changeset 45:d8635bb48c7c

Merge with SWT 3.5
author Jacob Carlborg <doob@me.com>
date Mon, 01 Dec 2008 17:07:00 +0100
parents ca5e494f2bbf
children cfa563df4fdd
files dwt-cocoa-bindings/bindings.h dwt-cocoa-bindings/bindings.m dwt/DWT.d dwt/DWTError.d dwt/DWTException.d dwt/accessibility/ACC.d dwt/accessibility/Accessible.d dwt/accessibility/AccessibleAdapter.d dwt/accessibility/AccessibleControlAdapter.d dwt/accessibility/AccessibleControlEvent.d dwt/accessibility/AccessibleControlListener.d dwt/accessibility/AccessibleEvent.d dwt/accessibility/AccessibleListener.d dwt/accessibility/AccessibleTextAdapter.d dwt/accessibility/AccessibleTextEvent.d dwt/accessibility/AccessibleTextListener.d dwt/accessibility/SWTAccessibleDelegate.d dwt/browser/AppFileLocProvider.d dwt/browser/Browser.d dwt/browser/CloseWindowListener.d dwt/browser/Download.d dwt/browser/DownloadFactory.d dwt/browser/DownloadFactory_1_8.d dwt/browser/Download_1_8.d dwt/browser/FilePicker.d dwt/browser/FilePickerFactory.d dwt/browser/FilePickerFactory_1_8.d dwt/browser/FilePicker_1_8.d dwt/browser/HelperAppLauncherDialog.d dwt/browser/HelperAppLauncherDialogFactory.d dwt/browser/HelperAppLauncherDialog_1_9.d dwt/browser/InputStream.d dwt/browser/LocationAdapter.d dwt/browser/LocationEvent.d dwt/browser/LocationListener.d dwt/browser/Mozilla.d dwt/browser/MozillaDelegate.d dwt/browser/OpenWindowListener.d dwt/browser/ProgressAdapter.d dwt/browser/ProgressEvent.d dwt/browser/ProgressListener.d dwt/browser/PromptDialog.d dwt/browser/PromptService2.d dwt/browser/PromptService2Factory.d dwt/browser/Safari.d dwt/browser/SimpleEnumerator.d dwt/browser/StatusTextEvent.d dwt/browser/StatusTextListener.d dwt/browser/TitleEvent.d dwt/browser/TitleListener.d dwt/browser/VisibilityWindowAdapter.d dwt/browser/VisibilityWindowListener.d dwt/browser/WebBrowser.d dwt/browser/WindowCreator2.d dwt/browser/WindowEvent.d dwt/dnd/ByteArrayTransfer.d dwt/dnd/Clipboard.d dwt/dnd/DND.d dwt/dnd/DNDEvent.d dwt/dnd/DNDListener.d dwt/dnd/DragSource.d dwt/dnd/DragSourceAdapter.d dwt/dnd/DragSourceEffect.d dwt/dnd/DragSourceEvent.d dwt/dnd/DragSourceListener.d dwt/dnd/DropTarget.d dwt/dnd/DropTargetAdapter.d dwt/dnd/DropTargetEffect.d dwt/dnd/DropTargetEvent.d dwt/dnd/DropTargetListener.d dwt/dnd/FileTransfer.d dwt/dnd/HTMLTransfer.d dwt/dnd/ImageTransfer.d dwt/dnd/RTFTransfer.d dwt/dnd/TableDragSourceEffect.d dwt/dnd/TableDropTargetEffect.d dwt/dnd/TextTransfer.d dwt/dnd/Transfer.d dwt/dnd/TransferData.d dwt/dnd/TreeDragSourceEffect.d dwt/dnd/TreeDropTargetEffect.d dwt/dnd/URLTransfer.d dwt/dwthelper/BufferedInputStream.d dwt/dwthelper/ByteArrayInputStream.d dwt/dwthelper/ByteArrayOutputStream.d dwt/dwthelper/File.d dwt/dwthelper/FileInputStream.d dwt/dwthelper/FileOutputStream.d dwt/dwthelper/InflaterInputStream.d dwt/dwthelper/InputStream.d dwt/dwthelper/OutputStream.d dwt/dwthelper/ResourceBundle.d dwt/dwthelper/Runnable.d dwt/dwthelper/System.d dwt/dwthelper/WeakHashMap.d dwt/dwthelper/WeakRef.d dwt/dwthelper/XmlTranscode.d dwt/dwthelper/utils.d dwt/events/ArmEvent.d dwt/events/ArmListener.d dwt/events/ControlAdapter.d dwt/events/ControlEvent.d dwt/events/ControlListener.d dwt/events/DisposeEvent.d dwt/events/DisposeListener.d dwt/events/DragDetectEvent.d dwt/events/DragDetectListener.d dwt/events/ExpandAdapter.d dwt/events/ExpandEvent.d dwt/events/ExpandListener.d dwt/events/FocusAdapter.d dwt/events/FocusEvent.d dwt/events/FocusListener.d dwt/events/HelpEvent.d dwt/events/HelpListener.d dwt/events/KeyAdapter.d dwt/events/KeyEvent.d dwt/events/KeyListener.d dwt/events/MenuAdapter.d dwt/events/MenuDetectEvent.d dwt/events/MenuDetectListener.d dwt/events/MenuEvent.d dwt/events/MenuListener.d dwt/events/ModifyEvent.d dwt/events/ModifyListener.d dwt/events/MouseAdapter.d dwt/events/MouseEvent.d dwt/events/MouseListener.d dwt/events/MouseMoveListener.d dwt/events/MouseTrackAdapter.d dwt/events/MouseTrackListener.d dwt/events/MouseWheelListener.d dwt/events/PaintEvent.d dwt/events/PaintListener.d dwt/events/SelectionAdapter.d dwt/events/SelectionEvent.d dwt/events/SelectionListener.d dwt/events/ShellAdapter.d dwt/events/ShellEvent.d dwt/events/ShellListener.d dwt/events/TraverseEvent.d dwt/events/TraverseListener.d dwt/events/TreeAdapter.d dwt/events/TreeEvent.d dwt/events/TypedEvent.d dwt/events/VerifyEvent.d dwt/events/VerifyListener.d dwt/graphics/Color.d dwt/graphics/Cursor.d dwt/graphics/Device.d dwt/graphics/DeviceData.d dwt/graphics/Drawable.d dwt/graphics/Font.d dwt/graphics/FontData.d dwt/graphics/FontMetrics.d dwt/graphics/GC.d dwt/graphics/GCData.d dwt/graphics/GlyphMetrics.d dwt/graphics/Image.d dwt/graphics/ImageData.d dwt/graphics/ImageDataLoader.d dwt/graphics/ImageLoader.d dwt/graphics/ImageLoaderEvent.d dwt/graphics/ImageLoaderListener.d dwt/graphics/LineAttributes.d dwt/graphics/PaletteData.d dwt/graphics/Path.d dwt/graphics/PathData.d dwt/graphics/Pattern.d dwt/graphics/Point.d dwt/graphics/RGB.d dwt/graphics/Rectangle.d dwt/graphics/Region.d dwt/graphics/Resource.d dwt/graphics/TextLayout.d dwt/graphics/TextStyle.d dwt/graphics/Transform.d dwt/internal/BidiUtil.d dwt/internal/C.d dwt/internal/CloneableCompatibility.d dwt/internal/Compatibility.d dwt/internal/DWTEventListener.d dwt/internal/DWTEventObject.d dwt/internal/LONG.d dwt/internal/Library.d dwt/internal/Lock.d dwt/internal/Platform.d dwt/internal/SerializableCompatibility.d dwt/internal/c/Carbon.d dwt/internal/c/bindings.d dwt/internal/c/carboncore/Gestalt.d dwt/internal/c/carboncore/MacTypes.d dwt/internal/c/carboncore/bindings.d dwt/internal/c/custom.d dwt/internal/c/gl.d dwt/internal/c/hiservices/Processes.d dwt/internal/c/hiservices/bindings.d dwt/internal/c/qd/Quickdraw.d dwt/internal/c/qd/QuickdrawTypes.d dwt/internal/c/qd/bindings.d dwt/internal/cocoa/CFNumberFormatter.d dwt/internal/cocoa/CFPropertyList.d dwt/internal/cocoa/CFRunLoopRef.d dwt/internal/cocoa/CGBase.d dwt/internal/cocoa/CGColorSpace.d dwt/internal/cocoa/CGEventTypes.d dwt/internal/cocoa/CGFloat.d dwt/internal/cocoa/CGPoint.d dwt/internal/cocoa/CGRect.d dwt/internal/cocoa/CGSize.d dwt/internal/cocoa/CIColor.d dwt/internal/cocoa/CIImage.d dwt/internal/cocoa/DOMDocument.d dwt/internal/cocoa/DOMEvent.d dwt/internal/cocoa/DOMKeyboardEvent.d dwt/internal/cocoa/DOMMouseEvent.d dwt/internal/cocoa/DOMUIEvent.d dwt/internal/cocoa/DOMWheelEvent.d dwt/internal/cocoa/IconRef.d dwt/internal/cocoa/MacGenerator.d dwt/internal/cocoa/NSATSTypesetter.d dwt/internal/cocoa/NSActionCell.d dwt/internal/cocoa/NSAffineTransform.d dwt/internal/cocoa/NSAffineTransformStruct.d dwt/internal/cocoa/NSAlert.d dwt/internal/cocoa/NSAnimation.d dwt/internal/cocoa/NSAnimationContext.d dwt/internal/cocoa/NSAppleEventDescriptor.d dwt/internal/cocoa/NSAppleEventManager.d dwt/internal/cocoa/NSAppleScript.d dwt/internal/cocoa/NSApplication.d dwt/internal/cocoa/NSArchiver.d dwt/internal/cocoa/NSArray.d dwt/internal/cocoa/NSArrayController.d dwt/internal/cocoa/NSAssertionHandler.d dwt/internal/cocoa/NSAttributedString.d dwt/internal/cocoa/NSAutoreleasePool.d dwt/internal/cocoa/NSBezierPath.d dwt/internal/cocoa/NSBitmapImageRep.d dwt/internal/cocoa/NSBox.d dwt/internal/cocoa/NSBrowser.d dwt/internal/cocoa/NSBrowserCell.d dwt/internal/cocoa/NSBundle.d dwt/internal/cocoa/NSButton.d dwt/internal/cocoa/NSButtonCell.d dwt/internal/cocoa/NSCIImageRep.d dwt/internal/cocoa/NSCachedImageRep.d dwt/internal/cocoa/NSCachedURLResponse.d dwt/internal/cocoa/NSCalendar.d dwt/internal/cocoa/NSCalendarDate.d dwt/internal/cocoa/NSCell.d dwt/internal/cocoa/NSCharacterSet.d dwt/internal/cocoa/NSClassDescription.d dwt/internal/cocoa/NSClipView.d dwt/internal/cocoa/NSCloneCommand.d dwt/internal/cocoa/NSCloseCommand.d dwt/internal/cocoa/NSCoder.d dwt/internal/cocoa/NSCollectionView.d dwt/internal/cocoa/NSCollectionViewItem.d dwt/internal/cocoa/NSColor.d dwt/internal/cocoa/NSColorList.d dwt/internal/cocoa/NSColorPanel.d dwt/internal/cocoa/NSColorPicker.d dwt/internal/cocoa/NSColorSpace.d dwt/internal/cocoa/NSColorWell.d dwt/internal/cocoa/NSComboBox.d dwt/internal/cocoa/NSComboBoxCell.d dwt/internal/cocoa/NSComparisonPredicate.d dwt/internal/cocoa/NSCompoundPredicate.d dwt/internal/cocoa/NSCondition.d dwt/internal/cocoa/NSConditionLock.d dwt/internal/cocoa/NSConnection.d dwt/internal/cocoa/NSControl.d dwt/internal/cocoa/NSController.d dwt/internal/cocoa/NSCountedSet.d dwt/internal/cocoa/NSCreateCommand.d dwt/internal/cocoa/NSCursor.d dwt/internal/cocoa/NSCustomImageRep.d dwt/internal/cocoa/NSData.d dwt/internal/cocoa/NSDate.d dwt/internal/cocoa/NSDateComponents.d dwt/internal/cocoa/NSDateFormatter.d dwt/internal/cocoa/NSDatePicker.d dwt/internal/cocoa/NSDatePickerCell.d dwt/internal/cocoa/NSDecimal.d dwt/internal/cocoa/NSDecimalNumber.d dwt/internal/cocoa/NSDecimalNumberHandler.d dwt/internal/cocoa/NSDeleteCommand.d dwt/internal/cocoa/NSDictionary.d dwt/internal/cocoa/NSDictionaryController.d dwt/internal/cocoa/NSDirectoryEnumerator.d dwt/internal/cocoa/NSDistantObject.d dwt/internal/cocoa/NSDistantObjectRequest.d dwt/internal/cocoa/NSDistributedLock.d dwt/internal/cocoa/NSDistributedNotificationCenter.d dwt/internal/cocoa/NSDockTile.d dwt/internal/cocoa/NSDocument.d dwt/internal/cocoa/NSDocumentController.d dwt/internal/cocoa/NSDrawer.d dwt/internal/cocoa/NSEPSImageRep.d dwt/internal/cocoa/NSEnumerator.d dwt/internal/cocoa/NSError.d dwt/internal/cocoa/NSEvent.d dwt/internal/cocoa/NSException.d dwt/internal/cocoa/NSExpression.d dwt/internal/cocoa/NSFileHandle.d dwt/internal/cocoa/NSFileManager.d dwt/internal/cocoa/NSFileWrapper.d dwt/internal/cocoa/NSFont.d dwt/internal/cocoa/NSFontDescriptor.d dwt/internal/cocoa/NSFontManager.d dwt/internal/cocoa/NSFontPanel.d dwt/internal/cocoa/NSForm.d dwt/internal/cocoa/NSFormCell.d dwt/internal/cocoa/NSFormatter.d dwt/internal/cocoa/NSGarbageCollector.d dwt/internal/cocoa/NSGlyphGenerator.d dwt/internal/cocoa/NSGlyphInfo.d dwt/internal/cocoa/NSGradient.d dwt/internal/cocoa/NSGraphicsContext.d dwt/internal/cocoa/NSHTTPCookie.d dwt/internal/cocoa/NSHTTPCookieStorage.d dwt/internal/cocoa/NSHTTPURLResponse.d dwt/internal/cocoa/NSHashEnumerator.d dwt/internal/cocoa/NSHashTable.d dwt/internal/cocoa/NSHashTableCallBacks.d dwt/internal/cocoa/NSHelpManager.d dwt/internal/cocoa/NSHost.d dwt/internal/cocoa/NSImage.d dwt/internal/cocoa/NSImageCell.d dwt/internal/cocoa/NSImageRep.d dwt/internal/cocoa/NSImageView.d dwt/internal/cocoa/NSIndexPath.d dwt/internal/cocoa/NSIndexSet.d dwt/internal/cocoa/NSIndexSpecifier.d dwt/internal/cocoa/NSInputManager.d dwt/internal/cocoa/NSInputServer.d dwt/internal/cocoa/NSInputStream.d dwt/internal/cocoa/NSInteger.d dwt/internal/cocoa/NSInvocation.d dwt/internal/cocoa/NSInvocationOperation.d dwt/internal/cocoa/NSKeyedArchiver.d dwt/internal/cocoa/NSKeyedUnarchiver.d dwt/internal/cocoa/NSLayoutManager.d dwt/internal/cocoa/NSLevelIndicator.d dwt/internal/cocoa/NSLevelIndicatorCell.d dwt/internal/cocoa/NSLocale.d dwt/internal/cocoa/NSLock.d dwt/internal/cocoa/NSLogicalTest.d dwt/internal/cocoa/NSMachBootstrapServer.d dwt/internal/cocoa/NSMachPort.d dwt/internal/cocoa/NSMapEnumerator.d dwt/internal/cocoa/NSMapTable.d dwt/internal/cocoa/NSMapTableKeyCallBacks.d dwt/internal/cocoa/NSMapTableValueCallBacks.d dwt/internal/cocoa/NSMatrix.d dwt/internal/cocoa/NSMenu.d dwt/internal/cocoa/NSMenuItem.d dwt/internal/cocoa/NSMenuItemCell.d dwt/internal/cocoa/NSMenuView.d dwt/internal/cocoa/NSMessagePortNameServer.d dwt/internal/cocoa/NSMetadataItem.d dwt/internal/cocoa/NSMetadataQuery.d dwt/internal/cocoa/NSMetadataQueryAttributeValueTuple.d dwt/internal/cocoa/NSMetadataQueryResultGroup.d dwt/internal/cocoa/NSMethodSignature.d dwt/internal/cocoa/NSMoveCommand.d dwt/internal/cocoa/NSMovie.d dwt/internal/cocoa/NSMovieView.d dwt/internal/cocoa/NSMutableArray.d dwt/internal/cocoa/NSMutableAttributedString.d dwt/internal/cocoa/NSMutableCharacterSet.d dwt/internal/cocoa/NSMutableData.d dwt/internal/cocoa/NSMutableDictionary.d dwt/internal/cocoa/NSMutableIndexSet.d dwt/internal/cocoa/NSMutableParagraphStyle.d dwt/internal/cocoa/NSMutableSet.d dwt/internal/cocoa/NSMutableString.d dwt/internal/cocoa/NSMutableURLRequest.d dwt/internal/cocoa/NSNameSpecifier.d dwt/internal/cocoa/NSNetService.d dwt/internal/cocoa/NSNetServiceBrowser.d dwt/internal/cocoa/NSNib.d dwt/internal/cocoa/NSNibConnector.d dwt/internal/cocoa/NSNibControlConnector.d dwt/internal/cocoa/NSNibOutletConnector.d dwt/internal/cocoa/NSNotification.d dwt/internal/cocoa/NSNotificationCenter.d dwt/internal/cocoa/NSNotificationQueue.d dwt/internal/cocoa/NSNull.d dwt/internal/cocoa/NSNumber.d dwt/internal/cocoa/NSNumberFormatter.d dwt/internal/cocoa/NSObject.d dwt/internal/cocoa/NSObjectController.d dwt/internal/cocoa/NSOpenGL.d dwt/internal/cocoa/NSOpenGLContext.d dwt/internal/cocoa/NSOpenGLPixelBuffer.d dwt/internal/cocoa/NSOpenGLPixelFormat.d dwt/internal/cocoa/NSOpenGLView.d dwt/internal/cocoa/NSOpenPanel.d dwt/internal/cocoa/NSOperation.d dwt/internal/cocoa/NSOperationQueue.d dwt/internal/cocoa/NSOutlineView.d dwt/internal/cocoa/NSOutputStream.d dwt/internal/cocoa/NSPDFImageRep.d dwt/internal/cocoa/NSPICTImageRep.d dwt/internal/cocoa/NSPageLayout.d dwt/internal/cocoa/NSPanel.d dwt/internal/cocoa/NSParagraphStyle.d dwt/internal/cocoa/NSPasteboard.d dwt/internal/cocoa/NSPathCell.d dwt/internal/cocoa/NSPathComponentCell.d dwt/internal/cocoa/NSPathControl.d dwt/internal/cocoa/NSPersistentDocument.d dwt/internal/cocoa/NSPipe.d dwt/internal/cocoa/NSPoint.d dwt/internal/cocoa/NSPointerArray.d dwt/internal/cocoa/NSPointerFunctions.d dwt/internal/cocoa/NSPopUpButton.d dwt/internal/cocoa/NSPopUpButtonCell.d dwt/internal/cocoa/NSPort.d dwt/internal/cocoa/NSPortCoder.d dwt/internal/cocoa/NSPortMessage.d dwt/internal/cocoa/NSPortNameServer.d dwt/internal/cocoa/NSPositionalSpecifier.d dwt/internal/cocoa/NSPredicate.d dwt/internal/cocoa/NSPredicateEditor.d dwt/internal/cocoa/NSPredicateEditorRowTemplate.d dwt/internal/cocoa/NSPrintInfo.d dwt/internal/cocoa/NSPrintOperation.d dwt/internal/cocoa/NSPrintPanel.d dwt/internal/cocoa/NSPrinter.d dwt/internal/cocoa/NSProcessInfo.d dwt/internal/cocoa/NSProgressIndicator.d dwt/internal/cocoa/NSPropertyListSerialization.d dwt/internal/cocoa/NSProtocolChecker.d dwt/internal/cocoa/NSProxy.d dwt/internal/cocoa/NSQuickDrawView.d dwt/internal/cocoa/NSQuitCommand.d dwt/internal/cocoa/NSRange.d dwt/internal/cocoa/NSRangeSpecifier.d dwt/internal/cocoa/NSRect.d dwt/internal/cocoa/NSRecursiveLock.d dwt/internal/cocoa/NSRelativeSpecifier.d dwt/internal/cocoa/NSResponder.d dwt/internal/cocoa/NSRuleEditor.d dwt/internal/cocoa/NSRulerMarker.d dwt/internal/cocoa/NSRulerView.d dwt/internal/cocoa/NSRunLoop.d dwt/internal/cocoa/NSSavePanel.d dwt/internal/cocoa/NSScanner.d dwt/internal/cocoa/NSScreen.d dwt/internal/cocoa/NSScriptClassDescription.d dwt/internal/cocoa/NSScriptCoercionHandler.d dwt/internal/cocoa/NSScriptCommand.d dwt/internal/cocoa/NSScriptCommandDescription.d dwt/internal/cocoa/NSScriptExecutionContext.d dwt/internal/cocoa/NSScriptObjectSpecifier.d dwt/internal/cocoa/NSScriptSuiteRegistry.d dwt/internal/cocoa/NSScriptWhoseTest.d dwt/internal/cocoa/NSScrollView.d dwt/internal/cocoa/NSScroller.d dwt/internal/cocoa/NSSearchField.d dwt/internal/cocoa/NSSearchFieldCell.d dwt/internal/cocoa/NSSecureTextField.d dwt/internal/cocoa/NSSecureTextFieldCell.d dwt/internal/cocoa/NSSegmentedCell.d dwt/internal/cocoa/NSSegmentedControl.d dwt/internal/cocoa/NSSet.d dwt/internal/cocoa/NSSetCommand.d dwt/internal/cocoa/NSShadow.d dwt/internal/cocoa/NSSize.d dwt/internal/cocoa/NSSlider.d dwt/internal/cocoa/NSSliderCell.d dwt/internal/cocoa/NSSocketPort.d dwt/internal/cocoa/NSSocketPortNameServer.d dwt/internal/cocoa/NSSortDescriptor.d dwt/internal/cocoa/NSSound.d dwt/internal/cocoa/NSSpecifierTest.d dwt/internal/cocoa/NSSpeechRecognizer.d dwt/internal/cocoa/NSSpeechSynthesizer.d dwt/internal/cocoa/NSSpellChecker.d dwt/internal/cocoa/NSSpellServer.d dwt/internal/cocoa/NSSplitView.d dwt/internal/cocoa/NSStatusBar.d dwt/internal/cocoa/NSStatusItem.d dwt/internal/cocoa/NSStepper.d dwt/internal/cocoa/NSStepperCell.d dwt/internal/cocoa/NSStream.d dwt/internal/cocoa/NSString.d dwt/internal/cocoa/NSSwappedDouble.d dwt/internal/cocoa/NSSwappedFloat.d dwt/internal/cocoa/NSTabView.d dwt/internal/cocoa/NSTabViewItem.d dwt/internal/cocoa/NSTableColumn.d dwt/internal/cocoa/NSTableHeaderCell.d dwt/internal/cocoa/NSTableHeaderView.d dwt/internal/cocoa/NSTableView.d dwt/internal/cocoa/NSTask.d dwt/internal/cocoa/NSText.d dwt/internal/cocoa/NSTextAttachment.d dwt/internal/cocoa/NSTextBlock.d dwt/internal/cocoa/NSTextContainer.d dwt/internal/cocoa/NSTextField.d dwt/internal/cocoa/NSTextFieldCell.d dwt/internal/cocoa/NSTextList.d dwt/internal/cocoa/NSTextStorage.d dwt/internal/cocoa/NSTextTab.d dwt/internal/cocoa/NSTextTable.d dwt/internal/cocoa/NSTextTableBlock.d dwt/internal/cocoa/NSTextView.d dwt/internal/cocoa/NSThread.d dwt/internal/cocoa/NSTimeInterval.d dwt/internal/cocoa/NSTimeZone.d dwt/internal/cocoa/NSTimer.d dwt/internal/cocoa/NSTokenField.d dwt/internal/cocoa/NSTokenFieldCell.d dwt/internal/cocoa/NSToolbar.d dwt/internal/cocoa/NSToolbarItem.d dwt/internal/cocoa/NSToolbarItemGroup.d dwt/internal/cocoa/NSTrackingArea.d dwt/internal/cocoa/NSTreeController.d dwt/internal/cocoa/NSTreeNode.d dwt/internal/cocoa/NSTypesetter.d dwt/internal/cocoa/NSURL.d dwt/internal/cocoa/NSURLAuthenticationChallenge.d dwt/internal/cocoa/NSURLCache.d dwt/internal/cocoa/NSURLConnection.d dwt/internal/cocoa/NSURLCredential.d dwt/internal/cocoa/NSURLCredentialStorage.d dwt/internal/cocoa/NSURLDownload.d dwt/internal/cocoa/NSURLHandle.d dwt/internal/cocoa/NSURLProtectionSpace.d dwt/internal/cocoa/NSURLProtocol.d dwt/internal/cocoa/NSURLRequest.d dwt/internal/cocoa/NSURLResponse.d dwt/internal/cocoa/NSUnarchiver.d dwt/internal/cocoa/NSUndoManager.d dwt/internal/cocoa/NSUniqueIDSpecifier.d dwt/internal/cocoa/NSUserDefaults.d dwt/internal/cocoa/NSUserDefaultsController.d dwt/internal/cocoa/NSValue.d dwt/internal/cocoa/NSValueTransformer.d dwt/internal/cocoa/NSView.d dwt/internal/cocoa/NSViewAnimation.d dwt/internal/cocoa/NSViewController.d dwt/internal/cocoa/NSWhoseSpecifier.d dwt/internal/cocoa/NSWindow.d dwt/internal/cocoa/NSWindowController.d dwt/internal/cocoa/NSWorkspace.d dwt/internal/cocoa/NSXMLDTD.d dwt/internal/cocoa/NSXMLDTDNode.d dwt/internal/cocoa/NSXMLDocument.d dwt/internal/cocoa/NSXMLElement.d dwt/internal/cocoa/NSXMLNode.d dwt/internal/cocoa/NSXMLParser.d dwt/internal/cocoa/NSZone.d dwt/internal/cocoa/OS.d dwt/internal/cocoa/Protocol.d dwt/internal/cocoa/SWTApplicationDelegate.d dwt/internal/cocoa/SWTBox.d dwt/internal/cocoa/SWTBrowserCell.d dwt/internal/cocoa/SWTButton.d dwt/internal/cocoa/SWTComboBox.d dwt/internal/cocoa/SWTDatePicker.d dwt/internal/cocoa/SWTDragSourceDelegate.d dwt/internal/cocoa/SWTImageView.d dwt/internal/cocoa/SWTMenu.d dwt/internal/cocoa/SWTMenuItem.d dwt/internal/cocoa/SWTOutlineView.d dwt/internal/cocoa/SWTPanelDelegate.d dwt/internal/cocoa/SWTPopUpButton.d dwt/internal/cocoa/SWTProgressIndicator.d dwt/internal/cocoa/SWTScrollView.d dwt/internal/cocoa/SWTScroller.d dwt/internal/cocoa/SWTSearchField.d dwt/internal/cocoa/SWTSecureTextField.d dwt/internal/cocoa/SWTSlider.d dwt/internal/cocoa/SWTStepper.d dwt/internal/cocoa/SWTTabView.d dwt/internal/cocoa/SWTTableHeaderCell.d dwt/internal/cocoa/SWTTableHeaderView.d dwt/internal/cocoa/SWTTableView.d dwt/internal/cocoa/SWTTextField.d dwt/internal/cocoa/SWTTextView.d dwt/internal/cocoa/SWTTreeItem.d dwt/internal/cocoa/SWTView.d dwt/internal/cocoa/SWTWebViewDelegate.d dwt/internal/cocoa/SWTWindow.d dwt/internal/cocoa/SWTWindowDelegate.d dwt/internal/cocoa/WebDataSource.d dwt/internal/cocoa/WebDocumentRepresentation.d dwt/internal/cocoa/WebFrame.d dwt/internal/cocoa/WebFrameView.d dwt/internal/cocoa/WebOpenPanelResultListener.d dwt/internal/cocoa/WebPolicyDecisionListener.d dwt/internal/cocoa/WebPreferences.d dwt/internal/cocoa/WebView.d dwt/internal/cocoa/gl.d dwt/internal/cocoa/id.d dwt/internal/cocoa/objc_super.d dwt/internal/image/FileFormat.d dwt/internal/image/GIFFileFormat.d dwt/internal/image/JPEGDecoder.d dwt/internal/image/JPEGFileFormat.d dwt/internal/image/LEDataInputStream.d dwt/internal/image/OS2BMPFileFormat.d dwt/internal/image/PNGFileFormat.d dwt/internal/image/PngEncoder.d dwt/internal/image/PngPlteChunk.d dwt/internal/image/TIFFFileFormat.d dwt/internal/image/WinBMPFileFormat.d dwt/internal/image/WinICOFileFormat.d dwt/internal/mozilla/XPCOM.d dwt/internal/mozilla/XPCOMObject.d dwt/internal/mozilla/init/GREVersionRange.d dwt/internal/mozilla/init/XPCOMInit.d dwt/internal/mozilla/nsEmbedString.d dwt/internal/mozilla/nsIAppShell.d dwt/internal/mozilla/nsIAuthInformation.d dwt/internal/mozilla/nsIBaseWindow.d dwt/internal/mozilla/nsICancelable.d dwt/internal/mozilla/nsICategoryManager.d dwt/internal/mozilla/nsIChannel.d dwt/internal/mozilla/nsIComponentManager.d dwt/internal/mozilla/nsIComponentRegistrar.d dwt/internal/mozilla/nsIContextMenuListener.d dwt/internal/mozilla/nsICookie.d dwt/internal/mozilla/nsICookieManager.d dwt/internal/mozilla/nsID.d dwt/internal/mozilla/nsIDOMEvent.d dwt/internal/mozilla/nsIDOMEventTarget.d dwt/internal/mozilla/nsIDOMKeyEvent.d dwt/internal/mozilla/nsIDOMMouseEvent.d dwt/internal/mozilla/nsIDOMSerializer.d dwt/internal/mozilla/nsIDOMSerializer_1_7.d dwt/internal/mozilla/nsIDOMUIEvent.d dwt/internal/mozilla/nsIDOMWindow.d dwt/internal/mozilla/nsIDOMWindowCollection.d dwt/internal/mozilla/nsIDirectoryService.d dwt/internal/mozilla/nsIDirectoryServiceProvider.d dwt/internal/mozilla/nsIDirectoryServiceProvider2.d dwt/internal/mozilla/nsIDocShell.d dwt/internal/mozilla/nsIDocShell_1_8.d dwt/internal/mozilla/nsIDocShell_1_9.d dwt/internal/mozilla/nsIDownload.d dwt/internal/mozilla/nsIDownload_1_8.d dwt/internal/mozilla/nsIEmbeddingSiteWindow.d dwt/internal/mozilla/nsIFactory.d dwt/internal/mozilla/nsIFile.d dwt/internal/mozilla/nsIFilePicker.d dwt/internal/mozilla/nsIFilePicker_1_8.d dwt/internal/mozilla/nsIHelperAppLauncher.d dwt/internal/mozilla/nsIHelperAppLauncherDialog.d dwt/internal/mozilla/nsIHelperAppLauncherDialog_1_9.d dwt/internal/mozilla/nsIHelperAppLauncher_1_8.d dwt/internal/mozilla/nsIHelperAppLauncher_1_9.d dwt/internal/mozilla/nsIIOService.d dwt/internal/mozilla/nsIInputStream.d dwt/internal/mozilla/nsIInterfaceRequestor.d dwt/internal/mozilla/nsIJSContextStack.d dwt/internal/mozilla/nsILocalFile.d dwt/internal/mozilla/nsIMemory.d dwt/internal/mozilla/nsIObserverService.d dwt/internal/mozilla/nsIPrefBranch.d dwt/internal/mozilla/nsIPrefLocalizedString.d dwt/internal/mozilla/nsIPrefService.d dwt/internal/mozilla/nsIProgressDialog.d dwt/internal/mozilla/nsIProgressDialog_1_8.d dwt/internal/mozilla/nsIPromptService.d dwt/internal/mozilla/nsIPromptService2.d dwt/internal/mozilla/nsIProperties.d dwt/internal/mozilla/nsIRequest.d dwt/internal/mozilla/nsIServiceManager.d dwt/internal/mozilla/nsISimpleEnumerator.d dwt/internal/mozilla/nsISupports.d dwt/internal/mozilla/nsISupportsWeakReference.d dwt/internal/mozilla/nsITooltipListener.d dwt/internal/mozilla/nsITransfer.d dwt/internal/mozilla/nsIURI.d dwt/internal/mozilla/nsIURIContentListener.d dwt/internal/mozilla/nsIWeakReference.d dwt/internal/mozilla/nsIWebBrowser.d dwt/internal/mozilla/nsIWebBrowserChrome.d dwt/internal/mozilla/nsIWebBrowserChromeFocus.d dwt/internal/mozilla/nsIWebBrowserFocus.d dwt/internal/mozilla/nsIWebNavigation.d dwt/internal/mozilla/nsIWebNavigationInfo.d dwt/internal/mozilla/nsIWebProgress.d dwt/internal/mozilla/nsIWebProgressListener.d dwt/internal/mozilla/nsIWebProgressListener2.d dwt/internal/mozilla/nsIWindowCreator.d dwt/internal/mozilla/nsIWindowCreator2.d dwt/internal/mozilla/nsIWindowWatcher.d dwt/internal/objc/appkit/AppKit.d dwt/internal/objc/appkit/NSAccessibility.d dwt/internal/objc/appkit/NSAttributedString.d dwt/internal/objc/appkit/NSGraphics.d dwt/internal/objc/appkit/bindings.d dwt/internal/objc/bindings.d dwt/internal/objc/cocoa/Cocoa.d dwt/internal/objc/cocoa/bindings.d dwt/internal/objc/coregraphics/CGRemoteOperation.d dwt/internal/objc/coregraphics/bindings.d dwt/internal/objc/foundation/Foundation.d dwt/internal/objc/foundation/NSGeometry.d dwt/internal/objc/foundation/NSHFSFileTypes.d dwt/internal/objc/foundation/NSRunLoop.d dwt/internal/objc/foundation/bindings.d dwt/internal/objc/runtime.d dwt/internal/theme/ButtonDrawData.d dwt/internal/theme/ComboDrawData.d dwt/internal/theme/DrawData.d dwt/internal/theme/ExpanderDrawData.d dwt/internal/theme/GroupDrawData.d dwt/internal/theme/ProgressBarDrawData.d dwt/internal/theme/RangeDrawData.d dwt/internal/theme/ScaleDrawData.d dwt/internal/theme/ScrollBarDrawData.d dwt/internal/theme/TabFolderDrawData.d dwt/internal/theme/TabItemDrawData.d dwt/internal/theme/Theme.d dwt/internal/theme/ToolBarDrawData.d dwt/internal/theme/ToolItemDrawData.d dwt/layout/FillLayout.d dwt/layout/FormAttachment.d dwt/layout/FormData.d dwt/layout/FormLayout.d dwt/layout/GridData.d dwt/layout/GridLayout.d dwt/layout/RowData.d dwt/layout/RowLayout.d dwt/opengl/GLCanvas.d dwt/opengl/GLData.d dwt/printing/PrintDialog.d dwt/printing/Printer.d dwt/printing/PrinterData.d dwt/program/Program.d dwt/widgets/Button.d dwt/widgets/Canvas.d dwt/widgets/Caret.d dwt/widgets/ColorDialog.d dwt/widgets/Combo.d dwt/widgets/Composite.d dwt/widgets/Control.d dwt/widgets/CoolBar.d dwt/widgets/CoolItem.d dwt/widgets/DateTime.d dwt/widgets/Decorations.d dwt/widgets/Dialog.d dwt/widgets/DirectoryDialog.d dwt/widgets/Display.d dwt/widgets/Event.d dwt/widgets/EventTable.d dwt/widgets/ExpandBar.d dwt/widgets/ExpandItem.d dwt/widgets/FileDialog.d dwt/widgets/FontDialog.d dwt/widgets/Group.d dwt/widgets/IME.d dwt/widgets/Item.d dwt/widgets/Label.d dwt/widgets/Layout.d dwt/widgets/Link.d dwt/widgets/List.d dwt/widgets/Listener.d dwt/widgets/Menu.d dwt/widgets/MenuItem.d dwt/widgets/MessageBox.d dwt/widgets/Monitor.d dwt/widgets/ProgressBar.d dwt/widgets/Sash.d dwt/widgets/Scale.d dwt/widgets/ScrollBar.d dwt/widgets/Scrollable.d dwt/widgets/Shell.d dwt/widgets/Slider.d dwt/widgets/Spinner.d dwt/widgets/Synchronizer.d dwt/widgets/TabFolder.d dwt/widgets/TabItem.d dwt/widgets/Table.d dwt/widgets/TableColumn.d dwt/widgets/TableItem.d dwt/widgets/Text.d dwt/widgets/ToolBar.d dwt/widgets/ToolItem.d dwt/widgets/ToolTip.d dwt/widgets/Tracker.d dwt/widgets/Tray.d dwt/widgets/TrayItem.d dwt/widgets/Tree.d dwt/widgets/TreeColumn.d dwt/widgets/TreeItem.d dwt/widgets/TypedListener.d dwt/widgets/Widget.d libdwt-cocoa-bindings.a
diffstat 767 files changed, 38448 insertions(+), 82487 deletions(-) [+]
line wrap: on
line diff
--- a/dwt-cocoa-bindings/bindings.h	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-//
-//  bindings.h
-//  dwt-cocoa-bindings
-//
-//  Created by doob on 8/24/08.
-//  Copyright 2008 Jacob Carlborg. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
-
-id DCB_NSDefaultRunLoopMode (void);
-
-id DCB_NSDeviceRGBColorSpace(void);
-id DCB_NSAccessibilityPositionAttribute (void);
-id DCB_NSAccessibilitySizeAttribute (void);
-id DCB_NSBackgroundColorAttributeName (void);
-id DCB_NSBaselineOffsetAttributeName (void);
-id DCB_NSDeviceResolution (void);
-id DCB_NSFontAttributeName (void);
-id DCB_NSForegroundColorAttributeName (void);
-id DCB_NSLinkAttributeName (void);
-id DCB_NSParagraphStyleAttributeName (void);
-id DCB_NSStrikethroughColorAttributeName (void);
-id DCB_NSStrikethroughStyleAttributeName (void);
-id DCB_NSUnderlineColorAttributeName (void);
-id DCB_NSUnderlineStyleAttributeName (void);
\ No newline at end of file
--- a/dwt-cocoa-bindings/bindings.m	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-//
-//  bindings.m
-//  dwt-cocoa-bindings
-//
-//  Created by doob on 8/24/08.
-//  Copyright 2008 Jacob Carlborg. All rights reserved.
-//
-
-#import "bindings.h"
-
-id DCB_NSDefaultRunLoopMode (void)
-{
-	return (id)NSDefaultRunLoopMode;
-}
-
-id DCB_NSDeviceRGBColorSpace(void)
-{
-	return (id)NSDeviceRGBColorSpace;
-}
-
-id DCB_NSAccessibilityPositionAttribute (void)
-{
-	return (id)NSAccessibilityPositionAttribute;
-}
-
-id DCB_NSAccessibilitySizeAttribute (void)
-{
-	return (id)NSAccessibilitySizeAttribute;
-}
-
-id DCB_NSBackgroundColorAttributeName (void)
-{
-	return (id)NSBackgroundColorAttributeName;
-}
-
-id DCB_NSBaselineOffsetAttributeName (void)
-{
-	return (id)NSBaselineOffsetAttributeName;
-}
-
-id DCB_NSDeviceResolution (void)
-{
-	return (id)NSDeviceResolution;
-}
-
-id DCB_NSFontAttributeName (void)
-{
-	return (id)NSFontAttributeName;
-}
-
-id DCB_NSForegroundColorAttributeName (void)
-{
-	return (id)NSForegroundColorAttributeName;
-}
-
-id DCB_NSLinkAttributeName (void)
-{
-	return (id)NSLinkAttributeName;
-}
-
-id DCB_NSParagraphStyleAttributeName (void)
-{
-	return (id)NSParagraphStyleAttributeName;
-}
-
-id DCB_NSStrikethroughColorAttributeName (void)
-{
-	return (id)NSStrikethroughColorAttributeName;
-}
-
-id DCB_NSStrikethroughStyleAttributeName (void)
-{
-	return (id)NSStrikethroughStyleAttributeName;
-}
-
-id DCB_NSUnderlineColorAttributeName (void)
-{
-	return (id)NSUnderlineColorAttributeName;
-}
-
-id DCB_NSUnderlineStyleAttributeName (void)
-{
-	return (id)NSUnderlineStyleAttributeName;
-}
--- a/dwt/DWT.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/DWT.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.DWT;
 
@@ -40,6 +40,8 @@
  * <em>HINT</em> may change from release to release, although we typically
  * will not withdraw support for a <em>HINT</em> once it is made available.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 /* NOTE:
@@ -414,7 +416,9 @@
      * @see dwt.widgets.Display#addFilter
      * @see dwt.widgets.Event
      * 
+     * @see dwt.custom.CCombo#addVerifyListener
      * @see dwt.widgets.Combo#addVerifyListener
+     * @see dwt.custom.StyledText#addVerifyListener
      * @see dwt.widgets.Text#addVerifyListener
      * @see dwt.events.VerifyListener#verifyText
      * @see dwt.events.VerifyEvent
@@ -3692,7 +3696,7 @@
 
     /**
      * Returns the DWT version number as an integer.
-     * Example: "DWT051" is 51
+     * Example: "SWT051" is 51
      *
      * @return the DWT version number
      */
@@ -3877,7 +3881,7 @@
          * to stop the compiler from inlining.
          */
         String platform = getPlatform();
-        if ("carbon".equals(platform)) { //$NON-NLS-1$
+    if ("carbon".equals (platform) || "cocoa".equals (platform)) { //$NON-NLS-1$ //$NON-NLS-2$
             MOD1 = COMMAND;
             MOD2 = SHIFT;
             MOD3 = ALT;
--- a/dwt/DWTError.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/DWTError.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,11 +29,11 @@
  * throwable that caused the problem (if this information is
  * available (i.e. it may be null)).
  * <p>
- * SWTErrors are thrown when something fails internally which
+ * DWTErrors are thrown when something fails internally which
  * either leaves DWT in an unknown state (eg. the o/s call to
  * remove an item from a list returns an error code) or when DWT
  * is left in a known-to-be-unrecoverable state (eg. it runs out
- * of callback resources). SWTErrors should not occur in typical
+ * of callback resources). DWTErrors should not occur in typical
  * programs, although "high reliability" applications should
  * still catch them.
  * </p><p>
@@ -45,6 +45,7 @@
  *
  * @see DWTException
  * @see DWT#error(int)
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public class DWTError : Error {
--- a/dwt/DWTException.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/DWTException.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,13 +29,14 @@
  * exception that caused the problem (if this information is
  * available (i.e. it may be null)).
  * <p>
- * SWTExceptions are thrown when something fails internally,
+ * DWTExceptions are thrown when something fails internally,
  * but DWT is left in a known stable state (eg. a widget call
  * was made from a non-u/i thread, or there is failure while
  * reading an Image because the source file was corrupt).
  * </p>
  *
  * @see DWTError
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public class DWTException : RuntimeException {
--- a/dwt/accessibility/ACC.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/ACC.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,13 +9,15 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.ACC;
 
 /**
  * Class ACC contains all the constants used in defining an
  * Accessible object.
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 2.0
  */
--- a/dwt/accessibility/Accessible.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/Accessible.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,13 +9,37 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.Accessible;
 
 import dwt.dwthelper.utils;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Vector;
+
+import dwt.DWT;
 import dwt.DWTException;
+import dwt.graphics.Point;
+import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSMutableArray;
+import dwt.internal.cocoa.NSNumber;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRange;
+import dwt.internal.cocoa.NSSize;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSValue;
+import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.id;
+import dwt.widgets.Composite;
 import dwt.widgets.Control;
+import dwt.widgets.Display;
+import dwt.widgets.Monitor;
+import dwt.widgets.Shell;
 
 import dwt.accessibility.AccessibleListener;
 import dwt.accessibility.AccessibleControlListener;
@@ -39,13 +63,55 @@
  * @see AccessibleEvent
  * @see AccessibleControlListener
  * @see AccessibleControlEvent
+ * @see <a href="http://www.eclipse.org/swt/snippets/#accessibility">Accessibility snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 2.0
  */
 public class Accessible {
+
+    static NSString[] baseAttributes = { 
+        OS.NSAccessibilityRoleAttribute,
+        OS.NSAccessibilityRoleDescriptionAttribute,
+        OS.NSAccessibilityHelpAttribute,
+        OS.NSAccessibilityFocusedAttribute,
+        OS.NSAccessibilityParentAttribute,
+        OS.NSAccessibilityChildrenAttribute,
+        OS.NSAccessibilityPositionAttribute,
+        OS.NSAccessibilitySizeAttribute,
+        OS.NSAccessibilityWindowAttribute,
+        OS.NSAccessibilityTopLevelUIElementAttribute
+    };
+
+    static NSString[] baseTextAttributes = {
+        OS.NSAccessibilityNumberOfCharactersAttribute,
+        OS.NSAccessibilitySelectedTextAttribute,
+        OS.NSAccessibilitySelectedTextRangeAttribute,
+        OS.NSAccessibilityInsertionPointLineNumberAttribute,
+        OS.NSAccessibilitySelectedTextRangesAttribute,
+        OS.NSAccessibilityVisibleCharacterRangeAttribute,
+        OS.NSAccessibilityValueAttribute,
+    };
+    
+    static NSString[] baseParameterizedAttributes = {
+        OS.NSAccessibilityStringForRangeParameterizedAttribute,
+        OS.NSAccessibilityRangeForLineParameterizedAttribute,
+    };
+    
+
+    NSMutableArray attributeNames = null;
+    NSMutableArray parameterizedAttributeNames = null;
+    NSMutableArray actionNames = null;
+
+    Vector accessibleListeners = new Vector();
+    Vector accessibleControlListeners = new Vector();
+    Vector accessibleTextListeners = new Vector ();
     Control control;
 
+    Map /*<Integer, SWTAccessibleDelegate>*/ children = new HashMap();
+    
     this (Control control) {
+    
         this.control = control;
     }
     
@@ -88,28 +154,9 @@
      * @see #removeAccessibleListener
      */
     public void addAccessibleListener (AccessibleListener listener) {
-    }
-
-    /**
-     * Removes the listener from the collection of listeners who will
-     * be notified when an accessible client asks for certain strings,
-     * such as name, description, help, or keyboard shortcut.
-     *
-     * @param listener the listener that should no longer be notified when the receiver
-     * is asked for a name, description, help, or keyboard shortcut string
-     *
-     * @exception IllegalArgumentException <ul>
-     *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
-     * </ul>
-     * @exception DWTException <ul>
-     *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
-     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
-     * </ul>
-     *
-     * @see AccessibleListener
-     * @see #addAccessibleListener
-     */
-    public void removeAccessibleListener (AccessibleListener listener) {
+        checkWidget();
+        if (listener is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
+        accessibleListeners.addElement(listener);
     }
 
     /**
@@ -133,29 +180,10 @@
      * @see AccessibleControlListener
      * @see #removeAccessibleControlListener
      */
-    public void addAccessibleControlListener (AccessibleControlListener listener) {
-    }
-
-    /**
-     * Removes the listener from the collection of listeners who will
-     * be notified when an accessible client asks for custom control
-     * specific information.
-     *
-     * @param listener the listener that should no longer be notified when the receiver
-     * is asked for custom control specific information
-     *
-     * @exception IllegalArgumentException <ul>
-     *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
-     * </ul>
-     * @exception DWTException <ul>
-     *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
-     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
-     * </ul>
-     *
-     * @see AccessibleControlListener
-     * @see #addAccessibleControlListener
-     */
-    public void removeAccessibleControlListener (AccessibleControlListener listener) {
+    public void addAccessibleControlListener(AccessibleControlListener listener) {
+        checkWidget();
+        if (listener is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
+        accessibleControlListeners.addElement(listener);
     }
 
     /**
@@ -182,6 +210,1053 @@
      * @since 3.0
      */
     public void addAccessibleTextListener (AccessibleTextListener listener) {
+        checkWidget ();
+        if (listener is null) DWT.error (DWT.ERROR_NULL_ARGUMENT);
+        accessibleTextListeners.addElement (listener);      
+    }
+    
+    public id internal_accessibilityActionDescription(NSString action, int childID) {
+        // TODO No action support for now.
+        return NSString.stringWith("");
+    }
+
+    public NSArray internal_accessibilityActionNames(int childID) {
+        // The supported action list depends on the role played by the control.
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.detail = -1;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getRole(event);
+        }
+
+        // No accessible listener is overriding the role of the control, so let Cocoa return the default set for the control.
+        if (event.detail is -1) {
+            return null;
+        }
+        
+        if ((childID is ACC.CHILDID_SELF) && (actionNames !is null)) {
+            return retainedAutoreleased(actionNames);
+        }
+        
+        NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(5);
+        
+        switch (event.detail) {
+        case ACC.ROLE_PUSHBUTTON:
+        case ACC.ROLE_RADIOBUTTON:
+        case ACC.ROLE_CHECKBUTTON:
+        case ACC.ROLE_TABITEM:
+            returnValue.addObject(OS.NSAccessibilityPressAction);
+            break;
+        }
+
+        switch (event.detail) {
+        case ACC.ROLE_COMBOBOX:
+            returnValue.addObject(OS.NSAccessibilityConfirmAction);
+            break;
+        }
+
+
+        if (childID is ACC.CHILDID_SELF) {
+            actionNames = returnValue;
+            actionNames.retain();
+            return retainedAutoreleased(actionNames);
+        } else {
+            // Caller must retain if they want to hold on to it.
+            return returnValue;
+        }
+    }
+
+    public NSArray internal_accessibilityAttributeNames(int childID) {
+        // The supported attribute set depends on the role played by the control.
+        // We may need to add or remove from the base set as needed.
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.detail = -1;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getRole(event);
+        }
+
+        // No accessible listener is overriding the role of the control, so let Cocoa
+        // return the default set for the control.
+        if (event.detail is -1)
+            return null;
+        
+        if ((childID is ACC.CHILDID_SELF) && (attributeNames !is null)) {
+            return retainedAutoreleased(attributeNames);
+        }
+        
+        NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(baseAttributes.length);
+
+        /* Add our list of supported attributes to the array.
+         * Make sure each attribute name is not already in the array before appending.
+         */
+        for (int i = 0; i < baseAttributes.length; i++) {
+            if (!returnValue.containsObject(baseAttributes[i])) {
+                returnValue.addObject(baseAttributes[i]);
+            }
+        }
+        
+        if (accessibleTextListeners.size() > 0) {
+            for (int i = 0; i < baseTextAttributes.length; i++) {
+                if (!returnValue.containsObject(baseTextAttributes[i])) {
+                    returnValue.addObject(baseTextAttributes[i]);
+                }
+            }
+        }
+        
+        // The following are expected to have a value (AXValue)
+        switch (event.detail) {
+        case ACC.ROLE_CHECKBUTTON:
+        case ACC.ROLE_RADIOBUTTON:
+        case ACC.ROLE_LABEL:
+        case ACC.ROLE_TABITEM:
+        case ACC.ROLE_TABFOLDER:
+            returnValue.addObject(OS.NSAccessibilityValueAttribute);
+            break;
+        }
+        
+        // The following are expected to report their enabled status (AXEnabled)
+        switch (event.detail) {
+        case ACC.ROLE_CHECKBUTTON:
+        case ACC.ROLE_RADIOBUTTON:
+        case ACC.ROLE_LABEL:
+        case ACC.ROLE_TABITEM:
+        case ACC.ROLE_PUSHBUTTON:
+        case ACC.ROLE_COMBOBOX:
+            returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+            break;
+        }
+        
+        // The following are expected to report a title (AXTitle)
+        switch (event.detail) {
+        case ACC.ROLE_CHECKBUTTON:
+        case ACC.ROLE_RADIOBUTTON:
+        case ACC.ROLE_PUSHBUTTON:
+        case ACC.ROLE_TABITEM:
+            returnValue.addObject(OS.NSAccessibilityTitleAttribute);
+            break;
+        }
+            
+        // Accessibility verifier says these attributes must be reported for combo boxes.
+        if (event.detail is ACC.ROLE_COMBOBOX) {
+            returnValue.addObject(OS.NSAccessibilityExpandedAttribute);
+        }
+        
+        // Accessibility verifier says these attributes must be reported for tab folders.
+        if (event.detail is ACC.ROLE_TABFOLDER) {
+            returnValue.addObject(OS.NSAccessibilityContentsAttribute);
+            returnValue.addObject(OS.NSAccessibilityTabsAttribute);
+        }
+
+        /*
+         * Only report back sub-roles when the DWT role maps to a sub-role.
+         */
+        if (event.detail !is -1) {
+            String osRole = roleToOs(event.detail);
+            
+            if (osRole.indexOf(':') is -1)
+                returnValue.removeObject(OS.NSAccessibilitySubroleAttribute);
+        }
+
+        /*
+         * Children never return their own children, so remove that attribute.
+         */
+        if (childID !is ACC.CHILDID_SELF) {
+            returnValue.removeObject(OS.NSAccessibilityChildrenAttribute);
+        }
+        
+        if (childID is ACC.CHILDID_SELF) {
+            attributeNames = returnValue;
+            attributeNames.retain();
+            return retainedAutoreleased(attributeNames);
+        } else {
+            // Caller must retain if necessary.
+            return returnValue;
+        }
+    }
+
+    public id internal_accessibilityAttributeValue(NSString attribute, int childID) {
+        if (attribute.isEqualToString(OS.NSAccessibilityRoleAttribute)) return getRoleAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilitySubroleAttribute)) return getSubroleAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityRoleDescriptionAttribute)) return getRoleDescriptionAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityExpandedAttribute)) return getExpandedAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityHelpAttribute)) return getHelpAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityTitleAttribute)) return getTitleAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityValueAttribute)) return getValueAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityEnabledAttribute)) return getEnabledAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityFocusedAttribute)) return getFocusedAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityParentAttribute)) return getParentAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityChildrenAttribute)) return getChildrenAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityContentsAttribute)) return getChildrenAttribute(childID);
+        // FIXME:  There's no specific API just for tabs, which won't include the buttons (if any.)
+        if (attribute.isEqualToString(OS.NSAccessibilityTabsAttribute)) return getTabsAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityWindowAttribute)) return getWindowAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityTopLevelUIElementAttribute)) return getTopLevelUIElementAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityPositionAttribute)) return getPositionAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilitySizeAttribute)) return getSizeAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityDescriptionAttribute)) return getDescriptionAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityNumberOfCharactersAttribute)) return getNumberOfCharactersAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilitySelectedTextAttribute)) return getSelectedTextAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilitySelectedTextRangeAttribute)) return getSelectedTextRangeAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityInsertionPointLineNumberAttribute)) return getInsertionPointLineNumberAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilitySelectedTextRangesAttribute)) return getSelectedTextRangesAttribute(childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityVisibleCharacterRangeAttribute)) return getVisibleCharacterRangeAttribute(childID);
+        
+        // If this object don't know how to get the value it's up to the control itself to return an attribute value.
+        return null;
+    }
+    
+    public id internal_accessibilityAttributeValue_forParameter(NSString attribute, id parameter, int childID) {
+        if (attribute.isEqualToString(OS.NSAccessibilityStringForRangeParameterizedAttribute)) return getStringForRangeAttribute(parameter, childID);
+        if (attribute.isEqualToString(OS.NSAccessibilityRangeForLineParameterizedAttribute)) return getRangeForLineParameterizedAttribute(parameter, childID);      
+        return null;
+    }
+
+    // Returns the UI Element that has the focus. You can assume that the search for the focus has already been narrowed down to the receiver.
+    // Override this method to do a deeper search with a UIElement - e.g. a NSMatrix would determine if one of its cells has the focus.
+    public id internal_accessibilityFocusedUIElement(int childID) {
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = ACC.CHILDID_MULTIPLE; // set to invalid value, to test if the application sets it in getFocus()
+        event.accessible = null;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getFocus(event);
+        }
+        
+        // The listener did not respond, so let Cocoa figure it out.
+        if (event.childID is ACC.CHILDID_MULTIPLE)
+            return null;
+        
+        /* The application can optionally answer an accessible. */
+        if (event.accessible !is null) {
+            return new id(OS.NSAccessibilityUnignoredAncestor(event.accessible.control.view.id));
+        }
+        
+        /* Or the application can answer a valid child ID, including CHILDID_SELF and CHILDID_NONE. */
+        if (event.childID is ACC.CHILDID_SELF || event.childID is ACC.CHILDID_NONE) {
+            return new id(OS.NSAccessibilityUnignoredAncestor(control.view.id));
+        }   
+
+        return new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(event.childID).id));
+    }
+
+    // Returns the deepest descendant of the UIElement hierarchy that contains the point. 
+    // You can assume the point has already been determined to lie within the receiver.
+    // Override this method to do deeper hit testing within a UIElement - e.g. a NSMatrix would test its cells. The point is bottom-left relative screen coordinates.
+    public id internal_accessibilityHitTest(NSPoint point, int childID) {
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.x = (int) point.x;
+        Monitor primaryMonitor = Display.getCurrent().getPrimaryMonitor();
+        event.y = (int) (primaryMonitor.getBounds().height - point.y);
+    
+        // Set an impossible value to determine if anything responded to the event.
+        event.childID = ACC.CHILDID_MULTIPLE;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getChildAtPoint(event);
+        }
+        
+        // The listener did not respond, so let Cocoa figure it out.
+        if (event.childID is ACC.CHILDID_MULTIPLE)
+            return null;
+        
+        if (event.accessible !is null) {
+            return new id(OS.NSAccessibilityUnignoredAncestor(event.accessible.control.view.id));
+        }
+    
+        if (event.childID is ACC.CHILDID_SELF || event.childID is ACC.CHILDID_NONE) {
+            return new id(OS.NSAccessibilityUnignoredAncestor(control.view.id));
+        }
+    
+        return new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(event.childID).id));
+    }
+
+    public bool internal_accessibilityIsAttributeSettable(NSString attribute, int childID) {
+        return false;
+    }
+
+    // Return YES if the UIElement doesn't show up to the outside world - i.e. its parent should return the UIElement's children as its own - cutting the UIElement out. E.g. NSControls are ignored when they are single-celled.
+    public bool internal_accessibilityIsIgnored(int childID) {
+        return false;
+    }
+
+    // parameterized attribute methods
+    public NSArray internal_accessibilityParameterizedAttributeNames(int childID) {
+
+        if ((childID is ACC.CHILDID_SELF) && (parameterizedAttributeNames !is null)) {
+            return retainedAutoreleased(parameterizedAttributeNames);
+        }
+
+        NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(4);
+
+        if (accessibleTextListeners.size() > 0) {
+            for (int i = 0; i < baseParameterizedAttributes.length; i++) {
+                if (!returnValue.containsObject(baseParameterizedAttributes[i])) {
+                    returnValue.addObject(baseParameterizedAttributes[i]);
+                }
+            }
+
+        }
+
+        if (childID is ACC.CHILDID_SELF) {
+            parameterizedAttributeNames = returnValue;
+            parameterizedAttributeNames.retain();
+            return retainedAutoreleased(parameterizedAttributeNames);
+        } else {
+            // Caller must retain if they want to keep it.
+            return returnValue;
+        }
+    }
+
+    public void internal_accessibilityPerformAction(NSString action, int childID) {
+        // TODO Auto-generated method stub
+        // No action support for now.
+    }
+
+    /**
+     * Returns the control for this Accessible object. 
+     *
+     * @return the receiver's control
+     * @since 3.0
+     */
+    public Control getControl() {
+        return control;
+    }
+
+    /**
+     * Invokes platform specific functionality to dispose an accessible object.
+     * <p>
+     * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+     * API for <code>Accessible</code>. It is marked public only so that it
+     * can be shared within the packages provided by DWT. It is not
+     * available on all platforms, and should never be called from
+     * application code.
+     * </p>
+     */
+    public void internal_dispose_Accessible() {
+        if (actionNames !is null) actionNames.release();
+        actionNames = null;
+        if (attributeNames !is null) attributeNames.release();
+        attributeNames = null;
+        if (parameterizedAttributeNames !is null) parameterizedAttributeNames.release();
+        parameterizedAttributeNames = null;
+        
+        Collection delegates = children.values();
+        Iterator iter = delegates.iterator();
+        while (iter.hasNext()) {
+            SWTAccessibleDelegate childDelegate = (SWTAccessibleDelegate)iter.next();
+            childDelegate.internal_dispose_SWTAccessibleDelegate();
+        }
+        
+        children.clear();
+    }
+    
+    id getExpandedAttribute(int childID) {
+        // TODO: May need to expand the API so the combo box state can be reported.
+        return NSNumber.numberWithBool(false);
+    }
+
+    id getHelpAttribute (int childID) {
+        id returnValue = null;
+        AccessibleEvent event = new AccessibleEvent(this);
+        event.childID = childID;
+        for (int i = 0; i < accessibleListeners.size(); i++) {
+            AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+            listener.getHelp(event);
+        }
+        
+        if (event.result !is null) {
+            returnValue = NSString.stringWith(event.result);
+        }
+        
+        return returnValue;
+    }
+    
+    NSString getRoleAttribute(int childID) {
+        NSString returnValue = null;
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.detail = -1;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getRole(event);
+        }
+        if (event.detail !is -1) {
+            String appRole = roleToOs (event.detail);
+            int index = appRole.indexOf(':');
+            if (index !is -1) appRole = appRole.substring(0, index);
+            returnValue = NSString.stringWith(appRole);
+        }
+
+        return returnValue;
+    }
+    
+    id getSubroleAttribute (int childID) {
+        id returnValue = null;
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.detail = -1;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getRole(event);
+        }
+        if (event.detail !is -1) {
+            String appRole = roleToOs (event.detail);
+            int index = appRole.indexOf(':');
+            if (index !is -1) {
+                appRole = appRole.substring(index + 1);
+                returnValue = NSString.stringWith(appRole);
+            }
+        }
+        return returnValue;
+    }
+    
+    id getRoleDescriptionAttribute (int childID) {
+        id returnValue = null;
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.detail = -1;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getRole(event);
+        }
+        if (event.detail !is -1) {
+            String appRole = roleToOs (event.detail);
+            String appSubrole = null;
+            int index = appRole.indexOf(':');
+            if (index !is -1) {
+                appSubrole = appRole.substring(index + 1);
+                appRole = appRole.substring(0, index);
+            }
+            NSString nsAppRole = NSString.stringWith(appRole);
+            NSString nsAppSubrole = null;
+            
+            if (appSubrole !is null) nsAppSubrole = NSString.stringWith(appSubrole);
+            returnValue = new NSString(OS.NSAccessibilityRoleDescription (((nsAppRole !is null) ? nsAppRole.id : 0), (nsAppSubrole !is null) ? nsAppSubrole.id : 0));
+        }
+        return returnValue;
+    }
+    
+    id getTitleAttribute (int childID) {
+        
+        id returnValue = null;//NSString.stringWith("");
+        
+        /*
+        * Feature of the Macintosh.  The text of a Label is returned in its value,
+        * not its title, so ensure that the role is not Label before asking for the title.
+        */
+        AccessibleControlEvent roleEvent = new AccessibleControlEvent(this);
+        roleEvent.childID = childID;
+        roleEvent.detail = -1;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getRole(roleEvent);
+        }
+        if (roleEvent.detail !is ACC.ROLE_LABEL) {
+            AccessibleEvent event = new AccessibleEvent(this);
+            event.childID = childID;
+            event.result = null;
+            for (int i = 0; i < accessibleListeners.size(); i++) {
+                AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+                listener.getName(event);
+            }
+            
+            if (event.result !is null)
+                returnValue = NSString.stringWith(event.result);
+        }
+        return returnValue;
+    }
+    
+    id getValueAttribute (int childID) {
+        id returnValue = null;
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.detail = -1;
+        event.result = null; //TODO: could pass the OS value to the app
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getRole(event);
+            listener.getValue(event);
+        }
+        int role = event.detail;
+        String value = event.result;
+
+        switch (role) {
+        case ACC.ROLE_RADIOBUTTON: // 1 = on, 0 = off
+        case ACC.ROLE_CHECKBUTTON: // 1 = checked, 0 = unchecked, 2 = mixed
+        case ACC.ROLE_SCROLLBAR: // numeric value representing the position of the scroller
+        case ACC.ROLE_SLIDER: // the value associated with the position of the slider thumb
+        case ACC.ROLE_PROGRESSBAR: // the value associated with the fill level of the progress bar
+            if (value !is null) {
+                try {
+                    int number = Integer.parseInt(value);
+                    returnValue = NSNumber.numberWithInt(number);
+                } catch (NumberFormatException ex) {
+                    if (value.equalsIgnoreCase("true")) {
+                        returnValue = NSNumber.numberWithBool(true);
+                    } else if (value.equalsIgnoreCase("false")) {
+                        returnValue = NSNumber.numberWithBool(false);
+                    }
+                }
+            } else {
+                returnValue = NSNumber.numberWithBool(false);
+            }
+            break;
+        case ACC.ROLE_TABFOLDER: // the accessibility object representing the currently selected tab item
+        case ACC.ROLE_TABITEM:  // 1 = selected, 0 = not selected
+            AccessibleControlEvent ace = new AccessibleControlEvent(this);
+            ace.childID = -4;
+            for (int i = 0; i < accessibleControlListeners.size(); i++) {
+                AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+                listener.getSelection(ace);
+            }
+            if (ace.childID >= ACC.CHILDID_SELF) {
+                if (role is ACC.ROLE_TABITEM) {
+                    returnValue = NSNumber.numberWithBool(ace.childID is childID);
+                } else {
+                    returnValue = new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(ace.childID).id));
+                }
+            } else {
+                returnValue = NSNumber.numberWithBool(false);               
+            }
+            break;
+        case ACC.ROLE_COMBOBOX: // text of the currently selected item
+        case ACC.ROLE_TEXT: // text in the text field
+            if (value !is null) returnValue = NSString.stringWith(value);
+            break;
+        case ACC.ROLE_LABEL: // text in the label
+            /* On a Mac, the 'value' of a label is the same as the 'name' of the label. */
+            AccessibleEvent e = new AccessibleEvent(this);
+            e.childID = childID;
+            e.result = null;
+            for (int i = 0; i < accessibleListeners.size(); i++) {
+                AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+                listener.getName(e);
+            }
+            if (e.result !is null) {
+                returnValue = NSString.stringWith(e.result);
+            } else {
+                if (value !is null) returnValue = NSString.stringWith(value);
+            }
+            break;
+        }
+        
+        return returnValue;
+    }
+    
+    id getEnabledAttribute (int childID) {
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.detail = -1;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getState(event);
+        }
+
+        return NSNumber.numberWithBool(control.isEnabled());
+    }
+    
+    id getFocusedAttribute (int childID) {
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = ACC.CHILDID_MULTIPLE; // set to invalid value, to test if the application sets it in getFocus()
+        event.accessible = null;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getFocus(event);
+        }
+
+        /* The application can optionally answer an accessible. */
+        // FIXME:
+//      if (event.accessible !is null) {
+//          bool hasFocus = (event.accessible.childID is childID) && (event.accessible.control is this.control);
+//          return NSNumber.numberWithBool(hasFocus);
+//      }
+        
+        /* Or the application can answer a valid child ID, including CHILDID_SELF and CHILDID_NONE. */
+        if (event.childID is ACC.CHILDID_SELF) {
+            bool hasFocus = (event.childID is childID);
+            return NSNumber.numberWithBool(hasFocus);
+        }
+        if (event.childID is ACC.CHILDID_NONE) {
+            return NSNumber.numberWithBool(false);
+        }
+        if (event.childID !is ACC.CHILDID_MULTIPLE) {
+            /* Other valid childID. */
+            return NSNumber.numberWithBool(event.childID is childID);
+        }
+
+        // Invalid childID at this point means the application did not implement getFocus, so 
+        // let the default handler return the native focus.
+        bool hasFocus = (this.control.view.window().firstResponder() is control.view);
+        return NSNumber.numberWithBool(hasFocus);
+    }
+    
+    id getParentAttribute (int childID) {
+        // Returning null here means 'let Cocoa figure it out.'
+        if (childID is ACC.CHILDID_SELF)
+            return null;
+        else
+            return new id(OS.NSAccessibilityUnignoredAncestor(control.view.id));
+    }
+    
+    id getChildrenAttribute (int childID) {
+        id returnValue = null;
+        if (childID is ACC.CHILDID_SELF) {
+            AccessibleControlEvent event = new AccessibleControlEvent(this);
+            event.childID = childID;
+            event.detail = -1; // set to impossible value to test if app resets
+            for (int i = 0; i < accessibleControlListeners.size(); i++) {
+                AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+                listener.getChildCount(event);
+            }
+            if (event.detail > 0) {
+                for (int i = 0; i < accessibleControlListeners.size(); i++) {
+                    AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+                    listener.getChildren(event);
+                }
+                Object [] appChildren = event.children;
+                if (appChildren !is null && appChildren.length > 0) {
+                    /* return an NSArray of NSAccessible objects. */
+                    NSMutableArray childArray = NSMutableArray.arrayWithCapacity(appChildren.length);
+
+                    for (int i = 0; i < appChildren.length; i++) {
+                        Object child = appChildren[i];
+                        if (child instanceof Integer) {
+                            id accChild = childIDToOs(((Integer)child).intValue());                         
+                            childArray.addObject(accChild);
+                        } else {
+                            childArray.addObject(((Accessible)child).control.view);
+                        }
+                    }
+
+                    returnValue = new id(OS.NSAccessibilityUnignoredChildren(childArray.id));
+                }
+            }
+        } else {
+            // Lightweight children have no children of their own.
+            // Don't return null if there are no children -- always return an empty array.
+            returnValue = NSArray.array();
+        }
+
+        // Returning null here means we want the control itself to determine its children. If the accessible listener
+        // implemented getChildCount/getChildren, references to those objects would have been returned above.
+        return returnValue;
+    }
+    
+    id getTabsAttribute (int childID) {
+        id returnValue = null;
+        if (childID is ACC.CHILDID_SELF) {
+            AccessibleControlEvent event = new AccessibleControlEvent(this);
+            event.childID = childID;
+            event.detail = -1; // set to impossible value to test if app resets
+            for (int i = 0; i < accessibleControlListeners.size(); i++) {
+                AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+                listener.getChildCount(event);
+            }
+            if (event.detail > 0) {
+                for (int i = 0; i < accessibleControlListeners.size(); i++) {
+                    AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+                    listener.getChildren(event);
+                }
+                Object [] appChildren = event.children;
+                if (appChildren !is null && appChildren.length > 0) {
+                    /* return an NSArray of NSAccessible objects. */
+                    NSMutableArray childArray = NSMutableArray.arrayWithCapacity(appChildren.length);
+
+                    for (int i = 0; i < appChildren.length; i++) {
+                        Object child = appChildren[i];
+                        if (child instanceof Integer) {
+                            int subChildID = ((Integer)child).intValue();
+                            event.childID = subChildID;
+                            event.detail = -1;
+                            for (int j = 0; j < accessibleControlListeners.size(); j++) {
+                                AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(j);
+                                listener.getRole(event);
+                            }
+                            
+                            if (event.detail is ACC.ROLE_TABITEM) {
+                                id accChild = childIDToOs(((Integer)child).intValue());                         
+                                childArray.addObject(accChild);
+                            }
+                        } else {
+                            childArray.addObject(((Accessible)child).control.view);
+                        }
+                    }
+
+                    returnValue = new id(OS.NSAccessibilityUnignoredChildren(childArray.id));
+                }
+            }
+        } else {
+            // Lightweight children have no children of their own.
+            // Don't return null if there are no children -- always return an empty array.
+            returnValue = NSArray.array();
+        }
+
+        // Returning null here means we want the control itself to determine its children. If the accessible listener
+        // implemented getChildCount/getChildren, references to those objects would have been returned above.
+        return returnValue;
+    }
+    
+    id getWindowAttribute (int childID) {
+        return control.view.window();
+    }
+    
+    id getTopLevelUIElementAttribute (int childID) {
+        return control.view.window();
+    }
+    
+    id getPositionAttribute (int childID) {
+        id returnValue = null;
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.width = -1;
+        
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getLocation(event);
+        }
+
+        Monitor primaryMonitor = Display.getCurrent().getPrimaryMonitor();
+        
+        NSPoint osPositionAttribute = new NSPoint ();
+        if (event.width !is -1) {
+            // The point returned is the lower-left coordinate of the widget in lower-left relative screen coordinates.
+            osPositionAttribute.x = event.x;
+            osPositionAttribute.y = primaryMonitor.getBounds().height - event.y - event.height;
+            returnValue = NSValue.valueWithPoint(osPositionAttribute);
+        } else {
+            if (childID !is ACC.CHILDID_SELF) {
+                Point pt = null;
+                Rectangle location = control.getBounds();
+
+                if (control.getParent() !is null)
+                    pt = control.getParent().toDisplay(location.x, location.y);
+                else 
+                    pt = ((Shell)control).toDisplay(location.x, location.y);
+
+                osPositionAttribute.x = pt.x;
+                osPositionAttribute.y = pt.y;
+                returnValue = NSValue.valueWithPoint(osPositionAttribute);
+            }
+        }
+        
+        return returnValue;
+    }
+    
+    id getSizeAttribute (int childID) {
+        id returnValue = null;
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.width = -1;
+
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getLocation(event);
+        }
+
+        NSSize controlSize = new NSSize ();
+        if (event.width !is -1) {
+            controlSize.width = event.width;
+            controlSize.height = event.height;
+            returnValue = NSValue.valueWithSize(controlSize);
+        } else {
+            if (childID !is ACC.CHILDID_SELF) {
+                controlSize.width = controlSize.height = 0;
+                returnValue = NSValue.valueWithSize(controlSize);
+            }
+        }
+        
+        return returnValue;
+    }
+    
+    id getDescriptionAttribute (int childID) {
+        AccessibleEvent event = new AccessibleEvent(this);
+        event.childID = childID;
+        event.result = null;
+        id returnValue = null;
+        for (int i = 0; i < accessibleListeners.size(); i++) {
+            AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+            listener.getDescription(event);
+        }
+
+        returnValue = (event.result !is null ? NSString.stringWith(event.result) : null);
+
+        // If no description was provided, try the name.
+        if (returnValue is null) {
+            if (control instanceof Composite) returnValue = NSString.stringWith("");
+        }
+
+        return returnValue;
+    }
+    
+    id getInsertionPointLineNumberAttribute (int childID) {
+        id returnValue = null;
+        AccessibleControlEvent controlEvent = new AccessibleControlEvent(this);
+        controlEvent.childID = childID;
+        controlEvent.result = null;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getValue(controlEvent);
+        }
+        AccessibleTextEvent textEvent = new AccessibleTextEvent(this);
+        textEvent.childID = childID;
+        textEvent.offset = -1;
+        for (int i = 0; i < accessibleTextListeners.size(); i++) {
+            AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+            listener.getCaretOffset(textEvent);
+        }
+        if (controlEvent.result !is null && textEvent.offset !is -1) {
+            int lineNumber = lineNumberForOffset (controlEvent.result, textEvent.offset);
+            returnValue = NSNumber.numberWithInt(lineNumber);
+        }
+        return returnValue;
+    }
+    
+    id getNumberOfCharactersAttribute (int childID) {
+        id returnValue = null;
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.result = null;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getValue(event);
+        }
+        String appValue = event.result;
+        if (appValue !is null) {
+            returnValue = NSNumber.numberWithInt(appValue.length());
+        }
+        return returnValue;
+    }
+    
+    id getRangeForLineParameterizedAttribute (id parameter, int childID) {
+        id returnValue = null;
+
+        // The parameter is an NSNumber with the line number.
+        NSNumber lineNumberObj = new NSNumber(parameter.id);        
+        int lineNumber = lineNumberObj.intValue();
+        System.out.println("Line number = " + lineNumber);
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.result = null;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getValue(event);
+        }
+        if (event.result !is null) {
+            NSRange range = rangeForLineNumber (lineNumber, event.result);
+            if (range.location !is -1) {
+                returnValue = NSValue.valueWithRange(range);
+            }
+        }
+        return returnValue;
+    }
+    
+    id getSelectedTextAttribute (int childID) {
+        id returnValue = NSString.stringWith("");
+        AccessibleTextEvent event = new AccessibleTextEvent(this);
+        event.childID = childID;
+        event.offset = -1;
+        event.length = -1;
+        for (int i = 0; i < accessibleTextListeners.size(); i++) {
+            AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+            listener.getSelectionRange(event);
+        }
+        int offset = event.offset;
+        int length = event.length;
+        if (offset !is -1 && length !is -1 && length !is 0) {  // TODO: do we need the && length !is 0 ?
+            AccessibleControlEvent event2 = new AccessibleControlEvent(this);
+            event2.childID = event.childID;
+            event2.result = null;
+            for (int i = 0; i < accessibleControlListeners.size(); i++) {
+                AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+                listener.getValue(event2);
+            }
+            String appValue = event2.result;
+            if (appValue !is null) {
+                returnValue = NSString.stringWith(appValue.substring(offset, offset + length));
+            }
+        }
+        return returnValue;
+    }
+    
+    id getSelectedTextRangeAttribute (int childID) {
+        id returnValue = null;
+        AccessibleTextEvent event = new AccessibleTextEvent(this);
+        event.childID = childID;
+        event.offset = -1;
+        event.length = 0;
+        for (int i = 0; i < accessibleTextListeners.size(); i++) {
+            AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+            listener.getSelectionRange(event);
+        }
+        if (event.offset !is -1) {
+            NSRange range = new NSRange();
+            range.location = event.offset;
+            range.length = event.length;
+            returnValue = NSValue.valueWithRange(range);
+        }
+        return returnValue;
+    }
+    
+    id getStringForRangeAttribute (id parameter, int childID) {
+        id returnValue = null;
+        
+        // Parameter is an NSRange wrapped in an NSValue. 
+        NSValue parameterObject = new NSValue(parameter.id);
+        NSRange range = parameterObject.rangeValue();       
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.result = null;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getValue(event);
+        }
+        String appValue = event.result;
+
+        if (appValue !is null) {
+            returnValue = NSString.stringWith(appValue.substring(range.location, range.location + range.length));
+        }
+
+        return returnValue;
+    }
+    
+    id getSelectedTextRangesAttribute (int childID) {
+        NSMutableArray returnValue = null; 
+        AccessibleTextEvent event = new AccessibleTextEvent(this);
+        event.childID = childID;
+        event.offset = -1;
+        event.length = 0;
+        
+        for (int i = 0; i < accessibleTextListeners.size(); i++) {
+            AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+            listener.getSelectionRange(event);
+        }
+        
+        if (event.offset !is -1) {
+            returnValue = NSMutableArray.arrayWithCapacity(1);
+            NSRange range = new NSRange();
+            range.location = event.offset;
+            range.length = event.length;
+            returnValue.addObject(NSValue.valueWithRange(range));
+        }
+        
+        return returnValue;
+    }
+    
+    id getVisibleCharacterRangeAttribute (int childID) {
+        AccessibleControlEvent event = new AccessibleControlEvent(this);
+        event.childID = childID;
+        event.result = null;
+        for (int i = 0; i < accessibleControlListeners.size(); i++) {
+            AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+            listener.getValue(event);
+        }
+        
+        NSRange range = new NSRange();
+
+        if (event.result !is null) {
+            range.location = 0;
+            range.length = event.result.length();
+        } else {
+            return null;
+//          range.location = range.length = 0;
+        }
+
+        return NSValue.valueWithRange(range);
+    }
+
+    int lineNumberForOffset (String text, int offset) {
+        int lineNumber = 1;
+        int length = text.length();
+        for (int i = 0; i < offset; i++) {
+            switch (text.charAt (i)) {
+                case '\r': 
+                    if (i + 1 < length) {
+                        if (text.charAt (i + 1) is '\n') ++i;
+                    }
+                    // FALL THROUGH
+                case '\n':
+                    lineNumber++;
+            }
+        }
+        return lineNumber;
+    }
+
+    NSRange rangeForLineNumber (int lineNumber, String text) {
+        NSRange range = new NSRange();
+        range.location = -1;
+        int line = 1;
+        int count = 0;
+        int length = text.length ();
+        for (int i = 0; i < length; i++) {
+            if (line is lineNumber) {
+                if (count is 0) {
+                    range.location = i;
+                }
+                count++;
+            }
+            if (line > lineNumber) break;
+            switch (text.charAt (i)) {
+                case '\r': 
+                    if (i + 1 < length && text.charAt (i + 1) is '\n') i++;
+                    // FALL THROUGH
+                case '\n':
+                    line++;
+            }
+        }
+        range.length = count;
+        return range;
+    }
+
+    /**
+     * Removes the listener from the collection of listeners who will
+     * be notified when an accessible client asks for certain strings,
+     * such as name, description, help, or keyboard shortcut.
+     *
+     * @param listener the listener that should no longer be notified when the receiver
+     * is asked for a name, description, help, or keyboard shortcut string
+     *
+     * @exception IllegalArgumentException <ul>
+     *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+     * </ul>
+     * @exception DWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+     * </ul>
+     *
+     * @see AccessibleListener
+     * @see #addAccessibleListener
+     */
+    public void removeAccessibleListener(AccessibleListener listener) {
+        checkWidget();
+        if (listener is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
+        accessibleListeners.removeElement(listener);
+    }
+
+    /**
+     * Removes the listener from the collection of listeners who will
+     * be notified when an accessible client asks for custom control
+     * specific information.
+     *
+     * @param listener the listener that should no longer be notified when the receiver
+     * is asked for custom control specific information
+     *
+     * @exception IllegalArgumentException <ul>
+     *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+     * </ul>
+     * @exception DWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+     * </ul>
+     *
+     * @see AccessibleControlListener
+     * @see #addAccessibleControlListener
+     */
+    public void removeAccessibleControlListener(AccessibleControlListener listener) {
+        checkWidget();
+        if (listener is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
+        accessibleControlListeners.removeElement(listener);
     }
 
     /**
@@ -206,18 +1281,17 @@
      * @since 3.0
      */
     public void removeAccessibleTextListener (AccessibleTextListener listener) {
+        checkWidget ();
+        if (listener is null) DWT.error (DWT.ERROR_NULL_ARGUMENT);
+        accessibleTextListeners.removeElement (listener);
     }
 
-    /**
-     * Returns the control for this Accessible object. 
-     *
-     * @return the receiver's control
-     * @since 3.0
-     */
-    public Control getControl () {
-        return control;
+    static NSArray retainedAutoreleased(NSArray inObject) {
+        id temp = inObject.retain();
+        id temp2 = new NSObject(temp.id).autorelease();
+        return new NSArray(temp2.id);
     }
-
+    
     /**
      * Sends a message to accessible clients that the child selection
      * within a custom container control has changed.
@@ -230,6 +1304,24 @@
      * @since 3.0
      */
     public void selectionChanged () {
+        checkWidget();
+        OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedChildrenChangedNotification.id);
+    }
+
+    /**
+     * Sends a message to accessible clients indicating that the focus
+     * has changed within a custom control.
+     *
+     * @param childID an identifier specifying a child of the control
+     * 
+     * @exception DWTException <ul>
+     *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+     * </ul>
+     */
+    public void setFocus(int childID) {
+        checkWidget();
+        OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilityFocusedUIElementChangedNotification.id);
     }
 
     /**
@@ -246,6 +1338,8 @@
      * @since 3.0
      */
     public void textCaretMoved (int index) {
+        checkWidget();
+        OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedTextChangedNotification.id);
     }
 
     /**
@@ -268,6 +1362,8 @@
      * @since 3.0
      */
     public void textChanged (int type, int startIndex, int length) {
+        checkWidget();
+        OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilityValueChangedNotification.id);
     }
 
     /**
@@ -282,46 +1378,124 @@
      * @since 3.0
      */
     public void textSelectionChanged () {
+        checkWidget();
+        OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedTextChangedNotification.id);
     }
+    
+    id childIDToOs(int childID) {
+        if (childID is ACC.CHILDID_SELF) {
+            return control.view;
+        }
 
-    /**
-     * Sends a message to accessible clients indicating that the focus
-     * has changed within a custom control.
-     *
-     * @param childID an identifier specifying a child of the control
-     * 
-     * @exception DWTException <ul>
-     *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
-     *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
-     * </ul>
-     */
-    public void setFocus (int childID) {
+        /* Check cache for childID, if found, return corresponding osChildID. */
+        SWTAccessibleDelegate childRef = (SWTAccessibleDelegate) children.get(new Integer(childID));
+        
+        if (childRef is null) {
+            childRef = new SWTAccessibleDelegate(this, childID);
+            children.put(new Integer(childID), childRef);
+        }
+        
+        return childRef;
     }
 
-    /**
-     * Invokes platform specific functionality to dispose an accessible object.
-     * <p>
-     * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
-     * API for <code>Accessible</code>. It is marked public only so that it
-     * can be shared within the packages provided by DWT. It is not
-     * available on all platforms, and should never be called from
-     * application code.
-     * </p>
-     */
-    public void internal_dispose_Accessible () {
+    NSString concatStringsAsRole(NSString str1, NSString str2) {
+        NSString returnValue = str1;
+        returnValue = returnValue.stringByAppendingString(NSString.stringWith(":"));
+        returnValue = returnValue.stringByAppendingString(str2);
+        return returnValue;
+    }   
+    
+    String roleToOs(int role) {
+        NSString nsReturnValue = null; //OS.NSAccessibilityUnknownRole;
+        
+        switch (role) {
+            case ACC.ROLE_CLIENT_AREA: nsReturnValue = OS.NSAccessibilityGroupRole; break;
+            case ACC.ROLE_WINDOW: nsReturnValue = OS.NSAccessibilityWindowRole; break;
+            case ACC.ROLE_MENUBAR: nsReturnValue = OS.NSAccessibilityMenuBarRole; break;
+            case ACC.ROLE_MENU: nsReturnValue = OS.NSAccessibilityMenuRole; break;
+            case ACC.ROLE_MENUITEM: nsReturnValue = OS.NSAccessibilityMenuItemRole; break;
+            case ACC.ROLE_SEPARATOR: nsReturnValue = OS.NSAccessibilitySplitterRole; break;
+            case ACC.ROLE_TOOLTIP: nsReturnValue = OS.NSAccessibilityHelpTagRole; break;
+            case ACC.ROLE_SCROLLBAR: nsReturnValue = OS.NSAccessibilityScrollBarRole; break;
+            case ACC.ROLE_DIALOG: nsReturnValue = concatStringsAsRole(OS.NSAccessibilityWindowRole, OS.NSAccessibilityDialogSubrole); break;
+            case ACC.ROLE_LABEL: nsReturnValue = OS.NSAccessibilityStaticTextRole; break;
+            case ACC.ROLE_PUSHBUTTON: nsReturnValue = OS.NSAccessibilityButtonRole; break;
+            case ACC.ROLE_CHECKBUTTON: nsReturnValue = OS.NSAccessibilityCheckBoxRole; break;
+            case ACC.ROLE_RADIOBUTTON: nsReturnValue = OS.NSAccessibilityRadioButtonRole; break;
+            case ACC.ROLE_COMBOBOX: nsReturnValue = OS.NSAccessibilityComboBoxRole; break;
+            case ACC.ROLE_TEXT: {
+                int style = control.getStyle();
+                
+                if ((style & DWT.MULTI) !is 0) {
+                    nsReturnValue = OS.NSAccessibilityTextAreaRole;
+                } else {
+                    nsReturnValue = OS.NSAccessibilityTextFieldRole;
+                }
+                
+                break;
+            }
+            case ACC.ROLE_TOOLBAR: nsReturnValue = OS.NSAccessibilityToolbarRole; break;
+            case ACC.ROLE_LIST: nsReturnValue = OS.NSAccessibilityOutlineRole; break;
+            case ACC.ROLE_LISTITEM: nsReturnValue = OS.NSAccessibilityStaticTextRole; break;
+            case ACC.ROLE_TABLE: nsReturnValue = OS.NSAccessibilityTableRole; break;
+            case ACC.ROLE_TABLECELL: nsReturnValue = concatStringsAsRole(OS.NSAccessibilityRowRole, OS.NSAccessibilityTableRowSubrole); break;
+            case ACC.ROLE_TABLECOLUMNHEADER: nsReturnValue = OS.NSAccessibilitySortButtonRole; break;
+            case ACC.ROLE_TABLEROWHEADER: nsReturnValue = concatStringsAsRole(OS.NSAccessibilityRowRole, OS.NSAccessibilityTableRowSubrole); break;
+            case ACC.ROLE_TREE: nsReturnValue = OS.NSAccessibilityOutlineRole; break;
+            case ACC.ROLE_TREEITEM: nsReturnValue = concatStringsAsRole(OS.NSAccessibilityOutlineRole, OS.NSAccessibilityOutlineRowSubrole); break;
+            case ACC.ROLE_TABFOLDER: nsReturnValue = OS.NSAccessibilityTabGroupRole; break;
+            case ACC.ROLE_TABITEM: nsReturnValue = OS.NSAccessibilityRadioButtonRole; break;
+            case ACC.ROLE_PROGRESSBAR: nsReturnValue = OS.NSAccessibilityProgressIndicatorRole; break;
+            case ACC.ROLE_SLIDER: nsReturnValue = OS.NSAccessibilitySliderRole; break;
+            case ACC.ROLE_LINK: nsReturnValue = OS.NSAccessibilityLinkRole; break;
+        }
+
+        return nsReturnValue.getString();
     }
 
-    /**
-     * Invokes platform specific functionality to handle a window message.
-     * <p>
-     * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
-     * API for <code>Accessible</code>. It is marked public only so that it
-     * can be shared within the packages provided by DWT. It is not
-     * available on all platforms, and should never be called from
-     * application code.
-     * </p>
-     */
-    public int internal_WM_GETOBJECT (int wParam, int lParam) {
-        return 0;
+    int osToRole(NSString osRole) {
+        if (osRole is null) return 0;
+        if (osRole.isEqualToString(OS.NSAccessibilityWindowRole)) return ACC.ROLE_WINDOW;
+        if (osRole.isEqualToString(OS.NSAccessibilityMenuBarRole)) return ACC.ROLE_MENUBAR;
+        if (osRole.isEqualToString(OS.NSAccessibilityMenuRole)) return ACC.ROLE_MENU;
+        if (osRole.isEqualToString(OS.NSAccessibilityMenuItemRole)) return ACC.ROLE_MENUITEM;
+        if (osRole.isEqualToString(OS.NSAccessibilitySplitterRole)) return ACC.ROLE_SEPARATOR;
+        if (osRole.isEqualToString(OS.NSAccessibilityHelpTagRole)) return ACC.ROLE_TOOLTIP;
+        if (osRole.isEqualToString(OS.NSAccessibilityScrollBarRole)) return ACC.ROLE_SCROLLBAR;
+        if (osRole.isEqualToString(OS.NSAccessibilityScrollAreaRole)) return ACC.ROLE_LIST;
+        if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityWindowRole, OS.NSAccessibilityDialogSubrole))) return ACC.ROLE_DIALOG;
+        if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityWindowRole, OS.NSAccessibilitySystemDialogSubrole))) return ACC.ROLE_DIALOG;
+        if (osRole.isEqualToString(OS.NSAccessibilityStaticTextRole)) return ACC.ROLE_LABEL;
+        if (osRole.isEqualToString(OS.NSAccessibilityButtonRole)) return ACC.ROLE_PUSHBUTTON;
+        if (osRole.isEqualToString(OS.NSAccessibilityCheckBoxRole)) return ACC.ROLE_CHECKBUTTON;
+        if (osRole.isEqualToString(OS.NSAccessibilityRadioButtonRole)) return ACC.ROLE_RADIOBUTTON;
+        if (osRole.isEqualToString(OS.NSAccessibilityComboBoxRole)) return ACC.ROLE_COMBOBOX;
+        if (osRole.isEqualToString(OS.NSAccessibilityTextFieldRole)) return ACC.ROLE_TEXT;
+        if (osRole.isEqualToString(OS.NSAccessibilityTextAreaRole)) return ACC.ROLE_TEXT;
+        if (osRole.isEqualToString(OS.NSAccessibilityToolbarRole)) return ACC.ROLE_TOOLBAR;
+        if (osRole.isEqualToString(OS.NSAccessibilityListRole)) return ACC.ROLE_LIST;
+        if (osRole.isEqualToString(OS.NSAccessibilityTableRole)) return ACC.ROLE_TABLE;
+        if (osRole.isEqualToString(OS.NSAccessibilityColumnRole)) return ACC.ROLE_TABLECOLUMNHEADER;
+        if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityButtonRole, OS.NSAccessibilitySortButtonRole))) return ACC.ROLE_TABLECOLUMNHEADER;
+        if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityRowRole, OS.NSAccessibilityTableRowSubrole))) return ACC.ROLE_TABLEROWHEADER;
+        if (osRole.isEqualToString(OS.NSAccessibilityOutlineRole)) return ACC.ROLE_TREE;
+        if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityOutlineRole, OS.NSAccessibilityOutlineRowSubrole))) return ACC.ROLE_TREEITEM;
+        if (osRole.isEqualToString(OS.NSAccessibilityTabGroupRole)) return ACC.ROLE_TABFOLDER;
+        if (osRole.isEqualToString(OS.NSAccessibilityProgressIndicatorRole)) return ACC.ROLE_PROGRESSBAR;
+        if (osRole.isEqualToString(OS.NSAccessibilitySliderRole)) return ACC.ROLE_SLIDER;
+        if (osRole.isEqualToString(OS.NSAccessibilityLinkRole)) return ACC.ROLE_LINK;
+        return ACC.ROLE_CLIENT_AREA;
     }
+    
+    /* checkWidget was copied from Widget, and rewritten to work in this package */
+    void checkWidget () {
+        if (!isValidThread ()) DWT.error (DWT.ERROR_THREAD_INVALID_ACCESS);
+        if (control.isDisposed ()) DWT.error (DWT.ERROR_WIDGET_DISPOSED);
+    }
+
+    /* isValidThread was copied from Widget, and rewritten to work in this package */
+    bool isValidThread () {
+        return control.getDisplay ().getThread () is Thread.currentThread ();
+    }
+
 }
--- a/dwt/accessibility/AccessibleAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleAdapter;
 
@@ -33,6 +33,7 @@
  *
  * @see AccessibleListener
  * @see AccessibleEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 2.0
  */
--- a/dwt/accessibility/AccessibleControlAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleControlAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleControlAdapter;
 
@@ -39,6 +39,7 @@
  *
  * @see AccessibleControlListener
  * @see AccessibleControlEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 2.0
  */
--- a/dwt/accessibility/AccessibleControlEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleControlEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleControlEvent;
 
@@ -33,6 +33,7 @@
  *
  * @see AccessibleControlListener
  * @see AccessibleControlAdapter
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 2.0
  */
--- a/dwt/accessibility/AccessibleControlListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleControlListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleControlListener;
 
--- a/dwt/accessibility/AccessibleEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleEvent;
 
@@ -30,6 +30,7 @@
  *
  * @see AccessibleListener
  * @see AccessibleAdapter
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 2.0
  */
@@ -62,10 +63,10 @@
     }
 
     /**
-     * Returns a String containing a concise, human-readable
+     * Returns a string containing a concise, human-readable
      * description of the receiver.
      *
-     * @return a String representation of the event
+     * @return a string representation of the event
      */
     public String toString () {
         return Format("AccessibleEvent {childID={}{}{}{}" , childID , " result=" , result , "}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
--- a/dwt/accessibility/AccessibleListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleListener;
 
--- a/dwt/accessibility/AccessibleTextAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleTextAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleTextAdapter;
 
@@ -39,6 +39,7 @@
  *
  * @see AccessibleTextListener
  * @see AccessibleTextEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.0
  */
--- a/dwt/accessibility/AccessibleTextEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleTextEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleTextEvent;
 
@@ -32,6 +32,7 @@
  *
  * @see AccessibleTextListener
  * @see AccessibleTextAdapter
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.0
  */
@@ -51,10 +52,10 @@
     }
 
     /**
-     * Returns a String containing a concise, human-readable
+     * Returns a string containing a concise, human-readable
      * description of the receiver.
      *
-     * @return a String representation of the event
+     * @return a string representation of the event
      */
     public String toString () {
         return Format("AccessibleTextEvent {childID={}{}{}{}{}{}" , childID , //$NON-NLS-1$
--- a/dwt/accessibility/AccessibleTextListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/accessibility/AccessibleTextListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.accessibility.AccessibleTextListener;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/accessibility/SWTAccessibleDelegate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+module dwt.accessibility.SWTAccessibleDelegate;
+
+import dwt.dwthelper.utils;
+
+
+import dwt.DWT;
+import dwt.internal.C;
+import dwt.internal.Callback;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.id;
+
+class SWTAccessibleDelegate extends NSObject {
+
+    /**
+     * Accessible Key: The string constant for looking up the accessible 
+     * for a control using <code>getData(String)</code>. When an accessible
+     * is created for a control, it is stored as a property in the control 
+     * using <code>setData(String, Object)</code>.
+     */
+    static final String ACCESSIBLE_KEY = "Accessible"; //$NON-NLS-1$
+    static final String DWT_OBJECT = "DWT_OBJECT";
+
+    static Callback accessible2Args, accessible3Args, accessible4Args;
+    static int /*long*/ proc2Args, proc3Args, proc4Args;
+
+    Accessible accessibleParent;
+    int /*long*/ delegateJniRef;
+    int childID;
+
+    NSArray attributeNames = null;
+    NSArray parameterizedAttributeNames = null;
+    NSArray actionNames = null;
+
+    static {
+        Class clazz = SWTAccessibleDelegate.class;
+
+        accessible2Args = new Callback(clazz, "accessibleProc", 2);
+        proc2Args = accessible2Args.getAddress();
+        if (proc2Args is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+
+        accessible3Args = new Callback(clazz, "accessibleProc", 3);
+        proc3Args = accessible3Args.getAddress();
+        if (proc3Args is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);        
+
+        accessible4Args = new Callback(clazz, "accessibleProc", 4);
+        proc4Args = accessible3Args.getAddress();
+        if (proc4Args is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);        
+
+        // Accessible custom controls need to implement the NSAccessibility protocol. To do that, 
+        // we dynamically add the methods to the control's class that are required 
+        // by NSAccessibility. Then, when external assistive technology services are used, 
+        // those methods get called to provide the needed information.
+
+        String className = "SWTAccessibleDelegate";
+
+        // TODO: These should either move out of Display or be accessible to this class.
+        String types = "*";
+        int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF is 4 ? 2 : 3;
+
+        int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+        OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+
+        // Add the NSAccessibility overrides
+        OS.class_addMethod(cls, OS.sel_accessibilityActionNames, proc2Args, "@:");
+        OS.class_addMethod(cls, OS.sel_accessibilityAttributeNames, proc2Args, "@:");
+        OS.class_addMethod(cls, OS.sel_accessibilityParameterizedAttributeNames, proc2Args, "@:");
+        OS.class_addMethod(cls, OS.sel_accessibilityIsIgnored, proc2Args, "@:");
+        OS.class_addMethod(cls, OS.sel_accessibilityFocusedUIElement, proc2Args, "@:");
+
+        OS.class_addMethod(cls, OS.sel_accessibilityAttributeValue_, proc3Args, "@:@");
+        OS.class_addMethod(cls, OS.sel_accessibilityHitTest_, proc3Args, "@:{NSPoint}");
+        OS.class_addMethod(cls, OS.sel_accessibilityIsAttributeSettable_, proc3Args, "@:@");
+        OS.class_addMethod(cls, OS.sel_accessibilityActionDescription_, proc3Args, "@:@");
+        OS.class_addMethod(cls, OS.sel_accessibilityPerformAction_, proc3Args, "@:@");
+
+        OS.class_addMethod(cls, OS.sel_accessibilityAttributeValue_forParameter_, proc4Args, "@:@@");
+        OS.class_addMethod(cls, OS.sel_accessibilitySetValue_forAttribute_, proc4Args, "@:@@");
+
+        OS.objc_registerClassPair(cls);
+    }
+
+
+    public SWTAccessibleDelegate(Accessible accessible, int childID) {
+        super(0);
+        this.accessibleParent = accessible;
+        this.childID = childID;
+        alloc().init();
+        delegateJniRef = OS.NewGlobalRef(this);
+        if (delegateJniRef is 0) DWT.error(DWT.ERROR_NO_HANDLES);
+        OS.object_setInstanceVariable(this.id, DWT_OBJECT, delegateJniRef);
+    }
+
+    NSArray accessibilityActionNames() {
+        
+        if (actionNames !is null)
+            return retainedAutoreleased(actionNames);
+        
+        actionNames = accessibleParent.internal_accessibilityActionNames(childID);
+        actionNames.retain();
+        return retainedAutoreleased(actionNames);
+    }
+
+    NSArray accessibilityAttributeNames() {
+        
+        if (attributeNames !is null)
+            return retainedAutoreleased(attributeNames);
+        
+        attributeNames = accessibleParent.internal_accessibilityAttributeNames(childID);
+        attributeNames.retain();
+        return retainedAutoreleased(attributeNames);
+    }
+
+    id accessibilityAttributeValue(NSString attribute) {
+        return accessibleParent.internal_accessibilityAttributeValue(attribute, childID);
+    }
+    
+    // parameterized attribute methods
+    NSArray accessibilityParameterizedAttributeNames() {
+        
+        if (parameterizedAttributeNames !is null)
+            return retainedAutoreleased(parameterizedAttributeNames);
+        
+        parameterizedAttributeNames = accessibleParent.internal_accessibilityParameterizedAttributeNames(childID);
+        parameterizedAttributeNames.retain();
+        return retainedAutoreleased(parameterizedAttributeNames);
+    }
+    
+    id accessibilityAttributeValue_forParameter(NSString attribute, id parameter) {
+        return accessibleParent.internal_accessibilityAttributeValue_forParameter(attribute, parameter, childID);
+    }
+
+    // Return YES if the UIElement doesn't show up to the outside world - i.e. its parent should return the UIElement's children as its own - cutting the UIElement out. E.g. NSControls are ignored when they are single-celled.
+    bool accessibilityIsIgnored() {
+        return accessibleParent.internal_accessibilityIsIgnored(childID);
+    }
+
+    bool accessibilityIsAttributeSettable(NSString attribute) {
+        return accessibleParent.internal_accessibilityIsAttributeSettable(attribute, childID);
+    }
+
+    // Returns the deepest descendant of the UIElement hierarchy that contains the point. You can assume the point has already been determined to lie within the receiver. Override this method to do deeper hit testing within a UIElement - e.g. a NSMatrix would test its cells. The point is bottom-left relative screen coordinates.
+    id accessibilityHitTest(NSPoint point) {
+        return accessibleParent.internal_accessibilityHitTest(point, childID);
+    }
+
+    // Returns the UI Element that has the focus. You can assume that the search for the focus has already been narrowed down to the reciever. Override this method to do a deeper search with a UIElement - e.g. a NSMatrix would determine if one of its cells has the focus.
+    id accessibilityFocusedUIElement() {
+        return accessibleParent.internal_accessibilityFocusedUIElement(childID);
+    }
+
+    void accessibilityPerformAction(NSString action) {
+        accessibleParent.internal_accessibilityPerformAction(action, childID);
+    }
+    
+    id accessibilityActionDescription(NSString action) {
+        return accessibleParent.internal_accessibilityActionDescription(action, childID);
+    }
+    
+    
+    void accessibilitySetValue_forAttribute(id value, NSString attribute) {
+        // This shouldn't be called!
+        System.out.println("Ignoring attribute: " + attribute.getString());
+    }
+    
+    static NSArray retainedAutoreleased(NSArray inObject) {
+        id temp = inObject.retain();
+        id temp2 = new NSObject(temp.id).autorelease();
+        return new NSArray(temp2.id);
+    }
+    
+    static int /*long*/ accessibleProc(int /*long*/ id, int /*long*/ sel) {
+        SWTAccessibleDelegate swtAcc = getAccessibleDelegate(id);
+        if (swtAcc is null) return 0;
+        
+        if (sel is OS.sel_accessibilityAttributeNames) {
+            NSArray retObject = swtAcc.accessibilityAttributeNames();
+            return (retObject is null ? 0 : retObject.id);
+        } else if (sel is OS.sel_accessibilityActionNames) {
+            NSArray retObject = swtAcc.accessibilityActionNames();
+            return (retObject is null ? 0 : retObject.id);
+        } else if (sel is OS.sel_accessibilityParameterizedAttributeNames) {
+            NSArray retObject = swtAcc.accessibilityParameterizedAttributeNames();
+            return (retObject is null ? 0 : retObject.id);
+        } else if (sel is OS.sel_accessibilityIsIgnored) {
+            bool retVal = swtAcc.accessibilityIsIgnored();
+            return (retVal ? 1 : 0);
+        } else if (sel is OS.sel_accessibilityFocusedUIElement) {
+            id retObject = swtAcc.accessibilityFocusedUIElement();
+            return (retObject is null ? 0 : retObject.id);
+        }
+
+        return 0;
+    }
+
+    static int /*long*/ accessibleProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+        SWTAccessibleDelegate swtAcc = getAccessibleDelegate(id);
+        if (swtAcc is null) return 0;
+        
+        if (sel is OS.sel_accessibilityAttributeValue_) {
+            NSString attribute = new NSString(arg0);
+            id retObject = swtAcc.accessibilityAttributeValue(attribute);
+            return (retObject is null ? 0 : retObject.id);
+        } else if (sel is OS.sel_accessibilityHitTest_) {
+            NSPoint point= new NSPoint();
+            OS.memmove(point, arg0, NSPoint.sizeof);
+            id retObject = swtAcc.accessibilityHitTest(point);
+            return (retObject is null ? 0 : retObject.id);
+        } else if (sel is OS.sel_accessibilityIsAttributeSettable_) {
+            NSString attribute = new NSString(arg0);
+            return (swtAcc.accessibilityIsAttributeSettable(attribute) ? 1 : 0);
+        } else if (sel is OS.sel_accessibilityActionDescription_) {
+            NSString action = new NSString(arg0);
+            id retObject = swtAcc.accessibilityActionDescription(action);
+            return (retObject is null ? 0 : retObject.id);
+        } else if (sel is OS.sel_accessibilityPerformAction_) {
+            NSString action = new NSString(arg0);
+            swtAcc.accessibilityPerformAction(action);
+        }
+
+        return 0;
+    }
+
+    static int /*long*/ accessibleProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+        SWTAccessibleDelegate swtAcc = getAccessibleDelegate(id);
+        if (swtAcc is null) return 0;
+        
+        if (sel is OS.sel_accessibilityAttributeValue_forParameter_) {
+            NSString attribute = new NSString(arg0);
+            id parameter = new id(arg1);
+            id retObject = swtAcc.accessibilityAttributeValue_forParameter(attribute, parameter);
+            return (retObject is null ? 0 : retObject.id);
+        } else if (sel is OS.sel_accessibilitySetValue_forAttribute_) {
+            id value = new id(arg0);
+            NSString attribute = new NSString(arg1);
+            swtAcc.accessibilitySetValue_forAttribute(value, attribute);
+        }
+
+        return 0;
+    }
+
+    static SWTAccessibleDelegate getAccessibleDelegate(int /*long*/ id) {
+        if (id is 0) return null;
+        int /*long*/ [] jniRef = new int /*long*/ [1];
+        OS.object_getInstanceVariable(id, DWT_OBJECT, jniRef);
+        if (jniRef[0] is 0) return null;
+        return (SWTAccessibleDelegate)OS.JNIGetObject(jniRef[0]);
+    }
+
+    public void internal_dispose_SWTAccessibleDelegate() {
+        if (actionNames !is null) actionNames.release();
+        actionNames = null;
+        if (attributeNames !is null) attributeNames.release();
+        attributeNames = null;
+        if (parameterizedAttributeNames !is null) parameterizedAttributeNames.release();
+        parameterizedAttributeNames = null;     
+    }
+
+}
--- a/dwt/browser/AppFileLocProvider.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/AppFileLocProvider.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
--- a/dwt/browser/Browser.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/Browser.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.Browser;
 
@@ -51,6 +51,10 @@
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
  * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#browser">Browser snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Examples: ControlExample, BrowserExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.0
  */
 
@@ -456,6 +460,19 @@
     public bool forward () {
         checkWidget();
         return webBrowser.forward();
+}
+
+/**
+ * Returns the type of native browser being used by this instance.
+ * Examples: "mozilla", "ie", "safari", "voyager"
+ *
+ * @return the type of the native browser
+ * 
+ * @since 3.5
+ */
+public String getBrowserType () {
+    checkWidget();
+    return webBrowser.getBrowserType ();
     }
 
     public int getStyle () {
--- a/dwt/browser/CloseWindowListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/CloseWindowListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.CloseWindowListener;
 
--- a/dwt/browser/Download.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/Download.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,12 @@
 import dwt.widgets.Listener;
 import dwt.widgets.Shell;
 
+/**
+ * This class implements the nsIDownload interface for mozilla
+ * versions 1.4 - 1.7.x.  For mozilla version 1.8.x this interface
+ * is implemented by class nsIDownload_1_8.  Later versions of
+ * mozilla do not need to call this interface. 
+ */
 class Download {
     XPCOMObject supports;
     XPCOMObject download;
@@ -199,7 +205,7 @@
     nsISupports supports = new nsISupports (aTarget);
     int /*long*/[] result = new int /*long*/[1];
     rc = supports.QueryInterface (nsIURI.NS_IURI_IID, result);
-    if (rc is 0) {  /* >= 1.7 */
+    if (rc is XPCOM.NS_OK) {    /* >= 1.7 */
         nsIURI target = new nsIURI (result[0]);
         result[0] = 0;
         int /*long*/ aPath = XPCOM.nsEmbedCString_new ();
@@ -241,17 +247,17 @@
         }
     };
     shell = new Shell (DWT.DIALOG_TRIM);
-    String msg = Compatibility.getMessage ("SWT_Download_File", new Object[] {filename}); //$NON-NLS-1$
+    String msg = Compatibility.getMessage ("DWT_Download_File", new Object[] {filename}); //$NON-NLS-1$
     shell.setText (msg);
     GridLayout gridLayout = new GridLayout ();
     gridLayout.marginHeight = 15;
     gridLayout.marginWidth = 15;
     gridLayout.verticalSpacing = 20;
     shell.setLayout(gridLayout);
-    msg = Compatibility.getMessage ("SWT_Download_Location", new Object[] {filename, url}); //$NON-NLS-1$
+    msg = Compatibility.getMessage ("DWT_Download_Location", new Object[] {filename, url}); //$NON-NLS-1$
     new Label (shell, DWT.SIMPLE).setText (msg);
     status = new Label (shell, DWT.SIMPLE);
-    msg = Compatibility.getMessage ("SWT_Download_Started"); //$NON-NLS-1$
+    msg = Compatibility.getMessage ("DWT_Download_Started"); //$NON-NLS-1$
     status.setText (msg);
     GridData data = new GridData ();
     data.grabExcessHorizontalSpace = true;
@@ -259,7 +265,7 @@
     status.setLayoutData (data);
 
     cancel = new Button (shell, DWT.PUSH);
-    cancel.setText (DWT.getMessage ("SWT_Cancel")); //$NON-NLS-1$
+    cancel.setText (DWT.getMessage ("DWT_Cancel")); //$NON-NLS-1$
     data = new GridData ();
     data.horizontalAlignment = GridData.CENTER;
     cancel.setLayoutData (data);
@@ -364,7 +370,7 @@
     int totalKBytes = aMaxTotalProgress / 1024;
     if (shell !is null && !shell.isDisposed ()) {
         Object[] arguments = {new Integer (currentKBytes), new Integer (totalKBytes)};
-        String statusMsg = Compatibility.getMessage ("SWT_Download_Status", arguments); //$NON-NLS-1$
+        String statusMsg = Compatibility.getMessage ("DWT_Download_Status", arguments); //$NON-NLS-1$
         status.setText (statusMsg);
         shell.layout (true);
         shell.getDisplay ().update ();
--- a/dwt/browser/DownloadFactory.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/DownloadFactory.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/DownloadFactory_1_8.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/DownloadFactory_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/Download_1_8.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/Download_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,12 @@
 import dwt.widgets.Listener;
 import dwt.widgets.Shell;
 
+/**
+ * This class implements the nsIDownload interface for mozilla
+ * version 1.8.x.  For mozilla versions 1.4 - 1.7.x this interface
+ * is implemented by class nsIDownload.  Mozilla versions later 
+ * than 1.8.x do not need to call this interface. 
+ */
 class Download_1_8 {
     XPCOMObject supports;
     XPCOMObject download;
@@ -258,17 +264,17 @@
         }
     };
     shell = new Shell (DWT.DIALOG_TRIM);
-    String msg = Compatibility.getMessage ("SWT_Download_File", new Object[] {filename}); //$NON-NLS-1$
+    String msg = Compatibility.getMessage ("DWT_Download_File", new Object[] {filename}); //$NON-NLS-1$
     shell.setText (msg);
     GridLayout gridLayout = new GridLayout ();
     gridLayout.marginHeight = 15;
     gridLayout.marginWidth = 15;
     gridLayout.verticalSpacing = 20;
     shell.setLayout (gridLayout);
-    msg = Compatibility.getMessage ("SWT_Download_Location", new Object[] {filename, url}); //$NON-NLS-1$
+    msg = Compatibility.getMessage ("DWT_Download_Location", new Object[] {filename, url}); //$NON-NLS-1$
     new Label (shell, DWT.SIMPLE).setText (msg);
     status = new Label (shell, DWT.SIMPLE);
-    msg = Compatibility.getMessage ("SWT_Download_Started"); //$NON-NLS-1$
+    msg = Compatibility.getMessage ("DWT_Download_Started"); //$NON-NLS-1$
     status.setText (msg);
     GridData data = new GridData ();
     data.grabExcessHorizontalSpace = true;
@@ -276,7 +282,7 @@
     status.setLayoutData (data);
     
     cancel = new Button (shell, DWT.PUSH);
-    cancel.setText (DWT.getMessage ("SWT_Cancel")); //$NON-NLS-1$
+    cancel.setText (DWT.getMessage ("DWT_Cancel")); //$NON-NLS-1$
     data = new GridData ();
     data.horizontalAlignment = GridData.CENTER;
     cancel.setLayoutData (data);
@@ -380,7 +386,7 @@
     long totalKBytes = aMaxTotalProgress / 1024;
     if (shell !is null && !shell.isDisposed ()) {
         Object[] arguments = {new Long (currentKBytes), new Long (totalKBytes)};
-        String statusMsg = Compatibility.getMessage ("SWT_Download_Status", arguments); //$NON-NLS-1$
+        String statusMsg = Compatibility.getMessage ("DWT_Download_Status", arguments); //$NON-NLS-1$
         status.setText (statusMsg);
         shell.layout (true);
         shell.getDisplay ().update ();
--- a/dwt/browser/FilePicker.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/FilePicker.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,12 +18,12 @@
 import dwt.internal.mozilla.XPCOMObject;
 import dwt.internal.mozilla.nsEmbedString;
 import dwt.internal.mozilla.nsID;
+import dwt.internal.mozilla.nsIDOMWindow;
 import dwt.internal.mozilla.nsIFilePicker;
 import dwt.internal.mozilla.nsIFilePicker_1_8;
 import dwt.internal.mozilla.nsILocalFile;
 import dwt.internal.mozilla.nsISupports;
 import dwt.widgets.DirectoryDialog;
-import dwt.widgets.Display;
 import dwt.widgets.FileDialog;
 import dwt.widgets.Shell;
 
@@ -124,6 +124,12 @@
     return refCount;
 }
 
+Browser getBrowser (int /*long*/ aDOMWindow) {
+    if (aDOMWindow is 0) return null;
+    nsIDOMWindow window = new nsIDOMWindow (aDOMWindow);
+    return Mozilla.findBrowser (window);
+}
+
 /*
  * As of Mozilla 1.8 some of nsIFilePicker's string arguments changed type.  This method
  * answers a java string based on the type of string that is appropriate for the Mozilla
@@ -153,10 +159,12 @@
     /* picking a file */
     int style = mode is nsIFilePicker.modeSave ? DWT.SAVE : DWT.OPEN;
     if (mode is nsIFilePicker.modeOpenMultiple) style |= DWT.MULTI;
-    Display display = Display.getCurrent ();
-    Shell parent = null; // TODO compute parent
-    if (parent is null) {
-        parent = new Shell (display);
+    Browser browser = getBrowser (parentHandle);
+    Shell parent = null;
+    if (browser !is null) {
+        parent = browser.getShell ();
+    } else {
+        parent = new Shell ();
     }
     FileDialog dialog = new FileDialog (parent, style);
     if (title !is null) dialog.setText (title);
@@ -174,10 +182,12 @@
 }
 
 int showDirectoryPicker () {
-    Display display = Display.getCurrent ();
-    Shell parent = null; // TODO compute parent
-    if (parent is null) {
-        parent = new Shell (display);
+    Browser browser = getBrowser (parentHandle);
+    Shell parent = null;
+    if (browser !is null) {
+        parent = browser.getShell ();
+    } else {
+        parent = new Shell ();
     }
     DirectoryDialog dialog = new DirectoryDialog (parent, DWT.NONE);
     if (title !is null) dialog.setText (title);
@@ -226,7 +236,7 @@
 }
 
 int GetDisplayDirectory (int /*long*/ aDisplayDirectory) {
-    String directoryName = directory !is null ? directory : "";  //$NON-NLS-1$
+    String directoryName = directory !is null ? directory : ""; //$NON-NLS-1$
     nsEmbedString path = new nsEmbedString (directoryName);
     int /*long*/[] file = new int /*long*/[1];
     int rc = XPCOM.NS_NewLocalFile (path.getAddress (), 1, file);
--- a/dwt/browser/FilePickerFactory.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/FilePickerFactory.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/FilePickerFactory_1_8.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/FilePickerFactory_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/FilePicker_1_8.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/FilePicker_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/HelperAppLauncherDialog.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/HelperAppLauncherDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,11 +21,16 @@
 import dwt.internal.mozilla.nsIHelperAppLauncher;
 import dwt.internal.mozilla.nsIHelperAppLauncherDialog;
 import dwt.internal.mozilla.nsIHelperAppLauncher_1_8;
-import dwt.internal.mozilla.nsIHelperAppLauncher_1_9;
 import dwt.internal.mozilla.nsISupports;
 import dwt.widgets.FileDialog;
 import dwt.widgets.Shell;
 
+/**
+ * This class implements the nsIHelperAppLauncherDialog interface for mozilla
+ * versions 1.4 - 1.8.x.  For mozilla versions >= 1.9 this interface is
+ * implemented by class HelperAppLauncherDialog_1_9.  HelperAppLauncherDialogFactory
+ * determines at runtime which of these classes to instantiate. 
+ */
 class HelperAppLauncherDialog {
     XPCOMObject supports;
     XPCOMObject helperAppLauncherDialog;
@@ -109,28 +114,19 @@
 
 int Show (int /*long*/ aLauncher, int /*long*/ aContext, int aReason) {
     /*
-    * The interface for nsIHelperAppLauncher changed in GRE versions 1.8 and 1.9.  Query for
-    * each of these interfaces in turn until one is found.
-    */
+     * The interface for nsIHelperAppLauncher changed as of mozilla 1.8.  Query the received
+     * nsIHelperAppLauncher for the new interface, and if it is not found then fall back to
+     * the old interface. 
+     */
     nsISupports supports = new nsISupports (aLauncher);
     int /*long*/[] result = new int /*long*/[1];
-    int rc = supports.QueryInterface (nsIHelperAppLauncher_1_9.NS_IHELPERAPPLAUNCHER_IID, result);
-    if (rc is 0) {
-        nsIHelperAppLauncher_1_9 helperAppLauncher = new nsIHelperAppLauncher_1_9 (aLauncher);
-        rc = helperAppLauncher.SaveToDisk (0, 0);
-        helperAppLauncher.Release ();
-        return rc;
-    }
-
-    result[0] = 0;
-    rc = supports.QueryInterface (nsIHelperAppLauncher_1_8.NS_IHELPERAPPLAUNCHER_IID, result);
-    if (rc is 0) {
+    int rc = supports.QueryInterface (nsIHelperAppLauncher_1_8.NS_IHELPERAPPLAUNCHER_IID, result);
+    if (rc is XPCOM.NS_OK) {    /* >= 1.8 */
         nsIHelperAppLauncher_1_8 helperAppLauncher = new nsIHelperAppLauncher_1_8 (aLauncher);
         rc = helperAppLauncher.SaveToDisk (0, 0);
         helperAppLauncher.Release ();
         return rc;
     }
-
     nsIHelperAppLauncher helperAppLauncher = new nsIHelperAppLauncher (aLauncher);  /* < 1.8 */
     return helperAppLauncher.SaveToDisk (0, 0);
 }
@@ -152,28 +148,20 @@
      * The interface for nsIHelperAppLauncher changed as of mozilla 1.8, so the first
      * argument must be queried for both the old and new nsIHelperAppLauncher interfaces. 
      */
-    bool using_1_8 = false, using_1_9 = false;
+    bool using_1_8 = false;
     nsISupports support = new nsISupports (arg0);
     int /*long*/[] result = new int /*long*/[1];
     int rc = support.QueryInterface (nsIHelperAppLauncher_1_8.NS_IHELPERAPPLAUNCHER_IID, result);
-    if (rc is 0) {
+    if (rc is XPCOM.NS_OK) {
         using_1_8 = true;
         hasLauncher = true;
         new nsISupports (result[0]).Release ();
     } else {
         result[0] = 0;
-        rc = support.QueryInterface (nsIHelperAppLauncher_1_9.NS_IHELPERAPPLAUNCHER_IID, result);
-        if (rc is 0) {
-            using_1_9 = true;
+        rc = support.QueryInterface (nsIHelperAppLauncher.NS_IHELPERAPPLAUNCHER_IID, result);
+        if (rc is XPCOM.NS_OK) {
             hasLauncher = true;
             new nsISupports (result[0]).Release ();
-        } else {
-            result[0] = 0;
-            rc = support.QueryInterface (nsIHelperAppLauncher.NS_IHELPERAPPLAUNCHER_IID, result);
-            if (rc is 0) {
-                hasLauncher = true;
-                new nsISupports (result[0]).Release ();
-            }
         }
     }
     result[0] = 0;
@@ -209,9 +197,6 @@
             if (using_1_8) {
                 nsIHelperAppLauncher_1_8 launcher = new nsIHelperAppLauncher_1_8 (arg0);
                 rc = launcher.Cancel (XPCOM.NS_BINDING_ABORTED);
-            } else if (using_1_9) {
-                nsIHelperAppLauncher_1_9 launcher = new nsIHelperAppLauncher_1_9 (arg0);
-                rc = launcher.Cancel (XPCOM.NS_BINDING_ABORTED);
             } else {
                 nsIHelperAppLauncher launcher = new nsIHelperAppLauncher (arg0);
                 rc = launcher.Cancel ();
--- a/dwt/browser/HelperAppLauncherDialogFactory.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/HelperAppLauncherDialogFactory.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -23,6 +23,7 @@
     XPCOMObject supports;
     XPCOMObject factory;
     int refCount = 0;
+    bool isPre_1_9 = true;
 
 this () {
     createCOMInterfaces ();
@@ -94,9 +95,15 @@
 /* nsIFactory */
 
 int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) {
-    HelperAppLauncherDialog helperAppLauncherDialog = new HelperAppLauncherDialog ();
-    helperAppLauncherDialog.AddRef ();
-    XPCOM.memmove (result, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF);
+    if (isPre_1_9) {
+        HelperAppLauncherDialog helperAppLauncherDialog = new HelperAppLauncherDialog ();
+        helperAppLauncherDialog.AddRef ();
+        XPCOM.memmove (result, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF);
+    } else {
+        HelperAppLauncherDialog_1_9 helperAppLauncherDialog = new HelperAppLauncherDialog_1_9 ();
+        helperAppLauncherDialog.AddRef ();
+        XPCOM.memmove (result, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF);
+    }
     return XPCOM.NS_OK;
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/browser/HelperAppLauncherDialog_1_9.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+module dwt.browser.HelperAppLauncherDialog_1_9;
+
+import dwt.dwthelper.utils;
+
+import dwt.DWT;
+import dwt.internal.C;
+import dwt.internal.mozilla.XPCOM;
+import dwt.internal.mozilla.XPCOMObject;
+import dwt.internal.mozilla.nsEmbedString;
+import dwt.internal.mozilla.nsID;
+import dwt.internal.mozilla.nsIHelperAppLauncherDialog_1_9;
+import dwt.internal.mozilla.nsIHelperAppLauncher_1_9;
+import dwt.internal.mozilla.nsISupports;
+import dwt.widgets.FileDialog;
+import dwt.widgets.Shell;
+
+/**
+ * This class implements the nsIHelperAppLauncherDialog interface for mozilla
+ * versions >= 1.9.  For mozilla versions 1.4 - 1.8.x this interface is
+ * implemented by class HelperAppLauncherDialog.  HelperAppLauncherDialogFactory
+ * determines at runtime which of these classes to instantiate. 
+ */
+class HelperAppLauncherDialog_1_9 {
+    XPCOMObject supports;
+    XPCOMObject helperAppLauncherDialog;
+    int refCount = 0;
+
+HelperAppLauncherDialog_1_9 () {
+    createCOMInterfaces ();
+}
+
+int AddRef () {
+    refCount++;
+    return refCount;
+}
+
+void createCOMInterfaces () {
+    /* Create each of the interfaces that this object implements */
+    supports = new XPCOMObject (new int[] {2, 0, 0}) {
+        public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);}
+        public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();}
+        public int /*long*/ method2 (int /*long*/[] args) {return Release ();}
+    };
+    
+    helperAppLauncherDialog = new XPCOMObject (new int[] {2, 0, 0, 3, 6}) {
+        public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);}
+        public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();}
+        public int /*long*/ method2 (int /*long*/[] args) {return Release ();}
+        public int /*long*/ method3 (int /*long*/[] args) {return Show (args[0], args[1], (int)/*64*/args[2]);}
+        public int /*long*/ method4 (int /*long*/[] args) {return PromptForSaveToFile (args[0], args[1], args[2], args[3], (int)/*64*/args[4], args[5]);}
+    };      
+}
+
+void disposeCOMInterfaces () {
+    if (supports !is null) {
+        supports.dispose ();
+        supports = null;
+    }   
+    if (helperAppLauncherDialog !is null) {
+        helperAppLauncherDialog.dispose ();
+        helperAppLauncherDialog = null; 
+    }
+}
+
+int /*long*/ getAddress () {
+    return helperAppLauncherDialog.getAddress ();
+}
+
+int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
+    if (riid is 0 || ppvObject is 0) return XPCOM.NS_ERROR_NO_INTERFACE;
+    nsID guid = new nsID ();
+    XPCOM.memmove (guid, riid, nsID.sizeof);
+
+    if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) {
+        XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF);
+        AddRef ();
+        return XPCOM.NS_OK;
+    }
+    if (guid.Equals (nsIHelperAppLauncherDialog_1_9.NS_IHELPERAPPLAUNCHERDIALOG_IID)) {
+        XPCOM.memmove (ppvObject, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF);
+        AddRef ();
+        return XPCOM.NS_OK;
+    }
+
+    XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF);
+    return XPCOM.NS_ERROR_NO_INTERFACE;
+}
+            
+int Release () {
+    refCount--;
+    /*
+    * Note.  This instance lives as long as the download it is bound to.
+    * Its reference count is expected to go down to 0 when the download
+    * has completed or when it has been cancelled. E.g. when the user
+    * cancels the File Dialog, cancels or closes the Download Dialog
+    * and when the Download Dialog goes away after the download is completed.
+    */
+    if (refCount is 0) disposeCOMInterfaces ();
+    return refCount;
+}
+
+/* nsIHelperAppLauncherDialog */
+
+int Show (int /*long*/ aLauncher, int /*long*/ aContext, int aReason) {
+    nsIHelperAppLauncher_1_9 helperAppLauncher = new nsIHelperAppLauncher_1_9 (aLauncher);
+    return helperAppLauncher.SaveToDisk (0, 0);
+}
+
+int PromptForSaveToFile (int /*long*/ aLauncher, int /*long*/ aWindowContext, int /*long*/ aDefaultFileName, int /*long*/ aSuggestedFileExtension, int aForcePrompt, int /*long*/ _retval) {
+    int length = XPCOM.strlen_PRUnichar (aDefaultFileName);
+    char[] dest = new char[length];
+    XPCOM.memmove (dest, aDefaultFileName, length * 2);
+    String defaultFile = new String (dest);
+
+    length = XPCOM.strlen_PRUnichar (aSuggestedFileExtension);
+    dest = new char[length];
+    XPCOM.memmove (dest, aSuggestedFileExtension, length * 2);
+    String suggestedFileExtension = new String (dest);
+
+    Shell shell = new Shell ();
+    FileDialog fileDialog = new FileDialog (shell, DWT.SAVE);
+    fileDialog.setFileName (defaultFile);
+    fileDialog.setFilterExtensions (new String[] {suggestedFileExtension});
+    String name = fileDialog.open ();
+    shell.close ();
+    if (name is null) {
+        nsIHelperAppLauncher_1_9 launcher = new nsIHelperAppLauncher_1_9 (aLauncher);
+        int rc = launcher.Cancel (XPCOM.NS_BINDING_ABORTED);
+        if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
+        return XPCOM.NS_ERROR_FAILURE;
+    }
+    nsEmbedString path = new nsEmbedString (name);
+    int /*long*/[] result = new int /*long*/[1];
+    int rc = XPCOM.NS_NewLocalFile (path.getAddress (), 1, result);
+    path.dispose ();
+    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
+    if (result[0] is 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER);
+    /* Our own nsIDownload has been registered during the Browser initialization. It will be invoked by Mozilla. */
+    XPCOM.memmove (_retval, result, C.PTR_SIZEOF);  
+    return XPCOM.NS_OK;
+}
+}
--- a/dwt/browser/InputStream.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/InputStream.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/LocationAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/LocationAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.LocationAdapter;
 
@@ -26,13 +26,15 @@
  * interested in.
  * </p>
  * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.0
  */
 public abstract class LocationAdapter : LocationListener {
 
-    public void changing (LocationEvent event) {
-    }
+public void changing(LocationEvent event) {
+}
 
-    public void changed (LocationEvent event) {
-    }
+public void changed(LocationEvent event) {
 }
+}
--- a/dwt/browser/LocationEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/LocationEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.LocationEvent;
 
@@ -26,6 +26,8 @@
  * {@link Browser#setUrl(String)} or when the user activates a
  * hyperlink.
  * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.0
  */
 public class LocationEvent : TypedEvent {
@@ -46,19 +48,19 @@
 
     static final long serialVersionUID = 3906644198244299574L;
 
-    this (Widget w) {
-        super(w);
-    }
+this (Widget w) {
+    super(w);
+}
 
-    /**
-     * Returns a String containing a concise, human-readable
-     * description of the receiver.
-     *
-     * @return a String representation of the event
-     */
-    public String toString () {
-        String String = super.toString();
-        return String.substring(0, String.length() - 1) // remove trailing '}'
-        + " location=" + location + " top=" + top + " doit=" + doit + "}";
-    }
+/**
+ * Returns a String containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a String representation of the event
+ */
+public String toString () {
+    String str = super.toString();
+    return str.substring(0, str.length() - 1) // remove trailing '}'
+     + " location=" + location + " top=" + top + " doit=" + doit + "}";
 }
+}
--- a/dwt/browser/LocationListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/LocationListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.LocationListener;
 
--- a/dwt/browser/Mozilla.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/Mozilla.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,9 +29,7 @@
 import dwt.internal.Compatibility;
 import dwt.internal.LONG;
 import dwt.internal.Library;
-import dwt.internal.mozilla.GREVersionRange;
 import dwt.internal.mozilla.XPCOM;
-import dwt.internal.mozilla.XPCOMInit;
 import dwt.internal.mozilla.XPCOMObject;
 import dwt.internal.mozilla.nsEmbedString;
 import dwt.internal.mozilla.nsIAppShell;
@@ -83,6 +81,8 @@
 import dwt.internal.mozilla.nsIWebProgress;
 import dwt.internal.mozilla.nsIWebProgressListener;
 import dwt.internal.mozilla.nsIWindowWatcher;
+import dwt.internal.mozilla.init.GREVersionRange;
+import dwt.internal.mozilla.init.XPCOMInit;
 import dwt.layout.FillLayout;
 import dwt.widgets.Composite;
 import dwt.widgets.Display;
@@ -223,7 +223,7 @@
 
 public void create (Composite parent, int style) {
     delegate = new MozillaDelegate (browser);
-    Display display = parent.getDisplay ();
+    final Display display = parent.getDisplay ();
 
     int /*long*/[] result = new int /*long*/[1];
     if (!Initialized) {
@@ -332,10 +332,37 @@
                     byte[] path = MozillaDelegate.wcsToMbcs (null, mozillaPath, true);
                     rc = XPCOMInit.XPCOMGlueStartup (path);
                     if (rc !is XPCOM.NS_OK) {
-                        IsXULRunner = false;    /* failed */
                         mozillaPath = mozillaPath.substring (0, mozillaPath.lastIndexOf cast(SEPARATOR_OS));
                         if (Device.DEBUG) System.out.println ("cannot use detected XULRunner: " + mozillaPath); //$NON-NLS-1$
-                    } else {
+
+                        /* attempt to XPCOMGlueStartup the GRE pointed at by MOZILLA_FIVE_HOME */
+                        int /*long*/ ptr = C.getenv (MozillaDelegate.wcsToMbcs (null, XPCOM.MOZILLA_FIVE_HOME, true));
+                        if (ptr is 0) {
+                            IsXULRunner = false;
+                        } else {
+                            length = C.strlen (ptr);
+                            byte[] buffer = new byte[length];
+                            C.memmove (buffer, ptr, length);
+                            mozillaPath = new String (MozillaDelegate.mbcsToWcs (null, buffer));
+                            /*
+                             * Attempting to XPCOMGlueStartup a mozilla-based GRE !is xulrunner can
+                             * crash, so don't attempt unless the GRE appears to be xulrunner.
+                             */
+                            if (mozillaPath.indexOf("xulrunner") is -1) { //$NON-NLS-1$
+                                IsXULRunner = false;    
+                            } else {
+                                mozillaPath += SEPARATOR_OS + delegate.getLibraryName ();
+                                path = MozillaDelegate.wcsToMbcs (null, mozillaPath, true);
+                                rc = XPCOMInit.XPCOMGlueStartup (path);
+                                if (rc !is XPCOM.NS_OK) {
+                                    IsXULRunner = false;
+                                    mozillaPath = mozillaPath.substring (0, mozillaPath.lastIndexOf (SEPARATOR_OS));
+                                    if (Device.DEBUG) System.out.println ("failed to start as XULRunner: " + mozillaPath); //$NON-NLS-1$
+                                }
+                            }
+                        } 
+                    }
+                    if (IsXULRunner) {
                         XPCOMInitWasGlued = true;
                     }
                 }
@@ -940,17 +967,6 @@
         }
         factory.Release ();
         
-        HelperAppLauncherDialogFactory dialogFactory = new HelperAppLauncherDialogFactory ();
-        dialogFactory.AddRef ();
-        aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_HELPERAPPLAUNCHERDIALOG_CONTRACTID, true);
-        aClassName = MozillaDelegate.wcsToMbcs (null, "Helper App Launcher Dialog", true); //$NON-NLS-1$
-        rc = componentRegistrar.RegisterFactory (XPCOM.NS_HELPERAPPLAUNCHERDIALOG_CID, aClassName, aContractID, dialogFactory.getAddress ());
-        if (rc !is XPCOM.NS_OK) {
-            browser.dispose ();
-            error (rc);
-        }
-        dialogFactory.Release ();
-
         /*
         * This Download factory will be used if the GRE version is < 1.8.
         * If the GRE version is 1.8.x then the Download factory that is registered later for
@@ -1046,7 +1062,17 @@
                 serviceManager.Release ();
 
                 if (XPCOMWasGlued) {
-                    XPCOM.XPCOMGlueShutdown ();
+                    /*
+                    * XULRunner 1.9 can crash on Windows if XPCOMGlueShutdown is invoked here,
+                    * presumably because one or more of its unloaded symbols are referenced when
+                    * this callback returns.  The workaround is to delay invoking XPCOMGlueShutdown
+                    * so that its symbols are still available once this callback returns.
+                    */
+                    display.asyncExec (new Runnable () {
+                        public void run () {
+                            XPCOM.XPCOMGlueShutdown ();
+                        }
+                    });
                     XPCOMWasGlued = false;
                 }
                 if (XPCOMInitWasGlued) {
@@ -1134,6 +1160,29 @@
     if (!PerformedVersionCheck) {
         PerformedVersionCheck = true;
 
+        rc = componentManager.QueryInterface (nsIComponentRegistrar.NS_ICOMPONENTREGISTRAR_IID, result);
+        if (rc !is XPCOM.NS_OK) {
+            browser.dispose ();
+            error (rc);
+        }
+        if (result[0] is 0) {
+            browser.dispose ();
+            error (XPCOM.NS_NOINTERFACE);
+        }
+        nsIComponentRegistrar componentRegistrar = new nsIComponentRegistrar (result[0]);
+        result[0] = 0;
+
+        HelperAppLauncherDialogFactory dialogFactory = new HelperAppLauncherDialogFactory ();
+        dialogFactory.AddRef ();
+        byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_HELPERAPPLAUNCHERDIALOG_CONTRACTID, true);
+        byte[] aClassName = MozillaDelegate.wcsToMbcs (null, "Helper App Launcher Dialog", true); //$NON-NLS-1$
+        rc = componentRegistrar.RegisterFactory (XPCOM.NS_HELPERAPPLAUNCHERDIALOG_CID, aClassName, aContractID, dialogFactory.getAddress ());
+        if (rc !is XPCOM.NS_OK) {
+            browser.dispose ();
+            error (rc);
+        }
+        dialogFactory.Release ();
+
         /*
         * Check for the availability of the pre-1.8 implementation of nsIDocShell
         * to determine if the GRE's version is < 1.8.
@@ -1171,28 +1220,17 @@
             if (rc is XPCOM.NS_OK && result[0] !is 0) { /* 1.8 */
                 new nsISupports (result[0]).Release ();
                 result[0] = 0;
-                rc = componentManager.QueryInterface (nsIComponentRegistrar.NS_ICOMPONENTREGISTRAR_IID, result);
-                if (rc !is XPCOM.NS_OK) {
-                    browser.dispose ();
-                    error (rc);
-                }
-                if (result[0] is 0) {
-                    browser.dispose ();
-                    error (XPCOM.NS_NOINTERFACE);
-                }
 
-                nsIComponentRegistrar componentRegistrar = new nsIComponentRegistrar (result[0]);
                 DownloadFactory_1_8 downloadFactory_1_8 = new DownloadFactory_1_8 ();
                 downloadFactory_1_8.AddRef ();
-                byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_TRANSFER_CONTRACTID, true);
-                byte[] aClassName = MozillaDelegate.wcsToMbcs (null, "Transfer", true); //$NON-NLS-1$
+                aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_TRANSFER_CONTRACTID, true);
+                aClassName = MozillaDelegate.wcsToMbcs (null, "Transfer", true); //$NON-NLS-1$
                 rc = componentRegistrar.RegisterFactory (XPCOM.NS_DOWNLOAD_CID, aClassName, aContractID, downloadFactory_1_8.getAddress ());
                 if (rc !is XPCOM.NS_OK) {
                     browser.dispose ();
                     error (rc);
                 }
                 downloadFactory_1_8.Release ();
-                componentRegistrar.Release ();
             } else { /* >= 1.9 */
                 /*
                  * Bug in XULRunner 1.9.  Mozilla no longer clears its background before initial content has
@@ -1217,10 +1255,13 @@
                 ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uri, 0);
                 rc = webNavigation.LoadURI (uri, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0);
                 webNavigation.Release ();
+
+                dialogFactory.isPre_1_9 = false;
             }
         }
         result[0] = 0;
         interfaceRequestor.Release ();
+        componentRegistrar.Release ();
     }
     componentManager.Release ();
 
@@ -1496,6 +1537,51 @@
     return MozillaDelegate.findBrowser (handle);
 }
 
+static Browser findBrowser (nsIDOMWindow aDOMWindow) {
+    int /*long*/[] result = new int /*long*/[1];
+    int rc = XPCOM.NS_GetServiceManager (result);
+    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
+    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);
+
+    nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
+    result[0] = 0;
+    byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_WINDOWWATCHER_CONTRACTID, true);
+    rc = serviceManager.GetServiceByContractID (aContractID, nsIWindowWatcher.NS_IWINDOWWATCHER_IID, result);
+    if (rc !is XPCOM.NS_OK) Mozilla.error(rc);
+    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);       
+    serviceManager.Release ();
+
+    nsIWindowWatcher windowWatcher = new nsIWindowWatcher (result[0]);
+    result[0] = 0;
+    /* the chrome will only be answered for the top-level nsIDOMWindow */
+    rc = aDOMWindow.GetTop (result);
+    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
+    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);
+    int /*long*/ topDOMWindow = result[0];
+    result[0] = 0;
+    rc = windowWatcher.GetChromeForWindow (topDOMWindow, result);
+    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
+    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);
+    new nsISupports (topDOMWindow).Release ();
+    windowWatcher.Release ();   
+
+    nsIWebBrowserChrome webBrowserChrome = new nsIWebBrowserChrome (result[0]);
+    result[0] = 0;
+    rc = webBrowserChrome.QueryInterface (nsIEmbeddingSiteWindow.NS_IEMBEDDINGSITEWINDOW_IID, result);
+    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
+    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);       
+    webBrowserChrome.Release ();
+
+    nsIEmbeddingSiteWindow embeddingSiteWindow = new nsIEmbeddingSiteWindow (result[0]);
+    result[0] = 0;
+    rc = embeddingSiteWindow.GetSiteWindow (result);
+    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
+    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);       
+    embeddingSiteWindow.Release ();
+
+    return findBrowser (result[0]); 
+}
+
 public bool forward () {
     if (awaitingNavigate) return false;
 
@@ -1511,6 +1597,10 @@
     return rc is XPCOM.NS_OK;
 }
 
+public String getBrowserType () {
+    return "mozilla"; //$NON-NLS-1$
+}
+
 public String getText () {
     if (awaitingNavigate) return ""; //$NON-NLS-1$
 
@@ -2445,7 +2535,7 @@
 
 int SetWebBrowser (int /*long*/ aWebBrowser) {
     if (webBrowser !is null) webBrowser.Release ();
-    webBrowser = aWebBrowser !is 0 ? new nsIWebBrowser (aWebBrowser) : null;                 
+    webBrowser = aWebBrowser !is 0 ? new nsIWebBrowser (aWebBrowser) : null;                
     return XPCOM.NS_OK;
 }
    
@@ -2803,7 +2893,7 @@
             /* First try to use the nsIWebNavigationInfo if it's available (>= mozilla 1.8) */
             byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_WEBNAVIGATIONINFO_CONTRACTID, true);
             rc = serviceManager.GetServiceByContractID (aContractID, nsIWebNavigationInfo.NS_IWEBNAVIGATIONINFO_IID, result);
-            if (rc is 0) {
+            if (rc is XPCOM.NS_OK) {
                 byte[] bytes = MozillaDelegate.wcsToMbcs (null, contentType, true);
                 int /*long*/ typePtr = XPCOM.nsEmbedCString_new (bytes, bytes.length);
                 nsIWebNavigationInfo info = new nsIWebNavigationInfo (result[0]);
--- a/dwt/browser/MozillaDelegate.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/MozillaDelegate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.MozillaDelegate;
 
@@ -31,7 +31,7 @@
         this.browser = browser;
     }
 
-    static Browser findBrowser (int handle) {
+static Browser findBrowser (int /*long*/ handle) {
         Display display = Display.getCurrent();
         return cast(Browser) display.findWidget(handle);
     }
@@ -51,7 +51,7 @@
         //      OS.CFRelease (cfString);
         //  }
         //  return chars;
-
+    // TODO implement mbcsToWcs
         //return new String(buffer).toCharArray(); commented by Jacob Carlborg
         return cast(char[]) buffer.dup; // FIXME
     }
@@ -74,6 +74,7 @@
         //      OS.CFRelease (cfString);
         //  }
         //  return buffer;
+    // TODO implement wcsToMbcs
         if (terminate)
             str ~= "\0";
 
@@ -81,7 +82,7 @@
         return cast(byte[]) str.dup; // FIXME
     }
 
-    int getHandle () {
+int /*long*/ getHandle () {
         return browser.view.id;
     }
 
@@ -130,7 +131,7 @@
         return false;
     }
 
-    void onDispose (int embedHandle) {
+void onDispose (int /*long*/ embedHandle) {
         if (listener !is null) {
             browser.getDisplay().removeFilter(DWT.FocusIn, listener);
             browser.getShell().removeListener(DWT.Deactivate, listener);
@@ -139,7 +140,7 @@
         browser = null;
     }
 
-    void setSize (int embedHandle, int width, int height) {
+void setSize (int /*long*/ embedHandle, int width, int height) {
         // TODO
     }
 
--- a/dwt/browser/OpenWindowListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/OpenWindowListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.OpenWindowListener;
 
--- a/dwt/browser/ProgressAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/ProgressAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.ProgressAdapter;
 
@@ -26,6 +26,8 @@
  * interested in.
  * </p>
  * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.0
  */
 public abstract class ProgressAdapter : ProgressListener {
--- a/dwt/browser/ProgressEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/ProgressEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.ProgressEvent;
 
@@ -24,6 +24,8 @@
  * loading of the current URL or when the loading of the current
  * URL has been completed.
  * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.0
  */
 public class ProgressEvent : TypedEvent {
@@ -40,14 +42,14 @@
     }
 
     /**
-     * Returns a String containing a concise, human-readable
+     * Returns a string containing a concise, human-readable
      * description of the receiver.
      *
-     * @return a String representation of the event
+     * @return a string representation of the event
      */
     public String toString () {
         String str = super.toString();
-        return str.substring(0, String.length() - 1) // remove trailing '}'
+        return str.substring(0, str.length() - 1) // remove trailing '}'
         + " current=" + current + " total=" + total + "}";
     }
 }
--- a/dwt/browser/ProgressListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/ProgressListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.ProgressListener;
 
--- a/dwt/browser/PromptDialog.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/PromptDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -63,7 +63,7 @@
             checkButton.setLayoutData (data);
         }
         Button okButton = new Button(shell, DWT.PUSH);
-        okButton.setText(DWT.getMessage("SWT_OK")); //$NON-NLS-1$
+        okButton.setText(DWT.getMessage("DWT_OK")); //$NON-NLS-1$
         data = new GridData ();
         data.horizontalAlignment = GridData.CENTER;
         okButton.setLayoutData (data);
@@ -211,11 +211,11 @@
         composite.setLayoutData (data);
         composite.setLayout(new GridLayout(2, true));
         buttons[1] = new Button(composite, DWT.PUSH);
-        buttons[1].setText(DWT.getMessage("SWT_OK")); //$NON-NLS-1$
+        buttons[1].setText(DWT.getMessage("DWT_OK")); //$NON-NLS-1$
         buttons[1].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
         buttons[1].addListener(DWT.Selection, listener);
         buttons[2] = new Button(composite, DWT.PUSH);
-        buttons[2].setText(DWT.getMessage("SWT_Cancel")); //$NON-NLS-1$
+        buttons[2].setText(DWT.getMessage("DWT_Cancel")); //$NON-NLS-1$
         buttons[2].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
         buttons[2].addListener(DWT.Selection, listener);
 
@@ -245,7 +245,7 @@
         label.setLayoutData (data);
         
         Label userLabel = new Label(shell, DWT.NONE);
-        userLabel.setText(DWT.getMessage("SWT_Username")); //$NON-NLS-1$
+        userLabel.setText(DWT.getMessage("DWT_Username")); //$NON-NLS-1$
         
         final Text userText = new Text(shell, DWT.BORDER);
         if (user[0] !is null) userText.setText(user[0]);
@@ -255,7 +255,7 @@
         userText.setLayoutData(data);
         
         Label passwordLabel = new Label(shell, DWT.NONE);
-        passwordLabel.setText(DWT.getMessage("SWT_Password")); //$NON-NLS-1$
+        passwordLabel.setText(DWT.getMessage("DWT_Password")); //$NON-NLS-1$
         
         final Text passwordText = new Text(shell, DWT.PASSWORD | DWT.BORDER);
         if (pass[0] !is null) passwordText.setText(pass[0]);
@@ -288,11 +288,11 @@
         composite.setLayoutData (data);
         composite.setLayout(new GridLayout(2, true));
         buttons[1] = new Button(composite, DWT.PUSH);
-        buttons[1].setText(DWT.getMessage("SWT_OK")); //$NON-NLS-1$
+        buttons[1].setText(DWT.getMessage("DWT_OK")); //$NON-NLS-1$
         buttons[1].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
         buttons[1].addListener(DWT.Selection, listener);
         buttons[2] = new Button(composite, DWT.PUSH);
-        buttons[2].setText(DWT.getMessage("SWT_Cancel")); //$NON-NLS-1$
+        buttons[2].setText(DWT.getMessage("DWT_Cancel")); //$NON-NLS-1$
         buttons[2].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
         buttons[2].addListener(DWT.Selection, listener);
 
--- a/dwt/browser/PromptService2.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/PromptService2.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -22,15 +22,12 @@
 import dwt.internal.mozilla.nsIChannel;
 import dwt.internal.mozilla.nsID;
 import dwt.internal.mozilla.nsIDOMWindow;
-import dwt.internal.mozilla.nsIEmbeddingSiteWindow;
 import dwt.internal.mozilla.nsIMemory;
 import dwt.internal.mozilla.nsIPromptService;
 import dwt.internal.mozilla.nsIPromptService2;
 import dwt.internal.mozilla.nsIServiceManager;
 import dwt.internal.mozilla.nsISupports;
 import dwt.internal.mozilla.nsIURI;
-import dwt.internal.mozilla.nsIWebBrowserChrome;
-import dwt.internal.mozilla.nsIWindowWatcher;
 import dwt.widgets.MessageBox;
 import dwt.widgets.Shell;
 
@@ -142,60 +139,19 @@
 
 Browser getBrowser (int /*long*/ aDOMWindow) {
     if (aDOMWindow is 0) return null;
-
-    int /*long*/[] result = new int /*long*/[1];
-    int rc = XPCOM.NS_GetServiceManager (result);
-    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
-    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);
-    
-    nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
-    result[0] = 0;
-    byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_WINDOWWATCHER_CONTRACTID, true);
-    rc = serviceManager.GetServiceByContractID (aContractID, nsIWindowWatcher.NS_IWINDOWWATCHER_IID, result);
-    if (rc !is XPCOM.NS_OK) Mozilla.error(rc);
-    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);       
-    serviceManager.Release ();
-    
-    nsIWindowWatcher windowWatcher = new nsIWindowWatcher (result[0]);
-    result[0] = 0;
-    /* the chrome will only be answered for the top-level nsIDOMWindow */
     nsIDOMWindow window = new nsIDOMWindow (aDOMWindow);
-    rc = window.GetTop (result);
-    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
-    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);
-    aDOMWindow = result[0];
-    result[0] = 0;
-    rc = windowWatcher.GetChromeForWindow (aDOMWindow, result);
-    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
-    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);       
-    windowWatcher.Release ();   
-    
-    nsIWebBrowserChrome webBrowserChrome = new nsIWebBrowserChrome (result[0]);
-    result[0] = 0;
-    rc = webBrowserChrome.QueryInterface (nsIEmbeddingSiteWindow.NS_IEMBEDDINGSITEWINDOW_IID, result);
-    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
-    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);       
-    webBrowserChrome.Release ();
-    
-    nsIEmbeddingSiteWindow embeddingSiteWindow = new nsIEmbeddingSiteWindow (result[0]);
-    result[0] = 0;
-    rc = embeddingSiteWindow.GetSiteWindow (result);
-    if (rc !is XPCOM.NS_OK) Mozilla.error (rc);
-    if (result[0] is 0) Mozilla.error (XPCOM.NS_NOINTERFACE);       
-    embeddingSiteWindow.Release ();
-    
-    return Mozilla.findBrowser (result[0]); 
+    return Mozilla.findBrowser (window);
 }
 
 String getLabel (int buttonFlag, int index, int /*long*/ buttonTitle) {
     String label = null;
     int flag = (buttonFlag & (0xff * index)) / index;
     switch (flag) {
-        case nsIPromptService.BUTTON_TITLE_CANCEL : label = DWT.getMessage ("SWT_Cancel"); break; //$NON-NLS-1$
-        case nsIPromptService.BUTTON_TITLE_NO : label = DWT.getMessage ("SWT_No"); break; //$NON-NLS-1$
-        case nsIPromptService.BUTTON_TITLE_OK : label = DWT.getMessage ("SWT_OK"); break; //$NON-NLS-1$
-        case nsIPromptService.BUTTON_TITLE_SAVE : label = DWT.getMessage ("SWT_Save"); break; //$NON-NLS-1$
-        case nsIPromptService.BUTTON_TITLE_YES : label = DWT.getMessage ("SWT_Yes"); break; //$NON-NLS-1$
+        case nsIPromptService.BUTTON_TITLE_CANCEL : label = DWT.getMessage ("DWT_Cancel"); break; //$NON-NLS-1$
+        case nsIPromptService.BUTTON_TITLE_NO : label = DWT.getMessage ("DWT_No"); break; //$NON-NLS-1$
+        case nsIPromptService.BUTTON_TITLE_OK : label = DWT.getMessage ("DWT_OK"); break; //$NON-NLS-1$
+        case nsIPromptService.BUTTON_TITLE_SAVE : label = DWT.getMessage ("DWT_Save"); break; //$NON-NLS-1$
+        case nsIPromptService.BUTTON_TITLE_YES : label = DWT.getMessage ("DWT_Yes"); break; //$NON-NLS-1$
         case nsIPromptService.BUTTON_TITLE_IS_STRING : {
             int length = XPCOM.strlen_PRUnichar (buttonTitle);
             char[] dest = new char[length];
@@ -420,7 +376,7 @@
     int[] checkValue = new int[1];
     String[] userLabel = new String[1], passLabel = new String[1];
 
-    String title = DWT.getMessage ("SWT_Authentication_Required"); //$NON-NLS-1$
+    String title = DWT.getMessage ("DWT_Authentication_Required"); //$NON-NLS-1$
 
     if (checkboxLabel !is 0 && checkboxValue !is 0) {
         int length = XPCOM.strlen_PRUnichar (checkboxLabel);
@@ -486,7 +442,7 @@
 
     String message;
     if (realm.length () > 0 && host.length () > 0) {
-        message = Compatibility.getMessage ("SWT_Enter_Username_and_Password", new String[] {realm, host}); //$NON-NLS-1$
+        message = Compatibility.getMessage ("DWT_Enter_Username_and_Password", new String[] {realm, host}); //$NON-NLS-1$
     } else {
         message = ""; //$NON-NLS-1$
     }
@@ -526,7 +482,7 @@
         XPCOM.memmove (dest, aDialogTitle, length * 2);
         titleLabel = new String (dest);
     } else {
-        titleLabel = DWT.getMessage ("SWT_Authentication_Required");    //$NON-NLS-1$
+        titleLabel = DWT.getMessage ("DWT_Authentication_Required");    //$NON-NLS-1$
     }
     
     length = XPCOM.strlen_PRUnichar (aText);
@@ -564,7 +520,7 @@
     Shell shell = browser is null ? new Shell () : browser.getShell ();
     PromptDialog dialog = new PromptDialog (shell);
     int[] check = new int[1], result = new int[1];
-    if (aCheckState !is 0) XPCOM.memmove (check, aCheckState, 4);    /* PRBool */
+    if (aCheckState !is 0) XPCOM.memmove (check, aCheckState, 4);   /* PRBool */
     dialog.promptUsernameAndPassword (titleLabel, textLabel, checkLabel, userLabel, passLabel, check, result);
 
     XPCOM.memmove (_retval, result, 4); /* PRBool */
--- a/dwt/browser/PromptService2Factory.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/PromptService2Factory.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/Safari.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/Safari.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,37 +7,31 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
  *******************************************************************************/
 module dwt.browser.Safari;
 
+import dwt.dwthelper.utils;
+
 import dwt.DWT;
-import dwt.browser.LocationEvent;
-import dwt.browser.ProgressEvent;
-import dwt.browser.ProgressListener;
-import dwt.browser.StatusTextEvent;
-import dwt.browser.TitleEvent;
-import dwt.browser.TitleListener;
-import dwt.browser.WebBrowser;
-import dwt.dwthelper.utils;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.C;
 import dwt.internal.Callback;
+import dwt.internal.Compatibility;
 import dwt.internal.cocoa.DOMDocument;
-import dwt.internal.cocoa.DOMEvent;
 import dwt.internal.cocoa.DOMKeyboardEvent;
 import dwt.internal.cocoa.DOMMouseEvent;
 import dwt.internal.cocoa.DOMWheelEvent;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSDictionary;
+import dwt.internal.cocoa.NSError;
 import dwt.internal.cocoa.NSHTTPCookie;
 import dwt.internal.cocoa.NSHTTPCookieStorage;
 import dwt.internal.cocoa.NSNotificationCenter;
 import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSPrintInfo;
 import dwt.internal.cocoa.NSPrintOperation;
+import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.NSURLDownload;
@@ -53,7 +47,6 @@
 import dwt.internal.cocoa.WebPreferences;
 import dwt.internal.cocoa.WebView;
 import dwt.internal.cocoa.id;
-
 import dwt.widgets.Composite;
 import dwt.widgets.Display;
 import dwt.widgets.Event;
@@ -62,65 +55,57 @@
 import dwt.widgets.Menu;
 import dwt.widgets.MessageBox;
 import dwt.widgets.Shell;
-
-import Math = tango.math.Math;
-
-import dwt.dwthelper.Runnable;
+import dwt.widgets.Widget;
 
-class Safari : WebBrowser
-{
+class Safari extends WebBrowser {
     WebView webView;
-    DWTWebViewDelegate delegatee;
-    int jniRef;
+    SWTWebViewDelegate delegate;
     bool changingLocation;
     String lastHoveredLinkURL;
     String html;
-    int identifier;
+    int /*long*/ identifier;
     int resourceCount;
-    String url = "";
+    String url = ""; //$NON-NLS-1$
     Point location;
     Point size;
     bool statusBar = true, toolBar = true, ignoreDispose;
     int lastMouseMoveX, lastMouseMoveY;
     //TEMPORARY CODE
-    //  bool doit;
+//  bool doit;
 
     static bool Initialized;
-    static Callback Callback2, Callback3, Callback4, Callback5, Callback6, Callback7;
-
-    static const int MIN_SIZE = 16;
-    static const int MAX_PROGRESS = 100;
-    static const String WebElementLinkURLKey = "WebElementLinkURL"; //$NON-NLS-1$
-    static const String AGENT_STRING = "Safari/unknown"; //$NON-NLS-1$
-    static const String URI_FROMMEMORY = "file:///"; //$NON-NLS-1$
-    static const String PROTOCOL_FILE = "file:"; //$NON-NLS-1$
-    static const String PROTOCOL_HTTP = "http:"; //$NON-NLS-1$
-    static const String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
-    static const String SAFARI_EVENTS_FIX_KEY = "dwt.internal.safariEventsFix"; //$NON-NLS-1$
+    // the following Callbacks are never freed
+    static Callback Callback3, Callback4, Callback5, Callback6, Callback7;
 
-    /* event Strings */
-    static const String DOMEVENT_KEYUP = "keyup"; //$NON-NLS-1$
-    static const String DOMEVENT_KEYDOWN = "keydown"; //$NON-NLS-1$
-    static const String DOMEVENT_MOUSEDOWN = "mousedown"; //$NON-NLS-1$
-    static const String DOMEVENT_MOUSEUP = "mouseup"; //$NON-NLS-1$
-    static const String DOMEVENT_MOUSEMOVE = "mousemove"; //$NON-NLS-1$
-    static const String DOMEVENT_MOUSEWHEEL = "mousewheel"; //$NON-NLS-1$
+    static final int MIN_SIZE = 16;
+    static final int MAX_PROGRESS = 100;
+    static final String WebElementLinkURLKey = "WebElementLinkURL"; //$NON-NLS-1$
+    static final String AGENT_STRING = "Safari/unknown"; //$NON-NLS-1$
+    static final String URI_FROMMEMORY = "file:///"; //$NON-NLS-1$
+    static final String PROTOCOL_FILE = "file://"; //$NON-NLS-1$
+    static final String PROTOCOL_HTTP = "http://"; //$NON-NLS-1$
+    static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
+    static final String ADD_WIDGET_KEY = "dwt.internal.addWidget"; //$NON-NLS-1$
+    static final String SAFARI_EVENTS_FIX_KEY = "dwt.internal.safariEventsFix"; //$NON-NLS-1$
+    static final String DWT_OBJECT = "DWT_OBJECT"; //$NON-NLS-1$
 
-    static this ()
-    {
-        NativeClearSessions = new class Runnable
-        {
-            public void run ()
-            {
+    /* event strings */
+    static final String DOMEVENT_KEYUP = "keyup"; //$NON-NLS-1$
+    static final String DOMEVENT_KEYDOWN = "keydown"; //$NON-NLS-1$
+    static final String DOMEVENT_MOUSEDOWN = "mousedown"; //$NON-NLS-1$
+    static final String DOMEVENT_MOUSEUP = "mouseup"; //$NON-NLS-1$
+    static final String DOMEVENT_MOUSEMOVE = "mousemove"; //$NON-NLS-1$
+    static final String DOMEVENT_MOUSEWHEEL = "mousewheel"; //$NON-NLS-1$
+
+    static {
+        NativeClearSessions = new Runnable() {
+            public void run() {
                 NSHTTPCookieStorage storage = NSHTTPCookieStorage.sharedHTTPCookieStorage();
                 NSArray cookies = storage.cookies();
-                int count = cookies.count();
-                
-                for (int i = 0; i < count; i++)
-                {
+                int /*long*/ count = cookies.count();
+                for (int i = 0; i < count; i++) {
                     NSHTTPCookie cookie = new NSHTTPCookie(cookies.objectAtIndex(i));
-                    if (cookie.isSessionOnly())
-                    {
+                    if (cookie.isSessionOnly()) {
                         storage.deleteCookie(cookie);
                     }
                 }
@@ -128,1439 +113,1134 @@
         };
     }
 
-    public void create (Composite parent, int style)
-    {
-
-        String className = "DWTWebViewDelegate";
-        if (OS.objc_lookUpClass(className) == 0)
-        {
-            ClassInfo safaryClass = this.classinfo;
-            Callback2 = new Callback(safaryClass, "browserProc", 2);
-            int proc2 = Callback2.getAddress();
-            if (proc2 is 0)
-                DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-            Callback3 = new Callback(safaryClass, "browserProc", 3);
-            int proc3 = Callback3.getAddress();
-            if (proc3 is 0)
-                DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-            Callback4 = new Callback(safaryClass, "browserProc", 4);
-            int proc4 = Callback4.getAddress();
-            if (proc4 is 0)
-                DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-            Callback5 = new Callback(safaryClass, "browserProc", 5);
-            int proc5 = Callback5.getAddress();
-            if (proc5 is 0)
-                DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-            Callback6 = new Callback(safaryClass, "browserProc", 6);
-            int proc6 = Callback6.getAddress();
-            if (proc6 is 0)
-                DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-            Callback7 = new Callback(safaryClass, "browserProc", 7);
-            int proc7 = Callback7.getAddress();
-            if (proc7 is 0)
-                DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-
-            int cls = OS.objc_allocateClassPair(OS.class_WebView, className, 0);
-            OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte) (Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-            OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-            OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
-            OS.class_addMethod(cls, OS.sel_webView_1didChangeLocationWithinPageForFrame_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webView_1didFailProvisionalLoadWithError_1forFrame_1, proc5, "@:@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1didFinishLoadForFrame_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webView_1didReceiveTitle_1forFrame_1, proc5, "@:@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1didStartProvisionalLoadForFrame_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webView_1didCommitLoadForFrame_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webView_1resource_1didFinishLoadingFromDataSource_1, proc5, "@:@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1resource_1didFailLoadingWithError_1fromDataSource_1, proc6, "@:@@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1identifierForInitialRequest_1fromDataSource_1, proc5, "@:@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1resource_1willSendRequest_1redirectResponse_1fromDataSource_1, proc7, "@:@@@@@");
-            OS.class_addMethod(cls, OS.sel_handleNotification_1, proc3, "@:@");
-            OS.class_addMethod(cls, OS.sel_webView_1createWebViewWithRequest_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webViewShow_1, proc3, "@:@");
-            OS.class_addMethod(cls, OS.sel_webView_1setFrame_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webViewClose_1, proc3, "@:@");
-            OS.class_addMethod(cls, OS.sel_webView_1contextMenuItemsForElement_1defaultMenuItems_1, proc5, "@:@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1setStatusBarVisible_1, proc4, "@:@B");
-            OS.class_addMethod(cls, OS.sel_webView_1setResizable_1, proc4, "@:@B");
-            OS.class_addMethod(cls, OS.sel_webView_1setToolbarsVisible_1, proc4, "@:@B");
-            OS.class_addMethod(cls, OS.sel_webView_1setStatusText_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webViewFocus_1, proc3, "@:@");
-            OS.class_addMethod(cls, OS.sel_webViewUnfocus_1, proc3, "@:@");
-            OS.class_addMethod(cls, OS.sel_webView_1runJavaScriptAlertPanelWithMessage_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webView_1runJavaScriptConfirmPanelWithMessage_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webView_1runOpenPanelForFileButtonWithResultListener_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webView_1mouseDidMoveOverElement_1modifierFlags_1, proc5, "@:@@I");
-            OS.class_addMethod(cls, OS.sel_webView_1printFrameView_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_webView_1decidePolicyForMIMEType_1request_1frame_1decisionListener_1, proc7, "@:@@@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1decidePolicyForNavigationAction_1request_1frame_1decisionListener_1, proc7, "@:@@@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1decidePolicyForNewWindowAction_1request_1newFrameName_1decisionListener_1, proc7, "@:@@@@@");
-            OS.class_addMethod(cls, OS.sel_webView_1unableToImplementPolicyWithError_1frame_1, proc5, "@:@@@");
-            OS.class_addMethod(cls, OS.sel_download_1decideDestinationWithSuggestedFilename_1, proc4, "@:@@");
-            OS.class_addMethod(cls, OS.sel_handleEvent_1, proc3, "@:@");
-            OS.objc_registerClassPair(cls);
-        }
-
-        /*
-         * Override the default event mechanism to not send key events so
-         * that the browser can send them by listening to the DOM instead.
-         */
-        browser.setData(SAFARI_EVENTS_FIX_KEY);
-
-        WebView webView = cast(WebView) (new WebView()).alloc();
-        if (webView is null)
-            DWT.error(DWT.ERROR_NO_HANDLES);
-        webView.initWithFrame(browser.view.frame(), null, null);
-        webView.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewHeightSizable);
-        jniRef = OS.NewGlobalRef(this);
-        if (jniRef is 0)
-            DWT.error(DWT.ERROR_NO_HANDLES);
-        const DWTWebViewDelegate delegatee = cast(DWTWebViewDelegate) (new DWTWebViewDelegate()).alloc().init();
-        delegatee.setTag(jniRef);
-        this.delegatee = delegatee;
-        this.webView = webView;
-        browser.view.addSubview_(webView);
-
-        const NSNotificationCenter notificationCenter = NSNotificationCenter.defaultCenter();
+public void create (Composite parent, int style) {
+    String className = "SWTWebViewDelegate"; //$NON-NLS-1$
+    if (OS.objc_lookUpClass(className) is 0) {
+        Class safariClass = this.getClass();
+        Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$
+        int /*long*/ proc3 = Callback3.getAddress();
+        if (proc3 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+        Callback4 = new Callback(safariClass, "browserProc", 4); //$NON-NLS-1$
+        int /*long*/ proc4 = Callback4.getAddress();
+        if (proc4 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+        Callback5 = new Callback(safariClass, "browserProc", 5); //$NON-NLS-1$
+        int /*long*/ proc5 = Callback5.getAddress();
+        if (proc5 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+        Callback6 = new Callback(safariClass, "browserProc", 6); //$NON-NLS-1$
+        int /*long*/ proc6 = Callback6.getAddress();
+        if (proc6 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+        Callback7 = new Callback(safariClass, "browserProc", 7); //$NON-NLS-1$
+        int /*long*/ proc7 = Callback7.getAddress();
+        if (proc7 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+        int /*long*/ setFrameProc = OS.webView_setFrame_CALLBACK(proc4);
+        if (setFrameProc is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
 
-        Listener listener = new class (notificationCenter) Listener
-        {
-            NSNotificationCenter notificationCenter;
-            
-            this (NSNotificationCenter notificationCenter)
-            {
-                this.notificationCenter = notificationCenter;
-            }
-            
-            public void handleEvent (Event e)
-            {
-                switch (e.type)
-                {
-                    case DWT.Dispose:
-                    {
-                        /* make this handler run after other dispose listeners */
-                        if (ignoreDispose)
-                        {
-                            ignoreDispose = false;
-                            break;
-                        }
-                        ignoreDispose = true;
-                        browser.notifyListeners(e.type, e);
-                        e.type = DWT.NONE;
-
-                        webView.setFrameLoadDelegate(null);
-                        webView.setResourceLoadDelegate(null);
-                        webView.setUIDelegate(null);
-                        webView.setPolicyDelegate(null);
-                        webView.setDownloadDelegate(null);
-                        notificationCenter.removeObserver(delegatee);
-
-                        webView.release();
-                        webView = null;
-                        delegatee.release();
-                        delegatee = null;
-                        OS.DeleteGlobalRef(jniRef);
-                        jniRef = 0;
-                        html = null;
-                        lastHoveredLinkURL = null;
-                        break;
-                    }
-                }
-            }
-        };
-        browser.addListener(DWT.Dispose, listener);
-
-        webView.setFrameLoadDelegate(delegatee);
-        webView.setResourceLoadDelegate(delegatee);
-        webView.setUIDelegate(delegatee);
-        notificationCenter.addObserver(delegatee, OS.sel_handleNotification_1, null, webView);
-        webView.setPolicyDelegate(delegatee);
-        webView.setDownloadDelegate(delegatee);
-        webView.setApplicationNameForUserAgent(NSString.StringWith(AGENT_STRING));
-
-        if (!Initialized)
-        {
-            Initialized = true;
-            /* disable applets */
-            WebPreferences.standardPreferences().setJavaEnabled(false);
-        }
-    }
-
-    public bool back ()
-    {
-        html = null;
-        return webView.goBack();
-    }
-
-    static int browserProc (int delegatee, int sel)
-    {
-        if (sel is OS.sel_tag)
-        {
-            int[] tag = new int[1];
-            OS.object_getInstanceVariable(delegatee, "tag", tag);
-            return tag[0];
-        }
-        return 0;
-    }
-
-    static int browserProc (int id, int sel, int arg0)
-    {
-        if (sel is OS.sel_setTag_1)
-        {
-            OS.object_setInstanceVariable(id, "tag", arg0);
-            return 0;
-        }
-        int jniRef = OS.objc_msgSend(id, OS.sel_tag);
-        if (jniRef is 0 || jniRef is -1)
-            return 0;
-        Safari widget = cast(Safari) OS.JNIGetObject(jniRef);
-        if (widget is null)
-            return 0;
-        if (sel is OS.sel_handleNotification_1)
-        {
-            widget.handleNotification(arg0);
-        }
-        else if (sel is OS.sel_webViewShow_1)
-        {
-            widget.webViewShow(arg0);
-        }
-        else if (sel is OS.sel_webViewClose_1)
-        {
-            widget.webViewClose(arg0);
-        }
-        else if (sel is OS.sel_webViewFocus_1)
-        {
-            widget.webViewFocus(arg0);
-        }
-        else if (sel is OS.sel_webViewUnfocus_1)
-        {
-            widget.webViewUnfocus(arg0);
-        }
-        else if (sel is OS.sel_handleEvent_1)
-        {
-            widget.handleEvent(arg0);
-        }
-        return 0;
-    }
+        String types = "*"; //$NON-NLS-1$
+        int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF is 4 ? 2 : 3;
 
-    static int browserProc (int id, int sel, int arg0, int arg1)
-    {
-        if (sel is OS.sel_setTag_1)
-        {
-            OS.object_setInstanceVariable(id, "tag", arg0);
-            return 0;
-        }
-        int jniRef = OS.objc_msgSend(id, OS.sel_tag);
-        if (jniRef is 0 || jniRef is -1)
-            return 0;
-        Safari widget = cast(Safari) OS.JNIGetObject(jniRef);
-        if (widget is null)
-            return 0;
-        if (sel is OS.sel_webView_1didChangeLocationWithinPageForFrame_1)
-        {
-            widget.webView_didChangeLocationWithinPageForFrame(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1didFinishLoadForFrame_1)
-        {
-            widget.webView_didFinishLoadForFrame(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1didStartProvisionalLoadForFrame_1)
-        {
-            widget.webView_didStartProvisionalLoadForFrame(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1didCommitLoadForFrame_1)
-        {
-            widget.webView_didCommitLoadForFrame(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1setFrame_1)
-        {
-            widget.webView_setFrame(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1createWebViewWithRequest_1)
-        {
-            return widget.webView_createWebViewWithRequest(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1setStatusBarVisible_1)
-        {
-            widget.webView_setStatusBarVisible(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1setResizable_1)
-        {
-            widget.webView_setResizable(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1setStatusText_1)
-        {
-            widget.webView_setStatusText(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1setToolbarsVisible_1)
-        {
-            widget.webView_setToolbarsVisible(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1runJavaScriptAlertPanelWithMessage_1)
-        {
-            widget.webView_runJavaScriptAlertPanelWithMessage(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1runJavaScriptConfirmPanelWithMessage_1)
-        {
-            return widget.webView_runJavaScriptConfirmPanelWithMessage(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1runOpenPanelForFileButtonWithResultListener_1)
-        {
-            widget.webView_runOpenPanelForFileButtonWithResultListener(arg0, arg1);
-        }
-        else if (sel is OS.sel_download_1decideDestinationWithSuggestedFilename_1)
-        {
-            widget.download_decideDestinationWithSuggestedFilename(arg0, arg1);
-        }
-        else if (sel is OS.sel_webView_1printFrameView_1)
-        {
-            widget.webView_printFrameView(arg0, arg1);
-        }
-        return 0;
-    }
-
-    static int browserProc (int id, int sel, int arg0, int arg1, int arg2)
-    {
-        int jniRef = OS.objc_msgSend(id, OS.sel_tag);
-        if (jniRef is 0 || jniRef is -1)
-            return 0;
-        Safari widget = cast(Safari) OS.JNIGetObject(jniRef);
-        if (widget is null)
-            return 0;
-        if (sel is OS.sel_webView_1didFailProvisionalLoadWithError_1forFrame_1)
-        {
-            widget.webView_didFailProvisionalLoadWithError_forFrame(arg0, arg1, arg2);
-        }
-        else if (sel is OS.sel_webView_1didReceiveTitle_1forFrame_1)
-        {
-            widget.webView_didReceiveTitle_forFrame(arg0, arg1, arg2);
-        }
-        else if (sel is OS.sel_webView_1resource_1didFinishLoadingFromDataSource_1)
-        {
-            widget.webView_resource_didFinishLoadingFromDataSource(arg0, arg1, arg2);
-        }
-        else if (sel is OS.sel_webView_1identifierForInitialRequest_1fromDataSource_1)
-        {
-            return widget.webView_identifierForInitialRequest_fromDataSource(arg0, arg1, arg2);
-        }
-        else if (sel is OS.sel_webView_1contextMenuItemsForElement_1defaultMenuItems_1)
-        {
-            return widget.webView_contextMenuItemsForElement_defaultMenuItems(arg0, arg1, arg2);
-        }
-        else if (sel is OS.sel_webView_1mouseDidMoveOverElement_1modifierFlags_1)
-        {
-            widget.webView_mouseDidMoveOverElement_modifierFlags(arg0, arg1, arg2);
-        }
-        else if (sel is OS.sel_webView_1unableToImplementPolicyWithError_1frame_1)
-        {
-            widget.webView_unableToImplementPolicyWithError_frame(arg0, arg1, arg2);
-        }
-        return 0;
-    }
-
-    static int browserProc (int id, int sel, int arg0, int arg1, int arg2, int arg3)
-    {
-        int jniRef = OS.objc_msgSend(id, OS.sel_tag);
-        if (jniRef is 0 || jniRef is -1)
-            return 0;
-        Safari widget = cast(Safari) OS.JNIGetObject(jniRef);
-        if (widget is null)
-            return 0;
-        if (sel is OS.sel_webView_1resource_1didFailLoadingWithError_1fromDataSource_1)
-        {
-            widget.webView_resource_didFailLoadingWithError_fromDataSource(arg0, arg1, arg2, arg3);
-        }
-        return 0;
-    }
-
-    static int browserProc (int id, int sel, int arg0, int arg1, int arg2, int arg3, int arg4)
-    {
-        int jniRef = OS.objc_msgSend(id, OS.sel_tag);
-        if (jniRef is 0 || jniRef is -1)
-            return 0;
-        Safari widget = cast(Safari) OS.JNIGetObject(jniRef);
-        if (widget is null)
-            return 0;
-        if (sel is OS.sel_webView_1resource_1willSendRequest_1redirectResponse_1fromDataSource_1)
-        {
-            return widget.webView_resource_willSendRequest_redirectResponse_fromDataSource(arg0, arg1, arg2, arg3, arg4);
-        }
-        else if (sel is OS.sel_webView_1decidePolicyForMIMEType_1request_1frame_1decisionListener_1)
-        {
-            widget.webView_decidePolicyForMIMEType_request_frame_decisionListener(arg0, arg1, arg2, arg3, arg4);
-        }
-        else if (sel is OS.sel_webView_1decidePolicyForNavigationAction_1request_1frame_1decisionListener_1)
-        {
-            widget.webView_decidePolicyForNavigationAction_request_frame_decisionListener(arg0, arg1, arg2, arg3, arg4);
-        }
-        else if (sel is OS.sel_webView_1decidePolicyForNewWindowAction_1request_1newFrameName_1decisionListener_1)
-        {
-            widget.webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener(arg0, arg1, arg2, arg3, arg4);
-        }
-        return 0;
-    }
-
-    public bool execute (String script)
-    {
-        return webView.StringByEvaluatingJavaScriptFromString(NSString.StringWith(script)) !is null;
-    }
-
-    public bool forward ()
-    {
-        html = null;
-        return webView.goForward();
-    }
-
-    public String getText ()
-    {
-        WebFrame mainFrame = webView.mainFrame();
-        WebDataSource dataSource = mainFrame.dataSource();
-        if (dataSource is null)
-            return ""; //$NON-NLS-1$
-        WebDocumentRepresentation representation = dataSource.representation();
-        if (representation is null)
-            return ""; //$NON-NLS-1$
-        NSString source = representation.documentSource();
-        if (source is null)
-            return ""; //$NON-NLS-1$
-        char[] buffer = new char[source.length()];
-        source.getCharacters_(buffer);
-        return new String(buffer);
-    }
-
-    public String getUrl ()
-    {
-        return url;
-    }
-
-    public bool isBackEnabled ()
-    {
-        return webView.canGoBack();
-    }
-
-    public bool isForwardEnabled ()
-    {
-        return webView.canGoForward();
-    }
-
-    public void refresh ()
-    {
-        webView.reload(null);
-    }
-
-    public bool setText (String html)
-    {
-        /*
-         * Bug in Safari.  The web view segment faults in some circumstances
-         * when the text changes during the location changing callback.  The
-         * fix is to defer the work until the callback is done. 
-         */
-        if (changingLocation)
-        {
-            this.html = html;
-        }
-        else
-        {
-            _setText(html);
-        }
-        return true;
-    }
-
-    void _setText (String html)
-    {
-        NSString String = NSString.StringWith(html);
-        NSString URLString = NSString.StringWith(URI_FROMMEMORY);
-        NSURL URL = NSURL.static_URLWithString_(URLString);
-        WebFrame mainFrame = webView.mainFrame();
-        mainFrame.loadHTMLString(String, URL);
-    }
-
-    public bool setUrl (String url)
-    {
-        html = null;
-
-        NSURL inURL;
-        if (url.startsWith(PROTOCOL_FILE))
-        {
-            url = url.substring(PROTOCOL_FILE.length());
-        }
-        bool isHttpURL = url.indexOf('/') !is 0;
-        if (isHttpURL)
-        {
-            if (url.indexOf(':') is -1)
-            {
-                url = PROTOCOL_HTTP + "//" + url; //$NON-NLS-1$
-            }
-            inURL = NSURL.static_URLWithString_(NSString.StringWith(url.toString()));
-        }
-        else
-        {
-            inURL = NSURL.static_fileURLWithPath_(NSString.StringWith(url.toString()));
-        }
-        if (inURL is null)
-            return false;
-
-        NSURLRequest request = NSURLRequest.static_requestWithURL_(inURL);
-        WebFrame mainFrame = webView.mainFrame();
-        mainFrame.loadRequest(request);
-        return true;
-    }
-
-    public void stop ()
-    {
-        html = null;
-        webView.stopLoading(null);
-    }
-
-    /* WebFrameLoadDelegate */
-
-    void webView_didChangeLocationWithinPageForFrame (int sender, int frameID)
-    {
-        WebFrame frame = new WebFrame(frameID);
-        WebDataSource dataSource = frame.dataSource();
-        NSURLRequest request = dataSource.request();
-        NSURL url = request.URL();
-        NSString s = url.absoluteString();
-        int length = s.length();
-        if (length is 0)
-            return;
-        char[] buffer = new char[length];
-        s.getCharacters_(buffer);
-        String url2 = new String(buffer);
-        /*
-         * If the URI indicates that the page is being rendered from memory
-         * (via setText()) then set it to about:blank to be consistent with IE.
-         */
-        if (url2.opEquals(URI_FROMMEMORY))
-            url2 = ABOUT_BLANK;
-
-        const Display display = browser.getDisplay();
-        bool top = frameID is webView.mainFrame().id;
-        if (top)
-        {
-            StatusTextEvent statusText = new StatusTextEvent(browser);
-            statusText.display = display;
-            statusText.widget = browser;
-            statusText.text = url2;
-            for (int i = 0; i < statusTextListeners.length; i++)
-            {
-                statusTextListeners[i].changed(statusText);
-            }
-        }
-
-        LocationEvent location = new LocationEvent(browser);
-        location.display = display;
-        location.widget = browser;
-        location.location = url2;
-        location.top = top;
-        for (int i = 0; i < locationListeners.length; i++)
-        {
-            locationListeners[i].changed(location);
-        }
-    }
-
-    void webView_didFailProvisionalLoadWithError_forFrame (int sender, int error, int frame)
-    {
-        if (frame is webView.mainFrame().id)
-        {
-            /*
-             * Feature on Safari.  The identifier is used here as a marker for the events 
-             * related to the top frame and the URL changes related to that top frame as 
-             * they should appear on the location bar of a browser.  It is expected to reset
-             * the identifier to 0 when the event didFinishLoadingFromDataSource related to 
-             * the identifierForInitialRequest event is received.  However, Safari fires
-             * the didFinishLoadingFromDataSource event before the entire content of the
-             * top frame is loaded.  It is possible to receive multiple willSendRequest 
-             * events in this interval, causing the Browser widget to send unwanted
-             * Location.changing events.  For this reason, the identifier is reset to 0
-             * when the top frame has either finished loading (didFinishLoadForFrame
-             * event) or failed (didFailProvisionalLoadWithError).
-             */
-            identifier = 0;
-        }
+        int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+        OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+        OS.class_addMethod(cls, OS.sel_webView_didChangeLocationWithinPageForFrame_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_didFailProvisionalLoadWithError_forFrame_, proc5, "@:@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_didFinishLoadForFrame_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_didReceiveTitle_forFrame_, proc5, "@:@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_didStartProvisionalLoadForFrame_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_didCommitLoadForFrame_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_resource_didFinishLoadingFromDataSource_, proc5, "@:@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_resource_didFailLoadingWithError_fromDataSource_, proc6, "@:@@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_identifierForInitialRequest_fromDataSource_, proc5, "@:@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_, proc7, "@:@@@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_handleNotification_, proc3, "@:@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_createWebViewWithRequest_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webViewShow_, proc3, "@:@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webViewClose_, proc3, "@:@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_contextMenuItemsForElement_defaultMenuItems_, proc5, "@:@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_setStatusBarVisible_, proc4, "@:@B"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_setResizable_, proc4, "@:@B"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_setToolbarsVisible_, proc4, "@:@B"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_setStatusText_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webViewFocus_, proc3, "@:@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webViewUnfocus_, proc3, "@:@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_runJavaScriptAlertPanelWithMessage_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_runJavaScriptConfirmPanelWithMessage_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_runOpenPanelForFileButtonWithResultListener_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_mouseDidMoveOverElement_modifierFlags_, proc5, "@:@@I"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_printFrameView_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_, proc7, "@:@@@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_, proc7, "@:@@@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_, proc7, "@:@@@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_unableToImplementPolicyWithError_frame_, proc5, "@:@@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_download_decideDestinationWithSuggestedFilename_, proc4, "@:@@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_handleEvent_, proc3, "@:@"); //$NON-NLS-1$
+        OS.class_addMethod(cls, OS.sel_webView_setFrame_, setFrameProc, "@:@{NSRect}"); //$NON-NLS-1$
+        OS.objc_registerClassPair(cls);
     }
 
-    void webView_didFinishLoadForFrame (int sender, int frameID)
-    {
-        hookDOMMouseListeners(frameID);
-        if (frameID is webView.mainFrame().id)
-        {
-            hookDOMKeyListeners(frameID);
+    /*
+    * Override the default event mechanism to not send key events so
+    * that the browser can send them by listening to the DOM instead.
+    */
+    browser.setData(SAFARI_EVENTS_FIX_KEY);
+
+    WebView webView = (WebView)new WebView().alloc();
+    if (webView is null) DWT.error(DWT.ERROR_NO_HANDLES);
+    webView.initWithFrame(browser.view.frame(), null, null);
+    webView.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewHeightSizable);
+    final SWTWebViewDelegate delegate = (SWTWebViewDelegate)new SWTWebViewDelegate().alloc().init();
+    Display display = browser.getDisplay();
+    display.setData(ADD_WIDGET_KEY, new Object[] {delegate, browser});
+    this.delegate = delegate;
+    this.webView = webView;
+    browser.view.addSubview(webView);
+
+    final NSNotificationCenter notificationCenter = NSNotificationCenter.defaultCenter();
 
-            const Display display = browser.getDisplay();
-            /*
-             * To be consistent with other platforms a title event should be fired when a
-             * page has completed loading.  A page with a <title> tag will do this
-             * automatically when the didReceiveTitle callback is received.  However a page
-             * without a <title> tag will not do this by default, so fire the event
-             * here with the page's url as the title.
-             */
-            WebFrame frame = new WebFrame(frameID);
-            WebDataSource dataSource = frame.dataSource();
-            if (dataSource !is null)
-            {
-                NSString title = dataSource.pageTitle();
-                if (title is null)
-                {   /* page has no title */
-                    const TitleEvent newEvent = new TitleEvent(browser);
-                    newEvent.display = display;
-                    newEvent.widget = browser;
-                    newEvent.title = url;
-                    for (int i = 0; i < titleListeners.length; i++)
-                    {
-                        const TitleListener listener = titleListeners[i];
-                        /*
-                         * Note on WebKit.  Running the event loop from a Browser
-                         * delegatee callback breaks the WebKit (stop loading or
-                         * crash).  The workaround is to invoke Display.asyncExec()
-                         * so that the Browser does not crash if this is attempted.
-                         */
-                        display.asyncExec(new class (display, listener) Runnable
-                        {
-                            Display display;
-                            TitleListener listener;
-                            
-                            this (Display display, TitleListener listener)
-                            {
-                                this.display = display;
-                                this.listener = listener;
-                            }
-                            
-                            public void run ()
-                            {
-                                if (!display.isDisposed() && !browser.isDisposed())
-                                {
-                                    listener.changed(newEvent);
-                                }
-                            }
-                        });
+    Listener listener = new Listener() {
+        public void handleEvent(Event e) {
+            switch (e.type) {
+                case DWT.FocusIn:
+                    Safari.this.webView.window().makeFirstResponder(Safari.this.webView);
+                    break;
+                case DWT.Dispose: {
+                    /* make this handler run after other dispose listeners */
+                    if (ignoreDispose) {
+                        ignoreDispose = false;
+                        break;
                     }
+                    ignoreDispose = true;
+                    browser.notifyListeners (e.type, e);
+                    e.type = DWT.NONE;
+
+                    e.display.setData(ADD_WIDGET_KEY, new Object[] {delegate, null});
+
+                    Safari.this.webView.setFrameLoadDelegate(null);
+                    Safari.this.webView.setResourceLoadDelegate(null);
+                    Safari.this.webView.setUIDelegate(null);
+                    Safari.this.webView.setPolicyDelegate(null);
+                    Safari.this.webView.setDownloadDelegate(null);
+                    notificationCenter.removeObserver(delegate);
+
+                    Safari.this.webView.release();
+                    Safari.this.webView = null;
+                    Safari.this.delegate.release();
+                    Safari.this.delegate = null;
+                    html = null;
+                    lastHoveredLinkURL = null;
+                    break;
                 }
             }
-            const ProgressEvent progress = new ProgressEvent(browser);
-            progress.display = display;
-            progress.widget = browser;
-            progress.current = MAX_PROGRESS;
-            progress.total = MAX_PROGRESS;
-            for (int i = 0; i < progressListeners.length; i++)
-            {
-                const ProgressListener listener = progressListeners[i];
-                /*
-                 * Note on WebKit.  Running the event loop from a Browser
-                 * delegatee callback breaks the WebKit (stop loading or
-                 * crash).  The ProgressBar widget currently touches the
-                 * event loop every time the method setSelection is called.  
-                 * The workaround is to invoke Display.asyncExec() so that
-                 * the Browser does not crash when the user updates the 
-                 * selection of the ProgressBar.
-                 */
-                display.asyncExec(new class (display, listener) Runnable
-                {
-                    Display display;
-                    ProgressListener listener;
-                    
-                    this (Display display, ProgressListener listener)
-                    {
-                        this.display = display;
-                        this.listener = listener;
-                    }
-                    
-                    public void run ()
-                    {
-                        if (!display.isDisposed() && !browser.isDisposed())
-                        {
-                            listener.completed(progress);
-                        }
-                    }
-                });
-            }
-            /*
-             * Feature on Safari.  The identifier is used here as a marker for the events 
-             * related to the top frame and the URL changes related to that top frame as 
-             * they should appear on the location bar of a browser.  It is expected to reset
-             * the identifier to 0 when the event didFinishLoadingFromDataSource related to 
-             * the identifierForInitialRequest event is received.  However, Safari fires
-             * the didFinishLoadingFromDataSource event before the entire content of the
-             * top frame is loaded.  It is possible to receive multiple willSendRequest 
-             * events in this interval, causing the Browser widget to send unwanted
-             * Location.changing events.  For this reason, the identifier is reset to 0
-             * when the top frame has either finished loading (didFinishLoadForFrame
-             * event) or failed (didFailProvisionalLoadWithError).
-             */
-            identifier = 0;
         }
-    }
-
-    void hookDOMKeyListeners (int frameID)
-    {
-        WebFrame frame = new WebFrame(frameID);
-        DOMDocument document = frame.DOMDocument();
-
-        NSString type = NSString.StringWith(DOMEVENT_KEYDOWN);
-        document.addEventListener_listener_useCapture(type, delegatee, false);
+    };
+    browser.addListener(DWT.Dispose, listener);
+    /* Needed to be able to tab into the browser */
+    browser.addListener(DWT.KeyDown, listener);
+    browser.addListener(DWT.FocusIn, listener);
 
-        type = NSString.StringWith(DOMEVENT_KEYUP);
-        document.addEventListener_listener_useCapture(type, delegatee, false);
-    }
+    webView.setFrameLoadDelegate(delegate);
+    webView.setResourceLoadDelegate(delegate);
+    webView.setUIDelegate(delegate);    
+    notificationCenter.addObserver(delegate, OS.sel_handleNotification_, null, webView);
+    webView.setPolicyDelegate(delegate);
+    webView.setDownloadDelegate(delegate);
+    webView.setApplicationNameForUserAgent(NSString.stringWith(AGENT_STRING));
 
-    void hookDOMMouseListeners (int frameID)
-    {
-        WebFrame frame = new WebFrame(frameID);
-        DOMDocument document = frame.DOMDocument();
+    if (!Initialized) {
+        Initialized = true;
+        /* disable applets */
+        WebPreferences.standardPreferences().setJavaEnabled(false);
+    }
+}
 
-        NSString type = NSString.StringWith(DOMEVENT_MOUSEDOWN);
-        document.addEventListener_listener_useCapture(type, delegatee, false);
-
-        type = NSString.StringWith(DOMEVENT_MOUSEUP);
-        document.addEventListener_listener_useCapture(type, delegatee, false);
+public bool back() {
+    html = null;    
+    return webView.goBack();
+}
 
-        type = NSString.StringWith(DOMEVENT_MOUSEMOVE);
-        document.addEventListener_listener_useCapture(type, delegatee, false);
-
-        type = NSString.StringWith(DOMEVENT_MOUSEWHEEL);
-        document.addEventListener_listener_useCapture(type, delegatee, false);
+static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    Widget widget = Display.getCurrent().findWidget(id);
+    if (widget is null) return 0;
+    Safari safari = (Safari)((Browser)widget).webBrowser;
+    if (sel is OS.sel_handleNotification_) {
+        safari.handleNotification(arg0);
+    } else if (sel is OS.sel_webViewShow_) {
+        safari.webViewShow(arg0);
+    } else if (sel is OS.sel_webViewClose_) {
+        safari.webViewClose(arg0);
+    } else if (sel is OS.sel_webViewFocus_) {
+        safari.webViewFocus(arg0);
+    } else if (sel is OS.sel_webViewUnfocus_) {
+        safari.webViewUnfocus(arg0);
+    } else if (sel is OS.sel_handleEvent_) {
+        safari.handleEvent(arg0);
     }
+    return 0;
+}
 
-    void webView_didReceiveTitle_forFrame (int sender, int titleID, int frameID)
-    {
-        if (frameID is webView.mainFrame().id)
-        {
-            NSString title = new NSString(titleID);
-            char[] buffer = new char[title.length()];
-            title.getCharacters_(buffer);
-            String newTitle = new String(buffer);
-            TitleEvent newEvent = new TitleEvent(browser);
-            newEvent.display = browser.getDisplay();
-            newEvent.widget = browser;
-            newEvent.title = newTitle;
-            for (int i = 0; i < titleListeners.length; i++)
-            {
-                titleListeners[i].changed(newEvent);
-            }
-        }
+static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+    Widget widget = Display.getCurrent().findWidget(id);
+    if (widget is null) return 0;
+    Safari safari = (Safari)((Browser)widget).webBrowser;
+    if (sel is OS.sel_webView_didChangeLocationWithinPageForFrame_) {
+        safari.webView_didChangeLocationWithinPageForFrame(arg0, arg1);
+    } else if (sel is OS.sel_webView_didFinishLoadForFrame_) {
+        safari.webView_didFinishLoadForFrame(arg0, arg1);
+    } else if (sel is OS.sel_webView_didStartProvisionalLoadForFrame_) {
+        safari.webView_didStartProvisionalLoadForFrame(arg0, arg1);
+    } else if (sel is OS.sel_webView_didCommitLoadForFrame_) {
+        safari.webView_didCommitLoadForFrame(arg0, arg1);
+    } else if (sel is OS.sel_webView_setFrame_) {
+        safari.webView_setFrame(arg0, arg1);
+    } else if (sel is OS.sel_webView_createWebViewWithRequest_) {
+        return safari.webView_createWebViewWithRequest(arg0, arg1);     
+    } else if (sel is OS.sel_webView_setStatusBarVisible_) {
+        safari.webView_setStatusBarVisible(arg0, arg1 !is 0);
+    } else if (sel is OS.sel_webView_setResizable_) {
+        safari.webView_setResizable(arg0, arg1 !is 0);
+    } else if (sel is OS.sel_webView_setStatusText_) {
+        safari.webView_setStatusText(arg0, arg1);
+    } else if (sel is OS.sel_webView_setToolbarsVisible_) {
+        safari.webView_setToolbarsVisible(arg0, arg1 !is 0);
+    } else if (sel is OS.sel_webView_runJavaScriptAlertPanelWithMessage_) {
+        safari.webView_runJavaScriptAlertPanelWithMessage(arg0, arg1);
+    } else if (sel is OS.sel_webView_runJavaScriptConfirmPanelWithMessage_) {
+        return safari.webView_runJavaScriptConfirmPanelWithMessage(arg0, arg1);
+    } else if (sel is OS.sel_webView_runOpenPanelForFileButtonWithResultListener_) {
+        safari.webView_runOpenPanelForFileButtonWithResultListener(arg0, arg1);
+    } else if (sel is OS.sel_download_decideDestinationWithSuggestedFilename_) {
+        safari.download_decideDestinationWithSuggestedFilename(arg0, arg1);
+    } else if (sel is OS.sel_webView_printFrameView_) {
+        safari.webView_printFrameView(arg0, arg1);
     }
+    return 0;
+}
 
-    void webView_didStartProvisionalLoadForFrame (int sender, int frameID)
-    {
-    /* 
-     * This code is intentionally commented.  WebFrameLoadDelegate:didStartProvisionalLoadForFrame is
-     * called before WebResourceLoadDelegate:willSendRequest and
-     * WebFrameLoadDelegate:didCommitLoadForFrame.  The resource count is reset when didCommitLoadForFrame
-     * is received for the top frame.
-     */
-    //  if (frameID is webView.mainFrame().id) {
-    //      /* reset resource status variables */
-    //      resourceCount= 0;
-    //  }
+static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+    Widget widget = Display.getCurrent().findWidget(id);
+    if (widget is null) return 0;
+    Safari safari = (Safari)((Browser)widget).webBrowser;
+    if (sel is OS.sel_webView_didFailProvisionalLoadWithError_forFrame_) {
+        safari.webView_didFailProvisionalLoadWithError_forFrame(arg0, arg1, arg2);
+    } else if (sel is OS.sel_webView_didReceiveTitle_forFrame_) {
+        safari.webView_didReceiveTitle_forFrame(arg0, arg1, arg2);
+    } else if (sel is OS.sel_webView_resource_didFinishLoadingFromDataSource_) {
+        safari.webView_resource_didFinishLoadingFromDataSource(arg0, arg1, arg2);
+    } else if (sel is OS.sel_webView_identifierForInitialRequest_fromDataSource_) {
+        return safari.webView_identifierForInitialRequest_fromDataSource(arg0, arg1, arg2);
+    } else if (sel is OS.sel_webView_contextMenuItemsForElement_defaultMenuItems_) {
+        return safari.webView_contextMenuItemsForElement_defaultMenuItems(arg0, arg1, arg2);
+    } else if (sel is OS.sel_webView_mouseDidMoveOverElement_modifierFlags_) {
+        safari.webView_mouseDidMoveOverElement_modifierFlags(arg0, arg1, arg2);
+    } else if (sel is OS.sel_webView_unableToImplementPolicyWithError_frame_) {
+        safari.webView_unableToImplementPolicyWithError_frame(arg0, arg1, arg2);
     }
+    return 0;
+}
 
-    void webView_didCommitLoadForFrame (int sender, int frameID)
-    {
-        WebFrame frame = new WebFrame(frameID);
-        WebDataSource dataSource = frame.dataSource();
-        NSURLRequest request = dataSource.request();
-        NSURL url = request.URL();
-        NSString s = url.absoluteString();
-        int length = s.length();
-        if (length is 0)
-            return;
-        char[] buffer = new char[length];
-        s.getCharacters_(buffer);
-        String url2 = new String(buffer);
-        /*
-         * If the URI indicates that the page is being rendered from memory
-         * (via setText()) then set it to about:blank to be consistent with IE.
-         */
-        if (url2.opEquals(URI_FROMMEMORY))
-            url2 = ABOUT_BLANK;
+static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
+    Widget widget = Display.getCurrent().findWidget(id);
+    if (widget is null) return 0;
+    Safari safari = (Safari)((Browser)widget).webBrowser;
+    if (sel is OS.sel_webView_resource_didFailLoadingWithError_fromDataSource_) {
+        safari.webView_resource_didFailLoadingWithError_fromDataSource(arg0, arg1, arg2, arg3);
+    }   
+    return 0;
+}
 
-        const Display display = browser.getDisplay();
-        bool top = frameID is webView.mainFrame().id;
-        if (top)
-        {
-            /* reset resource status variables */
-            resourceCount = 0;
-            this.url = url2;
+static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4) {
+    Widget widget = Display.getCurrent().findWidget(id);
+    if (widget is null) return 0;
+    Safari safari = (Safari)((Browser)widget).webBrowser;
+    if (sel is OS.sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_) {
+        return safari.webView_resource_willSendRequest_redirectResponse_fromDataSource(arg0, arg1, arg2, arg3, arg4);
+    } else if (sel is OS.sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_) {
+        safari.webView_decidePolicyForMIMEType_request_frame_decisionListener(arg0, arg1, arg2, arg3, arg4);
+    } else if (sel is OS.sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_) {
+        safari.webView_decidePolicyForNavigationAction_request_frame_decisionListener(arg0, arg1, arg2, arg3, arg4);
+    } else if (sel is OS.sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_) {
+        safari.webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener(arg0, arg1, arg2, arg3, arg4);
+    }
+    return 0;
+}
+
+public bool execute(String script) {
+    return webView.stringByEvaluatingJavaScriptFromString(NSString.stringWith(script)) !is null;
+}
+
+public bool forward() {
+    html = null;
+    return webView.goForward();
+}
 
-            const ProgressEvent progress = new ProgressEvent(browser);
-            progress.display = display;
-            progress.widget = browser;
-            progress.current = 1;
-            progress.total = MAX_PROGRESS;
-            for (int i = 0; i < progressListeners.length; i++)
-            {
-                const ProgressListener listener = progressListeners[i];
-                /*
-                 * Note on WebKit.  Running the event loop from a Browser
-                 * delegatee callback breaks the WebKit (stop loading or
-                 * crash).  The widget ProgressBar currently touches the
-                 * event loop every time the method setSelection is called.  
-                 * The workaround is to invoke Display.asyncexec so that
-                 * the Browser does not crash when the user updates the 
-                 * selection of the ProgressBar.
-                 */
-                display.asyncExec(new class (display, listener) Runnable
-                {
-                    Display display;
-                    ProgressListener listener;
-                    
-                    this (Display display, ProgressListener listener)
-                    {
-                        this.display = display;
-                        this.listener = listener;
-                    }
-                    
-                    public void run ()
-                    {
-                        if (!display.isDisposed() && !browser.isDisposed())
-                            listener.changed(progress);
-                    }
-                });
-            }
+public String getBrowserType () {
+    return "safari"; //$NON-NLS-1$
+}
+
+public String getText() {
+    WebFrame mainFrame = webView.mainFrame();
+    WebDataSource dataSource = mainFrame.dataSource();
+    if (dataSource is null) return "";  //$NON-NLS-1$
+    WebDocumentRepresentation representation = dataSource.representation();
+    if (representation is null) return "";  //$NON-NLS-1$
+    NSString source = representation.documentSource();
+    if (source is null) return "";  //$NON-NLS-1$
+    return source.getString();
+}
+
+public String getUrl() {
+    return url;
+}
+
+public bool isBackEnabled() {
+    return webView.canGoBack();
+}
+
+public bool isForwardEnabled() {
+    return webView.canGoForward();
+}
 
-            StatusTextEvent statusText = new StatusTextEvent(browser);
-            statusText.display = display;
-            statusText.widget = browser;
-            statusText.text = url2;
-            for (int i = 0; i < statusTextListeners.length; i++)
-            {
-                statusTextListeners[i].changed(statusText);
-            }
-        }
-        LocationEvent location = new LocationEvent(browser);
-        location.display = display;
-        location.widget = browser;
-        location.location = url2;
-        location.top = top;
-        for (int i = 0; i < locationListeners.length; i++)
-        {
-            locationListeners[i].changed(location);
-        }
-    }
+public void refresh() {
+    webView.reload(null);
+}
 
-    /* WebResourceLoadDelegate */
-
-    void webView_resource_didFinishLoadingFromDataSource (int sender, int identifier, int dataSource)
-    {
+public bool setText(String html) {
     /*
-     * Feature on Safari.  The identifier is used here as a marker for the events 
-     * related to the top frame and the URL changes related to that top frame as 
-     * they should appear on the location bar of a browser.  It is expected to reset
-     * the identifier to 0 when the event didFinishLoadingFromDataSource related to 
-     * the identifierForInitialRequest event is received.  However, Safari fires
-     * the didFinishLoadingFromDataSource event before the entire content of the
-     * top frame is loaded.  It is possible to receive multiple willSendRequest 
-     * events in this interval, causing the Browser widget to send unwanted
-     * Location.changing events.  For this reason, the identifier is reset to 0
-     * when the top frame has either finished loading (didFinishLoadForFrame
-     * event) or failed (didFailProvisionalLoadWithError).
-     */
-    // this code is intentionally commented
-    //if (this.identifier is identifier) this.identifier = 0;
+    * Bug in Safari.  The web view segment faults in some circumstances
+    * when the text changes during the location changing callback.  The
+    * fix is to defer the work until the callback is done. 
+    */
+    if (changingLocation) {
+        this.html = html;
+    } else {
+        _setText(html);
+    }
+    return true;
+}
+    
+void _setText(String html) {    
+    NSString string = NSString.stringWith(html);
+    NSString URLString = NSString.stringWith(URI_FROMMEMORY);
+    NSURL URL = NSURL.URLWithString(URLString);
+    WebFrame mainFrame = webView.mainFrame();
+    mainFrame.loadHTMLString(string, URL);
+}
+
+public bool setUrl(String url) {
+    html = null;
+
+    if (url.indexOf('/') is 0) {
+        url = PROTOCOL_FILE + url;
+    } else if (url.indexOf(':') is -1) {
+        url = PROTOCOL_HTTP + url;
     }
 
-    void webView_resource_didFailLoadingWithError_fromDataSource (int sender, int identifier, int error, int dataSource)
-    {
-    /*
-     * Feature on Safari.  The identifier is used here as a marker for the events 
-     * related to the top frame and the URL changes related to that top frame as 
-     * they should appear on the location bar of a browser.  It is expected to reset
-     * the identifier to 0 when the event didFinishLoadingFromDataSource related to 
-     * the identifierForInitialRequest event is received.  However, Safari fires
-     * the didFinishLoadingFromDataSource event before the entire content of the
-     * top frame is loaded.  It is possible to receive multiple willSendRequest 
-     * events in this interval, causing the Browser widget to send unwanted
-     * Location.changing events.  For this reason, the identifier is reset to 0
-     * when the top frame has either finished loading (didFinishLoadForFrame
-     * event) or failed (didFailProvisionalLoadWithError).
-     */
-    // this code is intentionally commented
-    //if (this.identifier is identifier) this.identifier = 0;
-    }
+    NSString str = NSString.stringWith(url);
+    NSString unescapedStr = NSString.stringWith("%#"); //$NON-NLS-1$
+    int /*long*/ ptr = OS.CFURLCreateStringByAddingPercentEscapes(0, str.id, unescapedStr.id, 0, OS.kCFStringEncodingUTF8);
+    NSString escapedString = new NSString(ptr);
+    NSURL inURL = NSURL.URLWithString(escapedString);
+    OS.CFRelease(ptr);
+    NSURLRequest request = NSURLRequest.requestWithURL(inURL);
+    WebFrame mainFrame = webView.mainFrame();
+    mainFrame.loadRequest(request);
+    return true;
+}
 
-    int webView_identifierForInitialRequest_fromDataSource (int sender, int request, int dataSourceID)
-    {
-        const Display display = browser.getDisplay();
-        const ProgressEvent progress = new ProgressEvent(browser);
-        progress.display = display;
-        progress.widget = browser;
-        progress.current = resourceCount;
-        progress.total = Math.max(resourceCount, MAX_PROGRESS);
-        for (int i = 0; i < progressListeners.length; i++)
-        {
-            const ProgressListener listener = progressListeners[i];
-            /*
-             * Note on WebKit.  Running the event loop from a Browser
-             * delegatee callback breaks the WebKit (stop loading or
-             * crash).  The widget ProgressBar currently touches the
-             * event loop every time the method setSelection is called.  
-             * The workaround is to invoke Display.asyncexec so that
-             * the Browser does not crash when the user updates the 
-             * selection of the ProgressBar.
-             */
-            display.asyncExec(new class (display, listener) Runnable
-            {
-                Display display;
-                ProgressListener listener;
-                
-                this (Display display, ProgressListener listener)
-                {
-                    this.display = display;
-                    this.listener = listener;
-                }
-                
-                public void run ()
-                {
-                    if (!display.isDisposed() && !browser.isDisposed())
-                        listener.changed(progress);
-                }
-            });
-        }
+public void stop() {
+    html = null;
+    webView.stopLoading(null);
+}
 
-        NSNumber identifier = NSNumber.numberWithInt(resourceCount++);
-        if (this.identifier is 0)
-        {
-            WebDataSource dataSource = new WebDataSource(dataSourceID);
-            WebFrame frame = dataSource.webFrame();
-            if (frame.id is webView.mainFrame().id)
-                this.identifier = identifier.id;
-        }
-        return identifier.id;
-
-    }
-
-    int webView_resource_willSendRequest_redirectResponse_fromDataSource (int sender, int identifier, int request, int redirectResponse,
-            int dataSource)
-    {
-        return request;
-    }
-
-    /* handleNotification */
-
-    void handleNotification (int notification)
-    {
-    }
-
-    /* UIDelegate */
-    int webView_createWebViewWithRequest (int sender, int request)
-    {
-        WindowEvent newEvent = new WindowEvent(browser);
-        newEvent.display = browser.getDisplay();
-        newEvent.widget = browser;
-        newEvent.required = true;
-        if (openWindowListeners !is null)
-        {
-            for (int i = 0; i < openWindowListeners.length; i++)
-            {
-                openWindowListeners[i].open(newEvent);
-            }
-        }
-        Browser browser = null;
-        if (newEvent.browser !is null && cast(Safari) newEvent.browser.webBrowser)
-        {
-            browser = newEvent.browser;
-        }
-        if (browser !is null && !browser.isDisposed())
-        {
-            if (request !is 0)
-            {
-                WebFrame mainFrame = webView.mainFrame();
-                mainFrame.loadRequest(new NSURLRequest(request));
-            }
-        }
-        return webView.id;
-    }
+/* WebFrameLoadDelegate */
 
-    void webViewShow (int sender)
-    {
-        /*
-         * Feature on WebKit.  The Safari WebKit expects the application
-         * to create a new Window using the Objective C Cocoa API in response
-         * to UIDelegate.createWebViewWithRequest. The application is then
-         * expected to use Objective C Cocoa API to make this window visible
-         * when receiving the UIDelegate.webViewShow message.  For some reason,
-         * a window created with the Carbon API hosting the new browser instance
-         * does not redraw until it has been resized.  The fix is to increase the
-         * size of the Shell and restore it to its initial size.
-         */
-        Shell parent = browser.getShell();
-        Point pt = parent.getSize();
-        parent.setSize(pt.x + 1, pt.y);
-        parent.setSize(pt.x, pt.y);
-        WindowEvent newEvent = new WindowEvent(browser);
-        newEvent.display = browser.getDisplay();
-        newEvent.widget = browser;
-        if (location !is null)
-            newEvent.location = location;
-        if (size !is null)
-            newEvent.size = size;
-        /*
-         * Feature in Safari.  Safari's tool bar contains
-         * the address bar.  The address bar is displayed
-         * if the tool bar is displayed. There is no separate
-         * notification for the address bar.
-         * Feature in Safari.  The menu bar is always
-         * displayed. There is no notification to hide
-         * the menu bar.
-         */
-        newEvent.addressBar = toolBar;
-        newEvent.menuBar = true;
-        newEvent.statusBar = statusBar;
-        newEvent.toolBar = toolBar;
-        for (int i = 0; i < visibilityWindowListeners.length; i++)
-        {
-            visibilityWindowListeners[i].show(newEvent);
-        }
-        location = null;
-        size = null;
-    }
-
-    void webView_setFrame (int sender, int frame)
-    {
-        float[] dest = new float[4];
-        OS.memmove(dest, frame, 16);
-        /* convert to DWT system coordinates */
-        Rectangle bounds = browser.getDisplay().getBounds();
-        location = new Point(cast(int) dest[0], bounds.height - cast(int) dest[1] - cast(int) dest[3]);
-        size = new Point(cast(int) dest[2], cast(int) dest[3]);
-    }
-
-    void webViewFocus (int sender)
-    {
-    }
-
-    void webViewUnfocus (int sender)
-    {
-    }
-
-    void webView_runJavaScriptAlertPanelWithMessage (int sender, int messageID)
-    {
-        NSString message = new NSString(messageID);
-        char[] buffer = new char[message.length()];
-        message.getCharacters_(buffer);
-        String text = new String(buffer);
-
-        MessageBox messageBox = new MessageBox(browser.getShell(), DWT.OK | DWT.ICON_WARNING);
-        messageBox.setText("Javascript"); //$NON-NLS-1$
-        messageBox.setMessage(text);
-        messageBox.open();
-    }
-
-    int webView_runJavaScriptConfirmPanelWithMessage (int sender, int messageID)
-    {
-        NSString message = new NSString(messageID);
-        char[] buffer = new char[message.length()];
-        message.getCharacters_(buffer);
-        String text = new String(buffer);
+void webView_didChangeLocationWithinPageForFrame(int /*long*/ sender, int /*long*/ frameID) {
+    WebFrame frame = new WebFrame(frameID);
+    WebDataSource dataSource = frame.dataSource();
+    NSURLRequest request = dataSource.request();
+    NSURL url = request.URL();
+    NSString s = url.absoluteString();
+    int length = (int)/*64*/s.length();
+    if (length is 0) return;
+    String url2 = s.getString();
+    /*
+     * If the URI indicates that the page is being rendered from memory
+     * (via setText()) then set it to about:blank to be consistent with IE.
+     */
+    if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
 
-        MessageBox messageBox = new MessageBox(browser.getShell(), DWT.OK | DWT.CANCEL | DWT.ICON_QUESTION);
-        messageBox.setText("Javascript"); //$NON-NLS-1$
-        messageBox.setMessage(text);
-        return messageBox.open() is DWT.OK ? 1 : 0;
-    }
-
-    void webView_runOpenPanelForFileButtonWithResultListener (int sender, int resultListenerID)
-    {
-        FileDialog dialog = new FileDialog(browser.getShell(), DWT.NONE);
-        String result = dialog.open();
-        WebOpenPanelResultListener resultListener = new WebOpenPanelResultListener(resultListenerID);
-        if (result is null)
-        {
-            resultListener.cancel();
-            return;
-        }
-        resultListener.chooseFilename(NSString.StringWith(result));
-    }
-
-    void webViewClose (int sender)
-    {
-        Shell parent = browser.getShell();
-        WindowEvent newEvent = new WindowEvent(browser);
-        newEvent.display = browser.getDisplay();
-        newEvent.widget = browser;
-        for (int i = 0; i < closeWindowListeners.length; i++)
-        {
-            closeWindowListeners[i].close(newEvent);
-        }
-        browser.dispose();
-        if (parent.isDisposed())
-            return;
-        /*
-         * Feature on WebKit.  The Safari WebKit expects the application
-         * to create a new Window using the Objective C Cocoa API in response
-         * to UIDelegate.createWebViewWithRequest. The application is then
-         * expected to use Objective C Cocoa API to make this window visible
-         * when receiving the UIDelegate.webViewShow message.  For some reason,
-         * a window created with the Carbon API hosting the new browser instance
-         * does not redraw until it has been resized.  The fix is to increase the
-         * size of the Shell and restore it to its initial size.
-         */
-        Point pt = parent.getSize();
-        parent.setSize(pt.x + 1, pt.y);
-        parent.setSize(pt.x, pt.y);
-    }
-
-    int webView_contextMenuItemsForElement_defaultMenuItems (int sender, int element, int defaultMenuItems)
-    {
-        Point pt = browser.getDisplay().getCursorLocation();
-        Event event = new Event();
-        event.x = pt.x;
-        event.y = pt.y;
-        browser.notifyListeners(DWT.MenuDetect, event);
-        Menu menu = browser.getMenu();
-        if (!event.doit)
-            return 0;
-        if (menu !is null && !menu.isDisposed())
-        {
-            if (event.x !is pt.x || event.y !is pt.y)
-            {
-                menu.setLocation(event.x, event.y);
-            }
-            menu.setVisible(true);
-            return 0;
-        }
-        return defaultMenuItems;
-    }
-
-    void webView_setStatusBarVisible (int sender, int visible)
-    {
-        /* Note.  Webkit only emits the notification when the status bar should be hidden. */
-        statusBar = visible !is 0;
-    }
-
-    void webView_setStatusText (int sender, int textID)
-    {
-        NSString text = new NSString(textID);
-        int length = text.length();
-        if (length is 0)
-            return;
-        char[] buffer = new char[length];
-        text.getCharacters_(buffer);
-
+    final Display display = browser.getDisplay();
+    bool top = frameID is webView.mainFrame().id;
+    if (top) {
         StatusTextEvent statusText = new StatusTextEvent(browser);
-        statusText.display = browser.getDisplay();
+        statusText.display = display;
         statusText.widget = browser;
-        statusText.text = new String(buffer);
-        for (int i = 0; i < statusTextListeners.length; i++)
-        {
+        statusText.text = url2;
+        for (int i = 0; i < statusTextListeners.length; i++) {
             statusTextListeners[i].changed(statusText);
         }
     }
 
-    void webView_setResizable (int sender, int visible)
-    {
+    LocationEvent location = new LocationEvent(browser);
+    location.display = display;
+    location.widget = browser;
+    location.location = url2;
+    location.top = top;
+    for (int i = 0; i < locationListeners.length; i++) {
+        locationListeners[i].changed(location);
     }
+}
 
-    void webView_setToolbarsVisible (int sender, int visible)
-    {
-        /* Note.  Webkit only emits the notification when the tool bar should be hidden. */
-        toolBar = visible !is 0;
+void webView_didFailProvisionalLoadWithError_forFrame(int /*long*/ sender, int /*long*/ error, int /*long*/ frame) {
+    if (frame is webView.mainFrame().id) {
+        /*
+        * Feature on Safari.  The identifier is used here as a marker for the events 
+        * related to the top frame and the URL changes related to that top frame as 
+        * they should appear on the location bar of a browser.  It is expected to reset
+        * the identifier to 0 when the event didFinishLoadingFromDataSource related to 
+        * the identifierForInitialRequest event is received.  However, Safari fires
+        * the didFinishLoadingFromDataSource event before the entire content of the
+        * top frame is loaded.  It is possible to receive multiple willSendRequest 
+        * events in this interval, causing the Browser widget to send unwanted
+        * Location.changing events.  For this reason, the identifier is reset to 0
+        * when the top frame has either finished loading (didFinishLoadForFrame
+        * event) or failed (didFailProvisionalLoadWithError).
+        */
+        identifier = 0;
     }
 
-    void webView_mouseDidMoveOverElement_modifierFlags (int sender, int elementInformationID, int modifierFlags)
-    {
-        if (elementInformationID is 0)
-            return;
+    NSError nserror = new NSError(error);
+    int /*long*/ errorCode = nserror.code();
+    if (errorCode <= OS.NSURLErrorBadURL) {
+        NSString description = nserror.localizedDescription();
+        if (description !is null) {
+            String descriptionString = description.getString();
+            String urlString = null;
+            NSDictionary info = nserror.userInfo();
+            if (info !is null) {
+                NSString key = new NSString(OS.NSErrorFailingURLStringKey());
+                id id = info.valueForKey(key);
+                if (id !is null) {
+                    NSString url = new NSString(id);
+                    urlString = url.getString();
+                }
+            }
+            String message = urlString !is null ? urlString + "\n\n" : ""; //$NON-NLS-1$ //$NON-NLS-2$
+            message += Compatibility.getMessage ("DWT_Page_Load_Failed", new Object[] {descriptionString}); //$NON-NLS-1$
+            MessageBox messageBox = new MessageBox(browser.getShell(), DWT.OK | DWT.ICON_ERROR);
+            messageBox.setMessage(message);
+            messageBox.open();
+        }
+    }
+}
+
+void webView_didFinishLoadForFrame(int /*long*/ sender, int /*long*/ frameID) {
+    hookDOMMouseListeners(frameID);
+    if (frameID is webView.mainFrame().id) {
+        hookDOMKeyListeners(frameID);
 
-        NSString key = NSString.StringWith(WebElementLinkURLKey);
-        NSDictionary elementInformation = new NSDictionary(elementInformationID);
-        id value = elementInformation.valueForKey(key);
-        if (value is null)
-        {
-            /* not currently over a link */
-            if (lastHoveredLinkURL is null)
-                return;
-            lastHoveredLinkURL = null;
-            StatusTextEvent statusText = new StatusTextEvent(browser);
-            statusText.display = browser.getDisplay();
-            statusText.widget = browser;
-            statusText.text = ""; //$NON-NLS-1$
-            for (int i = 0; i < statusTextListeners.length; i++)
-            {
-                statusTextListeners[i].changed(statusText);
+        final Display display = browser.getDisplay();
+        /*
+        * To be consistent with other platforms a title event should be fired when a
+        * page has completed loading.  A page with a <title> tag will do this
+        * automatically when the didReceiveTitle callback is received.  However a page
+        * without a <title> tag will not do this by default, so fire the event
+        * here with the page's url as the title.
+        */
+        WebFrame frame = new WebFrame(frameID);
+        WebDataSource dataSource = frame.dataSource();
+        if (dataSource !is null) {
+            NSString title = dataSource.pageTitle();
+            if (title is null) {    /* page has no title */
+                final TitleEvent newEvent = new TitleEvent(browser);
+                newEvent.display = display;
+                newEvent.widget = browser;
+                newEvent.title = url;
+                for (int i = 0; i < titleListeners.length; i++) {
+                    final TitleListener listener = titleListeners[i];
+                    /*
+                    * Note on WebKit.  Running the event loop from a Browser
+                    * delegate callback breaks the WebKit (stop loading or
+                    * crash).  The workaround is to invoke Display.asyncExec()
+                    * so that the Browser does not crash if this is attempted.
+                    */
+                    display.asyncExec(
+                        new Runnable() {
+                            public void run() {
+                                if (!display.isDisposed() && !browser.isDisposed()) {
+                                    listener.changed(newEvent);
+                                }
+                            }
+                        }
+                    );
+                }
             }
-            return;
+        }
+        final ProgressEvent progress = new ProgressEvent(browser);
+        progress.display = display;
+        progress.widget = browser;
+        progress.current = MAX_PROGRESS;
+        progress.total = MAX_PROGRESS;
+        for (int i = 0; i < progressListeners.length; i++) {
+            final ProgressListener listener = progressListeners[i];
+            /*
+            * Note on WebKit.  Running the event loop from a Browser
+            * delegate callback breaks the WebKit (stop loading or
+            * crash).  The ProgressBar widget currently touches the
+            * event loop every time the method setSelection is called.  
+            * The workaround is to invoke Display.asyncExec() so that
+            * the Browser does not crash when the user updates the 
+            * selection of the ProgressBar.
+            */
+            display.asyncExec(
+                new Runnable() {
+                    public void run() {
+                        if (!display.isDisposed() && !browser.isDisposed()) {
+                            listener.completed(progress);
+                        }
+                    }
+                }
+            );
+        }
+        /*
+        * Feature on Safari.  The identifier is used here as a marker for the events 
+        * related to the top frame and the URL changes related to that top frame as 
+        * they should appear on the location bar of a browser.  It is expected to reset
+        * the identifier to 0 when the event didFinishLoadingFromDataSource related to 
+        * the identifierForInitialRequest event is received.  However, Safari fires
+        * the didFinishLoadingFromDataSource event before the entire content of the
+        * top frame is loaded.  It is possible to receive multiple willSendRequest 
+        * events in this interval, causing the Browser widget to send unwanted
+        * Location.changing events.  For this reason, the identifier is reset to 0
+        * when the top frame has either finished loading (didFinishLoadForFrame
+        * event) or failed (didFailProvisionalLoadWithError).
+        */
+        identifier = 0;
+    }
+}
+
+void hookDOMKeyListeners(int /*long*/ frameID) {
+    WebFrame frame = new WebFrame(frameID);
+    DOMDocument document = frame.DOMDocument();
+
+    NSString type = NSString.stringWith(DOMEVENT_KEYDOWN);
+    document.addEventListener(type, delegate, false);
+
+    type = NSString.stringWith(DOMEVENT_KEYUP);
+    document.addEventListener(type, delegate, false);
+}
+
+void hookDOMMouseListeners(int /*long*/ frameID) {
+    WebFrame frame = new WebFrame(frameID);
+    DOMDocument document = frame.DOMDocument();
+
+    NSString type = NSString.stringWith(DOMEVENT_MOUSEDOWN);
+    document.addEventListener(type, delegate, false);
+
+    type = NSString.stringWith(DOMEVENT_MOUSEUP);
+    document.addEventListener(type, delegate, false);
+
+    type = NSString.stringWith(DOMEVENT_MOUSEMOVE);
+    document.addEventListener(type, delegate, false);
+
+    type = NSString.stringWith(DOMEVENT_MOUSEWHEEL);
+    document.addEventListener(type, delegate, false);
+}
+
+void webView_didReceiveTitle_forFrame(int /*long*/ sender, int /*long*/ titleID, int /*long*/ frameID) {
+    if (frameID is webView.mainFrame().id) {
+        NSString title = new NSString(titleID);
+        String newTitle = title.getString();
+        TitleEvent newEvent = new TitleEvent(browser);
+        newEvent.display = browser.getDisplay();
+        newEvent.widget = browser;
+        newEvent.title = newTitle;
+        for (int i = 0; i < titleListeners.length; i++) {
+            titleListeners[i].changed(newEvent);
+        }
+    }
+}
+
+void webView_didStartProvisionalLoadForFrame(int /*long*/ sender, int /*long*/ frameID) {
+    /* 
+    * This code is intentionally commented.  WebFrameLoadDelegate:didStartProvisionalLoadForFrame is
+    * called before WebResourceLoadDelegate:willSendRequest and
+    * WebFrameLoadDelegate:didCommitLoadForFrame.  The resource count is reset when didCommitLoadForFrame
+    * is received for the top frame.
+    */
+//  if (frameID is webView.mainFrame().id) {
+//      /* reset resource status variables */
+//      resourceCount= 0;
+//  }
+}
+
+void webView_didCommitLoadForFrame(int /*long*/ sender, int /*long*/ frameID) {
+    WebFrame frame = new WebFrame(frameID);
+    WebDataSource dataSource = frame.dataSource();
+    NSURLRequest request = dataSource.request();
+    NSURL url = request.URL();
+    NSString s = url.absoluteString();
+    int length = (int)/*64*/s.length();
+    if (length is 0) return;
+    String url2 = s.getString();
+    /*
+     * If the URI indicates that the page is being rendered from memory
+     * (via setText()) then set it to about:blank to be consistent with IE.
+     */
+    if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
+
+    final Display display = browser.getDisplay();
+    bool top = frameID is webView.mainFrame().id;
+    if (top) {
+        /* reset resource status variables */
+        resourceCount = 0;      
+        this.url = url2;
+
+        final ProgressEvent progress = new ProgressEvent(browser);
+        progress.display = display;
+        progress.widget = browser;
+        progress.current = 1;
+        progress.total = MAX_PROGRESS;
+        for (int i = 0; i < progressListeners.length; i++) {
+            final ProgressListener listener = progressListeners[i];
+            /*
+            * Note on WebKit.  Running the event loop from a Browser
+            * delegate callback breaks the WebKit (stop loading or
+            * crash).  The widget ProgressBar currently touches the
+            * event loop every time the method setSelection is called.  
+            * The workaround is to invoke Display.asyncexec so that
+            * the Browser does not crash when the user updates the 
+            * selection of the ProgressBar.
+            */
+            display.asyncExec(
+                new Runnable() {
+                    public void run() {
+                        if (!display.isDisposed() && !browser.isDisposed())
+                            listener.changed(progress);
+                    }
+                }
+            );
         }
 
-        NSString url = (new NSURL(value.id)).absoluteString();
-        int length = url.length();
-        String urlString;
-        if (length is 0)
-        {
-            urlString = ""; //$NON-NLS-1$
-        }
-        else
-        {
-            char[] buffer = new char[length];
-            url.getCharacters_(buffer);
-            urlString = new String(buffer);
-        }
-        if (urlString.opEquals(lastHoveredLinkURL))
-            return;
-
-        lastHoveredLinkURL = urlString;
         StatusTextEvent statusText = new StatusTextEvent(browser);
-        statusText.display = browser.getDisplay();
+        statusText.display = display;
         statusText.widget = browser;
-        statusText.text = urlString;
-        for (int i = 0; i < statusTextListeners.length; i++)
-        {
+        statusText.text = url2;
+        for (int i = 0; i < statusTextListeners.length; i++) {
             statusTextListeners[i].changed(statusText);
         }
     }
+    LocationEvent location = new LocationEvent(browser);
+    location.display = display;
+    location.widget = browser;
+    location.location = url2;
+    location.top = top;
+    for (int i = 0; i < locationListeners.length; i++) {
+        locationListeners[i].changed(location);
+    }
+}
 
-    void webView_printFrameView (int sender, int frameViewID)
-    {
-        WebFrameView view = new WebFrameView(frameViewID);
-        bool viewPrint = view.documentViewShouldHandlePrint();
-        if (viewPrint)
-        {
-            view.printDocumentView();
-            return;
-        }
-        NSPrintInfo info = NSPrintInfo.sharedPrintInfo();
-        NSPrintOperation operation = view.printOperationWithPrintInfo(info);
-        if (operation !is null)
-            operation.runOperation();
-    }
+/* WebResourceLoadDelegate */
 
-    /* PolicyDelegate */
-
-    void webView_decidePolicyForMIMEType_request_frame_decisionListener (int sender, int type, int request, int frame, int listenerID)
-    {
-        bool canShow = WebView.canShowMIMEType(new NSString(type));
-        WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
-        if (canShow)
-        {
-            listener.use();
-        }
-        else
-        {
-            listener.download();
-        }
-    }
+void webView_resource_didFinishLoadingFromDataSource(int /*long*/ sender, int /*long*/ identifier, int /*long*/ dataSource) {
+    /*
+    * Feature on Safari.  The identifier is used here as a marker for the events 
+    * related to the top frame and the URL changes related to that top frame as 
+    * they should appear on the location bar of a browser.  It is expected to reset
+    * the identifier to 0 when the event didFinishLoadingFromDataSource related to 
+    * the identifierForInitialRequest event is received.  However, Safari fires
+    * the didFinishLoadingFromDataSource event before the entire content of the
+    * top frame is loaded.  It is possible to receive multiple willSendRequest 
+    * events in this interval, causing the Browser widget to send unwanted
+    * Location.changing events.  For this reason, the identifier is reset to 0
+    * when the top frame has either finished loading (didFinishLoadForFrame
+    * event) or failed (didFailProvisionalLoadWithError).
+    */
+    // this code is intentionally commented
+    //if (this.identifier is identifier) this.identifier = 0;
+}
 
-    void webView_decidePolicyForNavigationAction_request_frame_decisionListener (int sender, int actionInformation, int request, int frame,
-            int listenerID)
-    {
-        NSURL url = (new NSURLRequest(request)).URL();
-        WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
-        if (url is null)
-        {
-            /* indicates that a URL with an invalid format was specified */
-            listener.ignore();
-            return;
-        }
-        NSString s = url.absoluteString();
-        char[] buffer = new char[s.length()];
-        s.getCharacters_(buffer);
-        String url2 = new String(buffer);
-        /*
-         * If the URI indicates that the page is being rendered from memory
-         * (via setText()) then set it to about:blank to be consistent with IE.
-         */
-        if (url2.opEquals(URI_FROMMEMORY))
-            url2 = ABOUT_BLANK;
+void webView_resource_didFailLoadingWithError_fromDataSource(int /*long*/ sender, int /*long*/ identifier, int /*long*/ error, int /*long*/ dataSource) {
+    /*
+    * Feature on Safari.  The identifier is used here as a marker for the events 
+    * related to the top frame and the URL changes related to that top frame as 
+    * they should appear on the location bar of a browser.  It is expected to reset
+    * the identifier to 0 when the event didFinishLoadingFromDataSource related to 
+    * the identifierForInitialRequest event is received.  However, Safari fires
+    * the didFinishLoadingFromDataSource event before the entire content of the
+    * top frame is loaded.  It is possible to receive multiple willSendRequest 
+    * events in this interval, causing the Browser widget to send unwanted
+    * Location.changing events.  For this reason, the identifier is reset to 0
+    * when the top frame has either finished loading (didFinishLoadForFrame
+    * event) or failed (didFailProvisionalLoadWithError).
+    */
+    // this code is intentionally commented
+    //if (this.identifier is identifier) this.identifier = 0;
+}
 
-        LocationEvent newEvent = new LocationEvent(browser);
-        newEvent.display = browser.getDisplay();
-        newEvent.widget = browser;
-        newEvent.location = url2;
-        newEvent.doit = true;
-        if (locationListeners !is null)
-        {
-            changingLocation = true;
-            for (int i = 0; i < locationListeners.length; i++)
-            {
-                locationListeners[i].changing(newEvent);
+int /*long*/ webView_identifierForInitialRequest_fromDataSource(int /*long*/ sender, int /*long*/ request, int /*long*/ dataSourceID) {
+    final Display display = browser.getDisplay();
+    final ProgressEvent progress = new ProgressEvent(browser);
+    progress.display = display;
+    progress.widget = browser;
+    progress.current = resourceCount;
+    progress.total = Math.max(resourceCount, MAX_PROGRESS);
+    for (int i = 0; i < progressListeners.length; i++) {
+        final ProgressListener listener = progressListeners[i];
+        /*
+        * Note on WebKit.  Running the event loop from a Browser
+        * delegate callback breaks the WebKit (stop loading or
+        * crash).  The widget ProgressBar currently touches the
+        * event loop every time the method setSelection is called.  
+        * The workaround is to invoke Display.asyncexec so that
+        * the Browser does not crash when the user updates the 
+        * selection of the ProgressBar.
+        */
+        display.asyncExec(
+            new Runnable() {
+                public void run() {
+                    if (!display.isDisposed() && !browser.isDisposed())
+                        listener.changed(progress);
+                }
             }
-            changingLocation = false;
-        }
-        if (newEvent.doit)
-        {
-            listener.use();
-        }
-        else
-        {
-            listener.ignore();
-        }
-        if (html !is null && !browser.isDisposed())
-        {
-            String html = this.html;
-            this.html = null;
-            _setText(html);
-        }
-    }
-
-    void webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener (int sender, int actionInformation, int request, int frameName,
-            int listenerID)
-    {
-        WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
-        listener.use();
+        );
     }
 
-    void webView_unableToImplementPolicyWithError_frame (int sender, int error, int frame)
-    {
+    NSNumber identifier = NSNumber.numberWithInt(resourceCount++);
+    if (this.identifier is 0) {
+        WebDataSource dataSource = new WebDataSource(dataSourceID);
+        WebFrame frame = dataSource.webFrame();
+        if (frame.id is webView.mainFrame().id) this.identifier = identifier.id;
+    }
+    return identifier.id;
+        
+}
+
+int /*long*/ webView_resource_willSendRequest_redirectResponse_fromDataSource(int /*long*/ sender, int /*long*/ identifier, int /*long*/ request, int /*long*/ redirectResponse, int /*long*/ dataSource) {
+    return request;
+}
+
+/* handleNotification */
+
+void handleNotification(int /*long*/ notification) {    
+}
+
+/* UIDelegate */
+
+int /*long*/ webView_createWebViewWithRequest(int /*long*/ sender, int /*long*/ request) {
+    WindowEvent newEvent = new WindowEvent(browser);
+    newEvent.display = browser.getDisplay();
+    newEvent.widget = browser;
+    newEvent.required = true;
+    if (openWindowListeners !is null) {
+        for (int i = 0; i < openWindowListeners.length; i++) {
+            openWindowListeners[i].open(newEvent);
+        }
+    }
+    WebView result = null;
+    Browser browser = null;
+    if (newEvent.browser !is null && newEvent.browser.webBrowser instanceof Safari) {
+        browser = newEvent.browser;
+    }
+    if (browser !is null && !browser.isDisposed()) {
+        result = ((Safari)browser.webBrowser).webView;
+        if (request !is 0) {
+            WebFrame mainFrame = webView.mainFrame();
+            mainFrame.loadRequest(new NSURLRequest(request));
+        }
     }
+    return result !is null ? result.id : 0;
+}
 
-    /* WebDownload */
+void webViewShow(int /*long*/ sender) {
+    /*
+    * Feature on WebKit.  The Safari WebKit expects the application
+    * to create a new Window using the Objective C Cocoa API in response
+    * to UIDelegate.createWebViewWithRequest. The application is then
+    * expected to use Objective C Cocoa API to make this window visible
+    * when receiving the UIDelegate.webViewShow message.  For some reason,
+    * a window created with the Carbon API hosting the new browser instance
+    * does not redraw until it has been resized.  The fix is to increase the
+    * size of the Shell and restore it to its initial size.
+    */
+    Shell parent = browser.getShell();
+    Point pt = parent.getSize();
+    parent.setSize(pt.x+1, pt.y);
+    parent.setSize(pt.x, pt.y);
+    WindowEvent newEvent = new WindowEvent(browser);
+    newEvent.display = browser.getDisplay();
+    newEvent.widget = browser;
+    if (location !is null) newEvent.location = location;
+    if (size !is null) newEvent.size = size;
+    /*
+    * Feature in Safari.  Safari's tool bar contains
+    * the address bar.  The address bar is displayed
+    * if the tool bar is displayed. There is no separate
+    * notification for the address bar.
+    * Feature in Safari.  The menu bar is always
+    * displayed. There is no notification to hide
+    * the menu bar.
+    */
+    newEvent.addressBar = toolBar;
+    newEvent.menuBar = true;
+    newEvent.statusBar = statusBar;
+    newEvent.toolBar = toolBar;
+    for (int i = 0; i < visibilityWindowListeners.length; i++) {
+        visibilityWindowListeners[i].show(newEvent);
+    }
+    location = null;
+    size = null;
+}
+
+void webView_setFrame(int /*long*/ sender, int /*long*/ frame) {
+    NSRect rect = new NSRect();
+    OS.memmove(rect, frame, NSRect.sizeof);
+    /* convert to DWT system coordinates */
+    Rectangle bounds = browser.getDisplay().getBounds();
+    location = new Point((int)rect.x, bounds.height - (int)rect.y - (int)rect.height);
+    size = new Point((int)rect.width, (int)rect.height);
+}
+
+void webViewFocus(int /*long*/ sender) {
+}
+
+void webViewUnfocus(int /*long*/ sender) {
+}
+
+void webView_runJavaScriptAlertPanelWithMessage(int /*long*/ sender, int /*long*/ messageID) {
+    NSString message = new NSString(messageID);
+    String text = message.getString();
 
-    void download_decideDestinationWithSuggestedFilename (int downloadId, int filename)
-    {
-        NSString String = new NSString(filename);
-        char[] buffer = new char[String.length()];
-        String.getCharacters_(buffer);
-        String name = new String(buffer);
-        FileDialog dialog = new FileDialog(browser.getShell(), DWT.SAVE);
-        dialog.setText(DWT.getMessage("DWT_FileDownload")); //$NON-NLS-1$
-        dialog.setFileName(name);
-        String path = dialog.open();
-        NSURLDownload download = new NSURLDownload(downloadId);
-        if (path is null)
-        {
-            /* cancel pressed */
-            download.cancel();
-            return;
+    MessageBox messageBox = new MessageBox(browser.getShell(), DWT.OK | DWT.ICON_WARNING);
+    messageBox.setText("Javascript");   //$NON-NLS-1$
+    messageBox.setMessage(text);
+    messageBox.open();
+}
+
+int webView_runJavaScriptConfirmPanelWithMessage(int /*long*/ sender, int /*long*/ messageID) {
+    NSString message = new NSString(messageID);
+    String text = message.getString();
+
+    MessageBox messageBox = new MessageBox(browser.getShell(), DWT.OK | DWT.CANCEL | DWT.ICON_QUESTION);
+    messageBox.setText("Javascript");   //$NON-NLS-1$
+    messageBox.setMessage(text);
+    return messageBox.open() is DWT.OK ? 1 : 0;
+}
+
+void webView_runOpenPanelForFileButtonWithResultListener(int /*long*/ sender, int /*long*/ resultListenerID) {
+    FileDialog dialog = new FileDialog(browser.getShell(), DWT.NONE);
+    String result = dialog.open();
+    WebOpenPanelResultListener resultListener = new WebOpenPanelResultListener(resultListenerID);
+    if (result is null) {
+        resultListener.cancel();
+        return;
+    }
+    resultListener.chooseFilename(NSString.stringWith(result));
+}
+
+void webViewClose(int /*long*/ sender) {
+    Shell parent = browser.getShell();
+    WindowEvent newEvent = new WindowEvent(browser);
+    newEvent.display = browser.getDisplay();
+    newEvent.widget = browser;
+    for (int i = 0; i < closeWindowListeners.length; i++) {
+        closeWindowListeners[i].close(newEvent);
+    }
+    browser.dispose();
+    if (parent.isDisposed()) return;
+    /*
+    * Feature on WebKit.  The Safari WebKit expects the application
+    * to create a new Window using the Objective C Cocoa API in response
+    * to UIDelegate.createWebViewWithRequest. The application is then
+    * expected to use Objective C Cocoa API to make this window visible
+    * when receiving the UIDelegate.webViewShow message.  For some reason,
+    * a window created with the Carbon API hosting the new browser instance
+    * does not redraw until it has been resized.  The fix is to increase the
+    * size of the Shell and restore it to its initial size.
+    */
+    Point pt = parent.getSize();
+    parent.setSize(pt.x+1, pt.y);
+    parent.setSize(pt.x, pt.y);
+}
+
+int /*long*/ webView_contextMenuItemsForElement_defaultMenuItems(int /*long*/ sender, int /*long*/ element, int /*long*/ defaultMenuItems) {
+    Point pt = browser.getDisplay().getCursorLocation();
+    Event event = new Event();
+    event.x = pt.x;
+    event.y = pt.y;
+    browser.notifyListeners(DWT.MenuDetect, event);
+    Menu menu = browser.getMenu();
+    if (!event.doit) return 0;
+    if (menu !is null && !menu.isDisposed()) {
+        if (event.x !is pt.x || event.y !is pt.y) {
+            menu.setLocation(event.x, event.y);
         }
-        download.setDestination(NSString.StringWith(path), true);
+        menu.setVisible(true);
+        return 0;
+    }
+    return defaultMenuItems;
+}
+
+void webView_setStatusBarVisible(int /*long*/ sender, bool visible) {
+    /* Note.  Webkit only emits the notification when the status bar should be hidden. */
+    statusBar = visible;
+}
+
+void webView_setStatusText(int /*long*/ sender, int /*long*/ textID) {
+    NSString text = new NSString(textID);
+    int length = (int)/*64*/text.length();
+    if (length is 0) return;
+
+    StatusTextEvent statusText = new StatusTextEvent(browser);
+    statusText.display = browser.getDisplay();
+    statusText.widget = browser;
+    statusText.text = text.getString();
+    for (int i = 0; i < statusTextListeners.length; i++) {
+        statusTextListeners[i].changed(statusText);
+    }
+}
+
+void webView_setResizable(int /*long*/ sender, bool visible) {
+}
+
+void webView_setToolbarsVisible(int /*long*/ sender, bool visible) {
+    /* Note.  Webkit only emits the notification when the tool bar should be hidden. */
+    toolBar = visible;
+}
+
+void webView_mouseDidMoveOverElement_modifierFlags (int /*long*/ sender, int /*long*/ elementInformationID, int /*long*/ modifierFlags) {
+    if (elementInformationID is 0) return;
+
+    NSString key = NSString.stringWith(WebElementLinkURLKey);
+    NSDictionary elementInformation = new NSDictionary(elementInformationID);
+    id value = elementInformation.valueForKey(key);
+    if (value is null) {
+        /* not currently over a link */
+        if (lastHoveredLinkURL is null) return;
+        lastHoveredLinkURL = null;
+        StatusTextEvent statusText = new StatusTextEvent(browser);
+        statusText.display = browser.getDisplay();
+        statusText.widget = browser;
+        statusText.text = "";   //$NON-NLS-1$
+        for (int i = 0; i < statusTextListeners.length; i++) {
+            statusTextListeners[i].changed(statusText);
+        }
+        return;
     }
 
-    /* DOMEventListener */
+    NSString url = new NSURL(value.id).absoluteString();
+    int length = (int)/*64*/url.length();
+    String urlString;
+    if (length is 0) {
+        urlString = ""; //$NON-NLS-1$
+    } else {
+        urlString = url.getString();
+    }
+    if (urlString.equals(lastHoveredLinkURL)) return;
 
-    void handleEvent (int evtId)
-    {
-        DOMEvent evt = new DOMEvent(evtId);
-        NSString String = evt.type();
-        char[] buffer = new char[String.length()];
-        String.getCharacters_(buffer);
-        String type = new String(buffer);
+    lastHoveredLinkURL = urlString;
+    StatusTextEvent statusText = new StatusTextEvent(browser);
+    statusText.display = browser.getDisplay();
+    statusText.widget = browser;
+    statusText.text = urlString;
+    for (int i = 0; i < statusTextListeners.length; i++) {
+        statusTextListeners[i].changed(statusText);
+    }
+}
 
-        if (DOMEVENT_KEYDOWN.opEquals(type) || DOMEVENT_KEYUP.opEquals(type))
-        {
-            DOMKeyboardEvent event = new DOMKeyboardEvent(evtId);
+void webView_printFrameView (int /*long*/ sender, int /*long*/ frameViewID) {
+    WebFrameView view = new WebFrameView(frameViewID);
+    bool viewPrint = view.documentViewShouldHandlePrint();
+    if (viewPrint) {
+        view.printDocumentView();
+        return;
+    }
+    NSPrintInfo info = NSPrintInfo.sharedPrintInfo();
+    NSPrintOperation operation = view.printOperationWithPrintInfo(info);
+    if (operation !is null) operation.runOperation();
+}
+
+/* PolicyDelegate */
 
-            bool ctrl = event.ctrlKey();
-            bool shift = event.shiftKey();
-            bool alt = event.altKey();
-            bool meta = event.metaKey();
-            int keyCode = event.keyCode();
-            int charCode = event.charCode();
+void webView_decidePolicyForMIMEType_request_frame_decisionListener(int /*long*/ sender, int /*long*/ type, int /*long*/ request, int /*long*/ frame, int /*long*/ listenerID) {
+    bool canShow = WebView.canShowMIMEType(new NSString(type));
+    WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
+    if (canShow) {
+        listener.use();
+    } else {
+        listener.download();
+    }
+}
+
+void webView_decidePolicyForNavigationAction_request_frame_decisionListener(int /*long*/ sender, int /*long*/ actionInformation, int /*long*/ request, int /*long*/ frame, int /*long*/ listenerID) {
+    NSURL url = new NSURLRequest(request).URL();
+    WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
+    if (url is null) {
+        /* indicates that a URL with an invalid format was specified */
+        listener.ignore();
+        return;
+    }
+    NSString s = url.absoluteString();
+    String url2 = s.getString();
+    /*
+     * If the URI indicates that the page is being rendered from memory
+     * (via setText()) then set it to about:blank to be consistent with IE.
+     */
+    if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
 
-            Event keyEvent = new Event();
-            keyEvent.widget = browser;
-            if (DOMEVENT_KEYDOWN.opEquals(type))
-            {
-                keyEvent.type = DWT.KeyDown;
-            }
-            else
-            {
-                keyEvent.type = DWT.KeyUp;
-            }
-            keyEvent.keyCode = translateKey(keyCode);
-            keyEvent.character = cast(char) charCode;
-            keyEvent.stateMask = (alt ? DWT.ALT : 0) | (ctrl ? DWT.CTRL : 0) | (shift ? DWT.SHIFT : 0) | (meta ? DWT.COMMAND : 0);
-            browser.notifyListeners(keyEvent.type, keyEvent);
-            if (!keyEvent.doit)
-            {
-                event.preventDefault();
-            }
-            return;
+    LocationEvent newEvent = new LocationEvent(browser);
+    newEvent.display = browser.getDisplay();
+    newEvent.widget = browser;
+    newEvent.location = url2;
+    newEvent.doit = true;
+    if (locationListeners !is null) {
+        changingLocation = true;
+        for (int i = 0; i < locationListeners.length; i++) {
+            locationListeners[i].changing(newEvent);
         }
+        changingLocation = false;
+    }
+    if (newEvent.doit) {
+        listener.use();
+    } else {
+        listener.ignore();
+    }
+    if (html !is null && !browser.isDisposed()) {
+        String html = this.html;
+        this.html = null;
+        _setText(html);
+    }
+}
+
+void webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener(int /*long*/ sender, int /*long*/ actionInformation, int /*long*/ request, int /*long*/ frameName, int /*long*/ listenerID) {
+    WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
+    listener.use();
+}
 
-        if (DOMEVENT_MOUSEWHEEL.opEquals(type))
-        {
-            DOMWheelEvent event = new DOMWheelEvent(evtId);
-            int clientX = event.clientX();
-            int clientY = event.clientY();
-            int delta = event.wheelDelta();
-            bool ctrl = event.ctrlKey();
-            bool shift = event.shiftKey();
-            bool alt = event.altKey();
-            bool meta = event.metaKey();
-            Event mouseEvent = new Event();
-            mouseEvent.type = DWT.MouseWheel;
-            mouseEvent.widget = browser;
-            mouseEvent.x = clientX;
-            mouseEvent.y = clientY;
-            mouseEvent.count = delta / 120;
-            mouseEvent.stateMask = (alt ? DWT.ALT : 0) | (ctrl ? DWT.CTRL : 0) | (shift ? DWT.SHIFT : 0) | (meta ? DWT.COMMAND : 0);
-            browser.notifyListeners(mouseEvent.type, mouseEvent);
-            return;
-        }
+void webView_unableToImplementPolicyWithError_frame(int /*long*/ sender, int /*long*/ error, int /*long*/ frame) {
+}
+
+/* WebDownload */
 
-        /* mouse event */
-
-        DOMMouseEvent event = new DOMMouseEvent(evtId);
+void download_decideDestinationWithSuggestedFilename(int /*long*/ downloadId, int /*long*/ filename) {
+    NSString string = new NSString(filename);
+    String name = string.getString();
+    FileDialog dialog = new FileDialog(browser.getShell(), DWT.SAVE);
+    dialog.setText(DWT.getMessage ("DWT_FileDownload")); //$NON-NLS-1$
+    dialog.setFileName(name);
+    String path = dialog.open();
+    NSURLDownload download = new NSURLDownload(downloadId);
+    if (path is null) {
+        /* cancel pressed */
+        download.cancel();
+        return;
+    }
+    download.setDestination(NSString.stringWith(path), true);
+}
 
-        int clientX = event.clientX();
-        int clientY = event.clientY();
-        int detail = event.detail();
-        int button = event.button();
+/* DOMEventListener */
+
+void handleEvent(int /*long*/ evtId) {
+    NSString string = new NSString(OS.objc_msgSend(evtId, OS.sel_type));
+    String type = string.getString();
+
+    if (DOMEVENT_KEYDOWN.equals(type) || DOMEVENT_KEYUP.equals(type)) {
+        DOMKeyboardEvent event = new DOMKeyboardEvent(evtId);
+
         bool ctrl = event.ctrlKey();
         bool shift = event.shiftKey();
         bool alt = event.altKey();
         bool meta = event.metaKey();
+        int keyCode = event.keyCode();
+        int charCode = event.charCode();
 
-        Event mouseEvent = new Event();
-        mouseEvent.widget = browser;
-        mouseEvent.x = clientX;
-        mouseEvent.y = clientY;
-        mouseEvent.stateMask = (alt ? DWT.ALT : 0) | (ctrl ? DWT.CTRL : 0) | (shift ? DWT.SHIFT : 0) | (meta ? DWT.COMMAND : 0);
-        if (DOMEVENT_MOUSEDOWN.opEquals(type))
-        {
-            mouseEvent.type = DWT.MouseDown;
-            mouseEvent.button = button + 1;
-            mouseEvent.count = detail;
+        Event keyEvent = new Event();
+        keyEvent.widget = browser;
+        if (DOMEVENT_KEYDOWN.equals(type)) {
+            keyEvent.type = DWT.KeyDown;
+        } else {
+            keyEvent.type = DWT.KeyUp;
+        }
+        keyEvent.keyCode = translateKey(keyCode);
+        keyEvent.character = (char)charCode;
+        keyEvent.stateMask = (alt ? DWT.ALT : 0) | (ctrl ? DWT.CTRL : 0) | (shift ? DWT.SHIFT : 0) | (meta ? DWT.COMMAND : 0);
+        browser.notifyListeners(keyEvent.type, keyEvent);
+        if (!keyEvent.doit) {
+            event.preventDefault();
         }
-        else if (DOMEVENT_MOUSEUP.opEquals(type))
-        {
-            mouseEvent.type = DWT.MouseUp;
-            mouseEvent.button = button + 1;
-            mouseEvent.count = detail;
-            switch (mouseEvent.button)
-            {
-                case 1:
-                    mouseEvent.stateMask |= DWT.BUTTON1;
-                break;
-                case 2:
-                    mouseEvent.stateMask |= DWT.BUTTON2;
-                break;
-                case 3:
-                    mouseEvent.stateMask |= DWT.BUTTON3;
-                break;
-                case 4:
-                    mouseEvent.stateMask |= DWT.BUTTON4;
-                break;
-                case 5:
-                    mouseEvent.stateMask |= DWT.BUTTON5;
-                break;
-            }
+        return;
+    }
+
+    if (DOMEVENT_MOUSEWHEEL.equals(type)) {
+        DOMWheelEvent event = new DOMWheelEvent(evtId);
+        int clientX = event.clientX();
+        int clientY = event.clientY();
+        int delta = event.wheelDelta();
+        bool ctrl = event.ctrlKey();
+        bool shift = event.shiftKey();
+        bool alt = event.altKey();
+        bool meta = event.metaKey();
+        Event mouseEvent = new Event();
+        mouseEvent.type = DWT.MouseWheel;
+        mouseEvent.widget = browser;
+        mouseEvent.x = clientX; mouseEvent.y = clientY;
+        mouseEvent.count = delta / 120;
+        mouseEvent.stateMask = (alt ? DWT.ALT : 0) | (ctrl ? DWT.CTRL : 0) | (shift ? DWT.SHIFT : 0) | (meta ? DWT.COMMAND : 0);
+        browser.notifyListeners (mouseEvent.type, mouseEvent);
+        return;
+    }
+
+    /* mouse event */
+
+    DOMMouseEvent event = new DOMMouseEvent(evtId);
+
+    int clientX = event.clientX();
+    int clientY = event.clientY();
+    int detail = event.detail();
+    int button = event.button();
+    bool ctrl = event.ctrlKey();
+    bool shift = event.shiftKey();
+    bool alt = event.altKey();
+    bool meta = event.metaKey();
+
+    Event mouseEvent = new Event ();
+    mouseEvent.widget = browser;
+    mouseEvent.x = clientX; mouseEvent.y = clientY;
+    mouseEvent.stateMask = (alt ? DWT.ALT : 0) | (ctrl ? DWT.CTRL : 0) | (shift ? DWT.SHIFT : 0) | (meta ? DWT.COMMAND : 0);
+    if (DOMEVENT_MOUSEDOWN.equals (type)) {
+        mouseEvent.type = DWT.MouseDown;
+        mouseEvent.button = button + 1;
+        mouseEvent.count = detail;
+    } else if (DOMEVENT_MOUSEUP.equals (type)) {
+        mouseEvent.type = DWT.MouseUp;
+        mouseEvent.button = button + 1;
+        mouseEvent.count = detail;
+        switch (mouseEvent.button) {
+            case 1: mouseEvent.stateMask |= DWT.BUTTON1; break;
+            case 2: mouseEvent.stateMask |= DWT.BUTTON2; break;
+            case 3: mouseEvent.stateMask |= DWT.BUTTON3; break;
+            case 4: mouseEvent.stateMask |= DWT.BUTTON4; break;
+            case 5: mouseEvent.stateMask |= DWT.BUTTON5; break;
         }
-        else if (DOMEVENT_MOUSEMOVE.opEquals(type))
-        {
-            /*
-             * Bug in Safari.  Spurious and redundant mousemove events are received in
-             * various contexts, including following every MouseUp.  The workaround is
-             * to not fire MouseMove events whose x and y values match the last MouseMove  
-             */
-            if (mouseEvent.x is lastMouseMoveX && mouseEvent.y is lastMouseMoveY)
-                return;
-            mouseEvent.type = DWT.MouseMove;
-            lastMouseMoveX = mouseEvent.x;
-            lastMouseMoveY = mouseEvent.y;
-        }
+    } else if (DOMEVENT_MOUSEMOVE.equals (type)) {
+        /*
+        * Bug in Safari.  Spurious and redundant mousemove events are received in
+        * various contexts, including following every MouseUp.  The workaround is
+        * to not fire MouseMove events whose x and y values match the last MouseMove  
+        */
+        if (mouseEvent.x is lastMouseMoveX && mouseEvent.y is lastMouseMoveY) return;
+        mouseEvent.type = DWT.MouseMove;
+        lastMouseMoveX = mouseEvent.x; lastMouseMoveY = mouseEvent.y;
+    }
 
-        browser.notifyListeners(mouseEvent.type, mouseEvent);
-        if (detail is 2 && DOMEVENT_MOUSEDOWN.opEquals(type))
-        {
-            mouseEvent = new Event();
-            mouseEvent.widget = browser;
-            mouseEvent.x = clientX;
-            mouseEvent.y = clientY;
-            mouseEvent.stateMask = (alt ? DWT.ALT : 0) | (ctrl ? DWT.CTRL : 0) | (shift ? DWT.SHIFT : 0) | (meta ? DWT.COMMAND : 0);
-            mouseEvent.type = DWT.MouseDoubleClick;
-            mouseEvent.button = button + 1;
-            mouseEvent.count = detail;
-            browser.notifyListeners(mouseEvent.type, mouseEvent);
-        }
+    browser.notifyListeners (mouseEvent.type, mouseEvent);
+    if (detail is 2 && DOMEVENT_MOUSEDOWN.equals (type)) {
+        mouseEvent = new Event ();
+        mouseEvent.widget = browser;
+        mouseEvent.x = clientX; mouseEvent.y = clientY;
+        mouseEvent.stateMask = (alt ? DWT.ALT : 0) | (ctrl ? DWT.CTRL : 0) | (shift ? DWT.SHIFT : 0) | (meta ? DWT.COMMAND : 0);
+        mouseEvent.type = DWT.MouseDoubleClick;
+        mouseEvent.button = button + 1;
+        mouseEvent.count = detail;
+        browser.notifyListeners (mouseEvent.type, mouseEvent);
     }
 }
+}
--- a/dwt/browser/SimpleEnumerator.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/SimpleEnumerator.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/StatusTextEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/StatusTextEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.StatusTextEvent;
 
@@ -24,6 +24,8 @@
  * The status text is typically displayed in the status bar of
  * a browser application.
  * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.0
  */
 public class StatusTextEvent : TypedEvent {
@@ -37,14 +39,14 @@
     }
 
     /**
-     * Returns a String containing a concise, human-readable
+     * Returns a string containing a concise, human-readable
      * description of the receiver.
      *
-     * @return a String representation of the event
+     * @return a string representation of the event
      */
     public String toString () {
-        String String = super.toString();
-        return String.substring(0, String.length() - 1) // remove trailing '}'
+        String string = super.toString();
+        return string.substring(0, string.length() - 1) // remove trailing '}'
         + " text=" + text + "}";
     }
 }
--- a/dwt/browser/StatusTextListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/StatusTextListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.StatusTextListener;
 
--- a/dwt/browser/TitleEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/TitleEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.TitleEvent;
 
@@ -23,6 +23,8 @@
  * {@link TitleListener}'s when the title of the current document
  * is available or when it is modified.
  * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.0
  */
 public class TitleEvent : TypedEvent {
@@ -36,14 +38,14 @@
     }
 
     /**
-     * Returns a String containing a concise, human-readable
+     * Returns a string containing a concise, human-readable
      * description of the receiver.
      *
-     * @return a String representation of the event
+     * @return a string representation of the event
      */
     public String toString () {
         String str = super.toString();
-        return str.substring(0, String.length() - 1) // remove trailing '}'
+        return str.substring(0, string.length() - 1) // remove trailing '}'
         + " title=" + title + "}";
     }
 }
--- a/dwt/browser/TitleListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/TitleListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.TitleListener;
 
--- a/dwt/browser/VisibilityWindowAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/VisibilityWindowAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.VisibilityWindowAdapter;
 
@@ -26,13 +26,15 @@
  * interested in.
  * </p>
  * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.0
  */
 public abstract class VisibilityWindowAdapter : VisibilityWindowListener {
 
-    public void hide (WindowEvent event) {
-    }
+public void hide(WindowEvent event) {
+}
 
-    public void show (WindowEvent event) {
-    }
+public void show(WindowEvent event) {
 }
+}
--- a/dwt/browser/VisibilityWindowListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/VisibilityWindowListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.VisibilityWindowListener;
 
--- a/dwt/browser/WebBrowser.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/WebBrowser.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.WebBrowser;
 
@@ -240,6 +240,8 @@
 
     public abstract bool forward ();
 
+public abstract String getBrowserType ();
+
     public abstract String getText ();
 
     public abstract String getUrl ();
--- a/dwt/browser/WindowCreator2.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/WindowCreator2.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2003, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/browser/WindowEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/browser/WindowEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.browser.WindowEvent;
 
@@ -123,6 +123,7 @@
  * @see CloseWindowListener
  * @see OpenWindowListener
  * @see VisibilityWindowListener
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.0
  */
--- a/dwt/dnd/ByteArrayTransfer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-module dwt.dnd;
-
- 
-/**
- * The class <code>ByteArrayTransfer</code> provides a platform specific 
- * mechanism for converting a java <code>byte[]</code> to a platform 
- * specific representation of the byte array and vice versa.  See 
- * <code>Transfer</code> for additional information.
- *
- * <p><code>ByteArrayTransfer</code> is never used directly but is sub-classed 
- * by transfer agents that convert between data in a java format such as a
- * <code>String</code> and a platform specific byte array.
- * 
- * <p>If the data you are converting <b>does not</b> map to a 
- * <code>byte[]</code>, you should sub-class <code>Transfer</code> directly 
- * and do your own mapping to a platform data type.</p>
- * 
- * <p>The following snippet shows a subclass of ByteArrayTransfer that transfers
- * data defined by the class <code>MyType</code>.</p>
- * 
- * <pre><code>
- * public class MyType {
- *  public String fileName;
- *  public long fileLength;
- *  public long lastModified;
- * }
- * </code></pre>
- * 
- * <pre><code>
- * public class MyTypeTransfer : ByteArrayTransfer {
- *  
- *  private static final String MYTYPENAME = "my_type_name";
- *  private static final int MYTYPEID = registerType(MYTYPENAME);
- *  private static MyTypeTransfer _instance = new MyTypeTransfer();
- * 
- * private MyTypeTransfer() {}
- * 
- * public static MyTypeTransfer getInstance () {
- *  return _instance;
- * }
- * public void javaToNative (Object object, TransferData transferData) {
- *  if (object is null || !(object instanceof MyType[])) return;
- *  
- *  if (isSupportedType(transferData)) {
- *      MyType[] myTypes = (MyType[]) object;   
- *      try {
- *          // write data to a byte array and then ask super to convert to pMedium
- *          ByteArrayOutputStream out = new ByteArrayOutputStream();
- *          DataOutputStream writeOut = new DataOutputStream(out);
- *          for (int i = 0, length = myTypes.length; i &lt; length;  i++){
- *              byte[] buffer = myTypes[i].fileName.getBytes();
- *              writeOut.writeInt(buffer.length);
- *              writeOut.write(buffer);
- *              writeOut.writeLong(myTypes[i].fileLength);
- *              writeOut.writeLong(myTypes[i].lastModified);
- *          }
- *          byte[] buffer = out.toByteArray();
- *          writeOut.close();
- * 
- *          super.javaToNative(buffer, transferData);
- *          
- *      } catch (IOException e) {
- *      }
- *  }
- * }
- * public Object nativeToJava(TransferData transferData){   
- * 
- *  if (isSupportedType(transferData)) {
- *      
- *      byte[] buffer = (byte[])super.nativeToJava(transferData);
- *      if (buffer is null) return null;
- *      
- *      MyType[] myData = new MyType[0];
- *      try {
- *          ByteArrayInputStream in = new ByteArrayInputStream(buffer);
- *          DataInputStream readIn = new DataInputStream(in);
- *          while(readIn.available() > 20) {
- *              MyType datum = new MyType();
- *              int size = readIn.readInt();
- *              byte[] name = new byte[size];
- *              readIn.read(name);
- *              datum.fileName = new String(name);
- *              datum.fileLength = readIn.readLong();
- *              datum.lastModified = readIn.readLong();
- *              MyType[] newMyData = new MyType[myData.length + 1];
- *              System.arraycopy(myData, 0, newMyData, 0, myData.length);
- *              newMyData[myData.length] = datum;
- *              myData = newMyData;
- *          }
- *          readIn.close();
- *      } catch (IOException ex) {
- *          return null;
- *      }
- *      return myData;
- *  }
- * 
- *  return null;
- * }
- * protected String[] getTypeNames(){
- *  return new String[]{MYTYPENAME};
- * }
- * protected int[] getTypeIds(){
- *  return new int[] {MYTYPEID};
- * }
- * }
- * </code></pre>
- */
-public abstract class ByteArrayTransfer : Transfer {
-
-public TransferData[] getSupportedTypes() {
-    int[] types = getTypeIds();
-    TransferData[] data = new TransferData[types.length];
-    for (int i = 0; i < types.length; i++) {
-        data[i] = new TransferData();
-        data[i].type = types[i];
-    }
-    return data;
-}
-
-public bool isSupportedType(TransferData transferData){
-    if (transferData is null) return false;
-    int[] types = getTypeIds();
-    for (int i = 0; i < types.length; i++) {
-        if (transferData.type is types[i]) return true;
-    }
-    return false;
-}
-
-/**
- * This implementation of <code>javaToNative</code> converts a java 
- * <code>byte[]</code> to a platform specific representation.  For additional
- * information see <code>Transfer#javaToNative</code>.
- * 
- * @see Transfer#javaToNative
- * 
- * @param object a java <code>byte[]</code> containing the data to be converted
- * @param transferData an empty <code>TransferData</code> object; this
- *  object will be filled in on return with the platform specific format of the data
- */
-protected void javaToNative (Object object, TransferData transferData) {
-    if (!checkByteArray(object) && !isSupportedType(transferData)) {
-        DND.error(DND.ERROR_INVALID_DATA);
-    }
-    byte[] orig = (byte[])object;
-    byte[] buffer = new byte[orig.length];
-    System.arraycopy(orig, 0, buffer, 0, orig.length);
-    transferData.data = new byte[1][];
-    transferData.data[0] = buffer;
-    transferData.result = 0;
-}
-
-/**
- * This implementation of <code>nativeToJava</code> converts a platform specific 
- * representation of a byte array to a java <code>byte[]</code>.   
- * For additional information see <code>Transfer#nativeToJava</code>.
- * 
- * @see Transfer#nativeToJava
- * 
- * @param transferData the platform specific representation of the data to be 
- * been converted
- * @return a java <code>byte[]</code> containing the converted data if the 
- * conversion was successful; otherwise null
- */
-protected Object nativeToJava(TransferData transferData) {
-    if (!isSupportedType(transferData) || transferData.data is null) return null;
-    if (transferData.data.length is 0 || transferData.data[0].length is 0) return null;
-    return transferData.data[0];
-}
-bool checkByteArray(Object object) {
-    return (object !is null && object instanceof byte[] && ((byte[])object).length > 0);
-}
-}
--- a/dwt/dnd/Clipboard.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/Clipboard.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,23 +8,37 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.Clipboard;
+
+import dwt.dwthelper.utils;
 
 
-import dwt.*;
-import dwt.widgets.*;
+import dwt.DWT;
+import dwt.DWTError;
+import dwt.DWTException;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSData;
+import dwt.internal.cocoa.NSMutableArray;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSPasteboard;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
+import dwt.widgets.Display;
 
 /**
  * The <code>Clipboard</code> provides a mechanism for transferring data from one
  * application to another or within an application.
  * 
  * <p>IMPORTANT: This class is <em>not</em> intended to be subclassed.</p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#clipboard">Clipboard snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ClipboardExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Clipboard {
 
     Display display;
-    int scrap = 0;
 
 /**
  * Constructs a new instance of this class.  Creating an instance of a Clipboard
@@ -41,7 +55,7 @@
  * @see Clipboard#dispose
  * @see Clipboard#checkSubclass
  */
-public this(Display display) { 
+public Clipboard(Display display) { 
     checkSubclass ();
     if (display is null) {
         display = Display.getCurrent();
@@ -85,7 +99,7 @@
 protected void checkSubclass () {
     String name = getClass().getName ();
     String validName = Clipboard.class.getName();
-    if (!validName.opEquals(name)) {
+    if (!validName.equals(name)) {
         DND.error (DWT.ERROR_INVALID_SUBCLASS);
     }
 }
@@ -164,14 +178,9 @@
  */
 public void clearContents(int clipboards) {
     checkWidget();
-    if ((clipboards & DND.CLIPBOARD) is 0 || scrap is 0) return;
-    int oldScrap = scrap;
-    scrap = 0;
-    int[] currentScrap = new int[1];
-    if (OS.GetCurrentScrap(currentScrap) !is OS.noErr) return;
-    if (currentScrap[0] is oldScrap) {
-        OS.ClearCurrentScrap();
-    }
+    if ((clipboards & DND.CLIPBOARD) is 0) return;
+    NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
+    pasteboard.declareTypes(NSMutableArray.arrayWithCapacity(0), null);
 }
 
 /**
@@ -203,10 +212,10 @@
  *    <code><pre>
  *    Clipboard clipboard = new Clipboard(display);
  *    TextTransfer textTransfer = TextTransfer.getInstance();
- *    String textData = cast(String)clipboard.getContents(textTransfer);
+ *    String textData = (String)clipboard.getContents(textTransfer);
  *    if (textData !is null) System.out.println("Text is "+textData);
  *    RTFTransfer rtfTransfer = RTFTransfer.getInstance();
- *    String rtfData = cast(String)clipboard.getContents(rtfTransfer);
+ *    String rtfData = (String)clipboard.getContents(rtfTransfer);
  *    if (rtfData !is null) System.out.println("RTF Text is "+rtfData);
  *    clipboard.dispose();
  *    </code></pre>
@@ -239,10 +248,10 @@
  *    <code><pre>
  *    Clipboard clipboard = new Clipboard(display);
  *    TextTransfer textTransfer = TextTransfer.getInstance();
- *    String textData = cast(String)clipboard.getContents(textTransfer);
+ *    String textData = (String)clipboard.getContents(textTransfer);
  *    if (textData !is null) System.out.println("Text is "+textData);
  *    RTFTransfer rtfTransfer = RTFTransfer.getInstance();
- *    String rtfData = cast(String)clipboard.getContents(rtfTransfer, DND.CLIPBOARD);
+ *    String rtfData = (String)clipboard.getContents(rtfTransfer, DND.CLIPBOARD);
  *    if (rtfData !is null) System.out.println("RTF Text is "+rtfData);
  *    clipboard.dispose();
  *    </code></pre>
@@ -275,26 +284,32 @@
     checkWidget();
     if (transfer is null) DND.error(DWT.ERROR_NULL_ARGUMENT);
     if ((clipboards & DND.CLIPBOARD) is 0) return null;
-    int[] scrap = new int[1];
-    if (OS.GetCurrentScrap(scrap) !is OS.noErr) return null;
-    int[] typeIds = transfer.getTypeIds();
-    int[] size = new int[1];    
-    // get data from system clipboard
-    for (int i=0; i<typeIds.length; i++) {
-        int type = typeIds[i];
-        size[0] = 0;
-        if (OS.GetScrapFlavorSize(scrap[0], type, size) is OS.noErr && size[0] > 0) {
-            byte[] buffer = new byte[size[0]];
-            if (OS.GetScrapFlavorData(scrap[0], type, size, buffer) is OS.noErr) {
-                TransferData tdata = new TransferData();
-                tdata.type = type;      
-                tdata.data = new byte[1][];
-                tdata.data[0] = buffer;
-                return transfer.nativeToJava(tdata);
-            }
+    NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
+    String[] typeNames = transfer.getTypeNames();
+    NSMutableArray types = NSMutableArray.arrayWithCapacity(typeNames.length);
+    for (int i = 0; i < typeNames.length; i++) {
+        types.addObject(NSString.stringWith(typeNames[i]));
+    }
+    NSString type = pasteboard.availableTypeFromArray(types);
+    if (type !is null) {
+        TransferData tdata = new TransferData();
+        tdata.type = Transfer.registerType(type.getString());
+        if (type.isEqual(OS.NSStringPboardType) || 
+                type.isEqual(OS.NSRTFPboardType) ||
+                type.isEqual(OS.NSHTMLPboardType)) {
+            tdata.data = pasteboard.stringForType(type);
+        } else if (type.isEqual(OS.NSFilenamesPboardType)) {
+            tdata.data = new NSArray(pasteboard.propertyListForType(type).id);
+        } else if (type.isEqual(OS.NSURLPboardType)) {
+            tdata.data = NSURL.URLFromPasteboard(pasteboard);
+        } else {
+            tdata.data = pasteboard.dataForType(type);
+        }
+        if (tdata.data !is null) {
+            return transfer.nativeToJava(tdata);
         }
     }
-    return null;    // No data available for this transfer
+    return null;
 }
 
 /**
@@ -435,30 +450,31 @@
         }
     }
     if ((clipboards & DND.CLIPBOARD) is 0) return;
-    if (OS.ClearCurrentScrap() !is OS.noErr) {
-        DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD);
-    }
-    scrap = 0;
-    int[] currentScrap = new int[1];
-    if (OS.GetCurrentScrap(currentScrap) !is OS.noErr) {
+    NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
+    if (pasteboard is null) {
         DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD);
     }
-    scrap = currentScrap[0];
-    // copy data directly over to System clipboard (not deferred)
+    pasteboard.declareTypes(NSMutableArray.arrayWithCapacity(0), null);
     for (int i=0; i<dataTypes.length; i++) {
-        int[] typeIds = dataTypes[i].getTypeIds();
-        for (int j=0; j<typeIds.length; j++) {
+        String[] typeNames = dataTypes[i].getTypeNames();
+        for (int j=0; j<typeNames.length; j++) {
             TransferData transferData = new TransferData();
-            transferData.type = typeIds[j];
-            dataTypes[i].javaToNative(data[i], transferData); 
-            if (transferData.result !is OS.noErr) {
-                DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD);
-            }
-            //Drag and Drop can handle multiple items in one transfer but the
-            //Clipboard can not.
-            byte[] datum = transferData.data[0];
-            if (OS.PutScrapFlavor(scrap, transferData.type, 0, datum.length, datum) !is OS.noErr){
-                DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD);
+            transferData.type = Transfer.registerType(typeNames[j]);
+            dataTypes[i].javaToNative(data[i], transferData);
+            NSObject tdata = transferData.data;
+            NSString dataType = NSString.stringWith(typeNames[j]);
+            pasteboard.addTypes(NSArray.arrayWithObject(dataType), null);
+            if (dataType.isEqual(OS.NSStringPboardType) || 
+                    dataType.isEqual(OS.NSRTFPboardType) ||
+                    dataType.isEqual(OS.NSHTMLPboardType)) {
+                pasteboard.setString((NSString) tdata, dataType);
+            } else if (dataType.isEqual(OS.NSURLPboardType)) {
+                NSURL url = (NSURL) tdata;
+                url.writeToPasteboard(pasteboard);
+            } else if (dataType.isEqual(OS.NSFilenamesPboardType)) {
+                pasteboard.setPropertyList((NSArray) tdata, dataType);
+            } else {
+                pasteboard.setData((NSData) tdata, dataType);
             }
         }
     }
@@ -508,12 +524,14 @@
  */
 public TransferData[] getAvailableTypes(int clipboards) {
     checkWidget();
-    if ((clipboards & DND.CLIPBOARD) is 0) return new TransferData[0]; 
-    int[] types = _getAvailableTypes();
-    TransferData[] result = new TransferData[types.length];
-    for (int i = 0; i < types.length; i++) {
+    if ((clipboards & DND.CLIPBOARD) is 0) return new TransferData[0];
+    NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
+    NSArray types = pasteboard.types();
+    int count = (int)/*64*/types.count();
+    TransferData[] result = new TransferData[count];
+    for (int i = 0; i < count; i++) {
         result[i] = new TransferData();
-        result[i].type = types[i];
+        result[i].type = Transfer.registerType(new NSString(types.objectAtIndex(i)).getString());
     }
     return result;
 }
@@ -536,32 +554,13 @@
  */
 public String[] getAvailableTypeNames() {
     checkWidget();
-    int[] types = _getAvailableTypes();
-    String[] names = new String[types.length];
-    for (int i = 0; i < types.length; i++) {
-        int type = types[i];
-        StringBuffer sb = new StringBuffer();
-        sb.append(cast(wchar)((type & 0xff000000) >> 24));
-        sb.append(cast(wchar)((type & 0x00ff0000) >> 16));
-        sb.append(cast(wchar)((type & 0x0000ff00) >> 8));
-        sb.append(cast(wchar)((type & 0x000000ff) >> 0));
-        names[i] = sb.toString();
+    NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
+    NSArray types = pasteboard.types();
+    int count = (int)/*64*/types.count();
+    String[] result = new String[count];
+    for (int i = 0; i < count; i++) {
+        result[i] = new NSString(types.objectAtIndex(i)).getString();
     }
-    return names;
-}
-
-int[] _getAvailableTypes() {
-    int[] types = new int[0];
-    int[] scrap = new int[1];
-    if (OS.GetCurrentScrap(scrap) !is OS.noErr) return types;
-    int[] count = new int[1];
-    if (OS.GetScrapFlavorCount(scrap[0], count) !is OS.noErr || count[0] is 0) return types;
-    int[] info = new int[count[0] * 2];
-    if (OS.GetScrapFlavorInfoList(scrap[0], count, info) !is OS.noErr) return types;
-    types = new int[count[0]];
-    for (int i= 0; i < count [0]; i++) {
-        types[i] = info[i*2];
-    }
-    return types;
+    return result;
 }
 }
--- a/dwt/dnd/DND.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DND.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,16 +8,21 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DND;
+
+import dwt.dwthelper.utils;
 
  
-import dwt.*;
+import dwt.DWT;
+import dwt.DWTError;
+import dwt.DWTException;
 
 /**
  *
  * Class DND contains all the constants used in defining a 
  * DragSource or a DropTarget.
  *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class DND {
     
@@ -194,7 +199,7 @@
     public static final int ERROR_INVALID_DATA = 2003;
     
     /**
-     * DropTarget Key: The String constant for looking up the drop target 
+     * DropTarget Key: The string constant for looking up the drop target 
      * for a control using <code>getData(String)</code>. When a drop target 
      * is created for a control, it is stored as a property in the control 
      * using <code>setData(String, Object)</code>.
@@ -204,7 +209,7 @@
     public static final String DROP_TARGET_KEY = "DropTarget"; //$NON-NLS-1$
     
     /**
-     * DragSource Key: The String constant for looking up the drag source 
+     * DragSource Key: The string constant for looking up the drag source 
      * for a control using <code>getData(String)</code>. When a drag source 
      * is created for a control, it is stored as a property in the control 
      * using <code>setData(String, Object)</code>.
@@ -236,9 +241,9 @@
  * <dl>
  * <dd>java.lang.IllegalArgumentException</dd>
  * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt>
- * <dd>dwt.DWTException (: java.lang.RuntimeException)</dd>
+ * <dd>dwt.DWTException (extends java.lang.RuntimeException)</dd>
  * <dt>thrown whenever a recoverable error happens internally in DWT</dt>
- * <dd>dwt.DWTError (: java.lang.Error)</dd>
+ * <dd>dwt.DWTError (extends java.lang.Error)</dd>
  * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in DWT</dt>
  * </dl>
  * This method provides the logic which maps between error codes
--- a/dwt/dnd/DNDEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DNDEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -8,16 +8,20 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DNDEvent;
+
+import dwt.dwthelper.utils;
 
 
-import dwt.graphics.*;
-import dwt.widgets.*;
+import dwt.graphics.Image;
+import dwt.widgets.Event;
 
-class DNDEvent : Event {
+class DNDEvent extends Event {
     public TransferData dataType;
     public TransferData[] dataTypes;
     public int operations;
     public int feedback;
     public Image image;
+    public int offsetX;
+    public int offsetY;
 }
--- a/dwt/dnd/DNDListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DNDListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -8,111 +8,115 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DNDListener;
+
+import dwt.dwthelper.utils;
 
-import dwt.internal.*;
-import dwt.widgets.*;
+import dwt.internal.DWTEventListener;
+import dwt.widgets.Event;
+import dwt.widgets.TypedListener;
+import dwt.widgets.Widget;
 
 
-class DNDListener : TypedListener {
+class DNDListener extends TypedListener {
     Widget dndWidget;
 /**
  * DNDListener constructor comment.
  * @param listener dwt.internal.DWTEventListener
  */
-this(DWTEventListener listener) {
+DNDListener(DWTEventListener listener) {
     super(listener);
 }
 public void handleEvent (Event e) {
     switch (e.type) {
         case DND.DragStart: {
-            DragSourceEvent event = new DragSourceEvent(cast(DNDEvent)e);
-            DragSourceEffect sourceEffect = (cast(DragSource) dndWidget).getDragSourceEffect();
+            DragSourceEvent event = new DragSourceEvent((DNDEvent)e);
+            DragSourceEffect sourceEffect = ((DragSource) dndWidget).getDragSourceEffect();
             if (sourceEffect !is null) {
                 sourceEffect.dragStart (event);
             }
-            (cast(DragSourceListener) eventListener).dragStart (event);
-            event.updateEvent(cast(DNDEvent)e);
+            ((DragSourceListener) eventListener).dragStart (event);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         case DND.DragEnd: {
-            DragSourceEvent event = new DragSourceEvent(cast(DNDEvent)e);
-            DragSourceEffect sourceEffect = (cast(DragSource) dndWidget).getDragSourceEffect();
+            DragSourceEvent event = new DragSourceEvent((DNDEvent)e);
+            DragSourceEffect sourceEffect = ((DragSource) dndWidget).getDragSourceEffect();
             if (sourceEffect !is null) {
                 sourceEffect.dragFinished (event);
             }
-            (cast(DragSourceListener) eventListener).dragFinished (event);
-            event.updateEvent(cast(DNDEvent)e);
+            ((DragSourceListener) eventListener).dragFinished (event);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         case DND.DragSetData: {
-            DragSourceEvent event = new DragSourceEvent(cast(DNDEvent)e);
-            DragSourceEffect sourceEffect = (cast(DragSource) dndWidget).getDragSourceEffect();
+            DragSourceEvent event = new DragSourceEvent((DNDEvent)e);
+            DragSourceEffect sourceEffect = ((DragSource) dndWidget).getDragSourceEffect();
             if (sourceEffect !is null) {
                 sourceEffect.dragSetData (event);
             }
-            (cast(DragSourceListener) eventListener).dragSetData (event);
-            event.updateEvent(cast(DNDEvent)e);
+            ((DragSourceListener) eventListener).dragSetData (event);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         case DND.DragEnter: {
-            DropTargetEvent event = new DropTargetEvent(cast(DNDEvent)e);
-            (cast(DropTargetListener) eventListener).dragEnter (event);
-            DropTargetEffect dropEffect = (cast(DropTarget) dndWidget).getDropTargetEffect();
+            DropTargetEvent event = new DropTargetEvent((DNDEvent)e);
+            ((DropTargetListener) eventListener).dragEnter (event);
+            DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect();
             if (dropEffect !is null) {
                 dropEffect.dragEnter (event);
             }
-            event.updateEvent(cast(DNDEvent)e);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         case DND.DragLeave: {
-            DropTargetEvent event = new DropTargetEvent(cast(DNDEvent)e);
-            (cast(DropTargetListener) eventListener).dragLeave (event);
-            DropTargetEffect dropEffect = (cast(DropTarget) dndWidget).getDropTargetEffect();
+            DropTargetEvent event = new DropTargetEvent((DNDEvent)e);
+            ((DropTargetListener) eventListener).dragLeave (event);
+            DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect();
             if (dropEffect !is null) {
                 dropEffect.dragLeave (event);
             }
-            event.updateEvent(cast(DNDEvent)e);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         case DND.DragOver: {
-            DropTargetEvent event = new DropTargetEvent(cast(DNDEvent)e);
-            (cast(DropTargetListener) eventListener).dragOver (event);
-            DropTargetEffect dropEffect = (cast(DropTarget) dndWidget).getDropTargetEffect();
+            DropTargetEvent event = new DropTargetEvent((DNDEvent)e);
+            ((DropTargetListener) eventListener).dragOver (event);
+            DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect();
             if (dropEffect !is null) {
                 dropEffect.dragOver (event);
             }
-            event.updateEvent(cast(DNDEvent)e);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         case DND.Drop: {
-            DropTargetEvent event = new DropTargetEvent(cast(DNDEvent)e);
-            (cast(DropTargetListener) eventListener).drop (event);
-            DropTargetEffect dropEffect = (cast(DropTarget) dndWidget).getDropTargetEffect();
+            DropTargetEvent event = new DropTargetEvent((DNDEvent)e);
+            ((DropTargetListener) eventListener).drop (event);
+            DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect();
             if (dropEffect !is null) {
                 dropEffect.drop (event);
             }
-            event.updateEvent(cast(DNDEvent)e);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         case DND.DropAccept: {
-            DropTargetEvent event = new DropTargetEvent(cast(DNDEvent)e);
-            (cast(DropTargetListener) eventListener).dropAccept (event);
-            DropTargetEffect dropEffect = (cast(DropTarget) dndWidget).getDropTargetEffect();
+            DropTargetEvent event = new DropTargetEvent((DNDEvent)e);
+            ((DropTargetListener) eventListener).dropAccept (event);
+            DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect();
             if (dropEffect !is null) {
                 dropEffect.dropAccept (event);
             }
-            event.updateEvent(cast(DNDEvent)e);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         case DND.DragOperationChanged: {
-            DropTargetEvent event = new DropTargetEvent(cast(DNDEvent)e);
-            (cast(DropTargetListener) eventListener).dragOperationChanged (event);
-            DropTargetEffect dropEffect = (cast(DropTarget) dndWidget).getDropTargetEffect();
+            DropTargetEvent event = new DropTargetEvent((DNDEvent)e);
+            ((DropTargetListener) eventListener).dragOperationChanged (event);
+            DropTargetEffect dropEffect = ((DropTarget) dndWidget).getDropTargetEffect();
             if (dropEffect !is null) {
                 dropEffect.dragOperationChanged (event);
             }
-            event.updateEvent(cast(DNDEvent)e);
+            event.updateEvent((DNDEvent)e);
             break;
         }
         
--- a/dwt/dnd/DragSource.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DragSource.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,18 +8,38 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DragSource;
+
+import dwt.dwthelper.utils;
+
 
- 
-import dwt.*;
-import dwt.graphics.*;
-import dwt.widgets.*;
+import dwt.DWT;
+import dwt.DWTError;
+import dwt.DWTException;
+import dwt.graphics.Image;
+import dwt.internal.C;
 import dwt.internal.Callback;
-import dwt.internal.cocoa.CGPoint;
-import dwt.internal.cocoa.EventRecord;
+import dwt.internal.cocoa.NSApplication;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSData;
+import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSImage;
+import dwt.internal.cocoa.NSMutableArray;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSPasteboard;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSSize;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
-import dwt.internal.cocoa.Point;
-
+import dwt.internal.cocoa.SWTDragSourceDelegate;
+import dwt.widgets.Control;
+import dwt.widgets.Display;
+import dwt.widgets.Event;
+import dwt.widgets.Listener;
+import dwt.widgets.Table;
+import dwt.widgets.Tree;
+import dwt.widgets.Widget;
 /**
  *
  * <code>DragSource</code> defines the source object for a drag and drop transfer.
@@ -95,24 +115,72 @@
  *  <dt><b>Styles</b></dt> <dd>DND.DROP_NONE, DND.DROP_COPY, DND.DROP_MOVE, DND.DROP_LINK</dd>
  *  <dt><b>Events</b></dt> <dd>DND.DragStart, DND.DragSetData, DND.DragEnd</dd>
  * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#dnd">Drag and Drop snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: DNDExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
-public class DragSource : Widget {
+public class DragSource extends Widget {
+
+    static Callback dragSource2Args, dragSource3Args, dragSource4Args, dragSource5Args;
+    static final String DWT_OBJECT = "DWT_OBJECT";
+
+    static {
+        String className = "SWTDragSourceDelegate";
+
+        // TODO: These should either move out of Display or be accessible to this class.
+        String types = "*";
+        int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF is 4 ? 2 : 3;
+
+        Class clazz = DragSource.class;
+
+        dragSource2Args = new Callback(clazz, "dragSourceProc", 2);
+        int /*long*/ proc2 = dragSource2Args.getAddress();
+        if (proc2 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+
+        dragSource3Args = new Callback(clazz, "dragSourceProc", 3);
+        int /*long*/ proc3 = dragSource3Args.getAddress();
+        if (proc3 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+
+        dragSource4Args = new Callback(clazz, "dragSourceProc", 4);
+        int /*long*/ proc4 = dragSource4Args.getAddress();
+        if (proc4 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+
+        dragSource5Args = new Callback(clazz, "dragSourceProc", 5);
+        int /*long*/ proc5 = dragSource5Args.getAddress();
+        if (proc5 is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+
+        int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+        OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+
+        int /*long*/ draggedImage_endedAt_operationProc = OS.draggedImage_endedAt_operation_CALLBACK(proc5);
+
+        // Add the NSDraggingSource callbacks
+        OS.class_addMethod(cls, OS.sel_draggingSourceOperationMaskForLocal_, proc3, "@:c");
+        OS.class_addMethod(cls, OS.sel_draggedImage_beganAt_, proc4, "@:@{NSPoint=ff}");
+        OS.class_addMethod(cls, OS.sel_draggedImage_endedAt_operation_, draggedImage_endedAt_operationProc, "@:@{NSPoint=ff}I");
+        OS.class_addMethod(cls, OS.sel_ignoreModifierKeysWhileDragging, proc3, "@:");
+
+        // Add the NSPasteboard delegate callback
+        OS.class_addMethod(cls, OS.sel_pasteboard_provideDataForType_, proc4, "@:@@");
+
+        OS.objc_registerClassPair(cls);
+    }   
+
 
     // info for registering as a drag source
     Control control;
     Listener controlListener;
     Transfer[] transferAgents = new Transfer[0];
     DragSourceEffect dragEffect;
-
-    static final String DEFAULT_DRAG_SOURCE_EFFECT = "DEFAULT_DRAG_SOURCE_EFFECT"; //$NON-NLS-1$
-    static Callback DragSendDataProc;
+    private int dragOperations;
+    SWTDragSourceDelegate dragSourceDelegate;
     
-    static {
-        DragSendDataProc = new Callback(DragSource.class, "DragSendDataProc", 4); //$NON-NLS-1$
-        int dragSendDataProcAddress = DragSendDataProc.getAddress();
-        if (dragSendDataProcAddress is 0) DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-    }
+    static final String DEFAULT_DRAG_SOURCE_EFFECT = "DEFAULT_DRAG_SOURCE_EFFECT"; //$NON-NLS-1$
 
+    bool dragStarted = false;
+    private int /*long*/ delegateJniRef;
+    
 /**
  * Creates a new <code>DragSource</code> to handle dragging from the specified <code>Control</code>.
  * Creating an instance of a DragSource may cause system resources to be allocated depending on the platform.  
@@ -142,7 +210,7 @@
  * @see DND#DROP_MOVE
  * @see DND#DROP_LINK
  */
-public this(Control control, int style) {
+public DragSource(Control control, int style) {
     super (control, checkStyle(style));
     this.control = control;
     if (control.getData(DND.DRAG_SOURCE_KEY) !is null) {
@@ -174,33 +242,20 @@
     });
     
     Object effect = control.getData(DEFAULT_DRAG_SOURCE_EFFECT);
-    if ( null !is cast(DragSourceEffect)effect ) {
-        dragEffect = cast(DragSourceEffect) effect;
-    } else if ( null !is cast(Tree)control ) {
-        dragEffect = new TreeDragSourceEffect(cast(Tree) control);
-    } else if ( null !is cast(Table)control ) {
-        dragEffect = new TableDragSourceEffect(cast(Table) control);
+    if (effect instanceof DragSourceEffect) {
+        dragEffect = (DragSourceEffect) effect;
+    } else if (control instanceof Tree) {
+        dragEffect = new TreeDragSourceEffect((Tree) control);
+    } else if (control instanceof Table) {
+        dragEffect = new TableDragSourceEffect((Table) control);
     }
-}
-
-static int checkStyle (int style) {
-    if (style is DWT.NONE) return DND.DROP_MOVE;
-    return style;
-}
-
-static int DragSendDataProc(int theType, int dragSendRefCon, int theItemRef, int theDrag) {
-    DragSource source = FindDragSource(dragSendRefCon, theDrag);
-    if (source is null) return OS.cantGetFlavorErr;
-    return source.dragSendDataProc(theType, dragSendRefCon, theItemRef, theDrag);
-}
-
-static DragSource FindDragSource(int dragSendRefCon, int theDrag) {
-    if (dragSendRefCon is 0) return null;
-    Display display = Display.findDisplay(Thread.currentThread());
-    if (display is null || display.isDisposed()) return null;
-    Widget widget = display.findWidget(dragSendRefCon);
-    if (widget is null) return null;
-    return cast(DragSource)widget.getData(DND.DRAG_SOURCE_KEY); 
+    
+    // Create a delegate, but then stuff a pointer back to this object so callbacks will have
+    // access to this object's data.
+    dragSourceDelegate = (SWTDragSourceDelegate)new SWTDragSourceDelegate().alloc().init();
+    delegateJniRef = OS.NewGlobalRef(this);
+    if (delegateJniRef is 0) DWT.error(DWT.ERROR_NO_HANDLES);
+    OS.object_setInstanceVariable(dragSourceDelegate.id, DWT_OBJECT, delegateJniRef);
 }
 
 /**
@@ -229,6 +284,7 @@
  * </ul>
  *
  * @see DragSourceListener
+ * @see #getDragListeners
  * @see #removeDragListener
  * @see DragSourceEvent
  */
@@ -244,11 +300,16 @@
 protected void checkSubclass () {
     String name = getClass().getName ();
     String validName = DragSource.class.getName();
-    if (!validName.opEquals(name)) {
+    if (!validName.equals(name)) {
         DND.error (DWT.ERROR_INVALID_SUBCLASS);
     }
 }
 
+static int checkStyle (int style) {
+    if (style is DWT.NONE) return DND.DROP_MOVE;
+    return style;
+}
+
 void drag(Event dragEvent) {
     DNDEvent event = new DNDEvent();
     event.widget = this;
@@ -259,135 +320,173 @@
     notifyListeners(DND.DragStart, event);
     if (!event.doit || transferAgents is null || transferAgents.length is 0) return;
     
-    int[] theDrag = new int[1];
-    if (OS.NewDrag(theDrag) !is OS.noErr) {
-        event = new DNDEvent();
-        event.widget = this;
-        event.time = cast(int)System.currentTimeMillis();
-        event.doit = false;
-        event.detail = DND.DROP_NONE; 
-        notifyListeners(DND.DragEnd, event);
-        return;
-    }
+    NSPasteboard dragBoard = NSPasteboard.pasteboardWithName(OS.NSDragPboard);
+    NSMutableArray nativeTypeArray = NSMutableArray.arrayWithCapacity(10);
     
-    Point pt = new Point();
-    OS.GetGlobalMouse (pt);
-
     for (int i = 0; i < transferAgents.length; i++) {
         Transfer transfer = transferAgents[i];
         if (transfer !is null) {
-            int[] types = transfer.getTypeIds();
-            if ( null !is cast(FileTransfer)transfer ) {
-                TransferData transferData = new TransferData();
-                transferData.type = types[0];
-                DNDEvent event2 = new DNDEvent();
-                event2.widget = this;
-                event2.time = cast(int)System.currentTimeMillis(); 
-                event2.dataType = transferData; 
-                notifyListeners(DND.DragSetData, event2);
-                if (event2.data !is null) {
-                    for (int j = 0; j < types.length; j++) {
-                        transferData.type = types[j];
-                        transfer.javaToNative(event2.data, transferData);
-                        if (transferData.result is OS.noErr) {
-                            for (int k = 0; k < transferData.data.length; k++) {
-                                byte[] datum = transferData.data[k];
-                                OS.AddDragItemFlavor(theDrag[0], 1 + k, types[j], datum, datum.length, 0);
-                            }
-                        }
-                    }
-                }
-            } else {
-                for (int j = 0; j < types.length; j++) {
-                    OS.AddDragItemFlavor(theDrag[0], 1, types[j], null, 0, 0);  
-                }   
-            }
-        }
+            String[] typeNames = transfer.getTypeNames();
+
+            for (int j = 0; j < typeNames.length; j++) {
+                nativeTypeArray.addObject(NSString.stringWith(typeNames[j]));
+            }   
+        }       
     }
+
+    if (nativeTypeArray !is null)
+        dragBoard.declareTypes(nativeTypeArray, dragSourceDelegate);
+
+    // Start the drag here from the Control's view.
+    NSEvent currEvent = NSApplication.sharedApplication().currentEvent();
+    NSPoint pt = currEvent.locationInWindow();
+    NSPoint viewPt = control.view.convertPoint_fromView_(pt, null);
+
+    // Save off the drag operations -- AppKit will call back to us to request them during the drag.
+    dragOperations = opToOsOp(getStyle());
     
-    OS.SetDragSendProc(theDrag[0], DragSendDataProc.getAddress(), control.handle);
-    
-    int theRegion = 0;
+    // Get the image for the drag. The drag should happen from the middle of the image.
+    NSImage dragImage = null;
     Image newImage = null;
     try {   
-        theRegion = OS.NewRgn();
-        OS.SetRectRgn(theRegion, cast(short)(pt.h), cast(short)(pt.v), cast(short)(pt.h+20), cast(short)(pt.v+20));
+        Image image = event.image;
         
-        int operations = opToOsOp(getStyle());
-        //set operations twice - local and not local
-        OS.SetDragAllowableActions(theDrag[0], operations, true);
-        OS.SetDragAllowableActions(theDrag[0], operations, false);
+        // If no image was provided, just create a trivial image. dragImage requires a non-null image.
+        if (image is null) {
+            newImage = new Image(Display.getCurrent(), 1, 1);
+            image = newImage;
+        }
+
+        dragImage = image.handle;
+
+        NSSize imageSize = dragImage.size();
+        viewPt.x -= (imageSize.width / 2);
+        viewPt.y -= (imageSize.height / 2);
         
-        Image image = event.image;
-        if (image !is null) {
-            CGPoint imageOffsetPt = new CGPoint();
-            imageOffsetPt.x = 0;
-            imageOffsetPt.y = 0;
-            /*
-            * Bug in the Macintosh.  For  some reason, it seems that SetDragImageWithCGImage() 
-            * expects an image with the alpha, otherwise the image does not draw.  The fix is
-            * to make sure that the image has an alpha by creating a new image with alpha
-            * when necessary.
-            */
-            if (OS.CGImageGetAlphaInfo(image.handle) is OS.kCGImageAlphaNoneSkipFirst) {
-                ImageData data = image.getImageData();
-                data.alpha = 0xFF;
-                newImage = new Image(image.getDevice(), data);
-                image = newImage;
-            }
-            OS.SetDragImageWithCGImage(theDrag[0], image.handle, imageOffsetPt, 0);
+        // The third argument to dragImage is ignored as of 10.4.
+        NSSize ignored = new NSSize();
+        ignored.width = 0;
+        ignored.height = 0;
+        
+        dragStarted = false;
+        control.view.dragImage(dragImage, viewPt, ignored, NSApplication.sharedApplication().currentEvent(), dragBoard, dragSourceDelegate, true);
+
+        // If we actually dragged, dragStarted will be set to true in dragImage:beganAt:
+        // If not, send a DragEnd indicating nothing happened.
+        if (!dragStarted) {
+            event = new DNDEvent();
+            event.widget = this;
+            event.time = (int)System.currentTimeMillis();
+            event.doit = false;
+            event.detail = DND.DROP_NONE; 
+            notifyListeners(DND.DragEnd, event);
         }
-        EventRecord theEvent = new EventRecord();
-        theEvent.message = OS.kEventMouseMoved;
-        theEvent.modifiers = cast(short)OS.GetCurrentEventKeyModifiers();
-        theEvent.what = cast(short)OS.osEvt;
-        theEvent.where_h = pt.h;
-        theEvent.where_v = pt.v;    
-        int result = OS.TrackDrag(theDrag[0], theEvent, theRegion);
-        int operation = DND.DROP_NONE;
-        if (result is OS.noErr) { 
-            int[] outAction = new int[1];
-            OS.GetDragDropAction(theDrag[0], outAction);
-            operation = osOpToOp(outAction[0]);
-        }   
-        event = new DNDEvent();
-        event.widget = this;
-        event.time = cast(int)System.currentTimeMillis();
-        event.doit = result is OS.noErr;
-        event.detail = operation; 
-        notifyListeners(DND.DragEnd, event);
     } finally { 
-        if (theRegion !is 0) OS.DisposeRgn(theRegion);
         if (newImage !is null) newImage.dispose();
     }
-    OS.DisposeDrag(theDrag[0]);
+}
+
+void draggedImage_beganAt(NSImage image) {
+    this.dragStarted = true;
+}
+
+void draggedImage_endedAt_operation(NSImage image, NSPoint location, int /*long*/ operation) {
+    int swtOperation = osOpToOp(operation);
+    Event event = new DNDEvent();
+    event.widget = this;
+    event.time = (int)System.currentTimeMillis();   
+    event.doit = swtOperation !is DND.DROP_NONE;
+    event.detail = swtOperation; 
+    notifyListeners(DND.DragEnd, event);
+}
+
+/** 
+ * Cocoa NSDraggingSource implementations
+ */
+int draggingSourceOperationMaskForLocal(bool flag) {
+    // Drag operations are same for local or remote drags.
+    return dragOperations;
+}
+
+static int /*long*/ dragSourceProc(int /*long*/ id, int /*long*/ sel) {
+    Display display = Display.findDisplay(Thread.currentThread());
+    if (display is null || display.isDisposed()) return 0;
+    Widget widget = display.findWidget(id);
+    if (widget is null) return 0;
+    DragSource ds = (DragSource)widget.getData(DND.DRAG_SOURCE_KEY);
+    if (ds is null) return 0;
+    
+    if (sel is OS.sel_ignoreModifierKeysWhileDragging) {
+        return (ds.ignoreModifierKeysWhileDragging() ? 1 : 0);
+    }
+    
+    return 0;
 }
 
-int dragSendDataProc(int theType, int dragSendRefCon, int theItemRef, int theDrag) {
-    if (theType is 0) return OS.badDragFlavorErr;
-    TransferData transferData = new TransferData();
-    transferData.type = theType;
-    DNDEvent event = new DNDEvent();
-    event.widget = this;
-    event.time = cast(int)System.currentTimeMillis(); 
-    event.dataType = transferData; 
-    notifyListeners(DND.DragSetData, event);
-    Transfer transfer = null;
-    for (int i = 0; i < transferAgents.length; i++) {
-        Transfer transferAgent = transferAgents[i];
-        if (transferAgent !is null && transferAgent.isSupportedType(transferData)) {
-            transfer = transferAgent;
-            break;
-        }
+static int /*long*/ dragSourceProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    Display display = Display.findDisplay(Thread.currentThread());
+    if (display is null || display.isDisposed()) return 0;
+    Widget widget = display.findWidget(id);
+    if (widget is null) return 0;
+    DragSource ds = null;
+    
+    if (widget instanceof DragSource)
+        ds = (DragSource)widget;
+    
+    if (ds is null) return 0;
+    
+    if (sel is OS.sel_draggingSourceOperationMaskForLocal_) {
+        return ds.draggingSourceOperationMaskForLocal(arg0 is 1);
     }
-    if (transfer is null) return OS.badDragFlavorErr;
-    transfer.javaToNative(event.data, transferData);
-    if (transferData.result !is OS.noErr) return transferData.result;
-    // Except for FileTransfer (see #drag), only one item can be transferred
-    // in a Drag operation
-    byte[] datum = transferData.data[0];
-    if (datum is null) return OS.cantGetFlavorErr;
-    return OS.SetDragItemFlavorData(theDrag, theItemRef, theType, datum, datum.length, 0);
+    
+    return 0;
+}
+
+static int /*long*/ dragSourceProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+    Display display = Display.findDisplay(Thread.currentThread());
+    if (display is null || display.isDisposed()) return 0;
+    Widget widget = display.findWidget(id);
+    if (widget is null) return 0;
+    DragSource ds = null;
+    
+    if (widget instanceof DragSource)
+        ds = (DragSource)widget;
+    
+    if (ds is null) return 0;
+    
+    if (sel is OS.sel_draggedImage_beganAt_) {
+        NSImage image = new NSImage(arg0);
+        // I am deliberately ignoring arg1 (an NSPoint). It's not needed for our purposes.
+        ds.draggedImage_beganAt(image);
+    } else if (sel is OS.sel_pasteboard_provideDataForType_) {
+        NSPasteboard pb = new NSPasteboard(arg0);
+        NSString type = new NSString(arg1);
+        ds.pasteboard_provideDataForType(pb, type);
+    }
+    
+    return 0;
+}
+
+static int /*long*/ dragSourceProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
+    Display display = Display.findDisplay(Thread.currentThread());
+    if (display is null || display.isDisposed()) return 0;
+    Widget widget = display.findWidget(id);
+    if (widget is null) return 0;
+    DragSource ds = null;
+    
+    if (widget instanceof DragSource)
+        ds = (DragSource)widget;
+    
+    if (ds is null) return 0;
+    
+    if (sel is OS.sel_draggedImage_endedAt_operation_) {
+        NSImage image = new NSImage(arg0);
+        NSPoint point = new NSPoint();
+        OS.memmove(point, arg1, NSPoint.sizeof);
+        ds.draggedImage_endedAt_operation(image, point, arg2);
+    }
+    
+    return 0;
 }
 
 /**
@@ -405,6 +504,9 @@
  * operation is in progress, by sending it one of the messages defined in 
  * the <code>DragSourceListener</code> interface.
  *
+ * @return the listeners who will be notified when a drag and drop
+ * operation is in progress
+ *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
@@ -424,8 +526,8 @@
     int count = 0;
     for (int i = 0; i < length; i++) {
         Listener listener = listeners[i];
-        if ( null !is cast(DNDListener)listener ) {
-            dragListeners[count] = cast(DragSourceListener) (cast(DNDListener) listener).getEventListener();
+        if (listener instanceof DNDListener) {
+            dragListeners[count] = (DragSourceListener) ((DNDListener) listener).getEventListener();
             count++;
         }
     }
@@ -456,6 +558,13 @@
     return transferAgents;
 }
 
+/**
+ * We always want the modifier keys to potentially update the drag.
+ */
+bool ignoreModifierKeysWhileDragging() {
+    return false;
+}
+
 void onDispose() {
     if (control is null)
         return;
@@ -467,50 +576,90 @@
     control.setData(DND.DRAG_SOURCE_KEY, null);
     control = null;
     transferAgents = null;
+
+    if (delegateJniRef !is 0) OS.DeleteGlobalRef(delegateJniRef);
+    if (dragSourceDelegate !is null) dragSourceDelegate.release();
 }
 
 int opToOsOp(int operation) {
     int osOperation = 0;
     if ((operation & DND.DROP_COPY) !is 0){
-        osOperation |= OS.kDragActionCopy;
+        osOperation |= OS.NSDragOperationCopy;
     }
     if ((operation & DND.DROP_LINK) !is 0) {
-        osOperation |= OS.kDragActionAlias;
+        osOperation |= OS.NSDragOperationLink;
     }
     if ((operation & DND.DROP_MOVE) !is 0) {
-        osOperation |= OS.kDragActionMove;
+        osOperation |= OS.NSDragOperationMove;
     }
     if ((operation & DND.DROP_TARGET_MOVE) !is 0) {
-        osOperation |= OS.kDragActionDelete;
+        osOperation |= OS.NSDragOperationDelete;
     }
     return osOperation;
 }
 
-int osOpToOp(int osOperation){
+int osOpToOp(int /*long*/ osOperation){
     int operation = 0;
-    if ((osOperation & OS.kDragActionCopy) !is 0){
+    if ((osOperation & OS.NSDragOperationCopy) !is 0){
         operation |= DND.DROP_COPY;
     }
-    if ((osOperation & OS.kDragActionAlias) !is 0) {
+    if ((osOperation & OS.NSDragOperationLink) !is 0) {
         operation |= DND.DROP_LINK;
     }
-    if ((osOperation & OS.kDragActionDelete) !is 0) {
+    if ((osOperation & OS.NSDragOperationDelete) !is 0) {
         operation |= DND.DROP_TARGET_MOVE;
     }
-    if ((osOperation & OS.kDragActionMove) !is 0) {
+    if ((osOperation & OS.NSDragOperationMove) !is 0) {
         operation |= DND.DROP_MOVE;
     }
-    if (osOperation is OS.kDragActionAll) {
+    if (osOperation is OS.NSDragOperationEvery) {
         operation = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
     }
     return operation;
 }
 
+void pasteboard_provideDataForType(NSPasteboard pasteboard, NSString dataType) {
+    if (pasteboard is null || dataType is null) return;
+    TransferData transferData = new TransferData();
+    transferData.type = Transfer.registerType(dataType.getString());
+    DNDEvent event = new DNDEvent();
+    event.widget = this;
+    event.time = (int)System.currentTimeMillis(); 
+    event.dataType = transferData; 
+    notifyListeners(DND.DragSetData, event);
+    Transfer transfer = null;
+    for (int i = 0; i < transferAgents.length; i++) {
+        Transfer transferAgent = transferAgents[i];
+        if (transferAgent !is null && transferAgent.isSupportedType(transferData)) {
+            transfer = transferAgent;
+            break;
+        }
+    }
+    if (transfer is null) return;
+    transfer.javaToNative(event.data, transferData);
+    if (transferData.data is null) return;
+
+    NSObject tdata = transferData.data;
+
+    if (dataType.isEqual(OS.NSStringPboardType) ||
+            dataType.isEqual(OS.NSHTMLPboardType) || 
+            dataType.isEqual(OS.NSRTFPboardType)) {
+        pasteboard.setString((NSString) tdata, dataType);
+    } else if (dataType.isEqual(OS.NSURLPboardType)) {
+        NSURL url = (NSURL) tdata;
+        url.writeToPasteboard(pasteboard);
+    } else if (dataType.isEqual(OS.NSFilenamesPboardType)) {
+        pasteboard.setPropertyList((NSArray) tdata, dataType);
+    } else {
+        pasteboard.setData((NSData) tdata, dataType);
+    }
+}
+
 /**
  * Removes the listener from the collection of listeners who will
  * be notified when a drag and drop operation is in progress.
  *
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
  *
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -522,6 +671,7 @@
  *
  * @see DragSourceListener
  * @see #addDragListener
+ * @see #getDragListeners
  */
 public void removeDragListener(DragSourceListener listener) {
     if (listener is null) DND.error (DWT.ERROR_NULL_ARGUMENT);
--- a/dwt/dnd/DragSourceAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DragSourceAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,9 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DragSourceAdapter;
+
+import dwt.dwthelper.utils;
 
 
 /**
@@ -21,21 +23,32 @@
  *
  * @see DragSourceListener
  * @see DragSourceEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
-public class DragSourceAdapter : DragSourceListener {
-    /**
-     * This implementation of <code>dragStart</code> permits the drag operation to start.
-     * For additional information see <code>DragSourceListener.dragStart</code>.
-     */
-    public void dragStart(DragSourceEvent event){}
-    /**
-     * This implementation of <code>dragFinished</code> does nothing.
-     * For additional information see <code>DragSourceListener.dragFinished</code>.
-     */
-    public void dragFinished(DragSourceEvent event){}
-    /**
-     * This implementation of <code>dragSetData</code> does nothing.
-     * For additional information see <code>DragSourceListener.dragSetData</code>.
-     */
-    public void dragSetData(DragSourceEvent event){}
+public class DragSourceAdapter implements DragSourceListener {
+
+/**
+ * This implementation of <code>dragStart</code> permits the drag operation to start.
+ * For additional information see <code>DragSourceListener.dragStart</code>.
+ * 
+ * @param event the information associated with the drag start event
+ */
+public void dragStart(DragSourceEvent event){}
+
+/**
+ * This implementation of <code>dragFinished</code> does nothing.
+ * For additional information see <code>DragSourceListener.dragFinished</code>.
+ * 
+ * @param event the information associated with the drag finished event
+ */
+public void dragFinished(DragSourceEvent event){}
+
+/**
+ * This implementation of <code>dragSetData</code> does nothing.
+ * For additional information see <code>DragSourceListener.dragSetData</code>.
+ * 
+ * @param event the information associated with the drag set data event
+ */
+public void dragSetData(DragSourceEvent event){}
+
 }
--- a/dwt/dnd/DragSourceEffect.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DragSourceEffect.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,10 +8,12 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DragSourceEffect;
 
-import dwt.*;
-import dwt.widgets.*;
+import dwt.dwthelper.utils;
+
+import dwt.DWT;
+import dwt.widgets.Control;
 
 /**
  * This class provides default implementations to display a drag source
@@ -32,10 +34,11 @@
  *
  * @see DragSourceAdapter
  * @see DragSourceEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.3
  */
-public class DragSourceEffect : DragSourceAdapter {
+public class DragSourceEffect extends DragSourceAdapter {
     Control control = null;
 
     /**
@@ -47,7 +50,7 @@
      *    <li>ERROR_NULL_ARGUMENT - if the control is null</li>
      * </ul>
      */
-    public this(Control control) {
+    public DragSourceEffect(Control control) {
         if (control is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
         this.control = control;
     }
--- a/dwt/dnd/DragSourceEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DragSourceEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,17 +8,20 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DragSourceEvent;
+
+import dwt.dwthelper.utils;
 
 import dwt.events.TypedEvent;
-import dwt.graphics.*;
+import dwt.graphics.Image;
 
 /**
  * The DragSourceEvent contains the event information passed in the methods of the DragSourceListener.
  * 
  * @see DragSourceListener
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
-public class DragSourceEvent : TypedEvent {
+public class DragSourceEvent extends TypedEvent {
     /**
      * The operation that was performed.
      * @see DND#DROP_NONE
@@ -48,12 +51,14 @@
     /**
      * In dragStart, the x coordinate (relative to the control) of the 
      * position the mouse went down to start the drag.
+     * 
      * @since 3.2
      */
     public int x;
     /**
      * In dragStart, the y coordinate (relative to the control) of the 
-     * position the mouse went down to start the drag .
+     * position the mouse went down to start the drag.
+     * 
      * @since 3.2
      */
     public int y;
@@ -73,6 +78,19 @@
      */
     public Image image;
 
+    /**
+     * In dragStart, the x offset (relative to the image) where the drag source image will be displayed.
+     * 
+     * @since 3.5
+     */
+    public int offsetX;
+    /**
+     * In dragStart, the y offset (relative to the image) where the drag source image will be displayed.
+     * 
+     * @since 3.5
+     */
+    public int offsetY;
+
     static final long serialVersionUID = 3257002142513770808L;
     
 /**
@@ -81,7 +99,7 @@
  *
  * @param e the untyped event containing the information
  */
-public this(DNDEvent e) {
+public DragSourceEvent(DNDEvent e) {
     super(e);
     this.data = e.data;
     this.detail = e.detail;
@@ -90,6 +108,8 @@
     this.x = e.x;
     this.y = e.y;
     this.image = e.image;
+    this.offsetX = e.offsetX;
+    this.offsetY = e.offsetY;
 }
 void updateEvent(DNDEvent e) {
     e.widget = this.widget;
@@ -101,5 +121,21 @@
     e.x = this.x;
     e.y = this.y;
     e.image = this.image;
+    e.offsetX = this.offsetX;
+    e.offsetY = this.offsetY;
+}
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString() {
+    String string = super.toString ();
+    return string.substring (0, string.length() - 1) // remove trailing '}'
+        + " operation=" + detail
+        + " type=" + (dataType !is null ? dataType.type : 0)
+        + " doit=" + doit
+        + "}";
 }
 }
--- a/dwt/dnd/DragSourceListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DragSourceListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -8,7 +8,9 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DragSourceListener;
+
+import dwt.dwthelper.utils;
 
 import dwt.internal.DWTEventListener;
 
@@ -24,7 +26,7 @@
  * <b>move</b> operation, the application must remove the data that was transferred.</p>
  *
  */
-public interface DragSourceListener : DWTEventListener {
+public interface DragSourceListener extends DWTEventListener {
 
 /**
  * The user has begun the actions required to drag the widget. This event gives the application 
--- a/dwt/dnd/DropTarget.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DropTarget.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,13 +8,37 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DropTarget;
 
+import dwt.dwthelper.utils;
+
+import java.util.ArrayList;
 
-import dwt.*;
-import dwt.widgets.*;
-import dwt.internal.*;
-import dwt.internal.carbon.*;
+import dwt.DWT;
+import dwt.DWTError;
+import dwt.DWTException;
+import dwt.internal.Callback;
+import dwt.internal.cocoa.NSApplication;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSCursor;
+import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSMutableArray;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSPasteboard;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSScreen;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSURL;
+import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.id;
+import dwt.widgets.Control;
+import dwt.widgets.Display;
+import dwt.widgets.Event;
+import dwt.widgets.Listener;
+import dwt.widgets.Table;
+import dwt.widgets.Tree;
+import dwt.widgets.Widget;
 
 /**
  *
@@ -56,7 +80,7 @@
  *              event.detail = DND.DROP_NONE;
  *              return;
  *          }
- *          label.setText (cast(String) event.data); // data copied to label text
+ *          label.setText ((String) event.data); // data copied to label text
  *      }
  *  });
  * </pre></code>
@@ -66,8 +90,27 @@
  *  <dt><b>Events</b></dt> <dd>DND.DragEnter, DND.DragLeave, DND.DragOver, DND.DragOperationChanged, 
  *                             DND.DropAccept, DND.Drop </dd>
  * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#dnd">Drag and Drop snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: DNDExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
-public class DropTarget : Widget {
+public class DropTarget extends Widget {
+
+    static Callback dropTarget2Args, dropTarget3Args;
+    static int /*long*/ proc2Args, proc3Args;
+
+    static {
+        Class clazz = DropTarget.class;
+
+        dropTarget2Args = new Callback(clazz, "dropTargetProc", 2);
+        proc2Args = dropTarget2Args.getAddress();
+        if (proc2Args is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+
+        dropTarget3Args = new Callback(clazz, "dropTargetProc", 3);
+        proc3Args = dropTarget3Args.getAddress();
+        if (proc3Args is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);        
+    }
 
     Control control;
     Listener controlListener;
@@ -82,33 +125,199 @@
     // workaround - There is no event for "operation changed" so track operation based on key state
     int keyOperation = -1;
     
-    // workaround - Simulate events when mouse is not moving
-    long dragOverStart;
-    Runnable dragOverHeartbeat;
-    DNDEvent dragOverEvent;
+    static final String DEFAULT_DROP_TARGET_EFFECT = "DEFAULT_DROP_TARGET_EFFECT"; //$NON-NLS-1$
     
-    // workaround - OS events are relative to the application, not the control.
-    // Track which control is the current target to determine when drag and
-    // drop enters or leaves a widget.
-    static DropTarget CurrentDropTarget = null;
+void addDragHandlers() {
+    // Our strategy here is to dynamically add methods to the control's class that are required 
+    // by NSDraggingDestination. Then, when setTransfer is called, we just register
+    // the types with the Control's NSView and AppKit will call the methods in the protocol
+    // when a drag goes over the view. 
+
+    int /*long*/ cls = OS.object_getClass(control.view.id);
+
+    if (cls is 0) {
+        DND.error(DND.ERROR_CANNOT_INIT_DROP);
+    }
+
+    // If we already added it, no need to do it again.
+    int /*long*/ procPtr = OS.class_getMethodImplementation(cls, OS.sel_draggingEnded_);
+    if (procPtr is proc3Args) return;
+
+    // Add the NSDraggingDestination callbacks
+    OS.class_addMethod(cls, OS.sel_draggingEntered_, proc3Args, "@:@");
+    OS.class_addMethod(cls, OS.sel_draggingUpdated_, proc3Args, "@:@");
+    OS.class_addMethod(cls, OS.sel_draggingExited_, proc3Args, "@:@");
+    OS.class_addMethod(cls, OS.sel_performDragOperation_, proc3Args, "@:@");
+    OS.class_addMethod(cls, OS.sel_wantsPeriodicDraggingUpdates, proc2Args, "@:");
+}
+
+/**
+ * Adds the listener to the collection of listeners who will
+ * be notified when a drag and drop operation is in progress, by sending
+ * it one of the messages defined in the <code>DropTargetListener</code>
+ * interface.
+ * 
+ * <p><ul>
+ * <li><code>dragEnter</code> is called when the cursor has entered the drop target boundaries
+ * <li><code>dragLeave</code> is called when the cursor has left the drop target boundaries and just before
+ * the drop occurs or is cancelled.
+ * <li><code>dragOperationChanged</code> is called when the operation being performed has changed 
+ * (usually due to the user changing the selected modifier key(s) while dragging)
+ * <li><code>dragOver</code> is called when the cursor is moving over the drop target
+ * <li><code>dropAccept</code> is called just before the drop is performed.  The drop target is given 
+ * the chance to change the nature of the drop or veto the drop by setting the <code>event.detail</code> field
+ * <li><code>drop</code> is called when the data is being dropped
+ * </ul></p>
+ *
+ * @param listener the listener which should be notified
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @see DropTargetListener
+ * @see #getDropListeners
+ * @see #removeDropListener
+ * @see DropTargetEvent
+ */
+public void addDropListener(DropTargetListener listener) {
+    if (listener is null) DND.error (DWT.ERROR_NULL_ARGUMENT);
+    DNDListener typedListener = new DNDListener (listener);
+    typedListener.dndWidget = this;
+    addListener (DND.DragEnter, typedListener);
+    addListener (DND.DragLeave, typedListener);
+    addListener (DND.DragOver, typedListener);
+    addListener (DND.DragOperationChanged, typedListener);
+    addListener (DND.Drop, typedListener);
+    addListener (DND.DropAccept, typedListener);
+}
+
+static int checkStyle (int style) {
+    if (style is DWT.NONE) return DND.DROP_MOVE;
+    return style;
+}
+
+protected void checkSubclass () {
+    String name = getClass().getName ();
+    String validName = DropTarget.class.getName();
+    if (!validName.equals(name)) {
+        DND.error (DWT.ERROR_INVALID_SUBCLASS);
+    }
+}
+
+int draggingEntered(NSObject sender) {
+    selectedDataType = null;
+    selectedOperation = 0;
     
-    static final String DEFAULT_DROP_TARGET_EFFECT = "DEFAULT_DROP_TARGET_EFFECT"; //$NON-NLS-1$
-    static final int DRAGOVER_HYSTERESIS = 50;
+    DNDEvent event = new DNDEvent();
+    if (!setEventData(sender, event)) {
+        keyOperation = -1;
+        if (OS.PTR_SIZEOF is 4) OS.SetThemeCursor(OS.kThemeNotAllowedCursor);
+        return OS.NSDragOperationNone;
+    }
     
-    static Callback DragTrackingHandler;
-    static Callback DragReceiveHandler;
+    int allowedOperations = event.operations;
+    TransferData[] allowedDataTypes = new TransferData[event.dataTypes.length];
+    System.arraycopy(event.dataTypes, 0, allowedDataTypes, 0, allowedDataTypes.length);
+    
+    notifyListeners(DND.DragEnter, event);
+
+    if (event.detail is DND.DROP_DEFAULT) {
+        event.detail = (allowedOperations & DND.DROP_MOVE) !is 0 ? DND.DROP_MOVE : DND.DROP_NONE;
+    }
+    
+    selectedDataType = null;
+    for (int i = 0; i < allowedDataTypes.length; i++) {
+        if (allowedDataTypes[i].type is event.dataType.type) {
+            selectedDataType = allowedDataTypes[i];
+            break;
+        }
+    }
+
+    selectedOperation = DND.DROP_NONE;
+    if (selectedDataType !is null && (allowedOperations & event.detail) !is 0) {
+        selectedOperation = event.detail;
+    }
+    
+    int osOperation = opToOsOp(selectedOperation);
+
+    if (OS.PTR_SIZEOF is 4) {
+        switch (selectedOperation) {
+        case DND.DROP_COPY:
+            OS.SetThemeCursor(OS.kThemeCopyArrowCursor);
+            break;
+        case DND.DROP_LINK:
+            OS.SetThemeCursor(OS.kThemeAliasArrowCursor);
+            break;
+        case DND.DROP_MOVE:
+            NSCursor.arrowCursor().set();
+            break;
+        default:
+            OS.SetThemeCursor(OS.kThemeNotAllowedCursor);
+        }
+    }   
+    return osOperation;
+}
+
+void draggingExited(NSObject sender) {
+    NSCursor.arrowCursor().set();
+    if (keyOperation is -1) return;
+    keyOperation = -1;
     
-    static {
-        DragTrackingHandler = new Callback(DropTarget.class, "DragTrackingHandler", 4); //$NON-NLS-1$
-        int dragTrackingHandlerAddress = DragTrackingHandler.getAddress();
-        if (dragTrackingHandlerAddress is 0) DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-        DragReceiveHandler = new Callback(DropTarget.class, "DragReceiveHandler", 3); //$NON-NLS-1$
-        int dragReceiveHandlerAddress = DragReceiveHandler.getAddress();
-        if (dragReceiveHandlerAddress is 0) DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-        OS.InstallTrackingHandler(dragTrackingHandlerAddress, 0, null);
-        OS.InstallReceiveHandler(dragReceiveHandlerAddress, 0, null);
+    DNDEvent event = new DNDEvent();
+    event.widget = this;
+    event.time = (int)System.currentTimeMillis();
+    event.detail = DND.DROP_NONE;
+    notifyListeners(DND.DragLeave, event);
+}
+
+int draggingUpdated(NSObject sender) {
+    if (sender is null) return OS.NSDragOperationNone;  
+    int oldKeyOperation = keyOperation;
+    
+    DNDEvent event = new DNDEvent();
+    if (!setEventData(sender, event)) {
+        keyOperation = -1;
+        if (OS.PTR_SIZEOF is 4) OS.SetThemeCursor(OS.kThemeNotAllowedCursor);
+        return OS.NSDragOperationNone;
     }
 
+    int allowedOperations = event.operations;
+    TransferData[] allowedDataTypes = new TransferData[event.dataTypes.length];
+    System.arraycopy(event.dataTypes, 0, allowedDataTypes, 0, allowedDataTypes.length);
+
+    if (keyOperation is oldKeyOperation) {
+        event.type = DND.DragOver;
+        event.dataType = selectedDataType;
+        event.detail = selectedOperation;
+    } else {
+        event.type = DND.DragOperationChanged;
+        event.dataType = selectedDataType;
+    }
+    notifyListeners(event.type, event);
+    if (event.detail is DND.DROP_DEFAULT) {
+        event.detail = (allowedOperations & DND.DROP_MOVE) !is 0 ? DND.DROP_MOVE : DND.DROP_NONE;
+    }
+    
+    selectedDataType = null;
+    for (int i = 0; i < allowedDataTypes.length; i++) {
+        if (allowedDataTypes[i].type is event.dataType.type) {
+            selectedDataType = allowedDataTypes[i];
+            break;
+        }
+    }
+
+    selectedOperation = DND.DROP_NONE;
+    if (selectedDataType !is null && ((allowedOperations & event.detail) is event.detail)) {
+        selectedOperation = event.detail;
+    }
+    return opToOsOp(selectedOperation);
+}
+
 /**
  * Creates a new <code>DropTarget</code> to allow data to be dropped on the specified 
  * <code>Control</code>.
@@ -140,15 +349,14 @@
  * @see DND#DROP_MOVE
  * @see DND#DROP_LINK
  */
-public this(Control control, int style) {
+public DropTarget(Control control, int style) {
     super(control, checkStyle(style));
     this.control = control;
-    if (DragTrackingHandler is null || DragTrackingHandler is null) {
-        DND.error(DND.ERROR_CANNOT_INIT_DROP);
-    }
+
     if (control.getData(DND.DROP_TARGET_KEY) !is null) {
         DND.error(DND.ERROR_CANNOT_INIT_DROP);
     }
+
     control.setData(DND.DROP_TARGET_KEY, this);
 
     controlListener = new Listener () {
@@ -167,179 +375,214 @@
     });
 
     Object effect = control.getData(DEFAULT_DROP_TARGET_EFFECT);
-    if ( null !is cast(DropTargetEffect)effect ) {
-        dropEffect = cast(DropTargetEffect) effect;
-    } else if ( null !is cast(Table)control ) {
-        dropEffect = new TableDropTargetEffect(cast(Table) control);
-    } else if ( null !is cast(Tree)control ) {
-        dropEffect = new TreeDropTargetEffect(cast(Tree) control);
+    if (effect instanceof DropTargetEffect) {
+        dropEffect = (DropTargetEffect) effect;
+    } else if (control instanceof Table) {
+        dropEffect = new TableDropTargetEffect((Table) control);
+    } else if (control instanceof Tree) {
+        dropEffect = new TreeDropTargetEffect((Tree) control);
     }
 
-    dragOverHeartbeat = new Runnable() {
-        public void run() {
-            Control control = DropTarget.this.control;
-            if (control is null || control.isDisposed() || dragOverStart is 0) return;
-            long time = System.currentTimeMillis();
-            int delay = DRAGOVER_HYSTERESIS;
-            if (time < dragOverStart) {
-                delay = cast(int)(dragOverStart - time);
-            } else {    
-                int allowedOperations = dragOverEvent.operations;
-                TransferData[] allowedTypes = dragOverEvent.dataTypes;
-                //pass a copy of data types in to listeners in case application modifies it
-                TransferData[] dataTypes = new TransferData[allowedTypes.length];
-                System.arraycopy(allowedTypes, 0, dataTypes, 0, dataTypes.length);
-    
-                DNDEvent event = new DNDEvent();
-                event.widget = dragOverEvent.widget;
-                event.x = dragOverEvent.x;
-                event.y = dragOverEvent.y;
-                event.time = cast(int)time;
-                event.feedback = DND.FEEDBACK_SELECT;
-                event.dataTypes = dataTypes;
-                event.dataType = selectedDataType;
-                event.operations = dragOverEvent.operations;
-                event.detail  = selectedOperation;
-                if (dropEffect !is null) {
-                    event.item = dropEffect.getItem(event.x, event.y);
-                }
-                selectedDataType = null;
-                selectedOperation = DND.DROP_NONE;              
-                notifyListeners(DND.DragOver, event);
-                if (event.dataType !is null) {
-                    for (int i = 0; i < allowedTypes.length; i++) {
-                        if (allowedTypes[i].type is event.dataType.type) {
-                            selectedDataType = event.dataType;
-                            break;
-                        }
-                    }
-                }
-                if (selectedDataType !is null && (event.detail & allowedOperations) !is 0) {
-                    selectedOperation = event.detail;
-                }
-            }
-            control = DropTarget.this.control;
-            if (control is null || control.isDisposed()) return;
-            control.getDisplay().timerExec(delay, dragOverHeartbeat);
-        }
-    };
+    addDragHandlers();  
 }
 
-static int checkStyle (int style) {
-    if (style is DWT.NONE) return DND.DROP_MOVE;
-    return style;
+static int /*long*/ dropTargetProc(int /*long*/ id, int /*long*/ sel) {
+    Display display = Display.findDisplay(Thread.currentThread());
+    if (display is null || display.isDisposed()) return 0;
+    Widget widget = display.findWidget(id);
+    if (widget is null) return 0;
+    DropTarget dt = (DropTarget)widget.getData(DND.DROP_TARGET_KEY);
+    if (dt is null) return 0;
+
+    if (sel is OS.sel_wantsPeriodicDraggingUpdates) {
+        return dt.wantsPeriodicDraggingUpdates() ? 1 : 0;
+    }
+    
+    return 0;
 }
 
-static int DragReceiveHandler(int theWindow, int handlerRefCon, int theDrag) {
-    DropTarget target = FindDropTarget(theWindow, theDrag);
-    if (target is null) return OS.noErr;
-    return target.dragReceiveHandler(theWindow, handlerRefCon, theDrag);   
-}
-
-static int DragTrackingHandler(int message, int theWindow, int handlerRefCon, int theDrag) {
-    if (message is OS.kDragTrackingLeaveHandler || message is OS.kDragTrackingEnterHandler) {
-        CurrentDropTarget = null;
-        return OS.noErr;
+static int /*long*/ dropTargetProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    Display display = Display.findDisplay(Thread.currentThread());
+    if (display is null || display.isDisposed()) return 0;
+    Widget widget = display.findWidget(id);
+    if (widget is null) return 0;
+    DropTarget dt = (DropTarget)widget.getData(DND.DROP_TARGET_KEY);
+    if (dt is null) return 0;
+    
+    // arg0 is _always_ the sender, and implements NSDraggingInfo.
+    // Looks like an NSObject for our purposes, though.
+    NSObject sender = new NSObject(arg0);
+    
+    if (sel is OS.sel_draggingEntered_) {
+        return dt.draggingEntered(sender);
+    } else if (sel is OS.sel_draggingUpdated_) {
+        return dt.draggingUpdated(sender);
+    } else if (sel is OS.sel_draggingExited_) {
+        dt.draggingExited(sender);
+    } else if (sel is OS.sel_performDragOperation_) {
+        return dt.performDragOperation(sender) ? 1 : 0;
     }
-    DropTarget target = FindDropTarget(theWindow, theDrag);
-    if (CurrentDropTarget !is null) {
-        if (target is null || CurrentDropTarget.control.handle !is target.control.handle) {
-            CurrentDropTarget.dragTrackingHandler(OS.kDragTrackingLeaveWindow, theWindow, handlerRefCon, theDrag);
-            CurrentDropTarget = target;
-            message = OS.kDragTrackingEnterWindow;
-        }
-    } else {
-        CurrentDropTarget = target;
-        message = OS.kDragTrackingEnterWindow;
-    }
-    if (target is null) return OS.noErr;
-    return target.dragTrackingHandler(message, theWindow, handlerRefCon, theDrag);   
+    
+    return 0;
 }
 
-static DropTarget FindDropTarget(int theWindow, int theDrag) {
-    Display display = Display.findDisplay(Thread.currentThread());
-    if (display is null || display.isDisposed()) return null;
-    Point mouse = new Point();
-    OS.GetDragMouse(theDrag, mouse, null);
-    int[] theRoot = new int[1];
-    OS.GetRootControl(theWindow, theRoot);
-    int[] theControl = new int[1];
-    Rect rect = new Rect();
-    OS.GetWindowBounds (theWindow, cast(short) OS.kWindowContentRgn, rect);
-    CGPoint inPoint = new CGPoint();
-    inPoint.x = mouse.h - rect.left;
-    inPoint.y = mouse.v - rect.top;
-    OS.HIViewGetSubviewHit(theRoot[0], inPoint, true, theControl);
-    if (!OS.IsControlEnabled(theControl[0])) return null;               
-    Widget widget = display.findWidget(theControl[0]);
-    if (widget is null) return null;
-    return cast(DropTarget)widget.getData(DND.DROP_TARGET_KEY);
-}
 /**
- * Adds the listener to the collection of listeners who will
- * be notified when a drag and drop operation is in progress, by sending
- * it one of the messages defined in the <code>DropTargetListener</code>
- * interface.
- * 
- * <p><ul>
- * <li><code>dragEnter</code> is called when the cursor has entered the drop target boundaries
- * <li><code>dragLeave</code> is called when the cursor has left the drop target boundaries and just before
- * the drop occurs or is cancelled.
- * <li><code>dragOperationChanged</code> is called when the operation being performed has changed 
- * (usually due to the user changing the selected modifier key(s) while dragging)
- * <li><code>dragOver</code> is called when the cursor is moving over the drop target
- * <li><code>dropAccept</code> is called just before the drop is performed.  The drop target is given 
- * the chance to change the nature of the drop or veto the drop by setting the <code>event.detail</code> field
- * <li><code>drop</code> is called when the data is being dropped
- * </ul></p>
+ * Returns the Control which is registered for this DropTarget.  This is the control over which the 
+ * user positions the cursor to drop the data.
  *
- * @param listener the listener which should be notified
+ * @return the Control which is registered for this DropTarget
+ */
+public Control getControl () {
+    return control;
+}
+
+/**
+ * Returns an array of listeners who will be notified when a drag and drop 
+ * operation is in progress, by sending it one of the messages defined in 
+ * the <code>DropTargetListener</code> interface.
  *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
+ * @return the listeners who will be notified when a drag and drop 
+ * operation is in progress
+ *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
  *
  * @see DropTargetListener
+ * @see #addDropListener
  * @see #removeDropListener
  * @see DropTargetEvent
+ * 
+ * @since 3.4
  */
-public void addDropListener(DropTargetListener listener) {
-    if (listener is null) DND.error (DWT.ERROR_NULL_ARGUMENT);
-    DNDListener typedListener = new DNDListener (listener);
-    typedListener.dndWidget = this;
-    addListener (DND.DragEnter, typedListener);
-    addListener (DND.DragLeave, typedListener);
-    addListener (DND.DragOver, typedListener);
-    addListener (DND.DragOperationChanged, typedListener);
-    addListener (DND.Drop, typedListener);
-    addListener (DND.DropAccept, typedListener);
+public DropTargetListener[] getDropListeners() {
+    Listener[] listeners = getListeners(DND.DragEnter);
+    int length = listeners.length;
+    DropTargetListener[] dropListeners = new DropTargetListener[length];
+    int count = 0;
+    for (int i = 0; i < length; i++) {
+        Listener listener = listeners[i];
+        if (listener instanceof DNDListener) {
+            dropListeners[count] = (DropTargetListener) ((DNDListener) listener).getEventListener();
+            count++;
+        }
+    }
+    if (count is length) return dropListeners;
+    DropTargetListener[] result = new DropTargetListener[count];
+    System.arraycopy(dropListeners, 0, result, 0, count);
+    return result;
+}
+
+/**
+ * Returns the drop effect for this DropTarget.  This drop effect will be 
+ * used during a drag and drop to display the drag under effect on the 
+ * target widget.
+ *
+ * @return the drop effect that is registered for this DropTarget
+ * 
+ * @since 3.3
+ */
+public DropTargetEffect getDropTargetEffect() {
+    return dropEffect;
+}
+
+int getOperationFromKeyState() {
+    // The NSDraggingInfo object already combined the modifier keys with the 
+    // drag source's allowed events. This might be better accomplished by diffing
+    // the base drag source mask with the active drag state mask instead of snarfing
+    // the current event.
+    
+    // See documentation on [NSDraggingInfo draggingSourceOperationMask] for the
+    // correct Cocoa behavior.  Control + Option or Command is NSDragOperationGeneric,
+    // or DND.DROP_DEFAULT in the DWT.
+    NSEvent currEvent = NSApplication.sharedApplication().currentEvent();
+    int /*long*/ modifiers = currEvent.modifierFlags();
+    bool option = (modifiers & OS.NSAlternateKeyMask) is OS.NSAlternateKeyMask;
+    bool control = (modifiers & OS.NSControlKeyMask) is OS.NSControlKeyMask;
+    if (control && option) return DND.DROP_DEFAULT;
+    if (control) return DND.DROP_LINK;
+    if (option) return DND.DROP_COPY;
+    return DND.DROP_DEFAULT; 
 }
 
-protected void checkSubclass () {
-    String name = getClass().getName ();
-    String validName = DropTarget.class.getName();
-    if (!validName.opEquals(name)) {
-        DND.error (DWT.ERROR_INVALID_SUBCLASS);
-    }
+/**
+ * Returns a list of the data types that can be transferred to this DropTarget.
+ *
+ * @return a list of the data types that can be transferred to this DropTarget
+ */
+public Transfer[] getTransfer() {
+    return transferAgents;
+}
+
+void onDispose () { 
+    if (control is null)
+        return;
+    if (controlListener !is null)
+        control.removeListener(DWT.Dispose, controlListener);
+    controlListener = null;
+    control.setData(DND.DROP_TARGET_KEY, null);
+    transferAgents = null;
+    
+    // Unregister the control as a drop target.
+    control.view.unregisterDraggedTypes();
+    control = null;
 }
 
-int dragReceiveHandler(int theWindow, int handlerRefCon, int theDrag) {
-    updateDragOverHover(0, null);
-    if (keyOperation is -1) return OS.dragNotAcceptedErr;
+int opToOsOp(int operation) {
+    int osOperation = 0;
+    if ((operation & DND.DROP_COPY) !is 0){
+        osOperation |= OS.NSDragOperationCopy;
+    }
+    if ((operation & DND.DROP_LINK) !is 0) {
+        osOperation |= OS.NSDragOperationLink;
+    }
+    if ((operation & DND.DROP_MOVE) !is 0) {
+        osOperation |= OS.NSDragOperationMove;
+    }
+    if ((operation & DND.DROP_TARGET_MOVE) !is 0) {
+        osOperation |= OS.NSDragOperationDelete;
+    }
+    return osOperation;
+}
 
+int osOpToOp(int /*long*/ osOperation){
+    int operation = 0;
+    if ((osOperation & OS.NSDragOperationCopy) !is 0){
+        operation |= DND.DROP_COPY;
+    }
+    if ((osOperation & OS.NSDragOperationLink) !is 0) {
+        operation |= DND.DROP_LINK;
+    }
+    if ((osOperation & OS.NSDragOperationDelete) !is 0) {
+        operation |= DND.DROP_TARGET_MOVE;
+    }
+    if ((osOperation & OS.NSDragOperationMove) !is 0) {
+        operation |= DND.DROP_MOVE;
+    }
+    if (osOperation is OS.NSDragOperationEvery) {
+        operation = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+    }
+    return operation;
+}
+
+bool performDragOperation(NSObject sender) {
     DNDEvent event = new DNDEvent();
     event.widget = this;
-    event.time = cast(int)System.currentTimeMillis();
+    event.time = (int)System.currentTimeMillis();
+    
+    if (dropEffect !is null) {
+        NSPoint mouseLocation = sender.draggingLocation();
+        NSPoint globalLoc = sender.draggingDestinationWindow().convertBaseToScreen(mouseLocation);
+        event.item = dropEffect.getItem((int)globalLoc.x, (int)globalLoc.y);
+    }
+    
     event.detail = DND.DROP_NONE;
     notifyListeners(DND.DragLeave, event);
     
     event = new DNDEvent();
-    if (!setEventData(theDrag, event)) {
-        return OS.dragNotAcceptedErr;
+    if (!setEventData(sender, event)) {
+        return false;
     }
     
     keyOperation = -1;
@@ -348,10 +591,9 @@
     System.arraycopy(event.dataTypes, 0, allowedDataTypes, 0, event.dataTypes.length);
     event.dataType = selectedDataType;
     event.detail = selectedOperation;
+    notifyListeners(DND.DropAccept, event);
+
     selectedDataType = null;
-    selectedOperation = DND.DROP_NONE;
-    notifyListeners(DND.DropAccept, event);
-    
     if (event.dataType !is null) {
         for (int i = 0; i < allowedDataTypes.length; i++) {
             if (allowedDataTypes[i].type is event.dataType.type) {
@@ -360,32 +602,56 @@
             }
         }
     }
+
+    selectedOperation = DND.DROP_NONE;
     if (selectedDataType !is null && (event.detail & allowedOperations) !is 0) {
         selectedOperation = event.detail;
     }   
+    
     if (selectedOperation is DND.DROP_NONE) {
-        // this was not a successful drop
-        return OS.dragNotAcceptedErr;
+        return false;
     }
+    
     // ask drag source for dropped data
-    byte[][] data  = new byte[0][];
-    // locate all the items with data of the desired type 
-    short[] numItems = new short[1];
-    OS.CountDragItems(theDrag, numItems);
-    for (short i = 0; i < numItems[0]; i++) {
-        int[] theItemRef = new int[1];
-        OS.GetDragItemReferenceNumber(theDrag, cast(short) (i+1), theItemRef);
-        int[] size = new int[1];
-        OS.GetFlavorDataSize(theDrag, theItemRef[0], selectedDataType.type, size);
-        if (size[0] > 0) {
-            byte[] buffer = new byte[size[0]];
-            OS.GetFlavorData(theDrag, theItemRef[0], selectedDataType.type, buffer, size, 0);
-            byte[][] newData = new byte[data.length + 1][];
-            System.arraycopy(data, 0, newData, 0, data.length);
-            newData[data.length] = buffer;
-            data = newData;
+    NSPasteboard pasteboard = sender.draggingPasteboard();
+    NSObject data = null;
+    NSMutableArray types = NSMutableArray.arrayWithCapacity(10);
+
+    for (int i = 0; i < transferAgents.length; i++){
+        Transfer transfer = transferAgents[i];
+        String[] typeNames = transfer.getTypeNames();
+        int[] typeIds = transfer.getTypeIds();
+        
+        for (int j = 0; j < typeNames.length; j++) {
+            if (selectedDataType.type is typeIds[j]) {
+                types.addObject(NSString.stringWith(typeNames[j]));
+                break;
+            }
         }
     }
+
+    NSString type = pasteboard.availableTypeFromArray(types);
+    TransferData tdata = new TransferData();
+
+    if (type !is null) {
+        tdata.type = Transfer.registerType(type.getString());
+        if (type.isEqual(OS.NSStringPboardType) ||
+                type.isEqual(OS.NSHTMLPboardType) ||
+                type.isEqual(OS.NSRTFPboardType)) {
+            tdata.data = pasteboard.stringForType(type);
+        } else if (type.isEqual(OS.NSURLPboardType)) {
+            tdata.data = NSURL.URLFromPasteboard(pasteboard);
+        } else if (type.isEqual(OS.NSFilenamesPboardType)) {
+            tdata.data = new NSArray(pasteboard.propertyListForType(type).id);
+        } else {
+            tdata.data = pasteboard.dataForType(type);
+        }
+    }
+
+    if (tdata.data !is null) {
+        data = tdata.data;
+    }
+
     // Get Data in a Java format
     Object object = null;
     for (int i = 0; i < transferAgents.length; i++) {
@@ -410,230 +676,14 @@
         selectedOperation = event.detail;
     }
     //notify source of action taken
-    int action = opToOsOp(selectedOperation);
-    OS.SetDragDropAction(theDrag, action);
-    return (selectedOperation is DND.DROP_NONE) ? OS.dragNotAcceptedErr : OS.noErr;
-}
-
-int dragTrackingHandler(int message, int theWindow, int handlerRefCon, int theDrag) {
-    
-    if (message is OS.kDragTrackingLeaveWindow) {
-        updateDragOverHover(0, null);
-        OS.SetThemeCursor(OS.kThemeArrowCursor);
-        if (keyOperation is -1) return OS.dragNotAcceptedErr;
-        keyOperation = -1;
-        
-        DNDEvent event = new DNDEvent();
-        event.widget = this;
-        event.time = cast(int)System.currentTimeMillis();
-        event.detail = DND.DROP_NONE;
-        notifyListeners(DND.DragLeave, event);
-        return OS.noErr;
-    }
-    
-    int oldKeyOperation = keyOperation;
-    
-    if (message is OS.kDragTrackingEnterWindow) {
-        selectedDataType = null;
-        selectedOperation = 0;
-    }
-    
-    DNDEvent event = new DNDEvent();
-    if (!setEventData(theDrag, event)) {
-        keyOperation = -1;
-        OS.SetThemeCursor(OS.kThemeNotAllowedCursor);
-        return OS.dragNotAcceptedErr;
-    }
-    
-    int allowedOperations = event.operations;
-    TransferData[] allowedDataTypes = new TransferData[event.dataTypes.length];
-    System.arraycopy(event.dataTypes, 0, allowedDataTypes, 0, allowedDataTypes.length);
-    
-    switch (message) {
-        case OS.kDragTrackingEnterWindow:
-            event.type = DND.DragEnter;
-            break;
-        case OS.kDragTrackingInWindow:
-            if (keyOperation is oldKeyOperation) {
-                event.type = DND.DragOver;
-                event.dataType = selectedDataType;
-                event.detail = selectedOperation;
-            }else {
-                event.type = DND.DragOperationChanged;
-                event.dataType = selectedDataType;
-            }
-            break;
-    }
-    
-    updateDragOverHover(DRAGOVER_HYSTERESIS, event);
-    selectedDataType = null;
-    selectedOperation = DND.DROP_NONE;
-    notifyListeners(event.type, event);
-
-    if (event.detail is DND.DROP_DEFAULT) {
-        event.detail = (allowedOperations & DND.DROP_MOVE) !is 0 ? DND.DROP_MOVE : DND.DROP_NONE;
-    }
-    
-    if (event.dataType !is null) {
-        for (int i = 0; i < allowedDataTypes.length; i++) {
-            if (allowedDataTypes[i].type is event.dataType.type) {
-                selectedDataType = allowedDataTypes[i];
-                break;
-            }
-        }
-    }
-
-    if (selectedDataType !is null && (allowedOperations & event.detail) !is 0) {
-        selectedOperation = event.detail;
-    }
-    
-    OS.SetDragDropAction(theDrag, opToOsOp(selectedOperation));
-
-    switch (selectedOperation) {
-        case DND.DROP_COPY:
-            OS.SetThemeCursor(OS.kThemeCopyArrowCursor);
-            break;
-        case DND.DROP_LINK:
-            OS.SetThemeCursor(OS.kThemeAliasArrowCursor);
-            break;
-        case DND.DROP_MOVE:
-            OS.SetThemeCursor(OS.kThemeArrowCursor);
-            break;
-        default:
-            OS.SetThemeCursor(OS.kThemeNotAllowedCursor);
-    }
-    
-    if (message is OS.kDragTrackingEnterWindow) {
-        dragOverHeartbeat.run();        
-    }
-    return OS.noErr;
-}
-
-/**
- * Returns the Control which is registered for this DropTarget.  This is the control over which the 
- * user positions the cursor to drop the data.
- *
- * @return the Control which is registered for this DropTarget
- */
-public Control getControl () {
-    return control;
-}
-
-/**
- * Returns an array of listeners who will be notified when a drag and drop 
- * operation is in progress, by sending it one of the messages defined in 
- * the <code>DropTargetListener</code> interface.
- *
- * @exception DWTException <ul>
- *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- *
- * @see DropTargetListener
- * @see #addDropListener
- * @see #removeDropListener
- * @see DropTargetEvent
- * 
- * @since 3.4
- */
-public DropTargetListener[] getDropListeners() {
-    Listener[] listeners = getListeners(DND.DragEnter);
-    int length = listeners.length;
-    DropTargetListener[] dropListeners = new DropTargetListener[length];
-    int count = 0;
-    for (int i = 0; i < length; i++) {
-        Listener listener = listeners[i];
-        if ( null !is cast(DNDListener)listener ) {
-            dropListeners[count] = cast(DropTargetListener) (cast(DNDListener) listener).getEventListener();
-            count++;
-        }
-    }
-    if (count is length) return dropListeners;
-    DropTargetListener[] result = new DropTargetListener[count];
-    System.arraycopy(dropListeners, 0, result, 0, count);
-    return result;
-}
-
-/**
- * Returns the drop effect for this DropTarget.  This drop effect will be 
- * used during a drag and drop to display the drag under effect on the 
- * target widget.
- *
- * @return the drop effect that is registered for this DropTarget
- * 
- * @since 3.3
- */
-public DropTargetEffect getDropTargetEffect() {
-    return dropEffect;
-}
-
-int getOperationFromKeyState(int theDrag) {
-    short[] modifiers = new short[1];
-    OS.GetDragModifiers(theDrag, modifiers, null, null);
-    bool option = (modifiers[0] & OS.optionKey) is OS.optionKey;
-    bool command = (modifiers[0] & OS.cmdKey) is OS.cmdKey;
-    if (option && command) return DND.DROP_LINK;
-    if (option) return DND.DROP_COPY;
-    if (command) return DND.DROP_MOVE;
-    return DND.DROP_DEFAULT; 
-}
-
-/**
- * Returns a list of the data types that can be transferred to this DropTarget.
- *
- * @return a list of the data types that can be transferred to this DropTarget
- */
-public Transfer[] getTransfer() {
-    return transferAgents;
-}
-
-void onDispose () { 
-    if (control is null)
-        return;
-    if (controlListener !is null)
-        control.removeListener(DWT.Dispose, controlListener);
-    controlListener = null;
-    control.setData(DND.DROP_TARGET_KEY, null);
-    transferAgents = null;
-    control = null;
-}
-
-int opToOsOp(int operation) {
-    int osOperation = 0;
-    if ((operation & DND.DROP_COPY) !is 0){
-        osOperation |= OS.kDragActionCopy;
-    }
-    if ((operation & DND.DROP_LINK) !is 0) {
-        osOperation |= OS.kDragActionAlias;
-    }
-    if ((operation & DND.DROP_MOVE) !is 0) {
-        osOperation |= OS.kDragActionMove;
-    }
-    return osOperation;
-}
-
-int osOpToOp(int osOperation){
-    int operation = 0;
-    if ((osOperation & OS.kDragActionCopy) !is 0){
-        operation |= DND.DROP_COPY;
-    }
-    if ((osOperation & OS.kDragActionAlias) !is 0) {
-        operation |= DND.DROP_LINK;
-    }
-    if ((osOperation & OS.kDragActionMove) !is 0) {
-        operation |= DND.DROP_MOVE;
-    }
-    if (osOperation is OS.kDragActionAll) {
-        operation = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
-    }
-    return operation;
+    return (selectedOperation !is DND.DROP_NONE);
 }
 
 /**
  * Removes the listener from the collection of listeners who will
  * be notified when a drag and drop operation is in progress.
  *
- * @param listener the listener which should be notified
+ * @param listener the listener which should no longer be notified
  *
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -645,6 +695,7 @@
  *
  * @see DropTargetListener
  * @see #addDropListener
+ * @see #getDropListeners
  */
 public void removeDropListener(DropTargetListener listener) {   
     if (listener is null) DND.error (DWT.ERROR_NULL_ARGUMENT);
@@ -669,18 +720,17 @@
     dropEffect = effect;
 }
 
-bool setEventData(int theDrag, DNDEvent event) {
-    if (theDrag is 0) return false;
+bool setEventData(NSObject draggingState, DNDEvent event) {
+    if (draggingState is null) return false;
     
     // get allowed operations
     int style = getStyle();
-    int[] outActions = new int[1];
-    OS.GetDragAllowableActions(theDrag, outActions);
-    int operations = osOpToOp(outActions[0]) & style;
+    int /*long*/ allowedActions = draggingState.draggingSourceOperationMask();
+    int operations = osOpToOp(allowedActions) & style;
     if (operations is DND.DROP_NONE) return false;
-    
-    //get current operation
-    int operation =  getOperationFromKeyState(theDrag);
+
+    // get current operation
+    int operation = getOperationFromKeyState();
     keyOperation = operation;
     if (operation is DND.DROP_DEFAULT) {
          if ((style & DND.DROP_DEFAULT) is 0) {
@@ -690,53 +740,27 @@
         if ((operation & operations) is 0) operation = DND.DROP_NONE;
     }
     
+    
     // get allowed transfer types
-    short[] numItems = new short[1];
-    OS.CountDragItems(theDrag, numItems);
-    int[] flavors = new int[10];
+    NSPasteboard dragPBoard = draggingState.draggingPasteboard();
+    NSArray draggedTypes = dragPBoard.types();
+    if (draggedTypes is null) return false;
+    
+    int /*long*/ draggedTypeCount = draggedTypes.count();
+    
+    TransferData[] dataTypes = new TransferData[(int)draggedTypeCount];
     int index = -1;
-    //Get a unique list of flavors
-    for (short i = 0; i < numItems[0]; i++) {
-        int[] theItemRef = new int[1];
-        OS.GetDragItemReferenceNumber(theDrag, cast(short) (i+1), theItemRef);
-        short[] numFlavors = new short[1];
-        OS.CountDragItemFlavors(theDrag, theItemRef[0], numFlavors);
-        int[] theType = new int[1];
-        for (int j = 0; j < numFlavors[0]; j++) {
-            theType[0] = 0;
-            if (OS.GetFlavorType(theDrag, theItemRef[0], cast(short) (j+1), theType) is OS.noErr) {
-                bool unique = true;
-                for (int k = 0; k < flavors.length; k++) {
-                    if (flavors[k] is theType[0]) {
-                        unique = false;
-                        break;
-                    }
-                }
-                if (unique) {
-                    if (index is flavors.length - 1) {
-                        int[] temp = new int[flavors.length + 10];
-                        System.arraycopy(flavors, 0, temp, 0, flavors.length);
-                        flavors = temp;
-                    }
-                    flavors[++index] = theType[0];
-                }
-            }
-        }
-    }
-    if (index is -1) return false;
-    
-    TransferData[] dataTypes = new TransferData[index+1];
-    index = -1;
-    for (int i = 0; i < dataTypes.length; i++) {
-        if (flavors[i] !is 0) {
-            TransferData data = new TransferData();
-            data.type = flavors[i];
-            for (int j = 0; j < transferAgents.length; j++) {
-                Transfer transfer = transferAgents[j];
-                if (transfer !is null && transfer.isSupportedType(data)) {
-                    dataTypes[++index] = data;
-                    break;
-                }
+    for (int i = 0; i < draggedTypeCount; i++) {
+        id draggedType = draggedTypes.objectAtIndex(i);
+        NSString nativeDataType = new NSString(draggedType);
+        TransferData data = new TransferData();
+        data.type = Transfer.registerType(nativeDataType.getString());
+        
+        for (int j = 0; j < transferAgents.length; j++) {
+            Transfer transfer = transferAgents[j];
+            if (transfer !is null && transfer.isSupportedType(data)) {
+                dataTypes[++index] = data;
+                break;
             }
         }
     }
@@ -748,13 +772,17 @@
         dataTypes = temp;
     }
 
-    Point mouse = new Point();
-    OS.GetDragMouse(theDrag, mouse, null);
+    // Convert from window-relative to global coordinates, and flip it.
+    NSPoint mouse = draggingState.draggingLocation();
+    NSPoint globalMouse = draggingState.draggingDestinationWindow().convertBaseToScreen(mouse);
+    NSArray screens = NSScreen.screens();
+    NSRect screenRect = new NSScreen(screens.objectAtIndex(0)).frame();
+    globalMouse.y = screenRect.height - globalMouse.y;
     
     event.widget = this;
-    event.x = mouse.h;
-    event.y = mouse.v;
-    event.time = cast(int)System.currentTimeMillis();
+    event.x = (int)globalMouse.x;
+    event.y = (int)globalMouse.y;
+    event.time = (int)System.currentTimeMillis();
     event.feedback = DND.FEEDBACK_SELECT;
     event.dataTypes = dataTypes;
     event.dataType = dataTypes[0];
@@ -783,22 +811,35 @@
 public void setTransfer(Transfer[] transferAgents){
     if (transferAgents is null) DND.error(DWT.ERROR_NULL_ARGUMENT);
     this.transferAgents = transferAgents;
+    
+    
+    // Register the types as valid drop types in Cocoa.
+    // Accumulate all of the transfer types into a list.
+    ArrayList typeStrings = new ArrayList();
+    
+    for (int i = 0; i < this.transferAgents.length; i++) {
+        String[] types = transferAgents[i].getTypeNames();
+        
+        for (int j = 0; j < types.length; j++) {
+            typeStrings.add(types[j]);
+        }
+    }
+    
+    // Convert to an NSArray of NSStrings so we can register with the Control.
+    int typeStringCount = typeStrings.size();
+    NSMutableArray nsTypeStrings = NSMutableArray.arrayWithCapacity(typeStringCount);
+    
+    for (int i = 0; i < typeStringCount; i++) {
+        nsTypeStrings.addObject(NSString.stringWith((String)typeStrings.get(i)));
+    }
+    
+    control.view.registerForDraggedTypes(nsTypeStrings);
+
 }
 
-void updateDragOverHover(long delay, DNDEvent event) {
-    if (delay is 0) {
-        dragOverStart = 0;
-        dragOverEvent = null;
-        return;
-    }
-    dragOverStart = System.currentTimeMillis() + delay;
-    if (dragOverEvent is null) dragOverEvent = new DNDEvent();
-    dragOverEvent.x = event.x;
-    dragOverEvent.y = event.y;
-    dragOverEvent.dataTypes  = event.dataTypes;
-    dragOverEvent.operations = event.operations;
-    dragOverEvent.dataType  = event.dataType;
-    dragOverEvent.detail  = event.detail;
+// By returning true we get draggingUpdated messages even when the mouse isn't moving.
+bool wantsPeriodicDraggingUpdates() {
+    return true;
 }
 
 }
--- a/dwt/dnd/DropTargetAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DropTargetAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,9 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DropTargetAdapter;
+
+import dwt.dwthelper.utils;
 
 
 /**
@@ -22,45 +24,63 @@
  *
  * @see DropTargetListener
  * @see DropTargetEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
-public class DropTargetAdapter : DropTargetListener {
+public class DropTargetAdapter implements DropTargetListener {
 
 /**
  * This implementation of <code>dragEnter</code> permits the default 
  * operation defined in <code>event.detail</code>to be performed on the current data type
  * defined in <code>event.currentDataType</code>.
  * For additional information see <code>DropTargetListener.dragEnter</code>.
+ * 
+ * @param event the information associated with the drag enter event
  */
 public void dragEnter(DropTargetEvent event){}
+
 /**
  * This implementation of <code>dragLeave</code> does nothing.
  * For additional information see <code>DropTargetListener.dragOperationChanged</code>.
+ * 
+ * @param event the information associated with the drag leave event
  */
 public void dragLeave(DropTargetEvent event){}
+
 /**
  * This implementation of <code>dragOperationChanged</code> permits the default 
  * operation defined in <code>event.detail</code>to be performed on the current data type
  * defined in <code>event.currentDataType</code>.
  * For additional information see <code>DropTargetListener.dragOperationChanged</code>.
+ * 
+ * @param event the information associated with the drag operation changed event
  */
 public void dragOperationChanged(DropTargetEvent event){}
+
 /**
  * This implementation of <code>dragOver</code> permits the default 
  * operation defined in <code>event.detail</code>to be performed on the current data type
  * defined in <code>event.currentDataType</code>.
  * For additional information see <code>DropTargetListener.dragOver</code>.
+ * 
+ * @param event the information associated with the drag over event
  */
 public void dragOver(DropTargetEvent event){}
+
 /**
  * This implementation of <code>drop</code> does nothing.
  * For additional information see <code>DropTargetListener.drop</code>.
+ * 
+ * @param event the information associated with the drop event
  */
 public void drop(DropTargetEvent event){}
+
 /**
  * This implementation of <code>dropAccept</code> permits the default 
  * operation defined in <code>event.detail</code>to be performed on the current data type
  * defined in <code>event.currentDataType</code>.
  * For additional information see <code>DropTargetListener.dropAccept</code>.
+ * 
+ * @param event the information associated with the drop accept event
  */
 public void dropAccept(DropTargetEvent event){}
 
--- a/dwt/dnd/DropTargetEffect.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DropTargetEffect.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,11 +8,19 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DropTargetEffect;
+
+import dwt.dwthelper.utils;
 
-import dwt.*;
-import dwt.graphics.*;
-import dwt.widgets.*;
+import dwt.DWT;
+import dwt.graphics.Point;
+import dwt.graphics.Rectangle;
+import dwt.widgets.Control;
+import dwt.widgets.Table;
+import dwt.widgets.TableItem;
+import dwt.widgets.Tree;
+import dwt.widgets.TreeItem;
+import dwt.widgets.Widget;
 
 
 /**
@@ -44,10 +52,11 @@
  * 
  * @see DropTargetAdapter
  * @see DropTargetEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.3
  */
-public class DropTargetEffect : DropTargetAdapter {
+public class DropTargetEffect extends DropTargetAdapter {
     Control control;
 
     /**
@@ -60,7 +69,7 @@
      *    <li>ERROR_NULL_ARGUMENT - if the control is null</li>
      * </ul>
      */
-    public this(Control control) {
+    public DropTargetEffect(Control control) {
         if (control is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
         this.control = control;
     }
@@ -85,11 +94,11 @@
      * @return the item at the given x-y coordinate, or null if the coordinate is not in a selectable item
      */
     public Widget getItem(int x, int y) {
-        if ( null !is cast(Table)control ) {
-            return getItem(cast(Table) control, x, y);
+        if (control instanceof Table) {
+            return getItem((Table) control, x, y);
         }
-        if ( null !is cast(Tree)control ) {
-            return getItem(cast(Tree) control, x, y);
+        if (control instanceof Tree) {
+            return getItem((Tree) control, x, y);
         }           
         return null;
     }
--- a/dwt/dnd/DropTargetEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DropTargetEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,15 +8,19 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DropTargetEvent;
+
+import dwt.dwthelper.utils;
 
 import dwt.events.TypedEvent;
 import dwt.widgets.Widget;
 
 /**
  * The DropTargetEvent contains the event information passed in the methods of the DropTargetListener.
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
-public class DropTargetEvent : TypedEvent {
+public class DropTargetEvent extends TypedEvent {
     /**
      * The x-cordinate of the cursor relative to the <code>Display</code>
      */
@@ -87,7 +91,7 @@
  *
  * @param e the untyped event containing the information
  */
-public this(DNDEvent e) {
+public DropTargetEvent(DNDEvent e) {
     super(e);
     this.data = e.data;
     this.x = e.x;
@@ -112,4 +116,31 @@
     e.feedback = this.feedback;
     e.item = this.item;
 }
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString() {
+    String string = super.toString ();
+    StringBuffer sb = new StringBuffer();
+    sb.append(string.substring (0, string.length() - 1)); // remove trailing '}'
+    sb.append(" x="); sb.append(x);
+    sb.append(" y="); sb.append(y);
+    sb.append(" item="); sb.append(item);
+    sb.append(" operations="); sb.append(operations);
+    sb.append(" operation="); sb.append(detail);
+    sb.append(" feedback="); sb.append(feedback);
+    sb.append(" dataTypes={ ");
+    if (dataTypes !is null) {
+        for (int i = 0; i < dataTypes.length; i++) {
+            sb.append(dataTypes[i].type); sb.append(' ');
+        }
+    }
+    sb.append('}');
+    sb.append(" currentDataType="); sb.append(currentDataType !is null ? currentDataType.type : '0');
+    sb.append('}');
+    return sb.toString();
 }
+}
--- a/dwt/dnd/DropTargetListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/DropTargetListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -8,7 +8,9 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.DropTargetListener;
+
+import dwt.dwthelper.utils;
 
 import dwt.internal.DWTEventListener;
 
@@ -33,7 +35,7 @@
  * @see DropTargetEvent
  *
  */
-public interface DropTargetListener : DWTEventListener {
+public interface DropTargetListener extends DWTEventListener {
     
 /**
  * The cursor has entered the drop target boundaries.
@@ -176,9 +178,9 @@
  * <pre><code>
  * public void dragOver(DropTargetEvent event) {
  *       TextTransfer textTransfer = TextTransfer.getInstance();
- *       String data = cast(String)textTransfer.nativeToJava(event.currentDataType);
+ *       String data = (String)textTransfer.nativeToJava(event.currentDataType);
  *       if (data !is null) {
- *           System.out.println("Data to be dropped is cast(Text)"+data);
+ *           System.out.println("Data to be dropped is (Text)"+data);
  *       }
  * };
  * </code></pre>
--- a/dwt/dnd/FileTransfer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/FileTransfer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,10 +9,14 @@
  *     IBM Corporation - initial API and implementation
  *     Outhink - support for typeFileURL
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.FileTransfer;
+
+import dwt.dwthelper.utils;
 
-import java.io.*;
-import dwt.internal.carbon.*;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSMutableArray;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
  
 /**
  * The class <code>FileTransfer</code> provides a platform specific mechanism 
@@ -20,7 +24,6 @@
  * platform specific representation of the data and vice versa.  
  * Each <code>String</code> in the array contains the absolute path for a single 
  * file or directory.
- * See <code>Transfer</code> for additional information.
  * 
  * <p>An example of a java <code>String[]</code> containing a list of files is shown 
  * below:</p>
@@ -32,16 +35,16 @@
  *     fileData[0] = file1.getAbsolutePath();
  *     fileData[1] = file2.getAbsolutePath();
  * </code></pre>
+ *
+ * @see Transfer
  */
-public class FileTransfer : ByteArrayTransfer {
+public class FileTransfer extends ByteArrayTransfer {
     
     static FileTransfer _instance = new FileTransfer();
-    static final String HFS = "hfs "; //$NON-NLS-1$
-    static final String FURL = "furl"; //$NON-NLS-1$
-    static final int HFSID = registerType(HFS);
-    static final int FURLID = registerType(FURL);
+    static final String ID_NAME = OS.NSFilenamesPboardType.getString();
+    static final int ID = registerType(ID_NAME);
     
-this() {}
+FileTransfer() {}
 
 /**
  * Returns the singleton instance of the FileTransfer class.
@@ -56,136 +59,65 @@
  * This implementation of <code>javaToNative</code> converts a list of file names
  * represented by a java <code>String[]</code> to a platform specific representation.
  * Each <code>String</code> in the array contains the absolute path for a single 
- * file or directory.  For additional information see 
- * <code>Transfer#javaToNative</code>.
+ * file or directory.
  * 
- * @param object a java <code>String[]</code> containing the file names to be 
- * converted
- * @param transferData an empty <code>TransferData</code> object; this
- *  object will be filled in on return with the platform specific format of the data
+ * @param object a java <code>String[]</code> containing the file names to be converted
+ * @param transferData an empty <code>TransferData</code> object that will
+ *      be filled in on return with the platform specific format of the data
+ * 
+ * @see Transfer#nativeToJava
  */
 public void javaToNative(Object object, TransferData transferData) {
     if (!checkFile(object) || !isSupportedType(transferData)) {
         DND.error(DND.ERROR_INVALID_DATA);
     }
     String[] files = (String[])object;
-    transferData.result = -1;
-    byte[][] data = new byte[files.length][];
-    for (int i = 0; i < data.length; i++) {
-        File file = new File(files[i]);
-        bool isDirectory = file.isDirectory();
+    int length = files.length;
+    NSMutableArray array = NSMutableArray.arrayWithCapacity(length);
+    for (int i = 0; i < length; i++) {
         String fileName = files[i];
-        char [] chars = new char [fileName.length ()];
-        fileName.getChars (0, chars.length, chars, 0);
-        int cfString = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, chars, chars.length);
-        if (cfString is 0) return;
-        try {
-            int url = OS.CFURLCreateWithFileSystemPath(OS.kCFAllocatorDefault, cfString, OS.kCFURLPOSIXPathStyle, isDirectory);
-            if (url is 0) return;
-            try {
-                if (transferData.type is HFSID) {
-                    byte[] fsRef = new byte[80];
-                    if (!OS.CFURLGetFSRef(url, fsRef)) return;
-                    byte[] fsSpec = new byte[70];
-                    if (OS.FSGetCatalogInfo(fsRef, 0, null, null, fsSpec, null) !is OS.noErr) return;
-                    byte[] hfsflavor = new byte[10 + fsSpec.length];
-                    byte[] finfo = new byte[16];
-                    OS.FSpGetFInfo(fsSpec, finfo);
-                    System.arraycopy(finfo, 0, hfsflavor, 0, 10);
-                    System.arraycopy(fsSpec, 0, hfsflavor, 10, fsSpec.length);
-                    data[i] = hfsflavor;
-                }
-                if (transferData.type is FURLID) {
-                    int encoding = OS.CFStringGetSystemEncoding();
-                    int theData = OS.CFURLCreateData(OS.kCFAllocatorDefault, url, encoding, true);
-                    if (theData is 0) return;
-                    try {
-                        int length = OS.CFDataGetLength(theData);
-                        byte[] buffer = new byte[length];
-                        CFRange range = new CFRange();
-                        range.length = length;
-                        OS.CFDataGetBytes(theData, range, buffer);
-                        data[i] = buffer;
-                    } finally {
-                        OS.CFRelease(theData);
-                    }
-                }
-            } finally {
-                OS.CFRelease(url);
-            }
-        } finally {
-            OS.CFRelease(cfString);
-        }
+        NSString string = NSString.stringWith(fileName);
+        array.addObject(string);
     }
-    transferData.data = data;
-    transferData.result = 0;
+    transferData.data = array;
 }
 /**
  * This implementation of <code>nativeToJava</code> converts a platform specific 
  * representation of a list of file names to a java <code>String[]</code>.  
  * Each String in the array contains the absolute path for a single file or directory. 
- * For additional information see <code>Transfer#nativeToJava</code>.
  * 
- * @param transferData the platform specific representation of the data to be 
- * been converted
- * @return a java <code>String[]</code> containing a list of file names if the 
- * conversion was successful; otherwise null
+ * @param transferData the platform specific representation of the data to be converted
+ * @return a java <code>String[]</code> containing a list of file names if the conversion
+ *      was successful; otherwise null
+ * 
+ * @see Transfer#javaToNative
  */
 public Object nativeToJava(TransferData transferData) {
     if (!isSupportedType(transferData) || transferData.data is null) return null;
-    if (transferData.data.length is 0) return null;
-    int count = transferData.data.length;
+    NSArray array = (NSArray) transferData.data;
+    if (array.count() is 0) return null;
+    int count = (int)/*64*/array.count();
     String[] fileNames = new String[count];
     for (int i=0; i<count; i++) {
-        byte[] data = transferData.data[i];
-        int url = 0;
-        if (transferData.type is HFSID) {
-            byte[] fsspec = new byte[data.length - 10];
-            System.arraycopy(data, 10, fsspec, 0, fsspec.length);
-            byte[] fsRef = new byte[80];
-            if (OS.FSpMakeFSRef(fsspec, fsRef) !is OS.noErr) return null;
-            url = OS.CFURLCreateFromFSRef(OS.kCFAllocatorDefault, fsRef);
-            if (url is 0) return null;
-        }
-        if (transferData.type is FURLID) {
-            int encoding = OS.kCFStringEncodingUTF8;
-            url = OS.CFURLCreateWithBytes(OS.kCFAllocatorDefault, data, data.length, encoding, 0);
-            if (url is 0) return null;
-        }
-        try {
-            int path = OS.CFURLCopyFileSystemPath(url, OS.kCFURLPOSIXPathStyle);
-            if (path is 0) return null;
-            try {
-                int length = OS.CFStringGetLength(path);
-                if (length is 0) return null;
-                char[] buffer= new char[length];
-                CFRange range = new CFRange();
-                range.length = length;
-                OS.CFStringGetCharacters(path, range, buffer);
-                fileNames[i] = new String(buffer);
-            } finally {
-                OS.CFRelease(path);
-            }
-        } finally {
-            OS.CFRelease(url);
-        }
+        NSString string = new NSString(array.objectAtIndex(i));
+        fileNames[i] = string.getString();
     }
     return fileNames;
 }
 
 protected int[] getTypeIds(){
-    return new int[] {FURLID, HFSID};
+    return new int[] {ID};
 }
 
 protected String[] getTypeNames(){
-    return new String[] {FURL, HFS};
+    return new String[] {ID_NAME};
 }
 
 bool checkFile(Object object) {
     if (object is null || !(object instanceof String[]) || ((String[])object).length is 0) return false;
-    String[] Strings = (String[])object;
-    for (int i = 0; i < Strings.length; i++) {
-        if (Strings[i] is null || Strings[i].length() is 0) return false;
+    String[] strings = (String[])object;
+    for (int i = 0; i < strings.length; i++) {
+        if (strings[i] is null || strings[i].length() is 0) return false;
     }
     return true;
 }
--- a/dwt/dnd/HTMLTransfer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/HTMLTransfer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,15 +8,17 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.HTMLTransfer;
+
+import dwt.dwthelper.utils;
  
-import dwt.internal.carbon.OS;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
 
 /**
  * The class <code>HTMLTransfer</code> provides a platform specific mechanism 
  * for converting text in HTML format represented as a java <code>String</code> 
- * to a platform specific representation of the data and vice versa.  See 
- * <code>Transfer</code> for additional information.
+ * to a platform specific representation of the data and vice versa.
  * 
  * <p>An example of a java <code>String</code> containing HTML text is shown 
  * below:</p>
@@ -24,14 +26,16 @@
  * <code><pre>
  *     String htmlData = "<p>This is a paragraph of text.</p>";
  * </code></pre>
+ *
+ * @see Transfer
  */
-public class HTMLTransfer : ByteArrayTransfer {
+public class HTMLTransfer extends ByteArrayTransfer {
 
     static HTMLTransfer _instance = new HTMLTransfer();
-    static final String HTML = "HTML"; //$NON-NLS-1$
+    static final String HTML = OS.NSHTMLPboardType.getString();
     static final int HTMLID = registerType(HTML);
 
-this() {}
+HTMLTransfer() {}
 
 /**
  * Returns the singleton instance of the HTMLTransfer class.
@@ -45,44 +49,34 @@
 /**
  * This implementation of <code>javaToNative</code> converts HTML-formatted text
  * represented by a java <code>String</code> to a platform specific representation.
- * For additional information see <code>Transfer#javaToNative</code>.
  * 
  * @param object a java <code>String</code> containing HTML text
- * @param transferData an empty <code>TransferData</code> object; this
- *  object will be filled in on return with the platform specific format of the data
+ * @param transferData an empty <code>TransferData</code> object that will
+ *      be filled in on return with the platform specific format of the data
+ * 
+ * @see Transfer#nativeToJava
  */
 public void javaToNative (Object object, TransferData transferData){
     if (!checkHTML(object) || !isSupportedType(transferData)) {
         DND.error(DND.ERROR_INVALID_DATA);
     }
-    String String = cast(String)object;
-    int count = String.length();
-    char[] chars = new char[count];
-    String.getChars(0, count, chars, 0);
-    byte[] buffer = new byte[chars.length * 2];
-    OS.memmove(buffer, chars, buffer.length);
-    transferData.data = new byte[1][];
-    transferData.data[0] = buffer;
-    transferData.result = OS.noErr;
+    transferData.data = NSString.stringWith((String) object);
 }
 
 /**
  * This implementation of <code>nativeToJava</code> converts a platform specific 
  * representation of HTML text to a java <code>String</code>.
- * For additional information see <code>Transfer#nativeToJava</code>.
  * 
- * @param transferData the platform specific representation of the data to be 
- * been converted
- * @return a java <code>String</code> containing HTML text if the 
- * conversion was successful; otherwise null
+ * @param transferData the platform specific representation of the data to be converted
+ * @return a java <code>String</code> containing HTML text if the conversion was successful;
+ *      otherwise null
+ * 
+ * @see Transfer#javaToNative
  */
 public Object nativeToJava(TransferData transferData){
     if (!isSupportedType(transferData) || transferData.data is null) return null;
-    if (transferData.data.length is 0 || transferData.data[0].length is 0) return null;
-    byte[] buffer = transferData.data[0];
-    char[] chars = new char[(buffer.length + 1) / 2];
-    OS.memmove(chars, buffer, buffer.length);
-    return new String(chars);
+    NSString string = (NSString) transferData.data;
+    return string.getString();
 }
 
 protected int[] getTypeIds() {
@@ -94,7 +88,7 @@
 }
 
 bool checkHTML(Object object) {
-    return (object !is null && null !is cast(String)object && (cast(String)object).length() > 0);
+    return (object !is null && object instanceof String && ((String)object).length() > 0);
 }
 
 protected bool validate(Object object) {
--- a/dwt/dnd/ImageTransfer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/ImageTransfer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,44 +9,46 @@
  *     IBM Corporation - initial API and implementation
  *     Outhink - support for typeFileURL
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.ImageTransfer;
+
+import dwt.dwthelper.utils;
 
 import dwt.DWT;
-import dwt.graphics.*;
-import dwt.internal.carbon.*;
-import dwt.widgets.*;
+import dwt.graphics.Image;
+import dwt.graphics.ImageData;
+import dwt.internal.cocoa.NSData;
+import dwt.internal.cocoa.NSImage;
+import dwt.internal.cocoa.OS;
+import dwt.widgets.Display;
 
 /**
- * The class <code>ImageTransfer</code> provides a platform specific mechanism
- * for converting an Image represented as a java <code>ImageData</code> to a
- * platform specific representation of the data and vice versa. The
- * <code>ImageData</code> contains infomration about the Image. See
- * <code>Transfer</code> for additional information.
+ * The class <code>ImageTransfer</code> provides a platform specific mechanism 
+ * for converting an Image represented as a java <code>ImageData</code> to a 
+ * platform specific representation of the data and vice versa.  
  * 
- * <p>
- * An example of a java <code>Image</code> containing an ImageData is shown
- * below:
- * </p>
+ * <p>An example of a java <code>ImageData</code> is shown below:</p>
  * 
  * <code><pre>
- * Image image = new Image(display, fileName);
- * ImageData imgData = image.getImageData();
+ *     Image image = new Image(display, "C:\temp\img1.gif");
+ *     ImageData imgData = image.getImageData();
  * </code></pre>
+ *
+ * @see Transfer
+ * 
+ * @since 3.4
  */
-public class ImageTransfer : ByteArrayTransfer {
+public class ImageTransfer extends ByteArrayTransfer {
 
 static ImageTransfer _instance = new ImageTransfer();
-static final String PICT = "PICT"; //$NON-NLS-1$
-static final String TIFF = "TIFF"; //$NON-NLS-1$
-static final int PICTID = registerType(PICT);
+static final String TIFF = OS.NSTIFFPboardType.getString();
 static final int TIFFID = registerType(TIFF);
 
-this() {
+ImageTransfer() {
 }
 
 /**
  * Returns the singleton instance of the ImageTransfer class.
- * 
+ *
  * @return the singleton instance of the ImageTransfer class
  */
 public static ImageTransfer getInstance() {
@@ -54,153 +56,59 @@
 }
 
 /**
- * This implementation of <code>javaToNative</code> converts an ImageData
- * object represented by a java <code>ImageData</code> to a platform
- * specific representation. For additional information see
- * <code>Transfer#javaToNative</code>.
+ * This implementation of <code>javaToNative</code> converts an ImageData object represented
+ * by java <code>ImageData</code> to a platform specific representation.
  * 
- * @param object
- *            a java <code>ImageData</code>
- * @param transferData
- *            an empty <code>TransferData</code> object; this object will
- *            be filled in on return with the platform specific format of
- *            the data
+ * @param object a java <code>ImageData</code> containing the ImageData to be converted
+ * @param transferData an empty <code>TransferData</code> object that will
+ *      be filled in on return with the platform specific format of the data
+ * 
+ * @see Transfer#nativeToJava
  */
 public void javaToNative(Object object, TransferData transferData) {
     if (!checkImage(object) || !isSupportedType(transferData)) {
         DND.error(DND.ERROR_INVALID_DATA);
     }
-    transferData.result = -1;
-
-    ImageData imgData = cast(ImageData) object;
+    ImageData imgData = (ImageData) object;
     Image image = new Image(Display.getCurrent(), imgData);
-    int handle = image.handle;
-    int width = OS.CGImageGetWidth(handle);
-    int height = OS.CGImageGetHeight(handle);
-    int alphaInfo = OS.CGImageGetAlphaInfo(handle);
-    int bpr = OS.CGImageGetBytesPerRow(handle);
-
-    Rect rect = new Rect();
-    rect.left = 0;
-    rect.top = 0;
-    rect.right = cast(short) width;
-    rect.bottom = cast(short) height;
-
-    int[] gWorld = new int[1];
-    int format = OS.k24RGBPixelFormat;
-    if (alphaInfo !is OS.kCGImageAlphaNoneSkipFirst) {
-        format = OS.k32ARGBPixelFormat;
-    }
-    OS.NewGWorldFromPtr(gWorld, format, rect, 0, 0, 0, image.data, bpr);
-    int[] curPort = new int[1];
-    int[] curGWorld = new int[1];
-    OS.GetGWorld(curPort, curGWorld);
-    OS.SetGWorld(gWorld[0], curGWorld[0]);
-    int pictHandle = OS.OpenPicture(rect);
-    int portBitMap = OS.GetPortBitMapForCopyBits(gWorld[0]);
-    OS.CopyBits(portBitMap, portBitMap, rect, rect, cast(short) OS.srcCopy, 0);
-    OS.ClosePicture();
-    OS.SetGWorld(curPort[0], curGWorld[0]);
-    OS.DisposeGWorld(gWorld[0]);
-    int length = OS.GetHandleSize(pictHandle);
-    OS.HLock(pictHandle);
-    int[] buffer = new int[1];
-    OS.memmove(buffer, pictHandle, 4);
-    byte[] pictData = new byte[length];
-    OS.memmove(pictData, buffer[0], length);
-    OS.HUnlock(pictHandle);
-    OS.KillPicture(pictHandle);
+    NSImage handle = image.handle;
+    transferData.data = handle.TIFFRepresentation();
     image.dispose();
-
-    transferData.data = new byte[][] { pictData };
-    transferData.result = OS.noErr;
 }
 
 /**
- * This implementation of <code>nativeToJava</code> converts a platform
- * specific representation of an ImageData <code>ImageData</code>. For
- * additional information see <code>Transfer#nativeToJava</code>.
+ * This implementation of <code>nativeToJava</code> converts a platform specific 
+ * representation of an image to java <code>ImageData</code>.  
  * 
- * @param transferData
- *            the platform specific representation of the data to be been
- *            converted
- * @return a java <code>ImageData</code> object if the conversion was
- *         successful; otherwise null
+ * @param transferData the platform specific representation of the data to be converted
+ * @return a java <code>ImageData</code> of the image if the conversion was successful;
+ *      otherwise null
+ * 
+ * @see Transfer#javaToNative
  */
 public Object nativeToJava(TransferData transferData) {
-    if (!isSupportedType(transferData) || transferData.data is null)
-        return null;
-    if (transferData.data.length is 0)
-        return null;
-    byte[] dataArr = transferData.data[0];
-    int size = dataArr.length;
-    int pictPtr = OS.NewPtr(size);
-    OS.memmove(pictPtr, dataArr, size);
-    int dataProvider = OS.CGDataProviderCreateWithData(0, pictPtr, size, 0);
-    if (dataProvider !is 0) {
-        int pictDataRef = OS.QDPictCreateWithProvider(dataProvider);
-        // get bounds for the image
-        CGRect rect = new CGRect();
-        OS.QDPictGetBounds(pictDataRef, rect);
-        int width = cast(int) rect.width;
-        int height = cast(int) rect.height;
-
-        /* Create the image */
-        int bpr = width * 4;
-        int dataSize = height * bpr;
-        int data = OS.NewPtr(dataSize);
-        if (data is 0)
-            DWT.error(DWT.ERROR_NO_HANDLES);
-        int provider = OS
-                .CGDataProviderCreateWithData(0, data, dataSize, 0);
-        if (provider is 0) {
-            OS.DisposePtr(data);
-            DWT.error(DWT.ERROR_NO_HANDLES);
-        }
-        int colorspace = OS.CGColorSpaceCreateDeviceRGB();
-        if (colorspace is 0)
-            DWT.error(DWT.ERROR_NO_HANDLES);
-        int handle = OS.CGImageCreate(width, height, 8, 32, bpr,
-                colorspace, OS.kCGImageAlphaNoneSkipFirst, provider, null,
-                true, 0);
-        OS.CGDataProviderRelease(provider);
-        if (handle is 0) {
-            OS.DisposePtr(data);
-            DWT.error(DWT.ERROR_NO_HANDLES);
-        }
-        int bpc = OS.CGImageGetBitsPerComponent(handle);
-        int context = OS.CGBitmapContextCreate(data, width, height, bpc,
-                bpr, colorspace, OS.kCGImageAlphaNoneSkipFirst);
-        if (context is 0) {
-            OS.CGImageRelease(handle);
-            OS.DisposePtr(data);
-            DWT.error(DWT.ERROR_NO_HANDLES);
-        }
-        int status = OS.QDPictDrawToCGContext(context, rect, pictDataRef);
-        ImageData imgData = null;
-        if (status is 0) {
-            Image image = Image.carbon_new(Display.getCurrent(),
-                    DWT.BITMAP, handle, data);
-            imgData = image.getImageData();
-            image.dispose();
-        }
-        OS.CGContextRelease(context);
-        OS.QDPictRelease(pictDataRef);
-        return imgData;
-    }
-    return null;
+    if (!isSupportedType(transferData) || transferData.data is null) return null;
+    NSData data = (NSData) transferData.data;
+    if (data.length() is 0) return null;
+    NSImage nsImage = (NSImage) new NSImage().alloc();
+    nsImage.initWithData(data);
+    //TODO: Image representation wrong???
+    Image image = Image.cocoa_new(Display.getCurrent(), DWT.BITMAP, nsImage);
+    ImageData imageData = image.getImageData();
+    image.dispose();
+    return imageData;
 }
 
 protected int[] getTypeIds() {
-    return new int[] { PICTID };
+    return new int[] { TIFFID };
 }
 
 protected String[] getTypeNames() {
-    return new String[] { PICT };
+    return new String[] { TIFF };
 }
 
 bool checkImage(Object object) {
-    if (object is null || !( null !is cast(ImageData)object )) return false;
+    if (object is null || !(object instanceof ImageData)) return false;
     return true;
 }
 
--- a/dwt/dnd/RTFTransfer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/RTFTransfer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,16 +8,17 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.RTFTransfer;
+
+import dwt.dwthelper.utils;
  
-import dwt.internal.carbon.OS;
-import dwt.internal.carbon.CFRange;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
 
 /**
  * The class <code>RTFTransfer</code> provides a platform specific mechanism 
  * for converting text in RTF format represented as a java <code>String</code> 
- * to a platform specific representation of the data and vice versa.  See 
- * <code>Transfer</code> for additional information.
+ * to a platform specific representation of the data and vice versa.
  * 
  * <p>An example of a java <code>String</code> containing RTF text is shown 
  * below:</p>
@@ -25,14 +26,16 @@
  * <code><pre>
  *     String rtfData = "{\\rtf1{\\colortbl;\\red255\\green0\\blue0;}\\uc1\\b\\i Hello World}";
  * </code></pre>
+ *
+ * @see Transfer
  */
-public class RTFTransfer : ByteArrayTransfer {
+public class RTFTransfer extends ByteArrayTransfer {
 
     static RTFTransfer _instance = new RTFTransfer();
-    static final String RTF = "RTF "; //$NON-NLS-1$
+    static final String RTF = OS.NSRTFPboardType.getString();
     static final int RTFID = registerType(RTF);
 
-this() {}
+RTFTransfer() {}
 
 /**
  * Returns the singleton instance of the RTFTransfer class.
@@ -46,69 +49,34 @@
 /**
  * This implementation of <code>javaToNative</code> converts RTF-formatted text
  * represented by a java <code>String</code> to a platform specific representation.
- * For additional information see <code>Transfer#javaToNative</code>.
  * 
  * @param object a java <code>String</code> containing RTF text
- * @param transferData an empty <code>TransferData</code> object; this
- *  object will be filled in on return with the platform specific format of the data
+ * @param transferData an empty <code>TransferData</code> object that will
+ *      be filled in on return with the platform specific format of the data
+ * 
+ * @see Transfer#nativeToJava
  */
 public void javaToNative (Object object, TransferData transferData){
     if (!checkRTF(object) || !isSupportedType(transferData)) {
         DND.error(DND.ERROR_INVALID_DATA);
     }
-    transferData.result = -1;
-    String String = cast(String)object;
-    int count = String.length();
-    char[] chars = new char[count];
-    String.getChars(0, count, chars, 0);
-    int cfString = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, count);
-    if (cfString is 0) return;
-    try {
-        CFRange range = new CFRange();
-        range.length = chars.length;
-        int encoding = OS.CFStringGetSystemEncoding();
-        int[] size = new int[1];
-        int numChars = OS.CFStringGetBytes(cfString, range, encoding, cast(byte)'?', true, null, 0, size);
-        if (numChars is 0 || size[0] is 0) return;
-        byte[] buffer = new byte[size[0]];
-        numChars = OS.CFStringGetBytes(cfString, range, encoding, cast(byte)'?', true, buffer, size [0], size);
-        if (numChars is 0) return;
-        transferData.data = new byte[1][];
-        transferData.data[0] = buffer;
-        transferData.result = 0;
-    } finally {
-        OS.CFRelease(cfString);
-    }
+    transferData.data = NSString.stringWith((String) object);
 }
 
 /**
  * This implementation of <code>nativeToJava</code> converts a platform specific 
  * representation of RTF text to a java <code>String</code>.
- * For additional information see <code>Transfer#nativeToJava</code>.
  * 
- * @param transferData the platform specific representation of the data to be 
- * been converted
- * @return a java <code>String</code> containing RTF text if the 
- * conversion was successful; otherwise null
+ * @param transferData the platform specific representation of the data to be converted
+ * @return a java <code>String</code> containing RTF text if the conversion was successful;
+ *      otherwise null
+ * 
+ * @see Transfer#javaToNative
  */
 public Object nativeToJava(TransferData transferData){
     if (!isSupportedType(transferData) || transferData.data is null) return null;
-    if (transferData.data.length is 0 || transferData.data[0].length is 0) return null;
-    byte[] buffer = transferData.data[0];
-    int encoding = OS.CFStringGetSystemEncoding();
-    int cfString = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, true);
-    if (cfString is 0) return null;
-    try {
-        int length = OS.CFStringGetLength(cfString);
-        if (length is 0) return null;
-        char[] chars = new char[length];
-        CFRange range = new CFRange();
-        range.length = length;
-        OS.CFStringGetCharacters(cfString, range, chars);
-        return new String(chars);
-    } finally {
-        OS.CFRelease(cfString);
-    }
+    NSString string = (NSString) transferData.data;
+    return string.getString();
 }
 
 protected int[] getTypeIds() {
@@ -120,7 +88,7 @@
 }
 
 bool checkRTF(Object object) {
-    return (object !is null && null !is cast(String)object && (cast(String)object).length() > 0);
+    return (object !is null && object instanceof String && ((String)object).length() > 0);
 }
 
 protected bool validate(Object object) {
--- a/dwt/dnd/TableDragSourceEffect.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/TableDragSourceEffect.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,9 +8,11 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.TableDragSourceEffect;
 
-import dwt.widgets.*;
+import dwt.dwthelper.utils;
+
+import dwt.widgets.Table;
 
 /**
  * This class provides default implementations to display a source image
@@ -26,17 +28,18 @@
  *
  * @see DragSourceEffect
  * @see DragSourceEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.3
  */
-public class TableDragSourceEffect : DragSourceEffect {
+public class TableDragSourceEffect extends DragSourceEffect {
     /**
      * Creates a new <code>TableDragSourceEffect</code> to handle drag effect 
      * from the specified <code>Table</code>.
      *
      * @param table the <code>Table</code> that the user clicks on to initiate the drag
      */
-    public this(Table table) {
+    public TableDragSourceEffect(Table table) {
         super(table);
     }
 }
--- a/dwt/dnd/TableDropTargetEffect.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/TableDropTargetEffect.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,14 +8,14 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.TableDropTargetEffect;
+
+import dwt.dwthelper.utils;
 
-import dwt.DWT;
-import dwt.graphics.*;
-import dwt.internal.Callback;
-import dwt.internal.carbon.DataBrowserCallbacks;
-import dwt.internal.carbon.OS;
-import dwt.widgets.*;
+import dwt.graphics.Point;
+import dwt.graphics.Rectangle;
+import dwt.widgets.Table;
+import dwt.widgets.TableItem;
 
 /**
  * This class provides a default drag under effect (eg. select, insert and scroll) 
@@ -43,37 +43,38 @@
  * 
  * @see DropTargetAdapter
  * @see DropTargetEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.3
  */
-public class TableDropTargetEffect : DropTargetEffect {
+public class TableDropTargetEffect extends DropTargetEffect {
     static final int SCROLL_HYSTERESIS = 150; // milli seconds
 
     TableItem scrollItem;
     long scrollBeginTime;
-    DataBrowserCallbacks callbacks = null;
+//  DataBrowserCallbacks callbacks = null;
 
-    static Callback AcceptDragProc;
-    static {
-        AcceptDragProc = new Callback(TableDropTargetEffect.class, "AcceptDragProc", 5); //$NON-NLS-1$
-        int acceptDragProc = AcceptDragProc.getAddress();
-        if (acceptDragProc is 0) DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-    }
+//  static Callback AcceptDragProc;
+//  static {
+//      AcceptDragProc = new Callback(TableDropTargetEffect.class, "AcceptDragProc", 5); //$NON-NLS-1$
+//      int acceptDragProc = AcceptDragProc.getAddress();
+//      if (acceptDragProc is 0) DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
+//  }
 
-    static int AcceptDragProc(int theControl, int itemID, int property, int theRect, int theDrag) {
-        DropTarget target = FindDropTarget(theControl, theDrag);
-        if (target is null) return 0;
-        return (target.feedback & DND.FEEDBACK_SELECT) !is 0 ? 1 : 0;
-    }
+//  static int AcceptDragProc(int theControl, int itemID, int property, int theRect, int theDrag) {
+//      DropTarget target = FindDropTarget(theControl, theDrag);
+//      if (target is null) return 0;
+//      return (target.feedback & DND.FEEDBACK_SELECT) !is 0 ? 1 : 0;
+//  }
     
-    static DropTarget FindDropTarget(int theControl, int theDrag) {
-        if (theControl is 0) return null;
-        Display display = Display.findDisplay(Thread.currentThread());
-        if (display is null || display.isDisposed()) return null;
-        Widget widget = display.findWidget(theControl);
-        if (widget is null) return null;
-        return cast(DropTarget)widget.getData(DND.DROP_TARGET_KEY); 
-    }
+//  static DropTarget FindDropTarget(int theControl, int theDrag) {
+//      if (theControl is 0) return null;
+//      Display display = Display.findDisplay(Thread.currentThread());
+//      if (display is null || display.isDisposed()) return null;
+//      Widget widget = display.findWidget(theControl);
+//      if (widget is null) return null;
+//      return (DropTarget)widget.getData(DND.DROP_TARGET_KEY); 
+//  }
     
     /**
      * Creates a new <code>TableDropTargetEffect</code> to handle the drag under effect on the specified 
@@ -81,7 +82,7 @@
      * 
      * @param table the <code>Table</code> over which the user positions the cursor to drop the data
      */
-    public this(Table table) {
+    public TableDropTargetEffect(Table table) {
         super(table);
     }
 
@@ -107,13 +108,13 @@
      * @see DropTargetEvent
      */
     public void dragEnter(DropTargetEvent event) {
-        if (callbacks is null) {
-            Table table = cast(Table) control;
-            DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();
-            OS.GetDataBrowserCallbacks (table.handle, callbacks);
-            callbacks.v1_acceptDragCallback = AcceptDragProc.getAddress();
-            OS.SetDataBrowserCallbacks(table.handle, callbacks);
-        }
+//      if (callbacks is null) {
+//          Table table = (Table) control;
+//          DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();
+//          OS.GetDataBrowserCallbacks (table.handle, callbacks);
+//          callbacks.v1_acceptDragCallback = AcceptDragProc.getAddress();
+//          OS.SetDataBrowserCallbacks(table.handle, callbacks);
+//      }
         scrollBeginTime = 0;
         scrollItem = null;
     }
@@ -155,16 +156,16 @@
      * @see DND#FEEDBACK_SCROLL
      */
     public void dragOver(DropTargetEvent event) {
-        Table table = cast(Table) control;
+        Table table = (Table) control;
         int effect = checkEffect(event.feedback);
 
-        TableItem item = cast(TableItem)getItem(table, event.x, event.y);
+        TableItem item = (TableItem)getItem(table, event.x, event.y);
 
         if ((effect & DND.FEEDBACK_SCROLL) is 0) {
             scrollBeginTime = 0;
             scrollItem = null;
         } else {
-            if (item !is null && item.opEquals(scrollItem)  && scrollBeginTime !is 0) {
+            if (item !is null && item.equals(scrollItem)  && scrollBeginTime !is 0) {
                 if (System.currentTimeMillis() >= scrollBeginTime) {
                     Rectangle area = table.getClientArea();
                     int headerHeight = table.getHeaderHeight();
@@ -191,6 +192,6 @@
         }
         
         // store current effect for selection feedback
-        (cast(DropTarget)event.widget).feedback = effect;
+        ((DropTarget)event.widget).feedback = effect;
     }
 }
--- a/dwt/dnd/TextTransfer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/TextTransfer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,10 +8,12 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.TextTransfer;
 
-import dwt.internal.carbon.CFRange;
-import dwt.internal.carbon.OS;
+import dwt.dwthelper.utils;
+
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
  
 /**
  * The class <code>TextTransfer</code> provides a platform specific mechanism 
@@ -27,15 +29,14 @@
  * 
  * @see Transfer
  */
-public class TextTransfer : ByteArrayTransfer {
+public class TextTransfer extends ByteArrayTransfer {
 
     static TextTransfer _instance = new TextTransfer();
-    static final String TEXT = "TEXT"; //$NON-NLS-1$
-    static final String UTEXT = "utxt"; //$NON-NLS-1$
-    static final int TEXTID = OS.kScrapFlavorTypeText;
-    static final int UTEXTID = OS.kScrapFlavorTypeUnicode;
+    
+    static final String ID_NAME = OS.NSStringPboardType.getString();
+    static final int ID = registerType(ID_NAME);
 
-this() {}
+TextTransfer() {}
 
 /**
  * Returns the singleton instance of the TextTransfer class.
@@ -51,51 +52,16 @@
  * represented by a java <code>String</code> to a platform specific representation.
  * 
  * @param object a java <code>String</code> containing text
- * @param transferData an empty <code>TransferData</code> object; this object
- *  will be filled in on return with the platform specific format of the data
+ * @param transferData an empty <code>TransferData</code> object that will
+ *      be filled in on return with the platform specific format of the data
  *  
- * @see Transfer#javaToNative
+ * @see Transfer#nativeToJava
  */
 public void javaToNative (Object object, TransferData transferData) {
     if (!checkText(object) || !isSupportedType(transferData)) {
         DND.error(DND.ERROR_INVALID_DATA);
     }
-    String String = cast(String)object;
-    char[] chars = new char[String.length()];
-    String.getChars (0, chars.length, chars, 0);
-    transferData.result = -1;
-    switch (transferData.type) {
-        case TEXTID: {
-            int cfString = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
-            if (cfString is 0) return;
-            byte[] buffer = null;
-            try {
-                CFRange range = new CFRange();
-                range.length = chars.length;
-                int encoding = OS.CFStringGetSystemEncoding();
-                int[] size = new int[1];
-                int numChars = OS.CFStringGetBytes(cfString, range, encoding, cast(byte)'?', true, null, 0, size);
-                if (numChars is 0) return;
-                buffer = new byte[size[0]];
-                numChars = OS.CFStringGetBytes(cfString, range, encoding, cast(byte)'?', true, buffer, size [0], size);
-                if (numChars is 0) return;
-            } finally {
-                OS.CFRelease(cfString);
-            }
-            transferData.data = new byte[1][];
-            transferData.data[0] = buffer;
-            transferData.result = OS.noErr;
-            break;
-        }
-        case UTEXTID: {
-            byte[] buffer = new byte[chars.length * 2];
-            OS.memmove(buffer, chars, buffer.length);
-            transferData.data = new byte[1][];
-            transferData.data[0] = buffer;
-            transferData.result = OS.noErr;
-            break;
-        }
-    }
+    transferData.data = NSString.stringWith((String) object);
 }
 
 /**
@@ -105,48 +71,24 @@
  * @param transferData the platform specific representation of the data to be converted
  * @return a java <code>String</code> containing text if the conversion was successful; otherwise null
  * 
- * @see Transfer#nativeToJava
+ * @see Transfer#javaToNative
  */
 public Object nativeToJava(TransferData transferData){
     if (!isSupportedType(transferData) || transferData.data is null) return null;
-    if (transferData.data.length is 0 || transferData.data[0].length is 0) return null;
-    byte[] buffer = transferData.data[0];
-    switch (transferData.type) {
-        case TEXTID: {
-            int encoding = OS.CFStringGetSystemEncoding();
-            int cfString = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, true);
-            if (cfString is 0) return null;
-            try {
-                int length = OS.CFStringGetLength(cfString);
-                if (length is 0) return null;
-                char[] chars = new char[length];
-                CFRange range = new CFRange();
-                range.length = length;
-                OS.CFStringGetCharacters(cfString, range, chars);
-                return new String(chars);
-            } finally {
-                OS.CFRelease(cfString);
-            }
-        }
-        case UTEXTID: {
-            char[] chars = new char[(buffer.length + 1) / 2];
-            OS.memmove(chars, buffer, buffer.length);
-            return new String(chars);
-        }
-    }
-    return null;
+    NSString string = (NSString) transferData.data;
+    return string.getString();
 }
 
 protected int[] getTypeIds() {
-    return new int[] {UTEXTID, TEXTID};
+    return new int[] {ID};
 }
 
 protected String[] getTypeNames() {
-    return new String[] {UTEXT, TEXT};
+    return new String[] {ID_NAME};
 }
 
 bool checkText(Object object) {
-    return (object !is null && null !is cast(String)object && (cast(String)object).length() > 0);
+    return (object !is null && object instanceof String && ((String)object).length() > 0);
 }
 protected bool validate(Object object) {
     return checkText(object);
--- a/dwt/dnd/Transfer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/Transfer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,9 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.Transfer;
+
+import dwt.dwthelper.utils;
 
  
 /**
@@ -22,9 +24,14 @@
  * ByteArrayTransfer class.</p>
  * 
  * @see ByteArrayTransfer
+ * @see <a href="http://www.eclipse.org/swt/snippets/#dnd">Drag and Drop snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: DNDExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public abstract class Transfer {
-    
+
+static String[] TYPES = new String[4];
+
 /**
  * Returns a list of the platform specific data types that can be converted using 
  * this transfer agent.
@@ -128,15 +135,22 @@
  * @return the unique identifier associated with this data type
  */
 public static int registerType(String formatName) {
-    int length = formatName.length();
-    // TODO - hashcode may not be unique - need another way
-    if (length > 4) return formatName.toHash();
-    int type = 0;
-    if (length > 0) type |= (formatName.charAt(0) & 0xff) << 24;
-    if (length > 1) type |= (formatName.charAt(1) & 0xff) << 16;
-    if (length > 2) type |= (formatName.charAt(2) & 0xff) << 8;
-    if (length > 3) type |= formatName.charAt(3) & 0xff; 
-    return type;
+    /* Note the type 0 is not used */
+    int index = 1;
+    while (index < TYPES.length) {
+        String type = TYPES[index];
+        if (type !is null && formatName.equals(type)) {
+            return index;
+        }
+        index++;
+    }
+    if (index is TYPES.length) {
+        String[] newTypes = new String[TYPES.length + 4];
+        System.arraycopy(TYPES, 0, newTypes, 0, TYPES.length);
+        TYPES = newTypes;
+    }
+    TYPES[index] = formatName;
+    return index;
 }
 
 /**
--- a/dwt/dnd/TransferData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/TransferData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,11 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.TransferData;
+
+import dwt.dwthelper.utils;
+
+import dwt.internal.cocoa.NSObject;
 
  
 /**
@@ -24,6 +28,8 @@
  * <p>You should only need to become familiar with the fields in this class if you 
  * are implementing a Transfer subclass and you are unable to subclass the 
  * ByteArrayTransfer class.</p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class TransferData {
     /**
@@ -32,7 +38,7 @@
      * <p>
      * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
      * public API. It is marked public only so that it can be shared
-     * within the modules provided by DWT. It is not available on all
+     * within the packages provided by DWT. It is not available on all
      * platforms and should never be accessed from application code.
      * </p>
      */
@@ -45,25 +51,10 @@
      * <p>
      * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
      * public API. It is marked public only so that it can be shared
-     * within the modules provided by DWT. It is not available on all
+     * within the packages provided by DWT. It is not available on all
      * platforms and should never be accessed from application code.
      * </p>
      */
-    public byte[][] data;
-    
-    /**
-     * The result field contains the result of converting a
-     * java data type into a platform specific value.
-     * (Warning: This field is platform dependent)
-     * <p>
-     * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
-     * public API. It is marked public only so that it can be shared
-     * within the modules provided by DWT. It is not available on all
-     * platforms and should never be accessed from application code.
-     * </p>
-     * <p>The value of result is 1 if the conversion was successful.
-     * The value of result is 0 if the conversion failed.</p>
-     */
-    public int result;
+    public NSObject data;
     
 }
--- a/dwt/dnd/TreeDragSourceEffect.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/TreeDragSourceEffect.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,9 +8,11 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.TreeDragSourceEffect;
 
-import dwt.widgets.*;
+import dwt.dwthelper.utils;
+
+import dwt.widgets.Tree;
 
 /**
  * This class provides default implementations to display a source image
@@ -25,17 +27,18 @@
  *
  * @see DragSourceEffect
  * @see DragSourceEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.3
  */
-public class TreeDragSourceEffect : DragSourceEffect {
+public class TreeDragSourceEffect extends DragSourceEffect {
     /**
      * Creates a new <code>TreeDragSourceEffect</code> to handle drag effect 
      * from the specified <code>Tree</code>.
      *
      * @param tree the <code>Tree</code> that the user clicks on to initiate the drag
      */
-    public this(Tree tree) {
+    public TreeDragSourceEffect(Tree tree) {
         super(tree);
     }
 }
--- a/dwt/dnd/TreeDropTargetEffect.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/TreeDropTargetEffect.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,14 +8,16 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-module dwt.dnd;
+module dwt.dnd.TreeDropTargetEffect;
+
+import dwt.dwthelper.utils;
 
-import dwt.*;
-import dwt.graphics.*;
-import dwt.internal.Callback;
-import dwt.internal.carbon.DataBrowserCallbacks;
-import dwt.internal.carbon.OS;
-import dwt.widgets.*;
+import dwt.DWT;
+import dwt.graphics.Point;
+import dwt.graphics.Rectangle;
+import dwt.widgets.Event;
+import dwt.widgets.Tree;
+import dwt.widgets.TreeItem;
 
 /**
  * This class provides a default drag under effect (eg. select, insert, scroll and expand) 
@@ -46,10 +48,11 @@
  * 
  * @see DropTargetAdapter
  * @see DropTargetEvent
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.3
  */
-public class TreeDropTargetEffect : DropTargetEffect {
+public class TreeDropTargetEffect extends DropTargetEffect {
     static final int SCROLL_HYSTERESIS = 150; // milli seconds
     static final int EXPAND_HYSTERESIS = 1000; // milli seconds
 
@@ -65,33 +68,33 @@
     TreeItem expandItem;
     long expandBeginTime;
     
-    DataBrowserCallbacks callbacks = null;
+//  DataBrowserCallbacks callbacks = null;
     
     int acceptDragProc(int theControl, int itemID, int property, int theRect, int theDrag) {
         return (currentEffect & DND.FEEDBACK_SELECT) !is 0 ? 1 : 0;
     }
 
-    static Callback AcceptDragProc;
-    static {
-        AcceptDragProc = new Callback(TreeDropTargetEffect.class, "AcceptDragProc", 5); //$NON-NLS-1$
-        int acceptDragProc = AcceptDragProc.getAddress();
-        if (acceptDragProc is 0) DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
-    }
+//  static Callback AcceptDragProc;
+//  static {
+//      AcceptDragProc = new Callback(TreeDropTargetEffect.class, "AcceptDragProc", 5); //$NON-NLS-1$
+//      int acceptDragProc = AcceptDragProc.getAddress();
+//      if (acceptDragProc is 0) DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
+//  }
 
-    static int AcceptDragProc(int theControl, int itemID, int property, int theRect, int theDrag) {
-        DropTarget target = FindDropTarget(theControl, theDrag);
-        if (target is null) return 0;
-        return (target.feedback & DND.FEEDBACK_SELECT) !is 0 ? 1 : 0;
-    }
+//  static int AcceptDragProc(int theControl, int itemID, int property, int theRect, int theDrag) {
+//      DropTarget target = FindDropTarget(theControl, theDrag);
+//      if (target is null) return 0;
+//      return (target.feedback & DND.FEEDBACK_SELECT) !is 0 ? 1 : 0;
+//  }
     
-    static DropTarget FindDropTarget(int theControl, int theDrag) {
-        if (theControl is 0) return null;
-        Display display = Display.findDisplay(Thread.currentThread());
-        if (display is null || display.isDisposed()) return null;
-        Widget widget = display.findWidget(theControl);
-        if (widget is null) return null;
-        return cast(DropTarget)widget.getData(DND.DROP_TARGET_KEY); 
-    }
+//  static DropTarget FindDropTarget(int theControl, int theDrag) {
+//      if (theControl is 0) return null;
+//      Display display = Display.findDisplay(Thread.currentThread());
+//      if (display is null || display.isDisposed()) return null;
+//      Widget widget = display.findWidget(theControl);
+//      if (widget is null) return null;
+//      return (DropTarget)widget.getData(DND.DROP_TARGET_KEY); 
+//  }
 
     /**
      * Creates a new <code>TreeDropTargetEffect</code> to handle the drag under effect on the specified 
@@ -99,7 +102,7 @@
      * 
      * @param tree the <code>Tree</code> over which the user positions the cursor to drop the data
      */
-    public this(Tree tree) {
+    public TreeDropTargetEffect(Tree tree) {
         super(tree);
     }
 
@@ -125,13 +128,13 @@
      * @see DropTargetEvent
      */
     public void dragEnter(DropTargetEvent event) {
-        if (callbacks is null) {
-            Tree table = cast(Tree) control;
-            DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();
-            OS.GetDataBrowserCallbacks (table.handle, callbacks);
-            callbacks.v1_acceptDragCallback = AcceptDragProc.getAddress();
-            OS.SetDataBrowserCallbacks(table.handle, callbacks);
-        }
+//      if (callbacks is null) {
+//          Tree table = (Tree) control;
+//          DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();
+//          OS.GetDataBrowserCallbacks (table.handle, callbacks);
+//          callbacks.v1_acceptDragCallback = AcceptDragProc.getAddress();
+//          OS.SetDataBrowserCallbacks(table.handle, callbacks);
+//      }
         insertItem = null;
         expandBeginTime = 0;
         expandItem = null;
@@ -154,7 +157,7 @@
      * @see DropTargetEvent
      */
     public void dragLeave(DropTargetEvent event) {
-        Tree tree = cast(Tree) control;
+        Tree tree = (Tree) control;
         if (insertItem !is null) {
             setInsertMark(tree, null, false);
             insertItem = null;
@@ -184,21 +187,21 @@
      * @see DND#FEEDBACK_SCROLL
      */
     public void dragOver(DropTargetEvent event) {
-        Tree tree = cast(Tree) control;
-        TreeItem item = cast(TreeItem)getItem(tree, event.x, event.y);
+        Tree tree = (Tree) control;
+        TreeItem item = (TreeItem)getItem(tree, event.x, event.y);
         int effect = checkEffect(event.feedback);       
         if ((effect & DND.FEEDBACK_EXPAND) is 0) {
             expandBeginTime = 0;
             expandItem = null;
         } else {
-            if (item !is null && item.opEquals(expandItem) && expandBeginTime !is 0) {
+            if (item !is null && item.equals(expandItem) && expandBeginTime !is 0) {
                 if (System.currentTimeMillis() >= expandBeginTime) {
                     if (item.getItemCount() > 0 && !item.getExpanded()) {
                         Event e = new Event();
                         e.x = event.x;
                         e.y = event.y;
                         e.item = item;
-                        e.time = cast(int) System.currentTimeMillis();
+                        e.time = (int) System.currentTimeMillis();
                         tree.notifyListeners(DWT.Expand, e);
                         if (item.isDisposed()) return;
                         item.setExpanded(true);
@@ -216,7 +219,7 @@
             scrollBeginTime = 0;
             scrollItem = null;
         } else {
-            if (item !is null && item.opEquals(scrollItem)  && scrollBeginTime !is 0) {
+            if (item !is null && item.equals(scrollItem)  && scrollBeginTime !is 0) {
                 if (System.currentTimeMillis() >= scrollBeginTime) {
                     Rectangle area = tree.getClientArea();
                     int headerHeight = tree.getHeaderHeight();
@@ -253,7 +256,7 @@
             setInsertMark(tree, null, false);
         }
         // save current effect for selection feedback
-        (cast(DropTarget)event.widget).feedback = effect;
+        ((DropTarget)event.widget).feedback = effect;
     }
 
     void setInsertMark(Tree tree, TreeItem item, bool before) {
--- a/dwt/dnd/URLTransfer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/dnd/URLTransfer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,1 +1,38 @@
-/*******************************************************************************
 * Copyright (c) 20007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
module dwt.dnd;

import dwt.internal.carbon.*;

/**
 * The class <code>URLTransfer</code> provides a platform specific mechanism 
 * for converting text in URL format represented as a java <code>String</code> 
 * to a platform specific representation of the data and vice versa.  See 
 * <code>Transfer</code> for additional information. The String  
 * must contain the fully specified url.
 * 
 * <p>An example of a java <code>String[]</code> containing a URL is shown 
 * below:</p>
 * 
 * <code><pre>
 *     String url = "http://www.eclipse.org";
 * </code></pre>
 */
public class URLTransfer : ByteArrayTransfer {

  static URLTransfer _instance = new URLTransfer();
 static final String URL = "url "; //$NON-NLS-1$
   static final int URL_ID = registerType(URL);
  static final String URLN = "urln"; //$NON-NLS-1$
  static final int URLN_ID = registerType(URLN);

private URLTransfer() {}

/**
 * Returns the singleton instance of the URLTransfer class.
 *
 * @return the singleton instance of the URLTransfer class
 */
public static URLTransfer getInstance () {
   return _instance;
}

/**
 * This implementation of <code>javaToNative</code> converts a URL
 * represented by a java <code>String</code> to a platform specific representation.
 * For additional information see <code>Transfer#javaToNative</code>.
 * 
 * @param object a java <code>String[]</code> containing a URL
 * @param transferData an empty <code>TransferData</code> object; this
 *  object will be filled in on return with the platform specific format of the data
 */
public void javaToNative (Object object, TransferData transferData){
 if (!checkURL(object) || !isSupportedType(transferData)) {
        DND.error(DND.ERROR_INVALID_DATA);
    }
 transferData.result = -1;
 String url = cast(String)object;
  int count = url.length();
 char[] chars = new char[count];
   url.getChars(0, count, chars, 0);
 int cfString = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, count);
 if (cfString is 0) return;
    try {
     CFRange range = new CFRange();
        range.length = chars.length;
      int encoding = OS.CFStringGetSystemEncoding();
        int[] size = new int[1];
      int numChars = OS.CFStringGetBytes(cfString, range, encoding, cast(byte)'?', true, null, 0, size);
        if (numChars is 0 || size[0] is 0) return;
        byte[] buffer = new byte[size[0]];
        numChars = OS.CFStringGetBytes(cfString, range, encoding, cast(byte)'?', true, buffer, size [0], size);
       if (numChars is 0) return;
        transferData.data = new byte[][] {buffer};
        transferData.result = 0;
  } finally {
       OS.CFRelease(cfString);
   }
}

/**
 * This implementation of <code>nativeToJava</code> converts a platform specific 
 * representation of a URL to a java <code>String</code>.
 * For additional information see <code>Transfer#nativeToJava</code>.
 * 
 * @param transferData the platform specific representation of the data to be 
 * converted
 * @return a java <code>String[]</code> containing a URL if the 
 * conversion was successful; otherwise null
 */
public Object nativeToJava(TransferData transferData){
  if (!isSupportedType(transferData) || transferData.data is null) return null;
 if (transferData.data.length is 0) return null;
   byte[] buffer = transferData.data[0];
 int encoding = OS.CFStringGetSystemEncoding();
    int cfString = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, true);
 if (cfString is 0) return null;
   try {
     int length = OS.CFStringGetLength(cfString);
      if (length is 0) return null;
     char[] chars = new char[length];
      CFRange range = new CFRange();
        range.length = length;
        OS.CFStringGetCharacters(cfString, range, chars);
     return new String(chars);
 } finally {
       OS.CFRelease(cfString);
   }
}

protected int[] getTypeIds(){
 return new int[] {URL_ID, URLN_ID};
}

protected String[] getTypeNames(){
  return new String[] {URL, URLN}; 
}

bool checkURL(Object object) {
    return object !is null && ( null !is cast(String)object ) && (cast(String)object).length() > 0;
}

protected bool validate(Object object) {
 return checkURL(object);
}
}
+/*******************************************************************************
 * Copyright (c) 20007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
module dwt.dnd;

import dwt.internal.cocoa.NSString;
import dwt.internal.cocoa.NSURL;
import dwt.internal.cocoa.OS.URLTransfer;

/**
+
+import dwt.dwthelper.utils;
+ * The class <code>URLTransfer</code> provides a platform specific mechanism 
+ * for converting text in URL format represented as a java <code>String</code> 
+ * to a platform specific representation of the data and vice versa. The string
+ * must contain a fully specified url.
+ * 
+ * <p>An example of a java <code>String</code> containing a URL is shown below:</p>
+ * 
+ * <code><pre>
+ *     String url = "http://www.eclipse.org";
+ * </code></pre>
+ *
+ * @see Transfer
+ */
public class URLTransfer extends ByteArrayTransfer {

 static URLTransfer _instance = new URLTransfer();
   static final String URL = OS.NSURLPboardType.getString();
   static final int URL_ID = registerType(URL);

private URLTransfer() {}

/**
+ * Returns the singleton instance of the URLTransfer class.
+ *
+ * @return the singleton instance of the URLTransfer class
+ */
public static URLTransfer getInstance () {
   return _instance;
}

/**
+ * This implementation of <code>javaToNative</code> converts a URL
+ * represented by a java <code>String</code> to a platform specific representation.
+ * 
+ * @param object a java <code>String</code> containing a URL
+ * @param transferData an empty <code>TransferData</code> object that will
+ *      be filled in on return with the platform specific format of the data
+ * 
+ * @see Transfer#nativeToJava
+ */
public void javaToNative (Object object, TransferData transferData){
 if (!checkURL(object) || !isSupportedType(transferData)) {
      DND.error(DND.ERROR_INVALID_DATA);
  }
   String url = (String)object;
    NSString nsString = NSString.stringWith(url);
   NSString escapedString = nsString.stringByAddingPercentEscapesUsingEncoding(OS.NSUTF8StringEncoding);
   transferData.data = NSURL.URLWithString(escapedString);
}

/**
+ * This implementation of <code>nativeToJava</code> converts a platform 
+ * specific representation of a URL to a java <code>String</code>.
+ * 
+ * @param transferData the platform specific representation of the data to be converted
+ * @return a java <code>String</code> containing a URL if the conversion was successful;
+ *      otherwise null
+ * 
+ * @see Transfer#javaToNative
+ */
public Object nativeToJava(TransferData transferData){
   if (!isSupportedType(transferData) || transferData.data is null) return null;
   NSURL nsUrl = (NSURL) transferData.data;
    NSString nsString = nsUrl.absoluteString();
 return nsString.getString();
}

protected int[] getTypeIds(){
  return new int[] {URL_ID};
}

protected String[] getTypeNames(){
   return new String[] {URL}; 
}

bool checkURL(Object object) {
  return object !is null && (object instanceof String) && ((String)object).length() > 0;
}

protected bool validate(Object object) {
 return checkURL(object);
}
}
--- a/dwt/events/ArmEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ArmEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ArmListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ArmListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -15,6 +15,7 @@
 public import dwt.internal.DWTEventListener;
 public import dwt.events.ArmEvent;
 
+
 /**
  * Classes which implement this interface provide a method
  * that deals with the event that is generated when a widget,
--- a/dwt/events/ControlAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ControlAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ControlEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ControlEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ControlListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ControlListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -15,6 +15,7 @@
 public import dwt.internal.DWTEventListener;
 public import dwt.events.ControlEvent;
 
+
 /**
  * Classes which implement this interface provide methods
  * that deal with the events that are generated by moving
--- a/dwt/events/DisposeEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/DisposeEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/DisposeListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/DisposeListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/DragDetectEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/DragDetectEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/DragDetectListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/DragDetectListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ExpandAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ExpandAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ExpandEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ExpandEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ExpandListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ExpandListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/FocusAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/FocusAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/FocusEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/FocusEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/FocusListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/FocusListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/HelpEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/HelpEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/HelpListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/HelpListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/KeyAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/KeyAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/KeyEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/KeyEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/KeyListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/KeyListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MenuAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MenuAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MenuDetectEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MenuDetectEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MenuDetectListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MenuDetectListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MenuEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MenuEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MenuListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MenuListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ModifyEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ModifyEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ModifyListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ModifyListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MouseAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MouseAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MouseEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MouseEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MouseListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MouseListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2004 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MouseMoveListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MouseMoveListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MouseTrackAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MouseTrackAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MouseTrackListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MouseTrackListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/MouseWheelListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/MouseWheelListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/PaintEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/PaintEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/PaintListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/PaintListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/SelectionAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/SelectionAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/SelectionEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/SelectionEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/SelectionListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/SelectionListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ShellAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ShellAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ShellEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ShellEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/ShellListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/ShellListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/TraverseEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/TraverseEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/TraverseListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/TraverseListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/TreeAdapter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/TreeAdapter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/TreeEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/TreeEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/TypedEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/TypedEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/VerifyEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/VerifyEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/events/VerifyListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/events/VerifyListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/graphics/Color.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Color.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Color;
 
@@ -38,6 +38,9 @@
  *
  * @see RGB
  * @see Device#getSystemColor
+ * @see <a href="http://www.eclipse.org/swt/snippets/#color">Color and RGB snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: PaintExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class Color : Resource {
     
--- a/dwt/graphics/Cursor.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Cursor.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,19 +9,21 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Cursor;
 
 
 import dwt.DWT;
 import dwt.DWTError;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSBitmapImageRep;
 import dwt.internal.cocoa.NSCursor;
 import dwt.internal.cocoa.NSImage;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSThread;
 import dwt.internal.cocoa.OS;
 
 import tango.text.convert.Format;
@@ -57,11 +59,32 @@
  * <p>
  * Note: Only one of the above styles may be specified.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#cursor">Cursor snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public final class Cursor : Resource {
     
     alias Resource.init_ init_;    
+    static final byte[] WAIT_SOURCE = new byte[] {
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xFF, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, 
+    };
     
     /**
      * the handle to the OS cursor resource
@@ -125,35 +148,62 @@
  */
 public this(Device device, int style) {
     super(device);
-    switch (style) {
-        case DWT.CURSOR_HAND:           handle = NSCursor.pointingHandCursor(); break;
-        case DWT.CURSOR_ARROW:          handle = NSCursor.arrowCursor(); break;
-        case DWT.CURSOR_WAIT:           handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_CROSS:          handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_APPSTARTING:    handle = NSCursor.arrowCursor(); break;
-        case DWT.CURSOR_HELP:           handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_SIZEALL:        handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_SIZENESW:       handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_SIZENS:         handle = NSCursor.resizeUpDownCursor(); break;
-        case DWT.CURSOR_SIZENWSE:       handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_SIZEWE:         handle = NSCursor.resizeLeftRightCursor(); break;
-        case DWT.CURSOR_SIZEN:          handle = NSCursor.resizeUpCursor(); break;
-        case DWT.CURSOR_SIZES:          handle = NSCursor.resizeDownCursor(); break;
-        case DWT.CURSOR_SIZEE:          handle = NSCursor.resizeRightCursor(); break;
-        case DWT.CURSOR_SIZEW:          handle = NSCursor.resizeLeftCursor(); break;
-        case DWT.CURSOR_SIZENE:         handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_SIZESE:         handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_SIZESW:         handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_SIZENW:         handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_UPARROW:        handle = NSCursor.crosshairCursor(); break;
-        case DWT.CURSOR_IBEAM:          handle = NSCursor.IBeamCursor(); break;
-        case DWT.CURSOR_NO:             handle = NSCursor.crosshairCursor(); break;
-        default:
-            DWT.error(DWT.ERROR_INVALID_ARGUMENT);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        switch (style) {
+            case DWT.CURSOR_HAND:           handle = NSCursor.pointingHandCursor(); break;
+            case DWT.CURSOR_ARROW:          handle = NSCursor.arrowCursor(); break;
+            case DWT.CURSOR_WAIT:           break;
+            case DWT.CURSOR_CROSS:          handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_APPSTARTING:    handle = NSCursor.arrowCursor(); break;
+            case DWT.CURSOR_HELP:           handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_SIZEALL:        handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_SIZENESW:       handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_SIZENS:         handle = NSCursor.resizeUpDownCursor(); break;
+            case DWT.CURSOR_SIZENWSE:       handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_SIZEWE:         handle = NSCursor.resizeLeftRightCursor(); break;
+            case DWT.CURSOR_SIZEN:          handle = NSCursor.resizeUpCursor(); break;
+            case DWT.CURSOR_SIZES:          handle = NSCursor.resizeDownCursor(); break;
+            case DWT.CURSOR_SIZEE:          handle = NSCursor.resizeRightCursor(); break;
+            case DWT.CURSOR_SIZEW:          handle = NSCursor.resizeLeftCursor(); break;
+            case DWT.CURSOR_SIZENE:         handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_SIZESE:         handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_SIZESW:         handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_SIZENW:         handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_UPARROW:        handle = NSCursor.crosshairCursor(); break;
+            case DWT.CURSOR_IBEAM:          handle = NSCursor.IBeamCursor(); break;
+            case DWT.CURSOR_NO:             handle = NSCursor.crosshairCursor(); break;
+            default:
+                DWT.error(DWT.ERROR_INVALID_ARGUMENT);
+        }
+        if (handle is null && style is DWT.CURSOR_WAIT) {
+            NSImage nsImage = (NSImage)new NSImage().alloc();
+            NSBitmapImageRep nsImageRep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
+            handle = (NSCursor)new NSCursor().alloc();
+            int width = 16, height = 16;
+            NSSize size = new NSSize();
+            size.width = width;
+            size.height =  height;
+            nsImage = nsImage.initWithSize(size);
+            nsImageRep = nsImageRep.initWithBitmapDataPlanes(0, width, height, 8, 4, true, false, OS.NSDeviceRGBColorSpace, 
+                    OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, width*4, 32);
+            OS.memmove(nsImageRep.bitmapData(), WAIT_SOURCE, WAIT_SOURCE.length);
+            nsImage.addRepresentation(nsImageRep);
+            NSPoint point = new NSPoint();
+            point.x = 0;
+            point.y = 0;
+            handle = handle.initWithImage(nsImage, point);
+            nsImageRep.release();
+            nsImage.release();
+        } else {
+            handle.retain();
+        }
+        handle.setOnMouseEntered(true);
+    init_();
+    } finally {
+        if (pool !is null) pool.release();
     }
-    handle.retain();
-    handle.setOnMouseEntered(true);
-    init_();
 }
 
 /**  
@@ -230,8 +280,14 @@
             offset += 4;
         }
     }
-    createNSCursor(hotspotX, hotspotY, data, source.width, source.height);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        createNSCursor(hotspotX, hotspotY, data, source.width, source.height);
     init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 void createNSCursor(int hotspotX, int hotspotY, byte[] buffer, int width, int height) {
@@ -243,7 +299,7 @@
     size.width = width;
     size.height =  height;
     nsImage = nsImage.initWithSize(size);
-    nsImageRep = nsImageRep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(dummy, cast(NSInteger) width, cast(NSInteger) height,
+    nsImageRep = nsImageRep.initWithBitmapDataPlanes(0, width, height,
             8, 4, true, false, OS.NSDeviceRGBColorSpace,
             NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) (width * 4), 32);
     OS.memmove(cast(void*) nsImageRep.bitmapData(), buffer.ptr, buffer.length);
@@ -251,7 +307,7 @@
     NSPoint point = NSPoint();
     point.x = hotspotX;
     point.y = hotspotY;
-    handle = handle.initWithImage_hotSpot_(nsImage, point);
+    handle = handle.initWithImage(nsImage, point);
     nsImageRep.release();
     nsImage.release();
 }
@@ -340,8 +396,14 @@
             data[i] = alphaData[i/4];
         }
     }
-    createNSCursor(hotspotX, hotspotY, data, source.width, source.height);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        createNSCursor(hotspotX, hotspotY, data, source.width, source.height);
     init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 void destroy() {
--- a/dwt/graphics/Device.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Device.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Device;
 
@@ -17,13 +17,17 @@
 import dwt.DWTException;
 import dwt.internal.Compatibility;
 import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSFontManager;
+import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSScreen;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSThread;
 import dwt.internal.cocoa.NSValue;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.id;
@@ -47,6 +51,8 @@
  * such as the Display device and the Printer device. Devices
  * can have a graphics context cast(GC) created for them, and they
  * can be drawn on by sending messages to the associated GC.
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public abstract class Device : Drawable {
     
@@ -67,7 +73,10 @@
 
     /* System Font */
     Font systemFont;
-
+    
+    /* Device DPI */
+    Point dpi;
+    
     /*
     * TEMPORARY CODE. When a graphics object is
     * created and the device parameter is null,
@@ -136,6 +145,18 @@
             objects = new Object [128];
             trackingLock = new Object ();
         }
+        NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+        NSThread nsthread = NSThread.currentThread();
+        NSMutableDictionary dictionary = nsthread.threadDictionary();
+        NSString key = NSString.stringWith("DWT_NSAutoreleasePool");
+        id obj = dictionary.objectForKey(key);
+        if (obj is null) {
+            NSNumber nsnumber = NSNumber.numberWithInteger(pool.id);
+            dictionary.setObject(nsnumber, key);
+        } else {
+            pool.release();
+        }
+        //check and create pool
         create (data);
         init_ ();
     }
@@ -249,9 +270,8 @@
  */
 public Rectangle getBounds () {
     checkDevice ();
-    NSScreen screen = NSScreen.mainScreen();
-    NSRect rect = screen.frame();
-    return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height);
+    NSRect frame = getPrimaryScreen().frame();
+    return new Rectangle(cast(int)frame.x, cast(int)frame.y, cast(int)frame.width, cast(int)frame.height);
 }
 
 /**
@@ -310,9 +330,7 @@
  */
 public Rectangle getClientArea () {
     checkDevice ();
-    NSScreen screen = NSScreen.mainScreen();
-    NSRect rect = screen.visibleFrame();
-    return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height);
+    return getBounds ();
 }
 
 /**
@@ -329,7 +347,7 @@
  */
 public int getDepth () {
     checkDevice (); 
-    return OS.NSBitsPerPixelFromDepth(NSScreen.mainScreen().depth());
+    return (int)/*64*/OS.NSBitsPerPixelFromDepth(getPrimaryScreen().depth());
 }
 
 /**
@@ -345,10 +363,12 @@
  */
 public Point getDPI () {
     checkDevice ();
-    NSDictionary dictionary = NSScreen.mainScreen().deviceDescription();
-    NSValue value = new NSValue(dictionary.objectForKey(new id(OS.NSDeviceResolution())).id_);
-    NSSize size = value.sizeValue();
-    return new Point(cast(int)size.width, cast(int)size.height);
+    return getScreenDPI();
+}
+
+NSScreen getPrimaryScreen () {
+    NSArray screens = NSScreen.screens();
+    return new NSScreen(screens.objectAtIndex(0));
 }
 
 /**
@@ -367,24 +387,35 @@
 public FontData[] getFontList (String faceName, bool scalable) {
     checkDevice ();
     if (!scalable) return new FontData[0];
-    NSArray fonts = NSFontManager.sharedFontManager().availableFonts();
-    int count = 0;
-    FontData[] fds = new FontData[fonts.count()];
-    for (NSUInteger i = 0; i < fds.length; i++) {
-        NSString str = new NSString(fonts.objectAtIndex(i));
-        char[] buffer = new char[str.length()];
-        str.getCharacters_(buffer.toString16().ptr);
-        String nsName = buffer.dup;
-        String name = nsName;
-        int index = nsName.indexOf('-');
-        if (index !is -1) name = name.substring(0, index);
-        int style = DWT.NORMAL;
-        if (nsName.indexOf("Italic") !is -1) style |= DWT.ITALIC;
-        if (nsName.indexOf("Bold") !is -1) style |= DWT.BOLD;
-        if (faceName is null || Compatibility.equalsIgnoreCase(faceName, name)) {
-            FontData data = new FontData(name, 0, style);
-            data.nsName = nsName;
-            fds[count++] = data;
+    NSArray families = NSFontManager.sharedFontManager().availableFontFamilies();
+    int famCount = families.count();
+    int count = 0;  
+    FontData[] fds = new FontData[100];
+    for (int i = 0; i < famCount; i++) {
+        NSString nsfamily = new NSString(families.objectAtIndex(i));
+        String family = nsfamily.getString();
+        NSArray fonts = NSFontManager.sharedFontManager().availableMembersOfFontFamily(nsfamily);
+        int fontCount = fonts.count();
+        for (int j = 0; j < fontCount; j++) {
+            NSArray fontDetails = new NSArray(fonts.objectAtIndex(j));
+            NSString str = new NSString(fontDetails.objectAtIndex(0));
+            String nsName = str.getString();
+            String name  = nsName;
+            int index = nsName.indexOf('-');
+            if (index !is -1) name = name.substring(0, index);
+            int style = DWT.NORMAL;
+            if (nsName.indexOf("Italic") !is -1) style |= DWT.ITALIC;
+            if (nsName.indexOf("Bold") !is -1) style |= DWT.BOLD;
+            if (faceName is null || Compatibility.equalsIgnoreCase(faceName, name)) {
+                FontData data = new FontData(family, 0, style);
+                data.nsName = nsName;
+                if (count is fds.length) {
+                    FontData[] newFds = new FontData[fds.length + 100];
+                    System.arraycopy(fds, 0, newFds, 0, fds.length);
+                    fds = newFds;
+                }
+                fds[count++] = data;
+            }
         }
     }
     if (count is fds.length) return fds;
@@ -393,6 +424,13 @@
     return result;
 }
 
+Point getScreenDPI () {
+    NSDictionary dictionary = getPrimaryScreen().deviceDescription();
+    NSValue value = new NSValue(dictionary.objectForKey(new id(OS.NSDeviceResolution())).id);
+    NSSize size = value.sizeValue();
+    return new Point((int)size.width, (int)size.height);
+}
+
 /**
  * Returns the matching standard color for the given
  * constant, which should be one of the color constants
@@ -507,7 +545,10 @@
     COLOR_WHITE = new Color (this, 0xFF,0xFF,0xFF);
     
     /* Initialize the system font slot */
-    NSFont font = NSFont.systemFontOfSize(NSFont.systemFontSize());
+    bool smallFonts = System.getProperty("dwt.internal.carbon.smallFonts") !is null;
+    float systemFontSize = smallFonts ? NSFont.smallSystemFontSize() : NSFont.systemFontSize();     
+    Point dpi = this.dpi = getDPI(), screenDPI = getScreenDPI();
+    NSFont font = NSFont.systemFontOfSize(systemFontSize * dpi.y / screenDPI.y);
     systemFont = Font.cocoa_new(this, font);
 }
 
@@ -579,6 +620,7 @@
     bool result = false;
     char [] chars = new char [path.length ()];
     path.getChars (0, chars.length, chars, 0);
+    //TODO not done
     return result;
 }
 
--- a/dwt/graphics/DeviceData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/DeviceData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.DeviceData;
 
--- a/dwt/graphics/Drawable.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Drawable.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Drawable;
 
--- a/dwt/graphics/Font.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Font.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Font;
 
@@ -17,8 +17,10 @@
 import dwt.DWT;
 import dwt.DWTError;
 import dwt.DWTException;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSThread;
 
 import tango.stdc.stringz;
 import tango.text.convert.Format;
@@ -42,6 +44,9 @@
  * </p>
  *
  * @see FontData
+ * @see <a href="http://www.eclipse.org/swt/snippets/#font">Font snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Examples: GraphicsExample, PaintExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class Font : Resource {
 
@@ -84,8 +89,14 @@
 public this(Device device, FontData fd) {
     super(device);
     if (fd is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    init_(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
-    init_();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        init(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
+        init();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**  
@@ -118,9 +129,15 @@
     for (int i=0; i<fds.length; i++) {
         if (fds[i] is null) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
-    FontData fd = fds[0];
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        FontData fd = fds[0];
     init_(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
     init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**  
@@ -147,8 +164,14 @@
  */
 public this(Device device, String name, int height, int style) {
     super(device);
-    init_(name, height, style, null);
-    init_();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        init_(name, height, style, null);
+        init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /+/*public*/ this(Device device, String name, float height, int style) {
@@ -195,20 +218,23 @@
  */
 public FontData[] getFontData() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSString family = handle.familyName();
-    wchar[] buffer1 = new wchar[family.length()];
-    family.getCharacters_(buffer1.ptr);
-    String name = tango.text.convert.Utf.toString(buffer1).dup;
-    NSString str = handle.fontName();
-    wchar[] buffer = new wchar[str.length()];
-    str.getCharacters_(buffer.ptr);
-    String nsName = tango.text.convert.Utf.toString(buffer).dup;
-    int style = DWT.NORMAL;
-    if (nsName.indexOf("Italic") !is -1) style |= DWT.ITALIC;
-    if (nsName.indexOf("Bold") !is -1) style |= DWT.BOLD;
-    FontData data = new FontData(name, handle.pointSize(), style);
-    data.nsName = nsName;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSString family = handle.familyName();
+        String name = family.getString();
+        NSString str = handle.fontName();
+        String nsName = str.getString();
+        int style = DWT.NORMAL;
+        if (nsName.indexOf("Italic") !is -1) style |= DWT.ITALIC;
+        if (nsName.indexOf("Bold") !is -1) style |= DWT.BOLD;
+        Point dpi = device.dpi, screenDPI = device.getScreenDPI();
+        FontData data = new FontData(name, (float)/*64*/handle.pointSize() * screenDPI.y / dpi.y, style);
+        data.nsName = nsName;
     return [data];
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**  
@@ -231,6 +257,7 @@
 public static Font cocoa_new(Device device, NSFont handle) {
     Font font = new Font(device);
     font.handle = handle;
+    font.handle.retain();
     return font;
 }
 
@@ -253,21 +280,23 @@
 void init_(String name, float height, int style, String nsName) {
     //if (name is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
+    Point dpi = device.dpi, screenDPI = device.getScreenDPI();
+    float size = height * dpi.y / screenDPI.y;
     if (nsName !is null) {
-        handle = NSFont.static_fontWithName_size_(NSString.stringWith(nsName), cast(CGFloat) height);
+        handle = NSFont.fontWithName(NSString.stringWith(nsName), size);
     } else {
         nsName = name;
         if ((style & DWT.BOLD) !is 0) nsName ~= " Bold";
         if ((style & DWT.ITALIC) !is 0) nsName ~= " Italic";
-        handle = NSFont.static_fontWithName_size_(NSString.stringWith(nsName), cast(CGFloat) height);
+        handle = NSFont.fontWithName(NSString.stringWith(nsName), size);
         if (handle is null && (style & DWT.ITALIC) !is 0) {
             nsName = name;
             if ((style & DWT.BOLD) !is 0) nsName ~= " Bold";
-            handle = NSFont.static_fontWithName_size_(NSString.stringWith(nsName), cast(CGFloat) height);
+            handle = NSFont.fontWithName(NSString.stringWith(nsName), size);
         }
         if (handle is null && (style & DWT.BOLD) !is 0) {
             nsName = name;
-            handle = NSFont.static_fontWithName_size_(NSString.stringWith(nsName), cast(CGFloat) height);
+            handle = NSFont.fontWithName(NSString.stringWith(nsName), size);
         }
     }
     if (handle is null) {
--- a/dwt/graphics/FontData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/FontData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.FontData;
 
@@ -41,6 +41,7 @@
  * required, and thus no <code>dispose()</code> method is provided.
  *
  * @see Font
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class FontData {
     /**
--- a/dwt/graphics/FontMetrics.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/FontMetrics.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.FontMetrics;
 
@@ -24,6 +24,7 @@
  * using the <code>getFontMetrics()</code> method.
  *
  * @see GC#getFontMetrics
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class FontMetrics {
     int ascent, descent, averageCharWidth, leading, height;
--- a/dwt/graphics/GC.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/GC.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.GC;
 
@@ -19,7 +19,9 @@
 import dwt.DWTException;
 import dwt.internal.cocoa.NSAffineTransform;
 import dwt.internal.cocoa.NSAffineTransformStruct;
+import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSAttributedString;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSFont;
@@ -28,10 +30,13 @@
 import dwt.internal.cocoa.NSImage;
 import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSMutableParagraphStyle;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSThread;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 
 import tango.text.convert.Format;
@@ -85,6 +90,9 @@
  * </p>
  *
  * @see dwt.events.PaintEvent
+ * @see <a href="http://www.eclipse.org/swt/snippets/#gc">GC snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Examples: GraphicsExample, PaintExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class GC : Resource {
    
@@ -230,41 +238,46 @@
     return gc;
 }
 
-/**  
- * Invokes platform specific functionality to wrap a graphics context.
- * <p>
- * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- * API for <code>GC</code>. It is marked public only so that it
- * can be shared within the packages provided by DWT. It is not
- * available on all platforms, and should never be called from
- * application code.
- * </p>
- *
- * @param context the Quartz context.
- * @param data the data for the receiver.
- *
- * @return a new <code>GC</code>
- */
-public static GC carbon_new(objc.id context, GCData data) {
-    GC gc = new GC();
-    gc.device = data.device;
-    gc.init_(null, data, context);
-    return gc;
-}
-
-void checkGC (int mask) {
-    if ((data.state & CLIPPING) is 0 || (data.state & TRANSFORM) is 0) {
-        handle.restoreGraphicsState();
-        handle.saveGraphicsState();
-        if (data.clipPath !is null) data.clipPath.addClip();
-        if (data.transform !is null) data.transform.concat();
-        mask &= ~(TRANSFORM | CLIPPING);
-        data.state |= TRANSFORM | CLIPPING;
-        data.state &= ~(BACKGROUND | FOREGROUND);
+NSAutoreleasePool checkGC (int mask) {
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if ((mask & (CLIPPING | TRANSFORM)) !is 0) {
+        NSGraphicsContext.setCurrentContext(handle);
+        NSView view = data.view;
+        if (view !is null && data.paintRect is null) {
+            NSRect rect = view.convertRect_toView_(view.bounds(), null);
+            NSRect visibleRect = view.visibleRect();
+            if (data.windowRect is null || rect.x !is data.windowRect.x || rect.y !is data.windowRect.y ||
+                rect.width !is data.windowRect.width || rect.height !is data.windowRect.height ||
+                visibleRect.x !is data.visibleRect.x || visibleRect.y !is data.visibleRect.y ||
+                visibleRect.width !is data.visibleRect.width || visibleRect.height !is data.visibleRect.height)
+            {
+                data.state &= ~CLIPPING;
+                data.windowRect = rect;
+                data.visibleRect = visibleRect;
+            }
+        }
+        if ((data.state & CLIPPING) is 0 || (data.state & TRANSFORM) is 0) {
+            handle.restoreGraphicsState();
+            handle.saveGraphicsState();
+            if (view !is null && data.paintRect is null) {
+                NSAffineTransform transform = NSAffineTransform.transform();
+                NSRect rect = data.windowRect;
+                transform.translateXBy(rect.x, rect.y + rect.height);
+                transform.scaleXBy(1, -1);
+                transform.concat();
+                NSBezierPath.bezierPathWithRect(data.visibleRect).addClip();
+            }
+            if (data.clipPath !is null) data.clipPath.addClip();
+            if (data.transform !is null) data.transform.concat();
+            mask &= ~(TRANSFORM | CLIPPING);
+            data.state |= TRANSFORM | CLIPPING;
+            data.state &= ~(BACKGROUND | FOREGROUND);
+        }
     }
 
     int state = data.state;
-    if ((state & mask) is mask) return;
+    if ((state & mask) is mask) return pool;
     state = (state ^ mask) & mask;  
     data.state |= mask;
     
@@ -370,6 +383,7 @@
             data.drawYOffset = 0.5f / scaling;
         }
     }
+    return pool;
 } 
 
 /**
@@ -646,53 +660,61 @@
     NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
     CGFloat[] foreground = data.foreground;
     NSColor color = NSColor.colorWithDeviceRed(foreground[0], foreground[1], foreground[2], data.alpha / 255f);
-    dict.setObject(color, OS.NSForegroundColorAttributeName());
-    dict.setObject(data.font.handle, OS.NSFontAttributeName());
+    dict.setObject(color, OS.NSForegroundColorAttributeName);
+    dict.setObject(data.font.handle, OS.NSFontAttributeName);
     if ((flags & DWT.DRAW_TRANSPARENT) is 0) {
         CGFloat[] background = data.background;
         color = NSColor.colorWithDeviceRed(background[0], background[1], background[2], data.alpha / 255f);
         dict.setObject(color, OS.FuncNSBackgroundColorAttributeName());
     }
+    if ((flags & DWT.DRAW_TAB) is 0) {
+        NSMutableParagraphStyle paragraph = (NSMutableParagraphStyle)new NSMutableParagraphStyle().alloc().init();
+        paragraph.setAlignment(OS.NSLeftTextAlignment);
+        paragraph.setLineBreakMode(OS.NSLineBreakByClipping);
+        paragraph.setTabStops(NSArray.array());
+        dict.setObject(paragraph, OS.NSParagraphStyleAttributeName);
+        paragraph.release();
+    }
     size_t length = string.length();
     char[] chars = new char[length];
     string.getChars(0, length, chars, 0);
-//  int breakCount = 0;
-//  int[] breaks = null;
-//  if ((flags & (DWT.DRAW_MNEMONIC | DWT.DRAW_DELIMITER)) !is 0) {
-//      int i=0, j=0;
-//      while (i < chars.length) {
-//          char c = chars [j++] = chars [i++];
-//          switch (c) {
-//              case '&': {
-//                  if ((flags & DWT.DRAW_MNEMONIC) !is 0) {
-//                      if (i is chars.length) {continue;}
-//                      if (chars [i] is '&') {i++; continue;}
-//                      j--;
-//                  }
-//                  break;
-//              }
-//              case '\r':
-//              case '\n': {
-//                  if ((flags & DWT.DRAW_DELIMITER) !is 0) {
-//                      if (c is '\r' && i !is chars.length && chars[i] is '\n') i++;
-//                      j--;
-//                      if (breaks is null) {
-//                          breaks = new int[4];
-//                      } else if (breakCount is breaks.length) {
-//                          int[] newBreaks = new int[breaks.length + 4];
-//                          System.arraycopy(breaks, 0, newBreaks, 0, breaks.length);
-//                          breaks = newBreaks;
-//                      }
-//                      breaks[breakCount++] = j;
-//                  }
-//                  break;
-//              }
-//          }
-//      }
-//      length = j;
-//  }
+    int breakCount = 0;
+    int[] breaks = null;
+    if ((flags & DWT.DRAW_MNEMONIC) !is 0 || (flags & DWT.DRAW_DELIMITER) is 0) {
+        int i=0, j=0;
+        while (i < chars.length) {
+            char c = chars [j++] = chars [i++];
+            switch (c) {
+                case '&': {
+                    if ((flags & DWT.DRAW_MNEMONIC) !is 0) {
+                        if (i is chars.length) {continue;}
+                        if (chars [i] is '&') {i++; continue;}
+                        j--;
+                    }
+                    break;
+                }
+                case '\r':
+                case '\n': {
+                    if ((flags & DWT.DRAW_DELIMITER) is 0) {
+                        if (c is '\r' && i !is chars.length && chars[i] is '\n') i++;
+                        j--;
+                        if (breaks is null) {
+                            breaks = new int[4];
+                        } else if (breakCount is breaks.length) {
+                            int[] newBreaks = new int[breaks.length + 4];
+                            System.arraycopy(breaks, 0, newBreaks, 0, breaks.length);
+                            breaks = newBreaks;
+                        }
+                        breaks[breakCount++] = j;
+                    }
+                    break;
+                }
+            }
+        }
+        length = j;
+    }
     NSString str = NSString.stringWithCharacters(chars.toCharArray().ptr, length);
-    return (cast(NSAttributedString)(new NSAttributedString()).alloc()).initWithString_attributes_(str, dict);
+    return (cast(NSAttributedString)(new NSAttributedString()).alloc()).initWithString(str, dict);
 }
 
 void destroy() {
@@ -702,6 +724,7 @@
         image.memGC = null;
         image.createAlpha();
     }
+    if (data.path !is null) data.path.release();
     if (data.clipPath !is null) data.clipPath.release();
     if (data.transform !is null) data.transform.release();
     if (data.inverseTransform !is null) data.inverseTransform.release();
@@ -750,9 +773,6 @@
  */
 public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(DRAW);
     if (width < 0) {
         x = x + width;
         width = -width;
@@ -762,21 +782,25 @@
         height = -height;
     }
     if (width is 0 || height is 0 || arcAngle is 0) return;
-    handle.saveGraphicsState();
-    NSAffineTransform transform = NSAffineTransform.transform();
+    NSAutoreleasePool pool = checkGC(DRAW);
+    try {
+        handle.saveGraphicsState();
+        NSAffineTransform transform = NSAffineTransform.transform();
     CGFloat xOffset = data.drawXOffset, yOffset = data.drawYOffset;
-    transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f);
-    transform.scaleXBy(width / 2f, height / 2f);
-    NSBezierPath path = data.path;
+        transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f);
+        transform.scaleXBy(width / 2f, height / 2f);
+        NSBezierPath path = data.path;
     NSPoint center = NSPoint();
     CGFloat sAngle = -startAngle;
     CGFloat eAngle = -(startAngle + arcAngle);
-    path.appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_(center, 1, sAngle,  eAngle, arcAngle>0);
-    path.transformUsingAffineTransform(transform);
-    path.stroke();
-    path.removeAllPoints();
-    handle.restoreGraphicsState();
-    NSGraphicsContext.setCurrentContext(context);
+        path.appendBezierPathWithArcWithCenter(center, 1, sAngle,  eAngle, arcAngle>0);
+        path.transformUsingAffineTransform(transform);
+        path.stroke();
+        path.removeAllPoints();
+        handle.restoreGraphicsState();
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /** 
@@ -798,19 +822,19 @@
  */
 public void drawFocus(int x, int y, int width, int height) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(CLIPPING | TRANSFORM);
-//  int[] metric = new int[1];
-//  OS.GetThemeMetric(OS.kThemeMetricFocusRectOutset, metric);
-//  CGRect rect = new CGRect ();
-//  rect.x = x + metric[0];
-//  rect.y = y + metric[0];
-//  rect.width = width - metric[0] * 2;
-//  rect.height = height - metric[0] * 2;
-//  OS.HIThemeDrawFocusRect(rect, true, handle, OS.kHIThemeOrientationNormal);
-//  flush();
-    NSGraphicsContext.setCurrentContext(context);
+    NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM);
+    try {
+        //  int[] metric = new int[1];
+        //  OS.GetThemeMetric(OS.kThemeMetricFocusRectOutset, metric);
+        //  CGRect rect = new CGRect ();
+        //  rect.x = x + metric[0];
+        //  rect.y = y + metric[0];
+        //  rect.width = width - metric[0] * 2;
+        //  rect.height = height - metric[0] * 2;
+        //  OS.HIThemeDrawFocusRect(rect, true, handle, OS.kHIThemeOrientationNormal);
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /**
@@ -883,9 +907,6 @@
 }
 
 void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, bool simple) {
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(CLIPPING | TRANSFORM);
     NSImage imageHandle = srcImage.handle;
     NSSize size = imageHandle.size();
     int imgWidth = cast(int)size.width;
@@ -898,29 +919,34 @@
             srcWidth is destWidth && destWidth is imgWidth &&
             srcHeight is destHeight && destHeight is imgHeight;
         if (srcX + srcWidth > imgWidth || srcY + srcHeight > imgHeight) {
-            NSGraphicsContext.setCurrentContext(context);
             DWT.error(DWT.ERROR_INVALID_ARGUMENT);
         }
     }
-    if (srcImage.memGC !is null) srcImage.createAlpha();
-    handle.saveGraphicsState();
-    NSAffineTransform transform = NSAffineTransform.transform();
-    transform.scaleXBy(1, -1);
-    transform.translateXBy(0, -(destHeight + 2 * destY));
-    transform.concat();
+    NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM);
+    try {
+        if (srcImage.memGC !is null) {
+            srcImage.createAlpha();
+        }
+        handle.saveGraphicsState();
+        NSAffineTransform transform = NSAffineTransform.transform();
+        transform.scaleXBy(1, -1);
+        transform.translateXBy(0, -(destHeight + 2 * destY));
+        transform.concat();
     NSRect srcRect = NSRect();
-    srcRect.x = srcX;
-    srcRect.y = srcY;
-    srcRect.width = srcWidth;
-    srcRect.height = srcHeight;
+        srcRect.x = srcX;
+        srcRect.y = imgHeight - (srcY + srcHeight);
+        srcRect.width = srcWidth;
+        srcRect.height = srcHeight;
     NSRect destRect = NSRect();
-    destRect.x = destX;
-    destRect.y = destY;
-    destRect.width = destWidth;
-    destRect.height = destHeight;
+        destRect.x = destX;
+        destRect.y = destY;
+        destRect.width = destWidth;
+        destRect.height = destHeight;
     imageHandle.drawInRect(destRect, srcRect, NSCompositeSourceOver, 1);
-    handle.restoreGraphicsState();
-    NSGraphicsContext.setCurrentContext(context);
+        handle.restoreGraphicsState();
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /** 
@@ -938,20 +964,21 @@
  */
 public void drawLine(int x1, int y1, int x2, int y2) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(DRAW);
-    NSBezierPath path = data.path;
+    NSAutoreleasePool pool = checkGC(DRAW);
+    try {
+        NSBezierPath path = data.path;
     NSPoint pt = NSPoint();
-    pt.x = x1 + data.drawXOffset;
-    pt.y = y1 + data.drawYOffset;
-    path.moveToPoint(pt);
-    pt.x = x2 + data.drawXOffset;
-    pt.y = y2 + data.drawYOffset;
-    path.lineToPoint(pt);
-    path.stroke();
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
+        pt.x = x1 + data.drawXOffset;
+        pt.y = y1 + data.drawYOffset;
+        path.moveToPoint(pt);
+        pt.x = x2 + data.drawXOffset;
+        pt.y = y2 + data.drawYOffset;
+        path.lineToPoint(pt);
+        path.stroke();
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /** 
@@ -977,27 +1004,28 @@
  */
 public void drawOval(int x, int y, int width, int height) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(DRAW);
-    if (width < 0) {
-        x = x + width;
-        width = -width;
-    }
-    if (height < 0) {
-        y = y + height;
-        height = -height;
+    NSAutoreleasePool pool = checkGC(DRAW);
+    try {
+        if (width < 0) {
+            x = x + width;
+            width = -width;
+        }
+        if (height < 0) {
+            y = y + height;
+            height = -height;
+        }
+        NSBezierPath path = data.path;
+    NSRect rect = NSRect();
+        rect.x = x + data.drawXOffset;
+        rect.y = y + data.drawXOffset;
+        rect.width = width;
+        rect.height = height;
+        path.appendBezierPathWithOvalInRect(rect);
+        path.stroke();
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    NSBezierPath path = data.path;
-    NSRect rect = NSRect();
-    rect.x = x + data.drawXOffset;
-    rect.y = y + data.drawXOffset;
-    rect.width = width;
-    rect.height = height;
-    path.appendBezierPathWithOvalInRect(rect);
-    path.stroke();
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /** 
@@ -1027,19 +1055,20 @@
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (path is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (path.handle is null) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(DRAW);
-    handle.saveGraphicsState();
-    NSAffineTransform transform = NSAffineTransform.transform();
-    transform.translateXBy(data.drawXOffset, data.drawYOffset);
-    transform.concat();
-    NSBezierPath drawPath = data.path;
-    drawPath.appendBezierPath(path.handle);
-    drawPath.stroke();
-    drawPath.removeAllPoints();
-    handle.restoreGraphicsState();
-    NSGraphicsContext.setCurrentContext(context);
+    NSAutoreleasePool pool = checkGC(DRAW);
+    try {
+        handle.saveGraphicsState();
+        NSAffineTransform transform = NSAffineTransform.transform();
+        transform.translateXBy(data.drawXOffset, data.drawYOffset);
+        transform.concat();
+        NSBezierPath drawPath = data.path;
+        drawPath.appendBezierPath(path.handle);
+        drawPath.stroke();
+        drawPath.removeAllPoints();
+        handle.restoreGraphicsState();
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /** 
@@ -1061,19 +1090,20 @@
  */
 public void drawPoint(int x, int y) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(FOREGROUND_FILL);
+    NSAutoreleasePool pool = checkGC(FOREGROUND_FILL | CLIPPING | TRANSFORM);
+    try {
     NSRect rect = NSRect();
-    rect.x = x;
-    rect.y = y;
-    rect.width = 1;
-    rect.height = 1;
-    NSBezierPath path = data.path;
-    path.appendBezierPathWithRect(rect);
-    path.fill();
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
+        rect.x = x;
+        rect.y = y;
+        rect.width = 1;
+        rect.height = 1;
+        NSBezierPath path = data.path;
+        path.appendBezierPathWithRect(rect);
+        path.fill();
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /** 
@@ -1096,26 +1126,27 @@
 public void drawPolygon(int[] pointArray) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(DRAW);
     if (pointArray.length < 4) return;
-    CGFloat xOffset = data.drawXOffset, yOffset = data.drawYOffset;
-    NSBezierPath path = data.path;
+    NSAutoreleasePool pool = checkGC(DRAW);
+    try {
+        float /*double*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+        NSBezierPath path = data.path;
     NSPoint pt = NSPoint();
-    pt.x = pointArray[0] + xOffset;
-    pt.y = pointArray[1] + yOffset;
-    path.moveToPoint(pt);
-    int end = pointArray.length / 2 * 2;
-    for (int i = 2; i < end; i+=2) {
-        pt.x = pointArray[i] + xOffset;
-        pt.y = pointArray[i+1] + yOffset;
-        path.lineToPoint(pt);
+        pt.x = pointArray[0] + xOffset;
+        pt.y = pointArray[1] + yOffset;
+        path.moveToPoint(pt);
+        int end = pointArray.length / 2 * 2;
+        for (int i = 2; i < end; i+=2) {
+            pt.x = pointArray[i] + xOffset;
+            pt.y = pointArray[i+1] + yOffset;
+            path.lineToPoint(pt);
+        }
+        path.closePath();
+        path.stroke();
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    path.closePath();
-    path.stroke();
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /** 
@@ -1138,25 +1169,26 @@
 public void drawPolyline(int[] pointArray) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(DRAW);
     if (pointArray.length < 4) return;
-    CGFloat xOffset = data.drawXOffset, yOffset = data.drawYOffset;
-    NSBezierPath path = data.path;
+    NSAutoreleasePool pool = checkGC(DRAW);
+    try {
+        float /*double*/ xOffset = data.drawXOffset, yOffset = data.drawYOffset;
+        NSBezierPath path = data.path;
     NSPoint pt = NSPoint();
-    pt.x = pointArray[0] + xOffset;
-    pt.y = pointArray[1] + yOffset;
-    path.moveToPoint(pt);
-    int end = pointArray.length / 2 * 2;
-    for (int i = 2; i < end; i+=2) {
-        pt.x = pointArray[i] + xOffset;
-        pt.y = pointArray[i+1] + yOffset;
-        path.lineToPoint(pt);
+        pt.x = pointArray[0] + xOffset;
+        pt.y = pointArray[1] + yOffset;
+        path.moveToPoint(pt);
+        int end = pointArray.length / 2 * 2;
+        for (int i = 2; i < end; i+=2) {
+            pt.x = pointArray[i] + xOffset;
+            pt.y = pointArray[i+1] + yOffset;
+            path.lineToPoint(pt);
+        }
+        path.stroke();
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    path.stroke();
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /** 
@@ -1176,27 +1208,28 @@
  */
 public void drawRectangle(int x, int y, int width, int height) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(DRAW);
-    if (width < 0) {
-        x = x + width;
-        width = -width;
-    }
-    if (height < 0) {
-        y = y + height;
-        height = -height;
+    NSAutoreleasePool pool = checkGC(DRAW);
+    try {
+        if (width < 0) {
+            x = x + width;
+            width = -width;
+        }
+        if (height < 0) {
+            y = y + height;
+            height = -height;
+        }
+    NSRect rect = NSRect();
+        rect.x = x + data.drawXOffset;
+        rect.y = y + data.drawYOffset;
+        rect.width = width;
+        rect.height = height;
+        NSBezierPath path = data.path;
+        path.appendBezierPathWithRect(rect);
+        path.stroke();
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    NSRect rect = NSRect();
-    rect.x = x + data.drawXOffset;
-    rect.y = y + data.drawYOffset;
-    rect.width = width;
-    rect.height = height;
-    NSBezierPath path = data.path;
-    path.appendBezierPathWithRect(rect);
-    path.stroke();
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /** 
@@ -1244,24 +1277,24 @@
  */
 public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth, int arcHeight) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(DRAW);
     if (arcWidth is 0 || arcHeight is 0) {
         drawRectangle(x, y, width, height);
-        NSGraphicsContext.setCurrentContext(context);
         return;
     }
-    NSBezierPath path = data.path;
+    NSAutoreleasePool pool = checkGC(DRAW);
+    try {
+        NSBezierPath path = data.path;
     NSRect rect = NSRect();
-    rect.x = x + data.drawXOffset;
-    rect.y = y + data.drawYOffset;
-    rect.width = width;
-    rect.height = height;
-    path.appendBezierPathWithRoundedRect(rect, arcWidth, arcHeight);
-    path.stroke();
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
+        rect.x = x + data.drawXOffset;
+        rect.y = y + data.drawYOffset;
+        rect.width = width;
+        rect.height = height;
+        path.appendBezierPathWithRoundedRect(rect, arcWidth, arcHeight);
+        path.stroke();
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /** 
@@ -1395,26 +1428,27 @@
 public void drawText (String string, int x, int y, int flags) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (string is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(CLIPPING | TRANSFORM | FONT | FOREGROUND_FILL);
-    NSAttributedString str = createString(string, flags);
-    if (data.paintRect is null) {
-        handle.saveGraphicsState();
-        NSAffineTransform transform = NSAffineTransform.transform();
-        transform.scaleXBy(1, -1);
-        transform.translateXBy(0, -(str.size().height + 2 * y));
-        transform.concat();
+    NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM | FONT | FOREGROUND_FILL);
+    try {
+        NSAttributedString str = createString(string, flags);
+        if (data.paintRect is null) {
+            handle.saveGraphicsState();
+            NSAffineTransform transform = NSAffineTransform.transform();
+            transform.scaleXBy(1, -1);
+            transform.translateXBy(0, -(str.size().height + 2 * y));
+            transform.concat();
+        }
+    NSPoint pt = NSPoint();
+        pt.x = x;
+        pt.y = y;
+        str.drawAtPoint(pt);
+        str.release();
+        if (data.paintRect is null) {
+            handle.restoreGraphicsState();
+        }
+    } finally {
+        uncheckGC(pool);
     }
-    NSPoint pt = NSPoint();
-    pt.x = x;
-    pt.y = y;
-    str.drawAtPoint(pt);
-    str.release();
-    if (data.paintRect is null) {
-        handle.restoreGraphicsState();
-    }
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /**
@@ -1469,9 +1503,6 @@
  */
 public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(FILL);
     if (width < 0) {
         x = x + width;
         width = -width;
@@ -1481,23 +1512,27 @@
         height = -height;
     }
     if (width is 0 || height is 0 || arcAngle is 0) return;
-    handle.saveGraphicsState();
-    NSAffineTransform transform = NSAffineTransform.transform();
+    NSAutoreleasePool pool = checkGC(FILL);
+    try {
+        handle.saveGraphicsState();
+        NSAffineTransform transform = NSAffineTransform.transform();
     CGFloat xOffset = data.drawXOffset, yOffset = data.drawYOffset;
-    transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f);
-    transform.scaleXBy(width / 2f, height / 2f);
-    NSBezierPath path = data.path;
+        transform.translateXBy(x + xOffset + width / 2f, y + yOffset + height / 2f);
+        transform.scaleXBy(width / 2f, height / 2f);
+        NSBezierPath path = data.path;
     NSPoint center = NSPoint();
-    path.moveToPoint(center);
+        path.moveToPoint(center);
     CGFloat sAngle = -startAngle;
     CGFloat eAngle = -(startAngle + arcAngle);
-    path.appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_(center, 1, sAngle,  eAngle, arcAngle>0);
-    path.closePath();
-    path.transformUsingAffineTransform(transform);
-    path.fill();
-    path.removeAllPoints();
-    handle.restoreGraphicsState();
-    NSGraphicsContext.setCurrentContext(context);
+        path.appendBezierPathWithArcWithCenter(center, 1, sAngle,  eAngle, arcAngle>0);
+        path.closePath();
+        path.transformUsingAffineTransform(transform);
+        path.fill();
+        path.removeAllPoints();
+        handle.restoreGraphicsState();
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /**
@@ -1522,46 +1557,46 @@
  */
 public void fillGradientRectangle(int x, int y, int width, int height, bool vertical) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(CLIPPING | TRANSFORM);
     if ((width is 0) || (height is 0)) return;
-
-    RGB backgroundRGB, foregroundRGB;
-    backgroundRGB = getBackground().getRGB();
-    foregroundRGB = getForeground().getRGB();
+    NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM);
+    try {
+        RGB backgroundRGB, foregroundRGB;
+        backgroundRGB = getBackground().getRGB();
+        foregroundRGB = getForeground().getRGB();
 
-    RGB fromRGB, toRGB;
-    fromRGB = foregroundRGB;
-    toRGB   = backgroundRGB;
-    bool swapColors = false;
-    if (width < 0) {
-        x += width; width = -width;
-        if (! vertical) swapColors = true;
-    }
-    if (height < 0) {
-        y += height; height = -height;
-        if (vertical) swapColors = true;
-    }
-    if (swapColors) {
-        fromRGB = backgroundRGB;
-        toRGB   = foregroundRGB;
-    }
-    if (fromRGB.equals(toRGB)) {
-        fillRectangle(x, y, width, height);
-    } else {
-        NSColor startingColor = NSColor.colorWithDeviceRed(fromRGB.red / 255f, fromRGB.green / 255f, fromRGB.blue / 255f, data.alpha / 255f);
-        NSColor endingColor = NSColor.colorWithDeviceRed(toRGB.red / 255f, toRGB.green / 255f, toRGB.blue / 255f, data.alpha / 255f);
+        RGB fromRGB, toRGB;
+        fromRGB = foregroundRGB;
+        toRGB   = backgroundRGB;
+        bool swapColors = false;
+        if (width < 0) {
+            x += width; width = -width;
+            if (! vertical) swapColors = true;
+        }
+        if (height < 0) {
+            y += height; height = -height;
+            if (vertical) swapColors = true;
+        }
+        if (swapColors) {
+            fromRGB = backgroundRGB;
+            toRGB   = foregroundRGB;
+        }
+        if (fromRGB.equals(toRGB)) {
+            fillRectangle(x, y, width, height);
+        } else {
+            NSColor startingColor = NSColor.colorWithDeviceRed(fromRGB.red / 255f, fromRGB.green / 255f, fromRGB.blue / 255f, data.alpha / 255f);
+            NSColor endingColor = NSColor.colorWithDeviceRed(toRGB.red / 255f, toRGB.green / 255f, toRGB.blue / 255f, data.alpha / 255f);
         NSGradient gradient = (cast(NSGradient)(new NSGradient()).alloc()).initWithStartingColor(startingColor, endingColor);
         NSRect rect = NSRect();
-        rect.x = x;
-        rect.y = y;
-        rect.width = width;
-        rect.height = height;
-        gradient.drawInRect_angle_(rect, vertical ? 90 : 0);
-        gradient.release();
+            rect.x = x;
+            rect.y = y;
+            rect.width = width;
+            rect.height = height;
+            gradient.drawInRect(rect, vertical ? 90 : 0);
+            gradient.release();
+        }
+    } finally {
+        uncheckGC(pool);
     }
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /** 
@@ -1582,40 +1617,40 @@
  */
 public void fillOval(int x, int y, int width, int height) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(FILL);
-    if (width < 0) {
-        x = x + width;
-        width = -width;
-    }
-    if (height < 0) {
-        y = y + height;
-        height = -height;
-    }
-    NSBezierPath path = data.path;
+    NSAutoreleasePool pool = checkGC(FILL);
+    try {
+        if (width < 0) {
+            x = x + width;
+            width = -width;
+        }
+        if (height < 0) {
+            y = y + height;
+            height = -height;
+        }
+        NSBezierPath path = data.path;
     NSRect rect = NSRect();
-    rect.x = x;
-    rect.y = y;
-    rect.width = width;
-    rect.height = height;
-    path.appendBezierPathWithOvalInRect(rect);
-    Pattern pattern = data.backgroundPattern;
-    if (pattern !is null && pattern.gradient !is null) {
-        fillPattern(path, pattern);
-    } else {
-        path.fill();
+        rect.x = x;
+        rect.y = y;
+        rect.width = width;
+        rect.height = height;
+        path.appendBezierPathWithOvalInRect(rect);
+        Pattern pattern = data.backgroundPattern;
+        if (pattern !is null && pattern.gradient !is null) {
+            fillPattern(path, pattern);
+        } else {
+            path.fill();
+        }
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 void fillPattern(NSBezierPath path, Pattern pattern) {
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
+    handle.saveGraphicsState();
     path.addClip();
     pattern.gradient.drawFromPoint(pattern.pt1, pattern.pt2, OS.NSGradientDrawsAfterEndingLocation | OS.NSGradientDrawsBeforeStartingLocation);
-    NSGraphicsContext.setCurrentContext(context);
+    handle.restoreGraphicsState();
 }
 
 /** 
@@ -1645,19 +1680,20 @@
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (path is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (path.handle is null) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(FILL);
-    NSBezierPath drawPath = data.path;
-    drawPath.appendBezierPath(path.handle);
-    Pattern pattern = data.backgroundPattern;
-    if (pattern !is null && pattern.gradient !is null) {
-        fillPattern(drawPath, pattern);
-    } else {
-        drawPath.fill();
+    NSAutoreleasePool pool = checkGC(FILL);
+    try {
+        NSBezierPath drawPath = data.path;
+        drawPath.appendBezierPath(path.handle);
+        Pattern pattern = data.backgroundPattern;
+        if (pattern !is null && pattern.gradient !is null) {
+            fillPattern(drawPath, pattern);
+        } else {
+            drawPath.fill();
+        }
+        drawPath.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    drawPath.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /** 
@@ -1682,30 +1718,31 @@
 public void fillPolygon(int[] pointArray) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(FILL);
     if (pointArray.length < 4) return;
-    NSBezierPath path = data.path;
+    NSAutoreleasePool pool = checkGC(FILL);
+    try {
+        NSBezierPath path = data.path;
     NSPoint pt = NSPoint();
-    pt.x = pointArray[0];
-    pt.y = pointArray[1];
-    path.moveToPoint(pt);
-    int end = pointArray.length / 2 * 2;
-    for (int i = 2; i < end; i+=2) {
-        pt.x = pointArray[i];
-        pt.y = pointArray[i+1];
-        path.lineToPoint(pt);
+        pt.x = pointArray[0];
+        pt.y = pointArray[1];
+        path.moveToPoint(pt);
+        int end = pointArray.length / 2 * 2;
+        for (int i = 2; i < end; i+=2) {
+            pt.x = pointArray[i];
+            pt.y = pointArray[i+1];
+            path.lineToPoint(pt);
+        }
+        path.closePath();
+        Pattern pattern = data.backgroundPattern;
+        if (pattern !is null && pattern.gradient !is null) {
+            fillPattern(path, pattern);
+        } else {
+            path.fill();
+        }
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    path.closePath();
-    Pattern pattern = data.backgroundPattern;
-    if (pattern !is null && pattern.gradient !is null) {
-        fillPattern(path, pattern);
-    } else {
-        path.fill();
-    }
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /** 
@@ -1725,32 +1762,33 @@
  */
 public void fillRectangle(int x, int y, int width, int height) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(FILL);
-    if (width < 0) {
-        x = x + width;
-        width = -width;
-    }
-    if (height < 0) {
-        y = y + height;
-        height = -height;
-    }
+    NSAutoreleasePool pool = checkGC(FILL);
+    try {
+        if (width < 0) {
+            x = x + width;
+            width = -width;
+        }
+        if (height < 0) {
+            y = y + height;
+            height = -height;
+        }
     NSRect rect = NSRect();
-    rect.x = x;
-    rect.y = y;
-    rect.width = width;
-    rect.height = height;
-    NSBezierPath path = data.path;
-    path.appendBezierPathWithRect(rect);
-    Pattern pattern = data.backgroundPattern;
-    if (pattern !is null && pattern.gradient !is null) {
-        fillPattern(path, pattern);
-    } else {
-        path.fill();
+        rect.x = x;
+        rect.y = y;
+        rect.width = width;
+        rect.height = height;
+        NSBezierPath path = data.path;
+        path.appendBezierPathWithRect(rect);
+        Pattern pattern = data.backgroundPattern;
+        if (pattern !is null && pattern.gradient !is null) {
+            fillPattern(path, pattern);
+        } else {
+            path.fill();
+        }
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 /** 
@@ -1793,31 +1831,33 @@
  */
 public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth, int arcHeight) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSGraphicsContext context = NSGraphicsContext.currentContext();
-    NSGraphicsContext.setCurrentContext(handle);
-    checkGC(FILL);
     if (arcWidth is 0 || arcHeight is 0) {
         fillRectangle(x, y, width, height);
         return;
     }
-    NSBezierPath path = data.path;
+    NSAutoreleasePool pool = checkGC(FILL);
+    try {
+        NSBezierPath path = data.path;
     NSRect rect = NSRect();
-    rect.x = x;
-    rect.y = y;
-    rect.width = width;
-    rect.height = height;
-    path.appendBezierPathWithRoundedRect(rect, arcWidth, arcHeight);
-    Pattern pattern = data.backgroundPattern;
-    if (pattern !is null && pattern.gradient !is null) {
-        fillPattern(path, pattern);
-    } else {
-        path.fill();
+        rect.x = x;
+        rect.y = y;
+        rect.width = width;
+        rect.height = height;
+        path.appendBezierPathWithRoundedRect(rect, arcWidth, arcHeight);
+        Pattern pattern = data.backgroundPattern;
+        if (pattern !is null && pattern.gradient !is null) {
+            fillPattern(path, pattern);
+        } else {
+            path.fill();
+        }
+        path.removeAllPoints();
+    } finally {
+        uncheckGC(pool);
     }
-    path.removeAllPoints();
-    NSGraphicsContext.setCurrentContext(context);
 }
 
 void flush () {
+    handle.flushGraphics();
 }
 
 /**
@@ -1905,7 +1945,8 @@
 }
 
 /**
- * Returns the receiver's alpha value.
+ * Returns the receiver's alpha value. The alpha value
+ * is between 0 (transparent) and 255 (opaque).
  *
  * @return the alpha value
  *
@@ -1979,7 +2020,7 @@
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSRect rect;
     if (data.view !is null) {
-        rect = data.view.bounds();
+        rect = data.view.visibleRect();
     } else {
         rect = NSRect();
         if (data.image !is null) {
@@ -2038,7 +2079,7 @@
     region.subtract(region);
     NSRect rect = void;
     if (data.view !is null) {
-        rect = data.view.bounds();
+        rect = data.view.visibleRect();
     } else {
         rect = NSRect();
         if (data.image !is null) {
@@ -2057,7 +2098,7 @@
     }
     if (data.clipPath !is null) {
         NSBezierPath clip = data.clipPath.bezierPathByFlatteningPath();
-        int count = clip.elementCount();
+        int count = (int)/*64*/clip.elementCount();
         int pointCount = 0;
         Region clipRgn = new Region(device);
         int[] pointArray = new int[count * 2];
@@ -2065,7 +2106,7 @@
         if (points is null) DWT.error(DWT.ERROR_NO_HANDLES);
         NSPoint pt = NSPoint();
         for (int  i = 0; i < count; i++) {
-            NSBezierPathElement element = clip.elementAtIndex_associatedPoints_(i, points);
+            NSBezierPathElement element = clip.elementAtIndex(i, points);
             switch (element) {
                 case NSMoveToBezierPathElement:
                     if (pointCount !is 0) clipRgn.add(pointArray, pointCount);
@@ -2140,13 +2181,17 @@
  */
 public FontMetrics getFontMetrics() {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    checkGC(FONT);
-    NSFont font = data.font.handle;
+    NSAutoreleasePool pool = checkGC(FONT);
+    try {
+        NSFont font = data.font.handle;
     int ascent = cast(int)(0.5f + font.ascender());
     int descent = cast(int)(0.5f + (-font.descender() + font.leading()));   
-    String s = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 
-    int averageCharWidth = stringExtent(s).x / s.length();
-    return FontMetrics.cocoa_new(ascent, descent, averageCharWidth, 0, ascent + descent);
+        String s = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 
+        int averageCharWidth = stringExtent(s).x / s.length();
+        return FontMetrics.cocoa_new(ascent, descent, averageCharWidth, 0, ascent + descent);
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /** 
@@ -2222,7 +2267,7 @@
  */
 public int getInterpolation() {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    int interpolation = handle.imageInterpolation();
+    int interpolation = (int)/*64*/handle.imageInterpolation();
     switch (interpolation) {
         case OS.NSImageInterpolationDefault: return DWT.DEFAULT;
         case OS.NSImageInterpolationNone: return DWT.NONE;
@@ -2572,7 +2617,8 @@
 }
 
 /**
- * Sets the receiver's alpha value.
+ * Sets the receiver's alpha value which must be
+ * between 0 (transparent) and 255 (opaque).
  * <p>
  * This operation requires the operating system's advanced
  * graphics subsystem which may not be available on some
@@ -3437,10 +3483,14 @@
 public Point textExtent(String string, int flags) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (string is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    checkGC(FONT);
-    NSAttributedString str = createString(string, flags);
-    NSSize size = str.size();
+    NSAutoreleasePool pool = checkGC(FONT);
+    try {
+        NSAttributedString str = createString(string, flags);
+        NSSize size = str.size();
     return new Point(cast(int)size.width, cast(int)size.height);
+    } finally {
+        uncheckGC(pool);
+    }
 }
 
 /**
@@ -3454,4 +3504,12 @@
     return Format("GC {{}{}" , handle , "}");
 }
 
+void uncheckGC(NSAutoreleasePool pool) {
+    NSView view = data.view;
+    if (view !is null && data.paintRect is null) {
+        if (data.thread !is Thread.currentThread()) flush();
+    }
+    if (pool !is null) pool.release();
 }
+
+}
--- a/dwt/graphics/GCData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/GCData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.GCData;
 
@@ -37,6 +37,7 @@
  * within the packages provided by DWT. It is not available on all
  * platforms, and should never be called from application code.
  * </p>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class GCData {
     public Device device;
@@ -68,8 +69,12 @@
     public NSAffineTransform transform, inverseTransform;
     public NSBezierPath clipPath;
     public NSView view;
-    public NSSize* size;
+    public NSSize* size;    
+    public NSRect* windowRect, visibleRect;
+    public Thread thread;
     
     public NSRect paintRectStruct;
     public NSSize sizeStruct;
+    public NSRect windowRectStruct;
+    public NSRect visibleRectStruct;
 }
--- a/dwt/graphics/GlyphMetrics.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/GlyphMetrics.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.GlyphMetrics;
 
@@ -35,6 +35,7 @@
  * 
  * @see TextStyle
  * @see TextLayout
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.2
  */
@@ -59,13 +60,17 @@
  * Constructs an instance of this class with the given
  * ascent, descent and width values.
  *
+ * @param ascent the GlyphMetrics ascent
+ * @param descent the GlyphMetrics descent
+ * @param width the GlyphMetrics width
+ *
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_INVALID_ARGUMENT - if the ascent, descent or width argument is negative</li>
  * </ul>
  */
 public this(int ascent, int descent, int width) {
     if (ascent < 0 || descent < 0 || width < 0) {
-            DWT.error(DWT.ERROR_INVALID_ARGUMENT);
+        DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
     this.ascent = ascent;
     this.descent = descent;
--- a/dwt/graphics/Image.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Image.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Image;
 
@@ -19,13 +19,15 @@
 import dwt.DWT;
 import dwt.DWTError;
 import dwt.DWTException;
+import dwt.internal.C;
 import dwt.internal.cocoa.NSAffineTransform;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSBitmapImageRep;
 import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSImage;
 import dwt.internal.cocoa.NSImageRep;
 import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSThread;
 import dwt.internal.cocoa.OS;
 
 import tango.text.convert.Format;
@@ -90,6 +92,9 @@
  * @see Color
  * @see ImageData
  * @see ImageLoader
+ * @see <a href="http://www.eclipse.org/swt/snippets/#image">Image snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Examples: GraphicsExample, ImageAnalyzer</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class Image : Resource, Drawable {
 
@@ -191,8 +196,14 @@
  */
 public this(Device device, int width, int height) {
     super(device);
-    init_(width, height);
-    init_();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        init_(width, height);
+        init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -200,11 +211,11 @@
  * provided image, with an appearance that varies depending
  * on the value of the flag. The possible flag values are:
  * <dl>
- * <dt><b>IMAGE_COPY</b></dt>
+ * <dt><b>{@link DWT#IMAGE_COPY}</b></dt>
  * <dd>the result is an identical copy of srcImage</dd>
- * <dt><b>IMAGE_DISABLE</b></dt>
+ * <dt><b>{@link DWT#IMAGE_DISABLE}</b></dt>
  * <dd>the result is a copy of srcImage which has a <em>disabled</em> look</dd>
- * <dt><b>IMAGE_GRAY</b></dt>
+ * <dt><b>{@link DWT#IMAGE_GRAY}</b></dt>
  * <dd>the result is a copy of srcImage which has a <em>gray scale</em> look</dd>
  * </dl>
  *
@@ -238,37 +249,40 @@
         default:
             DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
-    device = this.device;
-    this.type = srcImage.type;
 
-    /* Get source image size */
-    NSSize size = srcImage.handle.size();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        device = this.device;
+        this.type = srcImage.type;
+        /* Get source image size */
+        NSSize size = srcImage.handle.size();
     int width = cast(int)size.width;
     int height = cast(int)size.height;
-    NSBitmapImageRep srcRep = srcImage.imageRep;
+        NSBitmapImageRep srcRep = srcImage.imageRep;
     NSInteger bpr = srcRep.bytesPerRow();
 
-    /* Copy transparent pixel and alpha data when necessary */
-    transparentPixel = srcImage.transparentPixel;
-    alpha = srcImage.alpha;
-    if (srcImage.alphaData !is null) {
-        alphaData = new byte[srcImage.alphaData.length];
-        System.arraycopy(srcImage.alphaData, 0, alphaData, 0, alphaData.length);
-    }
+        /* Copy transparent pixel and alpha data when necessary */
+        transparentPixel = srcImage.transparentPixel;
+        alpha = srcImage.alpha;
+        if (srcImage.alphaData !is null) {
+            alphaData = new byte[srcImage.alphaData.length];
+            System.arraycopy(srcImage.alphaData, 0, alphaData, 0, alphaData.length);
+        }
 
-    /* Create the image */
+        /* Create the image */
     handle = cast(NSImage)(new NSImage()).alloc();
-    handle = handle.initWithSize(size);
+        handle = handle.initWithSize(size);
     NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
-    rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(null, cast(NSInteger) width, cast(NSInteger) height, srcRep.bitsPerSample(), srcRep.samplesPerPixel(), srcRep.samplesPerPixel() is 4, srcRep.isPlanar(), OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, srcRep.bytesPerRow(), srcRep.bitsPerPixel());
-    handle.addRepresentation(rep);
-    
+    rep = rep.initWithBitmapDataPlanes(null, width, height, srcRep.bitsPerSample(), srcRep.samplesPerPixel(), srcRep.samplesPerPixel() is 4, srcRep.isPlanar(), OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, srcRep.bytesPerRow(), srcRep.bitsPerPixel());
+        handle.addRepresentation(rep);
+
     objc.id data = rep.bitmapData();
-    OS.memmove(data, srcImage.imageRep.bitmapData(), cast(size_t) (width * height * 4));
-    if (flag !is DWT.IMAGE_COPY) {
-        
-        /* Apply transformation */
-        switch (flag) {
+    OS.memmove(data, srcImage.imageRep.bitmapData(), width * height * 4);
+        if (flag !is DWT.IMAGE_COPY) {
+
+            /* Apply transformation */
+            switch (flag) {
             case DWT.IMAGE_DISABLE: {
                 Color zeroColor = device.getSystemColor(DWT.COLOR_WIDGET_NORMAL_SHADOW);
                 RGB zeroRGB = zeroColor.getRGB();
@@ -280,7 +294,7 @@
                 byte oneRed = cast(byte)oneRGB.red;
                 byte oneGreen = cast(byte)oneRGB.green;
                 byte oneBlue = cast(byte)oneRGB.blue;
-                byte[] line = new byte[bpr];
+                byte[] line = new byte[(int)/*64*/bpr];
                 for (int y=0; y<height; y++) {
                     OS.memmove(line.ptr, data + (y * bpr), bpr);
                     int offset = 0;
@@ -305,7 +319,7 @@
                 break;
             }
             case DWT.IMAGE_GRAY: {          
-                byte[] line = new byte[bpr];
+                byte[] line = new byte[(int)/*64*/bpr];
                 for (int y=0; y<height; y++) {
                     OS.memmove(line.ptr, data + (y * bpr), bpr);
                     int offset = 0;
@@ -321,9 +335,12 @@
                 }
                 break;
             }
+            }
         }
+    init_();
+    } finally {
+        if (pool !is null) pool.release();
     }
-    init_();
 }
 
 /**
@@ -359,8 +376,14 @@
 public this(Device device, Rectangle bounds) {
     super(device);
     if (bounds is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    init_(bounds.width, bounds.height);
-    init_();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        init_(bounds.width, bounds.height);
+        init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -383,8 +406,14 @@
  */
 public this(Device device, ImageData data) {
     super(device);
-    init_(data);
-    init_();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        init_(data);
+        init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -419,11 +448,17 @@
     if (source.width !is mask.width || source.height !is mask.height) {
         DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
-    mask = ImageData.convertMask(mask);
-    ImageData image = new ImageData(source.width, source.height, source.depth, source.palette, source.scanlinePad, source.data);
-    image.maskPad = mask.scanlinePad;
-    image.maskData = mask.data;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        mask = ImageData.convertMask(mask);
+        ImageData image = new ImageData(source.width, source.height, source.depth, source.palette, source.scanlinePad, source.data);
+        image.maskPad = mask.scanlinePad;
+        image.maskData = mask.data;
     init_(image);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -476,8 +511,14 @@
  */
 public this(Device device, InputStream stream) {
     super(device);
-    init_(new ImageData(stream));
-    init_();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        init_(new ImageData(stream));
+        init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -509,40 +550,52 @@
  */
 public this(Device device, String filename) {
     super(device);
-    init_(new ImageData(filename));
-    init_();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        init_(new ImageData(filename));
+        init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 void createAlpha () {
     if (transparentPixel is -1 && alpha is -1 && alphaData is null) return;
-    NSSize size = handle.size();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSSize size = handle.size();
     int height = cast(int)size.height;
     NSInteger bpr = imageRep.bytesPerRow();
     size_t dataSize = height * bpr;
-    byte[] srcData = new byte[dataSize];
+        byte[] srcData = new byte[dataSize];
     OS.memmove(srcData.ptr, imageRep.bitmapData(), dataSize);
-    if (transparentPixel !is -1) {
-        for (int i=0; i<dataSize; i+=4) {
-            int pixel = ((srcData[i+1] & 0xFF) << 16) | ((srcData[i+2] & 0xFF) << 8) | (srcData[i+3] & 0xFF);
+        if (transparentPixel !is -1) {
+            for (int i=0; i<dataSize; i+=4) {
+                int pixel = ((srcData[i+1] & 0xFF) << 16) | ((srcData[i+2] & 0xFF) << 8) | (srcData[i+3] & 0xFF);
             srcData[i] = cast(byte)(pixel is transparentPixel ? 0 : 0xFF); 
-        }
-    } else if (alpha !is -1) {
+            }
+        } else if (alpha !is -1) {
         byte a = cast(byte)this.alpha;
-        for (int i=0; i<dataSize; i+=4) {
-            srcData[i] = a;             
-        }
-    } else {
+            for (int i=0; i<dataSize; i+=4) {
+                srcData[i] = a;             
+            }
+        } else {
         int width = cast(int)size.width;
-        int offset = 0, alphaOffset = 0;
-        for (int y = 0; y<height; y++) {
-            for (int x = 0; x<width; x++) {
-                srcData[offset] = alphaData[alphaOffset];
-                offset += 4;
-                alphaOffset += 1;
+            int offset = 0, alphaOffset = 0;
+            for (int y = 0; y<height; y++) {
+                for (int x = 0; x<width; x++) {
+                    srcData[offset] = alphaData[alphaOffset];
+                    offset += 4;
+                    alphaOffset += 1;
+                }
             }
         }
+    OS.memmove(imageRep.bitmapData(), srcData.ptr, dataSize);
+    } finally {
+        if (pool !is null) pool.release();
     }
-    OS.memmove(imageRep.bitmapData(), srcData.ptr, dataSize);
 }
 
 void destroy() {
@@ -615,11 +668,17 @@
  */
 public Rectangle getBounds() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    if (width !is -1 && height !is -1) {
-        return new Rectangle(0, 0, width, height);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        if (width !is -1 && height !is -1) {
+            return new Rectangle(0, 0, width, height);
+        }
+        NSSize size = handle.size();
+    return new Rectangle(0, 0, width = cast(int)size.width, height = cast(int)size.height);
+    } finally {
+        if (pool !is null) pool.release();
     }
-    NSSize size = handle.size();
-    return new Rectangle(0, 0, width = cast(int)size.width, height = cast(int)size.height);
 }
 
 /**
@@ -638,52 +697,56 @@
  */
 public ImageData getImageData() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-
-    NSSize size = handle.size();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSSize size = handle.size();
     int width = cast(int)size.width;
     int height = cast(int)size.height;
-    NSBitmapImageRep imageRep = this.imageRep;
+        NSBitmapImageRep imageRep = this.imageRep;
     NSInteger  bpr = imageRep.bytesPerRow();
     NSInteger  bpp = imageRep.bitsPerPixel();
     size_t dataSize = height * bpr;
-    byte[] srcData = new byte[dataSize];
+        byte[] srcData = new byte[dataSize];
     OS.memmove(srcData.ptr, imageRep.bitmapData(), dataSize);
-    
-    PaletteData palette = new PaletteData(0xFF0000, 0xFF00, 0xFF);
-    ImageData data = new ImageData(width, height, bpp, palette);
-    data.data = srcData;
-    data.bytesPerLine = bpr;
+
+        PaletteData palette = new PaletteData(0xFF0000, 0xFF00, 0xFF);
+        ImageData data = new ImageData(width, height, (int)/*64*/bpp, palette, 4, srcData);
+        data.bytesPerLine = (int)/*64*/bpr;
 
-    data.transparentPixel = transparentPixel;
-    if (transparentPixel is -1 && type is DWT.ICON) {
-        /* Get the icon mask data */
-        int maskPad = 2;
-        int maskBpl = (((width + 7) / 8) + (maskPad - 1)) / maskPad * maskPad;
-        byte[] maskData = new byte[height * maskBpl];
-        int offset = 0, maskOffset = 0;
-        for (int y = 0; y<height; y++) {
-            for (int x = 0; x<width; x++) {
-                if (srcData[offset] !is 0) {
-                    maskData[maskOffset + (x >> 3)] |= (1 << (7 - (x & 0x7)));
-                } else {
-                    maskData[maskOffset + (x >> 3)] &= ~(1 << (7 - (x & 0x7)));
+        data.transparentPixel = transparentPixel;
+        if (transparentPixel is -1 && type is DWT.ICON) {
+            /* Get the icon mask data */
+            int maskPad = 2;
+            int maskBpl = (((width + 7) / 8) + (maskPad - 1)) / maskPad * maskPad;
+            byte[] maskData = new byte[height * maskBpl];
+            int offset = 0, maskOffset = 0;
+            for (int y = 0; y<height; y++) {
+                for (int x = 0; x<width; x++) {
+                    if (srcData[offset] !is 0) {
+                        maskData[maskOffset + (x >> 3)] |= (1 << (7 - (x & 0x7)));
+                    } else {
+                        maskData[maskOffset + (x >> 3)] &= ~(1 << (7 - (x & 0x7)));
+                    }
+                    offset += 4;
                 }
-                offset += 4;
+                maskOffset += maskBpl;
             }
-            maskOffset += maskBpl;
+            data.maskData = maskData;
+            data.maskPad = maskPad;
+        }
+        for (int i = 0; i < srcData.length; i+= 4) {
+            srcData[i] = 0;
         }
-        data.maskData = maskData;
-        data.maskPad = maskPad;
+        data.alpha = alpha;
+        if (alpha is -1 && alphaData !is null) {
+            data.alphaData = new byte[alphaData.length];
+            System.arraycopy(alphaData, 0, data.alphaData, 0, alphaData.length);
+        }
+        return data;
+    } finally {
+        if (pool !is null) pool.release();
     }
-    for (int i = 0; i < srcData.length; i+= 4) {
-        srcData[i] = 0;
-    }
-    data.alpha = alpha;
-    if (alpha is -1 && alphaData !is null) {
-        data.alphaData = new byte[alphaData.length];
-        System.arraycopy(alphaData, 0, data.alphaData, 0, alphaData.length);
-    }
-    return data;
 }
 
 /**  
@@ -707,11 +770,18 @@
     Image image = new Image(device);
     image.type = type;
     image.handle = nsImage;
-    NSImageRep rep = nsImage.bestRepresentationForDevice(null);
-    if (rep.isKindOfClass(NSBitmapImageRep.static_class())) { 
-        image.imageRep = new NSBitmapImageRep(rep.id_);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSImageRep rep = nsImage.bestRepresentationForDevice(null);
+        if (rep.isKindOfClass(OS.class_NSBitmapImageRep)) { 
+            rep.retain();
+            image.imageRep = new NSBitmapImageRep(rep.id_);
+        }
+        return image;
+    } finally {
+        if (pool !is null) pool.release();
     }
-    return image;
 }
 
 /**
@@ -744,7 +814,7 @@
     size.height = height;
     handle = handle.initWithSize(size);
     NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
-    rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(null, cast(NSInteger) width, cast(NSInteger) height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) (width * 4), 32);
+    rep = rep.initWithBitmapDataPlanes_(null, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, width * 4, 32);
     OS.memset(rep.bitmapData(), 0xFF, cast(size_t) (width * height * 4));
     handle.addRepresentation(rep);
 //  rep.release();
@@ -853,8 +923,7 @@
     size.height = height;
     handle = handle.initWithSize(size);
     NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
-    rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(
-            null, cast(NSInteger) width, cast(NSInteger) height, 8, hasAlpha ? 4 : 3, hasAlpha, false, OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) bpr, 32);
+    rep = rep.initWithBitmapDataPlanes(0, width, height, 8, hasAlpha ? 4 : 3, hasAlpha, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, bpr, 32);
     OS.memmove(rep.bitmapData(), buffer.ptr, dataSize); 
     handle.addRepresentation(rep);
 //  rep.release();
@@ -878,39 +947,43 @@
     if (type !is DWT.BITMAP || memGC !is null) {
         DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
-    NSGraphicsContext current = NSGraphicsContext.currentContext();
-    NSBitmapImageRep rep = imageRep;
-    if (imageRep.hasAlpha()) {
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSBitmapImageRep rep = imageRep;
+        if (imageRep.hasAlpha()) {
         NSInteger bpr = width * 4;
         rep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
         objc.id bitmapData = imageRep.bitmapData();
         if (data.bitmapDataAddress !is null) OS.free(data.bitmapDataAddress);
-        data.bitmapDataAddress = cast(ubyte*) OS.malloc((void*).sizeof);
-        OS.memmove(data.bitmapDataAddress, bitmapData, (void*).sizeof);
-        rep = rep.initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_(
-                &data.bitmapDataAddress, cast(NSInteger) width, cast(NSInteger) height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat , bpr, 32);
-        rep.autorelease();
+        data.bitmapDataAddress = cast(ubyte*) OS.malloc(C.PTR_SIZEOF);
+        OS.memmove(data.bitmapDataAddress, bitmapData, C.PTR_SIZEOF);
+            rep = rep.initWithBitmapDataPlanes(data.bitmapDataAddress, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat , bpr, 32);
+            rep.autorelease();
+        }
+        handle.setCacheMode(OS.NSImageCacheNever);
+        NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(rep);
+        NSGraphicsContext.setCurrentContext(context);
+        NSAffineTransform transform = NSAffineTransform.transform();
+        NSSize size = handle.size();
+        transform.translateXBy(0, size.height);
+        transform.scaleXBy(1, -1);
+        transform.set();
+        if (data !is null) {
+            int mask = DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT;
+            if ((data.style & mask) is 0) {
+                data.style |= DWT.LEFT_TO_RIGHT;
+            }
+            data.device = device;
+            data.background = device.COLOR_WHITE.handle;
+            data.foreground = device.COLOR_BLACK.handle;
+            data.font = device.systemFont;
+            data.image = this;
+        }
+    return context.id_;
+    } finally {
+        if (pool !is null) pool.release();
     }
-    NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(rep);
-    NSGraphicsContext.setCurrentContext(context);
-    NSAffineTransform transform = NSAffineTransform.transform();
-    NSSize size = handle.size();
-    transform.translateXBy(0, size.height);
-    transform.scaleXBy(1, -1);
-    transform.set();
-    if (data !is null) {
-        int mask = DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT;
-        if ((data.style & mask) is 0) {
-            data.style |= DWT.LEFT_TO_RIGHT;
-        }
-        data.device = device;
-        data.background = device.COLOR_WHITE.handle;
-        data.foreground = device.COLOR_BLACK.handle;
-        data.font = device.systemFont;
-        data.image = this;
-    }
-    NSGraphicsContext.setCurrentContext(current);
-    return context.id_;
 }
 
 /**  
@@ -927,8 +1000,15 @@
  * @param data the platform specific GC data 
  */
 public void internal_dispose_GC (objc.id context, GCData data) {
-    if (data.bitmapDataAddress !is null) OS.free(data.bitmapDataAddress);
-    data.bitmapDataAddress = null;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        if (data.bitmapDataAddress !is null) OS.free(data.bitmapDataAddress);
+        data.bitmapDataAddress = null;
+//      handle.setCacheMode(OS.NSImageCacheDefault);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
--- a/dwt/graphics/ImageData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/ImageData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/graphics/ImageDataLoader.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/ImageDataLoader.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.ImageDataLoader;
 
--- a/dwt/graphics/ImageLoader.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/ImageLoader.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/graphics/ImageLoaderEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/ImageLoaderEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,11 +9,12 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.ImageLoaderEvent;
 
 
+
 import dwt.internal.DWTEventObject;
 
 import tango.text.convert.Format;
@@ -38,6 +39,7 @@
  * 
  * @see ImageLoader
  * @see ImageLoaderListener
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public class ImageLoaderEvent : DWTEventObject {
--- a/dwt/graphics/ImageLoaderListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/ImageLoaderListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -9,10 +9,11 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.ImageLoaderListener;
 
+
 import dwt.internal.DWTEventListener;
 
 import dwt.graphics.ImageLoaderEvent;
--- a/dwt/graphics/LineAttributes.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/LineAttributes.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.LineAttributes;
 
@@ -28,6 +28,7 @@
  * 
  * @see GC#getLineAttributes()
  * @see GC#setLineAttributes(LineAttributes)
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  *  
  * @since 3.3
  */
--- a/dwt/graphics/PaletteData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/PaletteData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.PaletteData;
 
@@ -56,6 +56,7 @@
  *
  * @see Image
  * @see RGB
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
  
 public final class PaletteData {
--- a/dwt/graphics/Path.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Path.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Path;
 
@@ -18,6 +18,7 @@
 import dwt.DWTError;
 import dwt.DWTException;
 import dwt.internal.cocoa.NSAffineTransform;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSLayoutManager;
 import dwt.internal.cocoa.NSPoint;
@@ -27,6 +28,7 @@
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTextContainer;
 import dwt.internal.cocoa.NSTextStorage;
+import dwt.internal.cocoa.NSThread;
 import dwt.internal.cocoa.OS;
 
 import tango.text.convert.Format;
@@ -56,6 +58,10 @@
  * This class requires the operating system's advanced graphics subsystem
  * which may not be available on some platforms.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#path">Path, Pattern snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: GraphicsExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.1
  */
@@ -99,34 +105,106 @@
  */
 public this (Device device) {
     super(device);
-    handle = NSBezierPath.bezierPath();
-    if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
-    handle.retain();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle = NSBezierPath.bezierPath();
+        if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
+        handle.retain();
     handle.moveToPoint(NSPoint());
     init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
-public this (Device device, Path path, float flatness) {
+/**
+ * Constructs a new Path that is a copy of <code>path</code>. If
+ * <code>flatness</code> is less than or equal to zero, an unflatten
+ * copy of the path is created. Otherwise, it specifies the maximum
+ * error between the path and its flatten copy. Smaller numbers give
+ * better approximation.
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ * 
+ * @param device the device on which to allocate the path
+ * @param path the path to make a copy
+ * @param flatness the flatness value
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device</li>
+ *    <li>ERROR_NULL_ARGUMENT - if the path is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the path has been disposed</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
+ * </ul>
+ * @exception DWTError <ul>
+ *    <li>ERROR_NO_HANDLES if a handle for the path could not be obtained</li>
+ * </ul>
+ * 
+ * @see #dispose()
+ * @since 3.4
+ */
     super(device);
-    if (path is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    if (path.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    flatness = Math.max(0, flatness);
-    if (flatness is 0) {
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        if (path is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
+        if (path.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
+        flatness = Math.max(0, flatness);
+        if (flatness is 0) {
         handle = new NSBezierPath(path.handle.copy().id_);
-    } else {
+        } else {
         CGFloat defaultFlatness = NSBezierPath.defaultFlatness();
-        NSBezierPath.setDefaultFlatness(flatness);
-        handle = path.handle.bezierPathByFlatteningPath();
-        NSBezierPath.setDefaultFlatness(defaultFlatness);       
+            NSBezierPath.setDefaultFlatness(flatness);
+            handle = path.handle.bezierPathByFlatteningPath();
+            NSBezierPath.setDefaultFlatness(defaultFlatness);       
+        }
+        if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
+    init_();
+    } finally {
+        if (pool !is null) pool.release();
     }
-    if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
-    init_();
 }
 
-public this (Device device, PathData data) {
+/**
+ * Constructs a new Path with the specifed PathData.
+ * <p>
+ * This operation requires the operating system's advanced
+ * graphics subsystem which may not be available on some
+ * platforms.
+ * </p>
+ * 
+ * @param device the device on which to allocate the path
+ * @param data the data for the path
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device</li>
+ *    <li>ERROR_NULL_ARGUMENT - if the data is null</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li>
+ * </ul>
+ * @exception DWTError <ul>
+ *    <li>ERROR_NO_HANDLES if a handle for the path could not be obtained</li>
+ * </ul>
+ * 
+ * @see #dispose()
+ * @since 3.4
+ */
     this(device);
-    if (data is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        if (data is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     init_(data);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -160,16 +238,22 @@
  */
 public void addArc(float x, float y, float width, float height, float startAngle, float arcAngle) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSAffineTransform transform = NSAffineTransform.transform();
-    transform.translateXBy(x + width / 2f, y + height / 2f);
-    transform.scaleXBy(width / 2f, height / 2f);
-    NSBezierPath path = NSBezierPath.bezierPath();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSAffineTransform transform = NSAffineTransform.transform();
+        transform.translateXBy(x + width / 2f, y + height / 2f);
+        transform.scaleXBy(width / 2f, height / 2f);
+        NSBezierPath path = NSBezierPath.bezierPath();
     NSPoint center = NSPoint();
     CGFloat sAngle = -startAngle;
     CGFloat eAngle = -(startAngle + arcAngle);
-    path.appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_(center, 1, sAngle,  eAngle, arcAngle>0);
-    path.transformUsingAffineTransform(transform);
-    handle.appendBezierPath(path);
+        path.appendBezierPathWithArcWithCenter(center, 1, sAngle,  eAngle, arcAngle>0);
+        path.transformUsingAffineTransform(transform);
+        handle.appendBezierPath(path);
+    } finally { 
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -189,7 +273,13 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (path is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (path.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    handle.appendBezierPath(path.handle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle.appendBezierPath(path.handle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -211,7 +301,13 @@
     rect.y = y;
     rect.width = width;
     rect.height = height;
-    handle.appendBezierPathWithRect(rect);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle.appendBezierPathWithRect(rect);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -235,42 +331,48 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (font is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (font.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    NSString str = NSString.stringWith(stri);
-    NSTextStorage textStorage = (cast(NSTextStorage)(new NSTextStorage()).alloc());
-    textStorage.initWithString_(str);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        NSString str = NSString.stringWith(stri);
+        NSTextStorage textStorage = (cast(NSTextStorage)(new NSTextStorage()).alloc());
+        textStorage.initWithString(str);
     NSLayoutManager layoutManager = cast(NSLayoutManager)(new NSLayoutManager()).alloc().init();
     NSTextContainer textContainer = cast(NSTextContainer)(new NSTextContainer()).alloc();
     NSSize size = NSSize();
     size.width = CGFloat.max; //Float.MAX_VALUE;
     size.height = CGFloat.max; //Float.MAX_VALUE;
-    textContainer.initWithContainerSize(size);
-    textStorage.addLayoutManager(layoutManager);
-    layoutManager.addTextContainer(textContainer);
+        textContainer.initWithContainerSize(size);
+        textStorage.addLayoutManager(layoutManager);
+        layoutManager.addTextContainer(textContainer);
     NSRange range = NSRange();
-    range.length = str.length();
-    textStorage.beginEditing();
-    textStorage.addAttribute(OS.NSFontAttributeName(), font.handle, range);
-    textStorage.endEditing();
-    range = layoutManager.glyphRangeForTextContainer(textContainer);
-    if (range.length !is 0) {
+        range.length = str.length();
+        textStorage.beginEditing();
+        textStorage.addAttribute(OS.NSFontAttributeName, font.handle, range);
+        textStorage.endEditing();
+        range = layoutManager.glyphRangeForTextContainer(textContainer);
+        if (range.length !is 0) {
         NSGlyph* glyphs = cast(NSGlyph*) OS.malloc(4 * range.length * 2);
-        layoutManager.getGlyphs(glyphs, range);
-        NSBezierPath path = NSBezierPath.bezierPath();
+            layoutManager.getGlyphs(glyphs, range);
+            NSBezierPath path = NSBezierPath.bezierPath();
         NSPoint point = NSPoint();
-        point.x = x;
-        point.y = y;
-        path.moveToPoint(point);
-        path.appendBezierPathWithGlyphs(glyphs, range.length, font.handle);
-        NSAffineTransform transform = NSAffineTransform.transform();
-        transform.scaleXBy(1, -1);
-        transform.translateXBy(0, -((2*y) + textStorage.size().height));
-        path.transformUsingAffineTransform(transform);
-        OS.free(glyphs);
-        handle.appendBezierPath(path);
+            point.x = x;
+            point.y = y;
+            path.moveToPoint(point);
+            path.appendBezierPathWithGlyphs(glyphs, range.length, font.handle);
+            NSAffineTransform transform = NSAffineTransform.transform();
+            transform.scaleXBy(1, -1);
+            transform.translateXBy(0, -((2*y) + textStorage.size().height));
+            path.transformUsingAffineTransform(transform);
+            OS.free(glyphs);
+            handle.appendBezierPath(path);
+        }
+        textContainer.release();
+        layoutManager.release();
+        textStorage.release();
+    } finally  {
+        if (pool !is null) pool.release();
     }
-    textContainer.release();
-    layoutManager.release();
-    textStorage.release();
 }
 
 /**
@@ -284,7 +386,13 @@
  */
 public void close() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    handle.closePath();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle.closePath();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -314,12 +422,18 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (gc is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (gc.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-//  gc.checkGC(GC.LINE_CAP | GC.LINE_JOIN | GC.LINE_STYLE | GC.LINE_WIDTH);
-    //TODO outline
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        //  gc.checkGC(GC.LINE_CAP | GC.LINE_JOIN | GC.LINE_STYLE | GC.LINE_WIDTH);
+        //TODO outline
     NSPoint point = NSPoint();
-    point.x = x;
-    point.y = y;
-    return handle.containsPoint(point);
+        point.x = x;
+        point.y = y;
+        return handle.containsPoint(point);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -338,16 +452,22 @@
  */
 public void cubicTo(float cx1, float cy1, float cx2, float cy2, float x, float y) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSPoint pt = NSPoint();
-    pt.x = x;
-    pt.y = y;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSPoint pt = NSPoint();
+        pt.x = x;
+        pt.y = y;
     NSPoint ct1 = NSPoint();
-    ct1.x = cx1;
-    ct1.y = cy1;
+        ct1.x = cx1;
+        ct1.y = cy1;
     NSPoint ct2 = NSPoint();
-    ct2.x = cx2;
-    ct2.y = cy2;
-    handle.curveToPoint(pt, ct1, ct2);
+        ct2.x = cx2;
+        ct2.y = cy2;
+        handle.curveToPoint(pt, ct1, ct2);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 void destroy() {
@@ -374,11 +494,17 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (bounds is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (bounds.length < 4) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    NSRect rect = handle.controlPointBounds();
-    bounds[0] = rect.x;
-    bounds[1] = rect.y;
-    bounds[2] = rect.width;
-    bounds[3] = rect.height;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSRect rect = handle.controlPointBounds();
+        bounds[0] = (float)/*64*/rect.x;
+        bounds[1] = (float)/*64*/rect.y;
+        bounds[2] = (float)/*64*/rect.width;
+        bounds[3] = (float)/*64*/rect.height;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -399,9 +525,15 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (point is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (point.length < 2) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    NSPoint pt = handle.currentPoint();
-    point[0] = pt.x;
-    point[1] = pt.y;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSPoint pt = handle.currentPoint();
+        point[0] = (float)/*64*/pt.x;
+        point[1] = (float)/*64*/pt.y;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -417,30 +549,33 @@
  */
 public PathData getPathData() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    int count = handle.elementCount();
-    int pointCount = 0, typeCount = 0;
-    byte[] types = new byte[count];
-    float[] pointArray = new float[count * 6];
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        int count = (int)/*64*/handle.elementCount();
+        int pointCount = 0, typeCount = 0;
+        byte[] types = new byte[count];
+        float[] pointArray = new float[count * 6];
     NSPointArray points = cast(NSPointArray) OS.malloc(3 * NSPoint.sizeof);
     if (points is null) DWT.error(DWT.ERROR_NO_HANDLES);
     NSPoint pt = NSPoint();
     for (NSInteger i = 0; i < count; i++) {
-        NSBezierPathElement  element = handle.elementAtIndex_associatedPoints_(i, points);
-        switch (element) {
+        NSBezierPathElement element = handle.elementAtIndex(i, points);
+            switch (element) {
             case NSMoveToBezierPathElement:
-                types[typeCount++] = DWT.PATH_MOVE_TO;
+                    types[typeCount++] = DWT.PATH_MOVE_TO;
                 OS.memmove(&pt, points, NSPoint.sizeof);
                 pointArray[pointCount++] = cast(int)pt.x;
                 pointArray[pointCount++] = cast(int)pt.y;
-                break;
+                    break;
             case NSLineToBezierPathElement:
-                types[typeCount++] = DWT.PATH_LINE_TO;
+                    types[typeCount++] = DWT.PATH_LINE_TO;
                 OS.memmove(&pt, points, NSPoint.sizeof);
                 pointArray[pointCount++] = cast(int)pt.x;
                 pointArray[pointCount++] = cast(int)pt.y;
-                break;
+                    break;
             case NSCurveToBezierPathElement:
-                types[typeCount++] = DWT.PATH_CUBIC_TO;
+                    types[typeCount++] = DWT.PATH_CUBIC_TO;
                 OS.memmove(&pt, points, NSPoint.sizeof);
                 pointArray[pointCount++] = cast(int)pt.x;
                 pointArray[pointCount++] = cast(int)pt.y;
@@ -450,22 +585,25 @@
                 OS.memmove(&pt, points + NSPoint.sizeof + NSPoint.sizeof, NSPoint.sizeof);
                 pointArray[pointCount++] = cast(int)pt.x;
                 pointArray[pointCount++] = cast(int)pt.y;
-                break;
+                    break;
             case NSClosePathBezierPathElement:
-                types[typeCount++] = DWT.PATH_CLOSE;
-                break;
+                    types[typeCount++] = DWT.PATH_CLOSE;
+                    break;
+            }
         }
+        OS.free(points);
+        if (pointCount !is pointArray.length) {
+            float[] temp = new float[pointCount];
+            System.arraycopy(pointArray, 0, temp, 0, pointCount);
+            pointArray = temp;
+        }
+        PathData data = new PathData();
+        data.types = types;
+        data.points = pointArray;
+        return data;
+    } finally {
+        if (pool !is null)  pool.release();
     }
-    OS.free(points);
-    if (pointCount !is pointArray.length) {
-        float[] temp = new float[pointCount];
-        System.arraycopy(pointArray, 0, temp, 0, pointCount);
-        pointArray = temp;
-    }
-    PathData data = new PathData();
-    data.types = types;
-    data.points = pointArray;
-    return data;
 }
 
 void init_(PathData data) {
@@ -522,10 +660,16 @@
  */
 public void lineTo(float x, float y) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSPoint pt = NSPoint();
-    pt.x = x;
-    pt.y = y;
-    handle.lineToPoint(pt);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSPoint pt = NSPoint();
+        pt.x = x;
+        pt.y = y;
+        handle.lineToPoint(pt);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -542,11 +686,16 @@
  */
 public void moveTo(float x, float y) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSPoint pt = NSPoint();
-    pt.x = x;
-    pt.y = y;
-    handle.moveToPoint(pt);
-
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        NSPoint pt = NSPoint();
+        pt.x = x;
+        pt.y = y;
+        handle.moveToPoint(pt);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -563,13 +712,19 @@
  */
 public void quadTo(float cx, float cy, float x, float y) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSPoint pt = NSPoint();
-    pt.x = x;
-    pt.y = y;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        NSPoint pt = NSPoint();
+        pt.x = x;
+        pt.y = y;
     NSPoint ct = NSPoint();
-    ct.x = cx;
-    ct.y = cy;
-    handle.curveToPoint(pt, ct, ct);
+        ct.x = cx;
+        ct.y = cy;
+        handle.curveToPoint(pt, ct, ct);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
--- a/dwt/graphics/PathData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/PathData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.PathData;
 
@@ -18,6 +18,7 @@
  * Instances of this class describe device-independent paths.
  *
  * @see Path
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.1
  */
--- a/dwt/graphics/Pattern.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Pattern.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Pattern;
 
@@ -18,9 +18,11 @@
 import dwt.DWT;
 import dwt.DWTError;
 import dwt.DWTException;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSGradient;
 import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSThread;
 
 import tango.text.convert.Format;
 
@@ -44,6 +46,10 @@
  * which may not be available on some platforms.
  * </p>
  * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#path">Path, Pattern snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: GraphicsExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.1
  */
 public class Pattern : Resource {
@@ -85,10 +91,16 @@
     super(device);
     if (image is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (image.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    this.image = image;
-    color = NSColor.colorWithPatternImage(image.handle);
-    color.retain();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        this.image = image;
+        color = NSColor.colorWithPatternImage(image.handle);
+        color.retain();
     init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -168,20 +180,26 @@
     if (color1.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (color2 is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (color2.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    pt1 = NSPoint();
-    pt2 = NSPoint();
-    pt1.x = x1;
-    pt1.y = y1;
-    pt2.x = x2;
-    pt2.y = y2;
-    this.color1 = color1.handle;
-    this.color2 = color2.handle;
-    this.alpha1 = alpha1;
-    this.alpha2 = alpha2;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        pt1 = NSPoint();
+        pt2 = NSPoint();
+        pt1.x = x1;
+        pt1.y = y1;
+        pt2.x = x2;
+        pt2.y = y2;
+        this.color1 = color1.handle;
+        this.color2 = color2.handle;
+        this.alpha1 = alpha1;
+        this.alpha2 = alpha2;
     NSColor start = NSColor.colorWithDeviceRed(cast(CGFloat) color1.handle[0], cast(CGFloat) color1.handle[1], cast(CGFloat) color1.handle[2], cast(CGFloat) (alpha1 / 255f));
     NSColor end = NSColor.colorWithDeviceRed(cast(CGFloat) color2.handle[0], cast(CGFloat) color2.handle[1], cast(CGFloat) color2.handle[2], cast(CGFloat) (alpha2 / 255f));
     gradient = (cast(NSGradient)(new NSGradient()).alloc()).initWithStartingColor(start, end);
     init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 void destroy() {
--- a/dwt/graphics/Point.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Point.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Point;
 
@@ -41,6 +41,7 @@
  * </p>
  *
  * @see Rectangle
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public final class Point : SerializableCompatibility {
--- a/dwt/graphics/RGB.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/RGB.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.RGB;
 
@@ -41,6 +41,8 @@
  * </p>
  *
  * @see Color
+ * @see <a href="http://www.eclipse.org/swt/snippets/#color">Color and RGB snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public final class RGB : SerializableCompatibility {
--- a/dwt/graphics/Rectangle.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Rectangle.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,10 +9,11 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Rectangle;
 
+
 import dwt.DWT;
 import dwt.internal.SerializableCompatibility;
 
@@ -45,6 +46,7 @@
  * </p>
  *
  * @see Point
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public final class Rectangle : SerializableCompatibility {
@@ -126,7 +128,7 @@
  * @return <code>true</code> if the rectangle contains the point and <code>false</code> otherwise
  */
 public bool contains (int x, int y) {
-    return (x >= this.x) && (y >= this.y) && ((x - this.x) < width) && ((y - this.y) < height);
+    return (x >= this.x) && (y >= this.y) && x < (this.x + width) && y < (this.y + height);
 }
 
 /**
--- a/dwt/graphics/Region.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Region.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Region;
 
@@ -17,10 +17,13 @@
 import dwt.DWT;
 import dwt.DWTError;
 import dwt.DWTException;
+import dwt.internal.C;
 import dwt.internal.cocoa.NSAffineTransform;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSThread;
 import dwt.internal.cocoa.OS;
 
 import tango.text.convert.Format;
@@ -43,6 +46,9 @@
  * method to release the operating system resources managed by each instance
  * when those instances are no longer required.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: GraphicsExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class Region : Resource {
 
@@ -92,9 +98,15 @@
  */
 public this(Device device) {
     super(device);
-    handle = OS.NewRgn();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle = OS.NewRgn();
     if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
     init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 this(Device device, QuickdrawTypes.RgnHandle handle) {
@@ -102,6 +114,78 @@
     this.handle = handle;
 }
 
+public static Region cocoa_new(Device device, int handle) {
+    return new Region(device, handle);
+}
+
+static int /*long*/ polyToRgn(int[] poly, int length) {
+    short[] r = new short[4];
+    int /*long*/ polyRgn = OS.NewRgn(), rectRgn = OS.NewRgn();
+    int minY = poly[1], maxY = poly[1];
+    for (int y = 3; y < length; y += 2) {
+        if (poly[y] < minY) minY = poly[y];
+        if (poly[y] > maxY) maxY = poly[y];
+    }
+    int[] inter = new int[length + 1];
+    for (int y = minY; y <= maxY; y++) {
+        int count = 0;
+        int x1 = poly[0], y1 = poly[1];
+        for (int p = 2; p < length; p += 2) {
+            int x2 = poly[p], y2 = poly[p + 1];
+            if (y1 !is y2 && ((y1 <= y && y < y2) || (y2 <= y && y < y1))) {
+                inter[count++] = (int)((((y - y1) / (float)(y2 - y1)) * (x2 - x1)) + x1 + 0.5f);
+            }
+            x1 = x2;
+            y1 = y2;
+        }
+        int x2 = poly[0], y2 = poly[1];         
+        if (y1 !is y2 && ((y1 <= y && y < y2) || (y2 <= y && y < y1))) {
+            inter[count++] = (int)((((y - y1) / (float)(y2 - y1)) * (x2 - x1)) + x1 + 0.5f);
+        }
+        for (int gap=count/2; gap>0; gap/=2) {
+            for (int i=gap; i<count; i++) {
+                for (int j=i-gap; j>=0; j-=gap) {
+                    if ((inter[j] - inter[j + gap]) <= 0)
+                        break;
+                    int temp = inter[j];
+                    inter[j] = inter[j + gap];
+                    inter[j + gap] = temp;
+                }
+            }
+        }
+        for (int i = 0; i < count; i += 2) {
+            OS.SetRect(r, (short)inter[i], (short)y, (short)(inter[i + 1]),(short)(y + 1));
+            OS.RectRgn(rectRgn, r);
+            OS.UnionRgn(polyRgn, rectRgn, polyRgn);
+        }
+    }
+    OS.DisposeRgn(rectRgn);
+    return polyRgn;
+}
+
+static int /*long*/ polyRgn(int[] pointArray, int count) {
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        int /*long*/ polyRgn;
+        if (C.PTR_SIZEOF is 4) {
+            polyRgn = OS.NewRgn();
+            OS.OpenRgn();
+            OS.MoveTo((short)pointArray[0], (short)pointArray[1]);
+            for (int i = 1; i < count / 2; i++) {
+                OS.LineTo((short)pointArray[2 * i], (short)pointArray[2 * i + 1]);
+            }
+            OS.LineTo((short)pointArray[0], (short)pointArray[1]);
+            OS.CloseRgn(polyRgn);
+        } else {
+            polyRgn = polyToRgn(pointArray, count);
+        }
+        return polyRgn;
+    } finally {
+        if (pool !is null) pool.release();
+    }
+}
+
 /**
  * Adds the given polygon to the collection of polygons
  * the receiver maintains to describe its area.
@@ -121,21 +205,26 @@
 public void add (int[] pointArray) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    add(pointArray, pointArray.length);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        add(pointArray, pointArray.length);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
     
 void add(int[] pointArray, int count) {
     if (count <= 2) return;
-    QuickdrawTypes.RgnHandle polyRgn = OS.NewRgn();
-    OS.OpenRgn();
-    OS.MoveTo(cast(short)pointArray[0], cast(short)pointArray[1]);
-    for (int i = 1; i < count / 2; i++) {
-        OS.LineTo(cast(short)pointArray[2 * i], cast(short)pointArray[2 * i + 1]);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        int /*long*/ polyRgn = polyRgn(pointArray, count);
+        OS.UnionRgn(handle, polyRgn, handle);
+        OS.DisposeRgn(polyRgn);
+    } finally {
+        if (pool !is null) pool.release();
     }
-    OS.LineTo(cast(short)pointArray[0], cast(short)pointArray[1]);
-    OS.CloseRgn(polyRgn);
-    OS.UnionRgn(handle, polyRgn, handle);
-    OS.DisposeRgn(polyRgn);
 }
 
 /**
@@ -156,7 +245,13 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (rect is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (rect.width < 0 || rect.height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    add (rect.x, rect.y, rect.width, rect.height);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        add (rect.x, rect.y, rect.width, rect.height);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -180,12 +275,18 @@
 public void add(int x, int y, int width, int height) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (width < 0 || height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
-    Rect r;
-    OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
-    OS.RectRgn(rectRgn, &r);
-    OS.UnionRgn(handle, rectRgn, handle);
-    OS.DisposeRgn(rectRgn);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
+        Rect r;
+        OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
+        OS.RectRgn(rectRgn, &r);
+        OS.UnionRgn(handle, rectRgn, handle);
+        OS.DisposeRgn(rectRgn);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -207,7 +308,13 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (region is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (region.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    OS.UnionRgn(handle, region.handle, handle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        OS.UnionRgn(handle, region.handle, handle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -225,8 +332,14 @@
  */
 public bool contains(int x, int y) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    QuickdrawTypes.Point point = {cast(short)x, cast(short)y};
-    return OS.PtInRgn(point, handle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        QuickdrawTypes.Point point = {cast(short)x, cast(short)y};
+        return OS.PtInRgn(point, handle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -264,29 +377,30 @@
     if (message is OS.kQDRegionToRectsMsgParse) {
         Rect rect;
         OS.memmove(&rect, r, rect.sizeof);
-        NSPoint point = NSPoint(); 
-        QuickdrawTypes.RgnHandle polyRgn = OS.NewRgn();
-        OS.OpenRgn();
+        int i = 0;
+        NSPoint point = NSPoint();
+        int[] points = new int[10];
         point.x = rect.left;
         point.y = rect.top;
         point = transform.transformPoint(point);
         short startX, startY;
-        OS.MoveTo(startX = cast(short)point.x, startY = cast(short)point.y);
-        point.x = rect.right;
+        points[i++] = startX = (short)point.x;
+        points[i++] = startY = (short)point.y;
         point.y = rect.top;
         point = transform.transformPoint(point);
-        OS.LineTo(cast(short)Math.round(point.x), cast(short)point.y);
-        point.x = rect.right;
+        points[i++] = (short)Math.round(point.x);
+        points[i++] = (short)point.y;
         point.y = rect.bottom;
         point = transform.transformPoint(point);
-        OS.LineTo(cast(short)Math.round(point.x), cast(short)Math.round(point.y));
-        point.x = rect.left;
+        points[i++] = (short)Math.round(point.x);
+        points[i++] = (short)Math.round(point.y);
         point.y = rect.bottom;
         point = transform.transformPoint(point);
-        OS.LineTo(cast(short)point.x, cast(short)Math.round(point.y));
-        OS.LineTo(startX, startY);
-        OS.CloseRgn(polyRgn);
-        OS.UnionRgn(cast(QuickdrawTypes.RgnHandle) newRgn, polyRgn, cast(QuickdrawTypes.RgnHandle) newRgn);
+        points[i++] = (short)point.x;
+        points[i++] = (short)Math.round(point.y);
+        points[i++] = startX;
+        points[i++] = startY;
+        int /*long*/ polyRgn = polyRgn(points, points.length);
         OS.DisposeRgn(polyRgn);
     }
     return null;
@@ -331,11 +445,18 @@
  */
 public Rectangle getBounds() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
+    NSAutoreleasePool pool = null;
     Rect bounds;
+
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
     OS.GetRegionBounds(handle, &bounds);
     int width = bounds.right - bounds.left;
     int height = bounds.bottom - bounds.left;
     return new Rectangle(bounds.left, bounds.top, width, height);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 NSBezierPath getPath() {
@@ -348,28 +469,24 @@
 
 static NSPoint pt = NSPoint();
 static Rect rect;
-extern(C) private static OSStatus* regionToRects(ushort message, QuickdrawTypes.RgnHandle rgn, Rect* r, void* path) {
+extern(C) private static OSStatus* regionToRects(ushort message, QuickdrawTypes.RgnHandle rgn, Rect* r, objc.id path) {
     if (message is OS.kQDRegionToRectsMsgParse) {
         OS.memmove(&rect, r, rect.sizeof);
         pt.x = rect.left;
         pt.y = rect.top;
-        OS.objc_msgSend(cast(objc.id) path, OS.sel_moveToPoint_1, pt);
+        OS.objc_msgSend(path, OS.sel_moveToPoint_, pt);
         pt.x = rect.right;
-        OS.objc_msgSend(cast(objc.id) path, OS.sel_lineToPoint_1, pt);
+        OS.objc_msgSend(path, OS.sel_lineToPoint_, pt);
         pt.x = rect.right;
         pt.y = rect.bottom;
-        OS.objc_msgSend(cast(objc.id) path, OS.sel_lineToPoint_1, pt);
+        OS.objc_msgSend(path, OS.sel_lineToPoint_, pt);
         pt.x = rect.left;
-        OS.objc_msgSend(cast(objc.id) path, OS.sel_lineToPoint_1, pt);
-        OS.objc_msgSend(cast(objc.id) path, OS.sel_closePath);
+        OS.objc_msgSend(path, OS.sel_lineToPoint_, pt);
+        OS.objc_msgSend(path, OS.sel_closePath);
     }
     return null;
 }
 
-public static Region carbon_new(Device device, QuickdrawTypes.RgnHandle handle) {
-    return new Region(device, handle);
-}
-
 /**
  * Returns an integer hash code for the receiver. Any two 
  * objects that return <code>true</code> when passed to 
@@ -429,12 +546,18 @@
 public void intersect(int x, int y, int width, int height) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (width < 0 || height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
-    Rect r;
-    OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
-    OS.RectRgn(rectRgn, &r);
-    OS.SectRgn(handle, rectRgn, handle);
-    OS.DisposeRgn(rectRgn);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
+        Rect r;
+        OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
+        OS.RectRgn(rectRgn, &r);
+        OS.SectRgn(handle, rectRgn, handle);
+        OS.DisposeRgn(rectRgn);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -458,7 +581,13 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (region is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (region.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    OS.SectRgn(handle, region.handle, handle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        OS.SectRgn(handle, region.handle, handle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -480,9 +609,15 @@
  */
 public bool intersects (int x, int y, int width, int height) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    Rect r;
-    OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
-    return OS.RectInRgn(&rect, handle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        Rect r;
+        OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
+        return OS.RectInRgn(&rect, handle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -534,7 +669,13 @@
  */
 public bool isEmpty() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    return OS.EmptyRgn(handle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        return OS.EmptyRgn(handle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -556,16 +697,15 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (pointArray.length < 2) return;
-    QuickdrawTypes.RgnHandle polyRgn = OS.NewRgn();
-    OS.OpenRgn();
-    OS.MoveTo(cast(short)pointArray[0], cast(short)pointArray[1]);
-    for (int i = 1; i < pointArray.length / 2; i++) {
-        OS.LineTo(cast(short)pointArray[2 * i], cast(short)pointArray[2 * i + 1]);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        int /*long*/ polyRgn = polyRgn(pointArray, pointArray.length);
+        OS.DiffRgn(handle, polyRgn, handle);
+        OS.DisposeRgn(polyRgn);
+    } finally {
+        if (pool !is null) pool.release();
     }
-    OS.LineTo(cast(short)pointArray[0], cast(short)pointArray[1]);
-    OS.CloseRgn(polyRgn);
-    OS.DiffRgn(handle, polyRgn, handle);
-    OS.DisposeRgn(polyRgn);
 }
 
 /**
@@ -611,12 +751,18 @@
 public void subtract(int x, int y, int width, int height) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (width < 0 || height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
-    Rect r;
-    OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
-    OS.RectRgn(rectRgn, &r);
-    OS.DiffRgn(handle, rectRgn, handle);
-    OS.DisposeRgn(rectRgn);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        int /*long*/ rectRgn = OS.NewRgn();
+        Rect r;
+        OS.SetRect(&r, cast(short)x, cast(short)y, cast(short)(x + width),cast(short)(y + height));
+        OS.RectRgn(rectRgn, &r);
+        OS.DiffRgn(handle, rectRgn, handle);
+        OS.DisposeRgn(rectRgn);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -640,7 +786,13 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (region is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (region.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    OS.DiffRgn(handle, region.handle, handle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        OS.DiffRgn(handle, region.handle, handle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -658,7 +810,13 @@
  */
 public void translate (int x, int y) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    OS.OffsetRgn (handle, cast(short)x, cast(short)y);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        OS.OffsetRgn (handle, cast(short)x, cast(short)y);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -679,7 +837,13 @@
 public void translate (Point pt) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pt is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    translate (pt.x, pt.y);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        translate (pt.x, pt.y);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
--- a/dwt/graphics/Resource.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Resource.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Resource;
 
@@ -37,6 +37,7 @@
  *
  * @see #dispose
  * @see #isDisposed
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.1
  */
@@ -47,7 +48,7 @@
      */
     Device device;
 
-this() {
+public this() {
 }
 
 this(Device device) {
--- a/dwt/graphics/TextLayout.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/TextLayout.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,12 +9,16 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.TextLayout;
 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.internal.Compatibility;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSAutoreleasePool;
+import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSLayoutManager;
@@ -27,6 +31,8 @@
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTextContainer;
 import dwt.internal.cocoa.NSTextStorage;
+import dwt.internal.cocoa.NSTextTab;
+import dwt.internal.cocoa.NSThread;
 import dwt.internal.cocoa.OS;
 
 import tango.text.convert.Format;
@@ -61,7 +67,11 @@
  * when those instances are no longer required.
  * </p>
  * 
- *  @since 3.0
+ * @see <a href="http://www.eclipse.org/swt/snippets/#textlayout">TextLayout, TextStyle snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: CustomControlExample, StyledText tab</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
+ * @since 3.0
  */
 public final class TextLayout : Resource {
 
@@ -83,6 +93,8 @@
     
     int[] lineOffsets;
     NSRect[] lineBounds;
+    
+    static final int UNDERLINE_THICK = 1 << 16;
 
     static class StyleItem {
         TextStyle style;
@@ -130,11 +142,34 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
 }
 
+float[] computePolyline(int left, int top, int right, int bottom) {
+    int height = bottom - top; // can be any number
+    int width = 2 * height; // must be even
+    int peaks = Compatibility.ceil(right - left, width);
+    if (peaks is 0 && right - left > 2) {
+        peaks = 1;
+    }
+    int length = ((2 * peaks) + 1) * 2;
+    if (length < 0) return new float[0];
+    
+    float[] coordinates = new float[length];
+    for (int i = 0; i < peaks; i++) {
+        int index = 4 * i;
+        coordinates[index] = left + (width * i);
+        coordinates[index+1] = bottom;
+        coordinates[index+2] = coordinates[index] + width / 2;
+        coordinates[index+3] = top;
+    }
+    coordinates[length-2] = left + (width * peaks);
+    coordinates[length-1] = bottom;
+    return coordinates;
+}
+
 void computeRuns() {
     if (textStorage !is null) return;
     NSString str = NSString.stringWith(text);
     textStorage = (cast(NSTextStorage)(new NSTextStorage()).alloc());
-    textStorage.initWithString_(str);
+    textStorage.initWithString(str);
     layoutManager = cast(NSLayoutManager)(new NSLayoutManager()).alloc().init();
     textContainer = cast(NSTextContainer)(new NSTextContainer()).alloc();
     NSSize size = NSSize();
@@ -148,7 +183,7 @@
     Font defaultFont = font !is null ? font : device.systemFont;
     NSRange range = NSRange();
     range.length = str.length();
-    textStorage.addAttribute(OS.NSFontAttributeName(), defaultFont.handle, range);
+    textStorage.addAttribute(OS.NSFontAttributeName, defaultFont.handle, range);
     
     NSMutableParagraphStyle paragraph = cast(NSMutableParagraphStyle)(new NSMutableParagraphStyle()).alloc().init();
     NSTextAlignment align_ = NSLeftTextAlignment;
@@ -166,13 +201,27 @@
     paragraph.setAlignment(align_);
     paragraph.setLineSpacing(spacing);
     paragraph.setFirstLineHeadIndent(indent);
+    paragraph.setLineBreakMode(wrapWidth !is -1 ? OS.NSLineBreakByWordWrapping : OS.NSLineBreakByClipping);
+    paragraph.setTabStops(NSArray.array());
+    if (tabs !is null) {
+        int count = tabs.length;
+        for (int i = 0, pos = 0; i < count; i++) {
+            pos += tabs[i];
+            NSTextTab tab = (NSTextTab)new NSTextTab().alloc();
+            tab = tab.initWithType(OS.NSLeftTabStopType, pos);
+            paragraph.addTabStop(tab);
+            tab.release();
+        }
+        int width = count - 2 >= 0 ? tabs[count - 1] - tabs[count - 2] : tabs[count - 1];
+        paragraph.setDefaultTabInterval(width);
+    }
     
-    //TODO tabs ascend descent wrap
+    //TODO ascend descent wrap
     
-    textStorage.addAttribute(OS.NSParagraphStyleAttributeName(), paragraph, range);
+    textStorage.addAttribute(OS.NSParagraphStyleAttributeName, paragraph, range);
     paragraph.release();
     
-    int textLength = str.length();
+    int /*long*/ textLength = str.length();
     for (int i = 0; i < styles.length - 1; i++) {
         StyleItem run = styles[i];
         if (run.style is null) continue;
@@ -181,12 +230,12 @@
         range.length = translateOffset(styles[i + 1].start) - range.location;
         Font font = style.font;
         if (font !is null) {
-            textStorage.addAttribute(OS.NSFontAttributeName(), font.handle, range);
+            textStorage.addAttribute(OS.NSFontAttributeName, font.handle, range);
         }
         Color foreground = style.foreground;
         if (foreground !is null) {
             NSColor color = NSColor.colorWithDeviceRed(foreground.handle[0], foreground.handle[1], foreground.handle[2], 1);
-            textStorage.addAttribute(OS.NSForegroundColorAttributeName(), color, range);
+            textStorage.addAttribute(OS.NSForegroundColorAttributeName, color, range);
         }
         Color background = style.background;
         if (background !is null) {
@@ -194,15 +243,14 @@
             textStorage.addAttribute(OS.NSBackgroundColorAttributeName, color, range);
         }
         if (style.strikeout) {
-            textStorage.addAttribute(OS.NSStrikethroughStyleAttributeName(), NSNumber.numberWithInt(OS.NSUnderlineStyleSingle), range);
+            textStorage.addAttribute(OS.NSStrikethroughStyleAttributeName, NSNumber.numberWithInt(OS.NSUnderlineStyleSingle), range);
             Color strikeColor = style.strikeoutColor;
             if (strikeColor !is null) {
                 NSColor color = NSColor.colorWithDeviceRed(strikeColor.handle[0], strikeColor.handle[1], strikeColor.handle[2], 1);
-                textStorage.addAttribute(OS.NSStrikethroughColorAttributeName(), color, range);
+                textStorage.addAttribute(OS.NSStrikethroughColorAttributeName, color, range);
             }
         }
         if (style.underline) {
-            //TODO - IME - thick
             int underlineStyle = 0;
             switch (style.underlineStyle) {
                 case DWT.UNDERLINE_SINGLE:
@@ -211,18 +259,21 @@
                 case DWT.UNDERLINE_DOUBLE:
                     underlineStyle = OS.NSUnderlineStyleDouble;
                     break;
+                case UNDERLINE_THICK:
+                    underlineStyle = OS.NSUnderlineStyleThick;
+                    break;
             }
             if (underlineStyle !is 0) {
-                textStorage.addAttribute(OS.NSUnderlineStyleAttributeName(), NSNumber.numberWithInt(underlineStyle), range);
+                textStorage.addAttribute(OS.NSUnderlineStyleAttributeName, NSNumber.numberWithInt(underlineStyle), range);
                 Color underlineColor = style.underlineColor;
                 if (underlineColor !is null) {
                     NSColor color = NSColor.colorWithDeviceRed(underlineColor.handle[0], underlineColor.handle[1], underlineColor.handle[2], 1);
-                    textStorage.addAttribute(OS.NSUnderlineColorAttributeName(), color, range);
+                    textStorage.addAttribute(OS.NSUnderlineColorAttributeName, color, range);
                 }
             }
         }
         if (style.rise !is 0) {
-            textStorage.addAttribute(OS.NSBaselineOffsetAttributeName(), NSNumber.numberWithInt(style.rise), range);
+            textStorage.addAttribute(OS.NSBaselineOffsetAttributeName, NSNumber.numberWithInt(style.rise), range);
         }
         if (style.metrics !is null) {
             //TODO
@@ -233,11 +284,11 @@
     textContainer.setLineFragmentPadding(0);    
     layoutManager.glyphRangeForTextContainer(textContainer);
     
-    int numberOfLines, index, numberOfGlyphs = layoutManager.numberOfGlyphs();
+    int numberOfLines;
+    NSUInteger numberOfGlyphs = layoutManager.numberOfGlyphs(), index;
     NSRangePointer rangePtr = cast(NSRangePointer) OS.malloc(NSRange.sizeof);
-    NSRange lineRange = NSRange();
     for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){
-        layoutManager.lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_(index, rangePtr, true);
+        layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
         OS.memmove(&lineRange, rangePtr, NSRange.sizeof);
         index = lineRange.location + lineRange.length;
     }
@@ -245,9 +296,10 @@
     int[] offsets = new int[numberOfLines + 1];
     NSRect[] bounds = new NSRect[numberOfLines];
     for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){
-        bounds[numberOfLines] = layoutManager.lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_(index, rangePtr, true);
+        bounds[numberOfLines] = layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
+        if (numberOfLines < bounds.length - 1) bounds[numberOfLines].height -= spacing;
         OS.memmove(&lineRange, rangePtr, NSRange.sizeof);
-        offsets[numberOfLines] = lineRange.location;
+        offsets[numberOfLines] = (int)/*64*/lineRange.location;
         index = lineRange.location + lineRange.length;
     }
     if (numberOfLines is 0) {
@@ -257,7 +309,7 @@
         bounds[0].height = Math.max(layoutManager.defaultLineHeightForFont(nsFont), ascent + descent);
     }
     OS.free(rangePtr);
-    offsets[numberOfLines] = textStorage.length();
+    offsets[numberOfLines] = (int)/*64*/textStorage.length();
     this.lineOffsets = offsets;
     this.lineBounds = bounds;
 }
@@ -345,32 +397,181 @@
     if (gc.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (selectionForeground !is null && selectionForeground.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (selectionBackground !is null && selectionBackground.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    gc.checkGC(GC.CLIPPING | GC.TRANSFORM | GC.FOREGROUND);
-//  float[] foreground = gc.data.foreground;
-//  NSColor color = NSColor.colorWithDeviceRed(foreground[0], foreground[1], foreground[2], foreground[3]);
-//  textStorage.setForegroundColor(color);
-    NSPoint pt = NSPoint();
-    pt.x = x;
-    pt.y = y;
-    NSRange range = NSRange();
-    range.length = layoutManager.numberOfGlyphs();
-    bool hasSelection = selectionStart <= selectionEnd && selectionStart !is -1 && selectionEnd !is -1;
+    int length = translateOffset(text.length());
+    if (length is 0 && flags is 0) return;
+    NSAutoreleasePool pool = gc.checkGC(GC.CLIPPING | GC.TRANSFORM | GC.FOREGROUND);
+    try {
+        gc.handle.saveGraphicsState();
+        float[] fg = gc.data.foreground;
+        NSColor foreground = NSColor.colorWithDeviceRed(fg[0], fg[1], fg[2], fg[3]);
+        NSPoint pt = NSPoint();
+        pt.x = x;
+        pt.y = y;
+        bool hasSelection = selectionStart <= selectionEnd && selectionStart !is -1 && selectionEnd !is -1;
     NSRange* selectionRange = null;
-    if (hasSelection) {
-        selectionRange = new NSRange();
-        selectionRange.location = selectionStart;
-        selectionRange.length = selectionEnd - selectionStart + 1;
-        if (selectionBackground is null) selectionBackground = device.getSystemColor(DWT.COLOR_LIST_SELECTION);
-        NSColor selectionColor = NSColor.colorWithDeviceRed(selectionBackground.handle[0], selectionBackground.handle[1], selectionBackground.handle[2], selectionBackground.handle[3]);
+        NSColor selectionColor = null;
+        if (hasSelection || (flags & DWT.LAST_LINE_SELECTION) !is 0) {
+            if (selectionBackground is null) selectionBackground = device.getSystemColor(DWT.COLOR_LIST_SELECTION);
+            selectionColor = NSColor.colorWithDeviceRed(selectionBackground.handle[0], selectionBackground.handle[1], selectionBackground.handle[2], selectionBackground.handle[3]);
+        }
+        if (hasSelection) {
+            selectionRange = new NSRange();
+            selectionRange.location = selectionStart;
+            selectionRange.length = selectionEnd - selectionStart + 1;
         layoutManager.addTemporaryAttribute(OS.NSBackgroundColorAttributeName, selectionColor, *selectionRange);
-    }
-    //TODO draw selection for flags (LAST_LINE_SELECTION and FULL_SELECTION)
-    if (range.length > 0) {
-        layoutManager.drawBackgroundForGlyphRange(range, pt);
-        layoutManager.drawGlyphsForGlyphRange(range, pt);
-    }
-    if (selectionRange !is null) {
+        }
+        //TODO draw selection for flags (DELIMITER_SELECTION)
+        int numberOfGlyphs = layoutManager.numberOfGlyphs();
+        if (numberOfGlyphs > 0) {
+            NSRange range = new NSRange();
+            for (int i = 0; i < styles.length - 1; i++) {
+                StyleItem run = styles[i];
+                if (run.style !is null && run.style.foreground !is null) continue;
+                range.location = length !is 0 ? translateOffset(run.start) : 0;
+                range.length = translateOffset(styles[i + 1].start) - range.location;
+                layoutManager.addTemporaryAttribute(OS.NSForegroundColorAttributeName, foreground, range);
+            }
+            range.location = 0;
+            range.length = numberOfGlyphs;
+            layoutManager.drawBackgroundForGlyphRange(range, pt);
+            layoutManager.drawGlyphsForGlyphRange(range, pt);
+            range.length = length;
+            layoutManager.removeTemporaryAttribute(OS.NSForegroundColorAttributeName, range);
+            NSPoint point = new NSPoint();
+            for (int j = 0; j < styles.length; j++) {
+                StyleItem run = styles[j];
+                TextStyle style = run.style;
+                if (style is null) continue;
+                bool drawUnderline = style.underline && style.underlineStyle !is DWT.UNDERLINE_SINGLE && style.underlineStyle !is DWT.UNDERLINE_DOUBLE;
+                drawUnderline = drawUnderline && (j + 1 is styles.length || !style.isAdherentUnderline(styles[j + 1].style)); 
+                bool drawBorder = style.borderStyle !is DWT.NONE;
+                drawBorder = drawBorder && (j + 1 is styles.length || !style.isAdherentBorder(styles[j + 1].style)); 
+                if (!drawUnderline && !drawBorder) continue;
+                int end = j + 1 < styles.length ? translateOffset(styles[j + 1].start - 1) : length;
+                for (int i = 0; i < lineOffsets.length - 1; i++) {
+                    int lineStart = untranslateOffset(lineOffsets[i]);
+                    int lineEnd = untranslateOffset(lineOffsets[i + 1] - 1);
+                    if (drawUnderline) {
+                        int start = run.start;
+                        for (int k = j; k > 0 && style.isAdherentUnderline(styles[k - 1].style); k--) {
+                            start = styles[k - 1].start;
+                        }
+                        start = translateOffset(start);
+                        if (!(start > lineEnd || end < lineStart)) {
+                            range.location = layoutManager.glyphIndexForCharacterAtIndex(Math.max(lineStart, start));
+                            range.length = layoutManager.glyphIndexForCharacterAtIndex(Math.min(lineEnd, end) + 1) - range.location;
+                            if (range.length > 0) {
+                                gc.handle.saveGraphicsState();
+                                NSRect rect = layoutManager.boundingRectForGlyphRange(range, textContainer);
+                                float baseline = layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, lineStart);
+                                float underlineX = pt.x + rect.x;
+                                float underlineY = pt.y + rect.y + rect.height - baseline;
+                                float[] color = null;
+                                if (style.underlineColor !is null) color = style.underlineColor.handle;
+                                if (color is null && style.foreground !is null) color = style.foreground.handle;
+                                if (color !is null) {
+                                    NSColor.colorWithDeviceRed(color[0], color[1], color[2], color[3]).setStroke();
+                                }
+                                NSBezierPath path = NSBezierPath.bezierPath();
+                                switch (style.underlineStyle) {
+                                case DWT.UNDERLINE_ERROR: {
+                                    path.setLineWidth(2f);
+                                    path.setLineCapStyle(OS.NSRoundLineCapStyle);
+                                    path.setLineJoinStyle(OS.NSRoundLineJoinStyle);
+                                    path.setLineDash(new float[]{1, 3f}, 2, 0);
+                                    point.x = underlineX;
+                                    point.y = underlineY + 0.5f;
+                                    path.moveToPoint(point);
+                                    point.x = underlineX + rect.width;
+                                    point.y = underlineY + 0.5f;
+                                    path.lineToPoint(point);
+                                    break;
+                                }
+                                case DWT.UNDERLINE_SQUIGGLE: {
+                                    gc.handle.setShouldAntialias(false);
+                                    path.setLineWidth(1.0f);
+                                    path.setLineCapStyle(OS.NSButtLineCapStyle);
+                                    path.setLineJoinStyle(OS.NSMiterLineJoinStyle);
+                                    float lineBottom = pt.y + rect.y + rect.height;
+                                    float squigglyThickness = 1;
+                                    float squigglyHeight = 2 * squigglyThickness;
+                                    float squigglyY = Math.min(underlineY - squigglyHeight / 2, lineBottom - squigglyHeight - 1);
+                                    float[] points = computePolyline((int)underlineX, (int)squigglyY, (int)(underlineX + rect.width), (int)(squigglyY + squigglyHeight));
+                                    point.x = points[0] + 0.5f;
+                                    point.y = points[1] + 0.5f;
+                                    path.moveToPoint(point);
+                                    for (int p = 2; p < points.length; p+=2) {
+                                        point.x = points[p] + 0.5f;
+                                        point.y = points[p+1] + 0.5f;
+                                        path.lineToPoint(point);
+                                    }
+                                    break;
+                                }
+                                }
+                                path.stroke();
+                                gc.handle.restoreGraphicsState();
+                            }
+                        }
+                    }
+                    if (drawBorder) {
+                        int start = run.start;
+                        for (int k = j; k > 0 && style.isAdherentBorder(styles[k - 1].style); k--) {
+                            start = styles[k - 1].start;
+                        }
+                        start = translateOffset(start);
+                        if (!(start > lineEnd || end < lineStart)) {
+                            range.location = layoutManager.glyphIndexForCharacterAtIndex(Math.max(lineStart, start));
+                            range.length = layoutManager.glyphIndexForCharacterAtIndex(Math.min(lineEnd, end) + 1) - range.location;
+                            if (range.length > 0) {
+                                gc.handle.saveGraphicsState();
+                                NSRect rect = layoutManager.boundingRectForGlyphRange(range, textContainer);
+                                rect.x += pt.x + 0.5f;
+                                rect.y += pt.y + 0.5f;
+                                rect.width -= 0.5f;
+                                rect.height -= 0.5f;
+                                float[] color = null;
+                                if (style.borderColor !is null) color = style.borderColor.handle;
+                                if (color is null && style.foreground !is null) color = style.foreground.handle;
+                                if (color !is null) {
+                                    NSColor.colorWithDeviceRed(color[0], color[1], color[2], color[3]).setStroke();
+                                }
+                                int width = 1;
+                                float[] dashes = null;
+                                switch (style.borderStyle) {
+                                case DWT.BORDER_SOLID:  break;
+                                case DWT.BORDER_DASH: dashes = width !is 0 ? GC.LINE_DASH : GC.LINE_DASH_ZERO; break;
+                                case DWT.BORDER_DOT: dashes = width !is 0 ? GC.LINE_DOT : GC.LINE_DOT_ZERO; break;
+                                }
+                                NSBezierPath path = NSBezierPath.bezierPath();
+                                path.setLineDash(dashes, dashes !is null ? dashes.length : 0, 0);
+                                path.appendBezierPathWithRect(rect);
+                                path.stroke();
+                                gc.handle.restoreGraphicsState();
+                            }
+                        }
+                    }
+                }
+
+            }
+        }
+        if ((flags & DWT.LAST_LINE_SELECTION) !is 0) {
+            NSRect bounds = lineBounds[lineBounds.length - 1];
+            NSRect rect = new NSRect();
+            rect.x = pt.x + bounds.x + bounds.width;
+            rect.y = y + bounds.y;
+            rect.width = (flags & DWT.FULL_SELECTION) !is 0 ? 0x7fffffff : bounds.height / 3;
+            rect.height = bounds.height;
+            selectionColor.setFill();
+            NSBezierPath path = NSBezierPath.bezierPath();
+            path.appendBezierPathWithRect(rect);
+            path.fill();
+        }
+        if (selectionRange !is null) {
         layoutManager.removeTemporaryAttribute(OS.NSBackgroundColorAttributeName, *selectionRange);
+        }
+        gc.handle.restoreGraphicsState();
+    } finally {
+        gc.uncheckGC(pool);
     }
 }
 
@@ -426,26 +627,37 @@
 }
 
 /**
- * Returns the bounds of the receiver.
+ * Returns the bounds of the receiver. The width returned is either the
+ * width of the longest line or the width set using {@link TextLayout#setWidth(int)}.
+ * To obtain the text bounds of a line use {@link TextLayout#getLineBounds(int)}.
  * 
  * @return the bounds of the receiver
  * 
  * @exception DWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @see #setWidth(int)
+ * @see #getLineBounds(int)
  */
 public Rectangle getBounds() {
     checkLayout();
-    computeRuns();
-    NSRect rect = layoutManager.usedRectForTextContainer(textContainer);
-    if (wrapWidth !is -1) rect.width = wrapWidth;
-    if (text.length() is 0) {
-        Font font = this.font !is null ? this.font : device.systemFont;
-        NSFont nsFont = font.handle;
-        rect.height = Math.max(rect.height, layoutManager.defaultLineHeightForFont(nsFont));
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        NSRect rect = layoutManager.usedRectForTextContainer(textContainer);
+        if (wrapWidth !is -1) rect.width = wrapWidth;
+        if (text.length() is 0) {
+            Font font = this.font !is null ? this.font : device.systemFont;
+            NSFont nsFont = font.handle;
+            rect.height = Math.max(rect.height, layoutManager.defaultLineHeightForFont(nsFont));
+        }
+        rect.height = Math.max(rect.height, ascent + descent) + spacing;
+    return new Rectangle(0, 0, cast(int)rect.width, cast(int)rect.height);
+    } finally {
+        if (pool !is null) pool.release();
     }
-    rect.height = Math.max(rect.height, ascent + descent);
-    return new Rectangle(0, 0, cast(int)rect.width, cast(int)rect.height);
 }
 
 /**
@@ -464,19 +676,25 @@
  */
 public Rectangle getBounds(int start, int end) {
     checkLayout();
-    computeRuns();
-    int length = text.length();
-    if (length is 0) return new Rectangle(0, 0, 0, 0);
-    if (start > end) return new Rectangle(0, 0, 0, 0);
-    start = Math.min(Math.max(0, start), length - 1);
-    end = Math.min(Math.max(0, end), length - 1);
-    start = translateOffset(start);
-    end = translateOffset(end);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        int length = text.length();
+        if (length is 0) return new Rectangle(0, 0, 0, 0);
+        if (start > end) return new Rectangle(0, 0, 0, 0);
+        start = Math.min(Math.max(0, start), length - 1);
+        end = Math.min(Math.max(0, end), length - 1);
+        start = translateOffset(start);
+        end = translateOffset(end);
     NSRange range = NSRange();
-    range.location = layoutManager.glyphIndexForCharacterAtIndex(start);
-    range.length = layoutManager.glyphIndexForCharacterAtIndex(end + 1) - range.location;
-    NSRect rect = layoutManager.boundingRectForGlyphRange(range, textContainer);
+        range.location = layoutManager.glyphIndexForCharacterAtIndex(start);
+        range.length = layoutManager.glyphIndexForCharacterAtIndex(end + 1) - range.location;
+        NSRect rect = layoutManager.boundingRectForGlyphRange(range, textContainer);
     return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)Math.ceil(rect.width), cast(int)Math.ceil(rect.height));
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -561,13 +779,19 @@
  */
 public int getLevel(int offset) {
     checkLayout();
-    computeRuns();
-    int length = text.length();
-    if (!(0 <= offset && offset <= length)) DWT.error(DWT.ERROR_INVALID_RANGE);
-    offset = translateOffset(offset);   
-    int level = 0;
-    //TODO
-    return level;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        int length = text.length();
+        if (!(0 <= offset && offset <= length)) DWT.error(DWT.ERROR_INVALID_RANGE);
+        offset = translateOffset(offset);   
+        int level = 0;
+        //TODO
+        return level;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -583,12 +807,18 @@
  */
 public int[] getLineOffsets() {
     checkLayout ();
-    computeRuns();
-    int[] offsets = new int[lineOffsets.length];
-    for (int i = 0; i < offsets.length; i++) {
-        offsets[i] = untranslateOffset(lineOffsets[i]);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        int[] offsets = new int[lineOffsets.length];
+        for (int i = 0; i < offsets.length; i++) {
+            offsets[i] = untranslateOffset(lineOffsets[i]);
+        }
+        return offsets;
+    } finally {
+        if (pool !is null) pool.release();
     }
-    return offsets;
 }
 
 /**
@@ -607,16 +837,22 @@
  */
 public int getLineIndex(int offset) {
     checkLayout ();
-    computeRuns();
-    int length = text.length();
-    if (!(0 <= offset && offset <= length)) DWT.error(DWT.ERROR_INVALID_RANGE);
-    offset = translateOffset(offset);
-    for (int line=0; line<lineOffsets.length - 1; line++) {
-        if (lineOffsets[line + 1] > offset) {
-            return line;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        int length = text.length();
+        if (!(0 <= offset && offset <= length)) DWT.error(DWT.ERROR_INVALID_RANGE);
+        offset = translateOffset(offset);
+        for (int line=0; line<lineOffsets.length - 1; line++) {
+            if (lineOffsets[line + 1] > offset) {
+                return line;
+            }
         }
+        return lineBounds.length - 1;
+    } finally {
+        if (pool !is null) pool.release();
     }
-    return lineBounds.length - 1;
 }
 
 /**
@@ -634,10 +870,16 @@
  */
 public Rectangle getLineBounds(int lineIndex) {
     checkLayout();
-    computeRuns();
-    if (!(0 <= lineIndex && lineIndex < lineBounds.length)) DWT.error(DWT.ERROR_INVALID_RANGE);
-    NSRect rect = lineBounds[lineIndex];
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        if (!(0 <= lineIndex && lineIndex < lineBounds.length)) DWT.error(DWT.ERROR_INVALID_RANGE);
+        NSRect rect = lineBounds[lineIndex];
     return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -652,8 +894,14 @@
  */
 public int getLineCount() {
     checkLayout ();
-    computeRuns();  
-    return lineOffsets.length - 1;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();  
+        return lineOffsets.length - 1;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -671,22 +919,28 @@
  */
 public FontMetrics getLineMetrics (int lineIndex) {
     checkLayout ();
-    computeRuns();
-    int lineCount = getLineCount();
-    if (!(0 <= lineIndex && lineIndex < lineCount)) DWT.error(DWT.ERROR_INVALID_RANGE);
-    int length = text.length();
-    if (length is 0) {
-        Font font = this.font !is null ? this.font : device.systemFont;
-        NSFont nsFont = font.handle;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        int lineCount = getLineCount();
+        if (!(0 <= lineIndex && lineIndex < lineCount)) DWT.error(DWT.ERROR_INVALID_RANGE);
+        int length = text.length();
+        if (length is 0) {
+            Font font = this.font !is null ? this.font : device.systemFont;
+            NSFont nsFont = font.handle;
         int ascent = cast(int)(0.5f + nsFont.ascender());
         int descent = cast(int)(0.5f + (-nsFont.descender() + nsFont.leading()));   
-        ascent = Math.max(ascent, this.ascent);
-        descent = Math.max(descent, this.descent);
-        return FontMetrics.cocoa_new(ascent, descent, 0, 0, ascent + descent);
+            ascent = Math.max(ascent, this.ascent);
+            descent = Math.max(descent, this.descent);
+            return FontMetrics.cocoa_new(ascent, descent, 0, 0, ascent + descent);
+        }
+        Rectangle rect = getLineBounds(lineIndex);
+    int baseline = cast(int)layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, getLineOffsets()[lineIndex]);
+        return FontMetrics.cocoa_new(rect.height - baseline, baseline, 0, 0, rect.height);
+    } finally {
+        if (pool !is null) pool.release();
     }
-    Rectangle rect = getLineBounds(lineIndex);
-    int baseline = cast(int)layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, getLineOffsets()[lineIndex]);
-    return FontMetrics.cocoa_new(rect.height - baseline, baseline, 0, 0, rect.height);
 }
 
 /**
@@ -707,22 +961,28 @@
  */
 public Point getLocation(int offset, bool trailing) {
     checkLayout();
-    computeRuns();
-    int length = text.length();
-    if (!(0 <= offset && offset <= length)) DWT.error(DWT.ERROR_INVALID_RANGE);
-    if (length is 0) return new Point(0, 0);
-    offset = translateOffset(offset);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        int length = text.length();
+        if (!(0 <= offset && offset <= length)) DWT.error(DWT.ERROR_INVALID_RANGE);
+        if (length is 0) return new Point(0, 0);
+        offset = translateOffset(offset);
     NSUInteger glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(offset);
     NSRect rect = layoutManager.lineFragmentUsedRectForGlyphAtIndex_effectiveRange_(glyphIndex, null);
-    NSPoint point = layoutManager.locationForGlyphAtIndex(glyphIndex);
-    if (trailing) {
+        NSPoint point = layoutManager.locationForGlyphAtIndex(glyphIndex);
+        if (trailing) {
         NSRange range = NSRange();
-        range.location = glyphIndex;
-        range.length = 1;
-        NSRect bounds = layoutManager.boundingRectForGlyphRange(range, textContainer);
-        point.x += bounds.width;
+            range.location = glyphIndex;
+            range.length = 1;
+            NSRect bounds = layoutManager.boundingRectForGlyphRange(range, textContainer);
+            point.x += bounds.width;
+        }
+    return new Point(cast(int)point.x, cast(int)rect.y);
+    } finally {
+        if (pool !is null) pool.release();
     }
-    return new Point(cast(int)point.x, cast(int)rect.y);
 }
 
 /**
@@ -745,7 +1005,13 @@
  * @see #getPreviousOffset(int, int)
  */
 public int getNextOffset (int offset, int movement) {
-    return _getOffset(offset, movement, true);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        return _getOffset(offset, movement, true);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 int _getOffset (int offset, int movement, bool forward) {
@@ -763,18 +1029,18 @@
             } else {
                 offset--;
             }
-            return untranslateOffset(offset);
+            return Math.max(0, Math.min(length, untranslateOffset(offset)));
         }
         case DWT.MOVEMENT_WORD: {
-            return untranslateOffset(textStorage.nextWordFromIndex(offset, forward));
+            return untranslateOffset((int)/*64*/textStorage.nextWordFromIndex(offset, forward));
         }
         case DWT.MOVEMENT_WORD_END: {
             NSRange range = textStorage.doubleClickAtIndex(length is offset ? length - 1 : offset);
-            return untranslateOffset(range.location + range.length);
+            return untranslateOffset((int)/*64*/(range.location + range.length));
         }
         case DWT.MOVEMENT_WORD_START: {
             NSRange range = textStorage.doubleClickAtIndex(length is offset ? length - 1 : offset);
-            return untranslateOffset(range.location);
+            return untranslateOffset((int)/*64*/range.location);
         }
         default:
             break;
@@ -807,9 +1073,15 @@
  */
 public int getOffset(Point point, int[] trailing) {
     checkLayout();
-    computeRuns();
-    if (point is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    return getOffset(point.x, point.y, trailing);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        if (point is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
+        return getOffset(point.x, point.y, trailing);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -837,18 +1109,24 @@
  */
 public int getOffset(int x, int y, int[] trailing) {
     checkLayout();
-    computeRuns();
-    if (trailing !is null && trailing.length < 1) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    int length = text.length();
-    if (length is 0) return 0;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        computeRuns();
+        if (trailing !is null && trailing.length < 1) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
+        int length = text.length();
+        if (length is 0) return 0;
     NSPoint pt = NSPoint();
-    pt.x = x;
-    pt.y = y;
+        pt.x = x;
+        pt.y = y;
     CGFloat partialFration;
-    NSUInteger glyphIndex = layoutManager.glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_(pt, textContainer, &partialFration);
-    int offset = layoutManager.characterIndexForGlyphAtIndex(glyphIndex);
+    NSUInteger glyphIndex = layoutManager.glyphIndexForPoint(pt, textContainer, &partialFration);
+        int /*long*/ offset = layoutManager.characterIndexForGlyphAtIndex(glyphIndex);
     if (trailing !is null) trailing[0] = cast(int) Math.round(partialFration);
-    return Math.min(untranslateOffset(offset), length - 1);
+        return Math.min(untranslateOffset((int)/*64*/offset), length - 1);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -885,7 +1163,13 @@
  * @see #getNextOffset(int, int)
  */
 public int getPreviousOffset (int index, int movement) {
-    return _getOffset(index, movement, false);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        return _getOffset(index, movement, false);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1088,8 +1372,14 @@
     if ((alignment & DWT.LEFT) !is 0) alignment = DWT.LEFT;
     if ((alignment & DWT.RIGHT) !is 0) alignment = DWT.RIGHT;
     if (this.alignment is alignment) return;
-    freeRuns();
-    this.alignment = alignment;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.alignment = alignment;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1114,8 +1404,14 @@
     checkLayout ();
     if (ascent < -1) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (this.ascent is ascent) return;
-    freeRuns();
-    this.ascent = ascent;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.ascent = ascent;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1140,8 +1436,14 @@
     checkLayout ();
     if (descent < -1) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (this.descent is descent) return;
-    freeRuns();
-    this.descent = descent;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.descent = descent;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /** 
@@ -1167,7 +1469,13 @@
     if (oldFont is font) return;
     this.font = font;
     if (oldFont !is null && oldFont.equals(font)) return;
-    freeRuns();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1186,8 +1494,14 @@
     checkLayout ();
     if (indent < 0) return;
     if (this.indent is indent) return;
-    freeRuns();
-    this.indent = indent;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.indent = indent;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1205,8 +1519,14 @@
 public void setJustify (bool justify) {
     checkLayout ();
     if (justify is this.justify) return;
-    freeRuns();
-    this.justify = justify;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.justify = justify;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1227,7 +1547,13 @@
     if ((orientation & DWT.LEFT_TO_RIGHT) !is 0) orientation = DWT.LEFT_TO_RIGHT;
     if (this.orientation is orientation) return;
     this.orientation = orientation;
-    freeRuns();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1260,8 +1586,14 @@
             if (i is segments.length) return;
         }
     }
-    freeRuns();
-    this.segments = segments;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.segments = segments;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1281,8 +1613,14 @@
     checkLayout();
     if (spacing < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (this.spacing is spacing) return;
-    freeRuns();
-    this.spacing = spacing;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.spacing = spacing;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1300,73 +1638,79 @@
  */
 public void setStyle (TextStyle style, int start, int end) {
     checkLayout();
-    int length = text.length();
-    if (length is 0) return;
-    if (start > end) return;
-    start = Math.min(Math.max(0, start), length - 1);
-    end = Math.min(Math.max(0, end), length - 1);
-    int low = -1;
-    int high = styles.length;
-    while (high - low > 1) {
-        int index = (high + low) / 2;
-        if (styles[index + 1].start > start) {
-            high = index;
-        } else {
-            low = index;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        int length = text.length();
+        if (length is 0) return;
+        if (start > end) return;
+        start = Math.min(Math.max(0, start), length - 1);
+        end = Math.min(Math.max(0, end), length - 1);
+        int low = -1;
+        int high = styles.length;
+        while (high - low > 1) {
+            int index = (high + low) / 2;
+            if (styles[index + 1].start > start) {
+                high = index;
+            } else {
+                low = index;
+            }
         }
-    }
-    if (0 <= high && high < styles.length) {
-        StyleItem item = styles[high];
-        if (item.start is start && styles[high + 1].start - 1 is end) {
-            if (style is null) {
-                if (item.style is null) return;
-            } else {
-                if (style.equals(item.style)) return;
+        if (0 <= high && high < styles.length) {
+            StyleItem item = styles[high];
+            if (item.start is start && styles[high + 1].start - 1 is end) {
+                if (style is null) {
+                    if (item.style is null) return;
+                } else {
+                    if (style.equals(item.style)) return;
+                }
             }
         }
-    }
-    freeRuns();
-    int modifyStart = high;
-    int modifyEnd = modifyStart;
-    while (modifyEnd < styles.length) {
-        if (styles[modifyEnd + 1].start > end) break;
-        modifyEnd++;
-    }
-    if (modifyStart is modifyEnd) {
-        int styleStart = styles[modifyStart].start; 
-        int styleEnd = styles[modifyEnd + 1].start - 1;
-        if (styleStart is start && styleEnd is end) {
-            styles[modifyStart].style = style;
-            return;
+        freeRuns();
+        int modifyStart = high;
+        int modifyEnd = modifyStart;
+        while (modifyEnd < styles.length) {
+            if (styles[modifyEnd + 1].start > end) break;
+            modifyEnd++;
         }
-        if (styleStart !is start && styleEnd !is end) {
-            StyleItem[] newStyles = new StyleItem[styles.length + 2];
-            System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1);
-            StyleItem item = new StyleItem();
-            item.start = start;
-            item.style = style;
-            newStyles[modifyStart + 1] = item;  
-            item = new StyleItem();
-            item.start = end + 1;
-            item.style = styles[modifyStart].style;
-            newStyles[modifyStart + 2] = item;
-            System.arraycopy(styles, modifyEnd + 1, newStyles, modifyEnd + 3, styles.length - modifyEnd - 1);
-            styles = newStyles;
-            return;
+        if (modifyStart is modifyEnd) {
+            int styleStart = styles[modifyStart].start; 
+            int styleEnd = styles[modifyEnd + 1].start - 1;
+            if (styleStart is start && styleEnd is end) {
+                styles[modifyStart].style = style;
+                return;
+            }
+            if (styleStart !is start && styleEnd !is end) {
+                StyleItem[] newStyles = new StyleItem[styles.length + 2];
+                System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1);
+                StyleItem item = new StyleItem();
+                item.start = start;
+                item.style = style;
+                newStyles[modifyStart + 1] = item;  
+                item = new StyleItem();
+                item.start = end + 1;
+                item.style = styles[modifyStart].style;
+                newStyles[modifyStart + 2] = item;
+                System.arraycopy(styles, modifyEnd + 1, newStyles, modifyEnd + 3, styles.length - modifyEnd - 1);
+                styles = newStyles;
+                return;
+            }
         }
+        if (start is styles[modifyStart].start) modifyStart--;
+        if (end is styles[modifyEnd + 1].start - 1) modifyEnd++;
+        int newLength = styles.length + 1 - (modifyEnd - modifyStart - 1);
+        StyleItem[] newStyles = new StyleItem[newLength];
+        System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1); 
+        StyleItem item = new StyleItem();
+        item.start = start;
+        item.style = style;
+        newStyles[modifyStart + 1] = item;
+        styles[modifyEnd].start = end + 1;
+        System.arraycopy(styles, modifyEnd, newStyles, modifyStart + 2, styles.length - modifyEnd);
+        styles = newStyles;
+    } finally {
+        if (pool !is null) pool.release();
     }
-    if (start is styles[modifyStart].start) modifyStart--;
-    if (end is styles[modifyEnd + 1].start - 1) modifyEnd++;
-    int newLength = styles.length + 1 - (modifyEnd - modifyStart - 1);
-    StyleItem[] newStyles = new StyleItem[newLength];
-    System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1); 
-    StyleItem item = new StyleItem();
-    item.start = start;
-    item.style = style;
-    newStyles[modifyStart + 1] = item;
-    styles[modifyEnd].start = end + 1;
-    System.arraycopy(styles, modifyEnd, newStyles, modifyStart + 2, styles.length - modifyEnd);
-    styles = newStyles;
 }
 
 /**
@@ -1392,8 +1736,14 @@
             if (i is tabs.length) return;
         }
     }
-    freeRuns();
-    this.tabs = tabs;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.tabs = tabs;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1412,12 +1762,18 @@
     checkLayout ();
     if (text is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (text.equals(this.text)) return;
-    freeRuns();
-    this.text = text;
-    styles = new StyleItem[2];
-    styles[0] = new StyleItem();
-    styles[1] = new StyleItem();
-    styles[styles.length - 1].start = text.length();
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.text = text;
+        styles = new StyleItem[2];
+        styles[0] = new StyleItem();
+        styles[1] = new StyleItem();
+        styles[styles.length - 1].start = text.length();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -1440,8 +1796,14 @@
     checkLayout();
     if (width < -1 || width is 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (this.wrapWidth is width) return;
-    freeRuns();
-    this.wrapWidth = width;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        freeRuns();
+        this.wrapWidth = width;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
--- a/dwt/graphics/TextStyle.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/TextStyle.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.TextStyle;
 
@@ -38,6 +38,8 @@
  * @see TextLayout
  * @see Font
  * @see Color
+ * @see <a href="http://www.eclipse.org/swt/snippets/#textlayout">TextLayout, TextStyle snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  *  
  * @since 3.0
  */
@@ -163,7 +165,7 @@
 public this (Font font, Color foreground, Color background) {
     if (font !is null && font.isDisposed()) DWT.error (DWT.ERROR_INVALID_ARGUMENT);
     if (foreground !is null && foreground.isDisposed()) DWT.error (DWT.ERROR_INVALID_ARGUMENT);
-    if (background !is null && background.isDisposed()) DWT.error (DWT.ERROR_INVALID_ARGUMENT);  
+    if (background !is null && background.isDisposed()) DWT.error (DWT.ERROR_INVALID_ARGUMENT); 
     this.font = font;
     this.foreground = foreground;
     this.background = background;
@@ -173,7 +175,7 @@
 /** 
  * Create a new text style from an existing text style.
  * 
- *@param style the style to copy 
+ * @param style the style to copy 
  *
  * @since 3.4
  */
@@ -251,7 +253,7 @@
 public hash_t toHash() {
     hash_t hash = 0;
     if (foreground !is null) hash ^= foreground.hashCode();
-    if (background !is null) hash ^= background.hashCode();  
+    if (background !is null) hash ^= background.hashCode(); 
     if (font !is null) hash ^= font.hashCode();
     if (metrics !is null) hash ^= metrics.hashCode();
     if (underline) hash ^= hash;
@@ -272,7 +274,12 @@
     if (borderStyle !is style.borderStyle) return false;
     if (borderColor !is null) {
         if (!borderColor.equals(style.borderColor)) return false;
-    } else if (style.borderColor !is null) return false;
+    } else {
+        if (style.borderColor !is null) return false;
+        if (foreground !is null) {
+            if (!foreground.equals(style.foreground)) return false;
+        } else if (style.foreground !is null) return false;
+    }
     return true;
 }
 
@@ -283,7 +290,12 @@
     if (underlineStyle !is style.underlineStyle) return false;
     if (underlineColor !is null) {
         if (!underlineColor.equals(style.underlineColor)) return false;
-    } else if (style.underlineColor !is null) return false;
+    } else {
+        if (style.underlineColor !is null) return false;
+        if (foreground !is null) {
+            if (!foreground.equals(style.foreground)) return false;
+        } else if (style.foreground !is null) return false;
+    }
     return true;
 }
 
@@ -293,7 +305,12 @@
     if (strikeout !is style.strikeout) return false;
     if (strikeoutColor !is null) {
         if (!strikeoutColor.equals(style.strikeoutColor)) return false;
-    } else if (style.strikeoutColor !is null) return false;
+    } else {
+        if (style.strikeoutColor !is null) return false;
+        if (foreground !is null) {
+            if (!foreground.equals(style.foreground)) return false;
+        } else if (style.foreground !is null) return false;
+    }
     return true;
 }
 
--- a/dwt/graphics/Transform.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/graphics/Transform.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.graphics.Transform;
 
@@ -18,7 +18,9 @@
 import dwt.DWTException;
 import dwt.internal.cocoa.NSAffineTransform;
 import dwt.internal.cocoa.NSAffineTransformStruct;
+import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSThread;
 
 import tango.text.convert.Format;
 
@@ -39,6 +41,9 @@
  * which may not be available on some platforms.
  * </p>
  * 
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: GraphicsExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
  * @since 3.1
  */
 public class Transform : Resource {
@@ -143,11 +148,17 @@
  */
 public this (Device device, float m11, float m12, float m21, float m22, float dx, float dy) {
     super(device);
-    handle = NSAffineTransform.transform();
-    if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
-    handle.retain();
-    setElements(m11, m12, m21, m22, dx, dy);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        handle = NSAffineTransform.transform();
+        if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
+        handle.retain();
+        setElements(m11, m12, m21, m22, dx, dy);
     init_();
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 static float[] checkTransform(float[] elements) {
@@ -179,25 +190,46 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (elements is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (elements.length < 6) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    NSAffineTransformStruct structt = handle.transformStruct();
-    elements[0] = structt.m11;
-    elements[1] = structt.m12;
-    elements[2] = structt.m21;
-    elements[3] = structt.m22;
-    elements[4] = structt.tX;
-    elements[5] = structt.tY;
-}
-
-public void identity() {
-    if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSAffineTransformStruct structt = NSAffineTransformStruct();
-    structt.m11 = 1;
-    structt.m22 = 1;
-    handle.setTransformStruct(structt);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSAffineTransformStruct struct_ = handle.transformStruct();
+        elements[0] = (float)/*64*/struct_.m11;
+        elements[1] = (float)/*64*/struct_.m12;
+        elements[2] = (float)/*64*/struct_.m21;
+        elements[3] = (float)/*64*/struct_.m22;
+        elements[4] = (float)/*64*/struct_.tX;
+        elements[5] = (float)/*64*/struct_.tY;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
  * Modifies the receiver such that the matrix it represents becomes the
+ * identity matrix. 
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
+public void identity() {
+    if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
+    NSAutoreleasePool pool = null;
+    try {
+        NSAffineTransformStruct struct_ = NSAffineTransformStruct();
+        struct_.m11 = 1;
+        struct_.m22 = 1;
+        handle.setTransformStruct(structt);
+    } finally {
+        if (pool !is null) pool.release();
+    }
+}
+
+/**
+ * Modifies the receiver such that the matrix it represents becomes
  * the mathematical inverse of the matrix it previously represented. 
  *
  * @exception DWTException <ul>
@@ -207,11 +239,17 @@
  */
 public void invert() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSAffineTransformStruct structt = handle.transformStruct();
-    if ((structt.m11 * structt.m22 - structt.m12 * structt.m21) is 0) {
-        DWT.error(DWT.ERROR_CANNOT_INVERT_MATRIX);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        NSAffineTransformStruct struct_ = handle.transformStruct();
+        if ((struct_.m11 * struct_.m22 - struct_.m12 * struct_.m21) is 0) {
+            DWT.error(DWT.ERROR_CANNOT_INVERT_MATRIX);
+        }
+        handle.invert();
+    } finally {
+        if (pool !is null) pool.release();
     }
-    handle.invert();
 }
 
 /**
@@ -236,8 +274,14 @@
  */
 public bool isIdentity() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSAffineTransformStruct structt = handle.transformStruct();
-    return structt.m11 is 1 && structt.m12 is 0 && structt.m21 is 0 && structt.m22 is 1 && structt.tX is 0 && structt.tY is 0;
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        NSAffineTransformStruct struct = handle.transformStruct();
+        return struct.m11 is 1 && struct.m12 is 0 && struct.m21 is 0 && struct.m22 is 1 && struct.tX is 0 && struct.tY is 0;
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -259,7 +303,13 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (matrix is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (matrix.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-    handle.prependTransform(matrix.handle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle.prependTransform(matrix.handle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -277,7 +327,13 @@
  */
 public void rotate(float angle) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    handle.rotateByDegrees(angle);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle.rotateByDegrees(angle);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -293,7 +349,13 @@
  */
 public void scale(float scaleX, float scaleY) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    handle.scaleXBy(scaleX, scaleY);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle.scaleXBy(scaleX, scaleY);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
@@ -313,26 +375,51 @@
  */
 public void setElements(float m11, float m12, float m21, float m22, float dx, float dy) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSAffineTransformStruct structt = NSAffineTransformStruct();
-    structt.m11 = m11;
-    structt.m12 = m12;
-    structt.m21 = m21;
-    structt.m22 = m22;
-    structt.tX = dx;
-    structt.tY = dy;
-    handle.setTransformStruct(structt);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        NSAffineTransformStruct struct_ = NSAffineTransformStruct();
+        struct_.m11 = m11;
+        struct_.m12 = m12;
+        struct_.m21 = m21;
+        struct_.m22 = m22;
+        struct_.tX = dx;
+        struct_.tY = dy;
+        handle.setTransformStruct(struct_);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
+/**
+ * Modifies the receiver so that it represents a transformation that is
+ * equivalent to its previous transformation sheared by (shearX, shearY).
+ * 
+ * @param shearX the shear factor in the X direction
+ * @param shearY the shear factor in the Y direction
+ * 
+ * @exception DWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public void shear(float shearX, float shearY) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    NSAffineTransformStruct structt = NSAffineTransformStruct();
-    structt.m11 = 1;
-    structt.m12 = shearX;
-    structt.m21 = shearY;
-    structt.m22 = 1;
-    NSAffineTransform matrix = NSAffineTransform.transform();
-    matrix.setTransformStruct(structt);
-    handle.prependTransform(matrix);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        NSAffineTransformStruct struct_ =  NSAffineTransformStruct();
+        struct_.m11 = 1;
+        struct_.m12 = shearX;
+        struct_.m21 = shearY;
+        struct_.m22 = 1;
+        NSAffineTransform matrix = NSAffineTransform.transform();
+        matrix.setTransformStruct(struct_);
+        handle.prependTransform(matrix);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /** 
@@ -352,14 +439,20 @@
 public void transform(float[] pointArray) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-    NSPoint point = NSPoint();
-    size_t length = pointArray.length / 2;
-    for (int i = 0, j = 0; i < length; i++, j += 2) {
-        point.x = pointArray[j];
-        point.y = pointArray[j + 1];
-        point = handle.transformPoint(point);
-        pointArray[j] = point.x;                
-        pointArray[j + 1] = point.y;                
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
+    try {
+        NSPoint point = NSPoint();
+        size_t length = pointArray.length / 2;
+        for (size_t i = 0, j = 0; i < length; i++, j += 2) {
+            point.x = pointArray[j];
+            point.y = pointArray[j + 1];
+            point = handle.transformPoint(point);
+            pointArray[j] = (float)/*64*/point.x;               
+            pointArray[j + 1] = (float)/*64*/point.y;               
+        }
+    } finally {
+        if (pool !is null) pool.release();
     }
 }
 
@@ -376,7 +469,13 @@
  */
 public void translate(float offsetX, float offsetY) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    handle.translateXBy(offsetX, offsetY);
+    NSAutoreleasePool pool = null;
+    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        handle.translateXBy(offsetX, offsetY);
+    } finally {
+        if (pool !is null) pool.release();
+    }
 }
 
 /**
--- a/dwt/internal/BidiUtil.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/BidiUtil.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.BidiUtil;
 
--- a/dwt/internal/C.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/C.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.C;
 
@@ -32,7 +32,9 @@
 
     public static const size_t PTR_SIZEOF = (void*).sizeof;
 
+/** @param ptr cast=(void *) */
     alias stdlib.free free;
+/** @param env cast=(const char *) */
     alias stdlib.getenv getenv;
     alias stdlib.malloc malloc;
     alias stdcstring.memset memset;
@@ -40,26 +42,115 @@
     alias stdcstring.strlen strlen;
     
 /+public static final native void free (int /*long*/ ptr);
-public static final native int /*long*/ getenv (byte[] wcsToMbcs);
 public static final native int /*long*/ malloc (int /*long*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out critical
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int /*long*/ dest, byte[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out critical
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int /*long*/ dest, char[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out critical
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int /*long*/ dest, double[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out critical
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int /*long*/ dest, float[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out critical
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int /*long*/ dest, int[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out critical
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int /*long*/ dest, long[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out critical
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int /*long*/ dest, short[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *),flags=no_out critical
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (byte[] dest, char[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (byte[] dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int /*long*/ dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (char[] dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (double[] dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (float[] dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int[] dest, byte[] src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (short[] dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (int[] dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(const void *)
+ * @param size cast=(size_t)
+ */
 public static final native void memmove (long[] dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param buffer cast=(void *),flags=critical
+ * @param num cast=(size_t)
+ */
 public static final native int /*long*/ memset (int /*long*/ buffer, int c, int /*long*/ num);
 public static final native int PTR_sizeof ();
+/** @param s cast=(char *) */
 public static final native int strlen (int /*long*/ s);+/
 }
--- a/dwt/internal/CloneableCompatibility.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/CloneableCompatibility.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.CloneableCompatibility;
 
--- a/dwt/internal/Compatibility.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/Compatibility.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/internal/DWTEventListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/DWTEventListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.DWTEventListener;
 
--- a/dwt/internal/DWTEventObject.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/DWTEventObject.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.DWTEventObject;
 
--- a/dwt/internal/LONG.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/LONG.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -14,6 +14,7 @@
 
 import dwt.dwthelper.utils;
 
+/** @jniclass flags=no_gen */
 public class LONG
 {
     public int /*long*/value;
--- a/dwt/internal/Library.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/Library.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,7 +38,7 @@
     /**
      * DWT Minor version number (must be in the range 0..999)
      */
-    static const int MINOR_VERSION = 440;
+    static int MINOR_VERSION = 514;
 
     /**
      * DWT revision number (must be >= 0)
@@ -132,10 +132,12 @@
  FileOutputStream os = null;
  InputStream is = null;
  File file = new File(fileName);
+    bool extracted = false;
  try {
  if (!file.exists ()) {
  is = Library.class.getResourceAsStream ("/" + mappedName); //$NON-NLS-1$
  if (is !is null) {
+                extracted = true;
  int read;
  byte [] buffer = new byte [4096];
  os = new FileOutputStream (fileName);
@@ -152,6 +154,7 @@
  if (load (fileName)) return true;
  }
  }
+        if (load (fileName)) return true;
  } catch (Throwable e) {
  try {
  if (os !is null) os.close ();
@@ -159,8 +162,8 @@
  try {
  if (is !is null) is.close ();
  } catch (IOException e1) {}
+        if (extracted && file.exists ()) file.delete ();
  }
- if (file.exists ()) file.delete ();
  return false;
  }
 
--- a/dwt/internal/Lock.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/Lock.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,12 +21,11 @@
 import dwt.dwthelper.utils;
 
 /**
- * Instance of this represent a recursive monitor.
+ * Instances of this represent a recursive monitor.  Note that this
+ * is an empty implementation which does not actually perform locking.
  */
 public class Lock
 {
-    int count, waitCount;
-    Thread owner;
     Mutex mutex;
     Condition cond;
 
@@ -59,7 +58,6 @@
                     }
                     catch (SyncException e)
                     {
-                    /* Wait forever, just like synchronized blocks */
                     }
                 }
                 --waitCount;
--- a/dwt/internal/Platform.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/Platform.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.Platform;
 
@@ -18,5 +18,5 @@
 public class Platform {
     
 public static const String PLATFORM = "cocoa"; //$NON-NLS-1$
-
+public static final Lock lock = new Lock ();
 }
--- a/dwt/internal/SerializableCompatibility.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/SerializableCompatibility.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.SerializableCompatibility;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/c/Carbon.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,334 @@
+/**
+ * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Nov 18, 2008
+ * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
+ * 
+ */
+module dwt.internal.c.Carbon;
+
+import dwt.dwthelper.utils;
+import bindings = dwt.internal.c.bindings;
+
+// MacTypes.h
+
+/********************************************************************************
+
+ Base integer types for all target OS's and CPU's
+
+ UInt8            8-bit unsigned integer 
+ SInt8            8-bit signed integer
+ UInt16          16-bit uinteger 
+ SInt16          16-bit signed integer           
+ UInt32          32-bit uinteger 
+ SInt32          32-bit signed integer   
+ UInt64          64-bit uinteger 
+ SInt64          64-bit integer   
+
+ *********************************************************************************/
+alias ubyte UInt8;
+alias byte SInt8;
+alias ushort UInt16;
+alias short SInt16;
+alias uint UInt32;
+alias int SInt32;
+alias ulong UInt64;
+alias long SInt64;
+
+alias byte uint8_t;
+
+/********************************************************************************
+
+ Higher level basic types
+
+ OSErr                   16-bit result error code
+ OSStatus                32-bit result error code
+ LogicalAddress          Address in the clients virtual address space
+ ConstLogicalAddress     Address in the clients virtual address space that will only be read
+ PhysicalAddress         Real address as used on the hardware bus
+ BytePtr                 Pointer to an array of bytes
+ ByteCount               The size of an array of bytes
+ ByteOffset              An offset into an array of bytes
+ ItemCount               32-bit iteration count
+ OptionBits              Standard 32-bit set of bit flags
+ PBVersion               ?
+ Duration                32-bit millisecond timer for drivers
+ AbsoluteTime            64-bit clock
+ ScriptCode              A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding
+ LangCode                A particular language (e.g. English), as represented using a particular ScriptCode
+ RegionCode              Designates a language as used in a particular region (e.g. British vs American
+ English) together with other region-dependent characteristics (e.g. date format)
+ FourCharCode            A 32-bit value made by packing four 1 byte characters together
+ OSType                  A FourCharCode used in the OS and file system (e.g. creator)
+ ResType                 A FourCharCode used to tag resources (e.g. 'DLOG')
+ 
+ *********************************************************************************/
+alias SInt16 OSErr;
+alias SInt32 OSStatus;
+alias void* LogicalAddress;
+alias /*const*/void* ConstLogicalAddress;
+alias void* PhysicalAddress;
+alias UInt8* BytePtr;
+alias uint ByteCount;
+alias uint ByteOffset;
+alias SInt32 Duration;
+alias UnsignedWide AbsoluteTime;
+alias UInt32 OptionBits;
+alias uint ItemCount;
+alias UInt32 PBVersion;
+alias SInt16 ScriptCode;
+alias SInt16 LangCode;
+alias SInt16 RegionCode;
+alias UInt32 FourCharCode;
+alias FourCharCode OSType;
+alias FourCharCode ResType;
+alias OSType* OSTypePtr;
+alias ResType* ResTypePtr;
+
+struct UnsignedWide
+{
+    uint hi;
+    uint lo;
+}
+
+struct ProcessSerialNumber 
+{
+    uint highLongOfPSN;
+    uint lowLongOfPSN;
+}
+
+struct CPSProcessSerNum
+{
+    uint lo;
+    uint hi;
+}
+
+alias ProcessSerialNumber * ProcessSerialNumberPtr;
+
+
+
+// Appearance.h
+enum ThemeCursor : uint
+{
+    kThemeArrowCursor = 0,
+    kThemeCopyArrowCursor = 1,
+    kThemeAliasArrowCursor = 2,
+    kThemeContextualMenuArrowCursor = 3,
+    kThemeIBeamCursor = 4,
+    kThemeCrossCursor = 5,
+    kThemePlusCursor = 6,
+    kThemeWatchCursor = 7,
+    kThemeClosedHandCursor = 8,
+    kThemeOpenHandCursor = 9,
+    kThemePointingHandCursor = 10,
+    kThemeCountingUpHandCursor = 11,
+    kThemeCountingDownHandCursor = 12,
+    kThemeCountingUpAndDownHandCursor = 13,
+    kThemeSpinningCursor = 14,
+    kThemeResizeLeftCursor = 15,
+    kThemeResizeRightCursor = 16,
+    kThemeResizeLeftRightCursor = 17,
+    kThemeNotAllowedCursor = 18,
+    kThemeResizeUpCursor = 19,
+    kThemeResizeDownCursor = 20,
+    kThemeResizeUpDownCursor = 21,
+    kThemePoofCursor = 22
+}
+
+alias bindings.SetThemeCursor SetThemeCursor;
+
+
+
+// CABase.h
+static if ((void*).sizeof > int.sizeof) // 64bit target
+    alias double CGFloat;
+
+else
+    alias float CGFloat;
+
+
+
+// CarbonEventsCore.h
+alias bindings.GetCurrentButtonState GetCurrentButtonState;
+
+
+
+// CFBase.h
+alias void* CFTypeRef;
+alias void* __CFAllocator;
+alias __CFAllocator* CFAllocatorRef;
+alias void* __CFString;
+alias __CFString* CFStringRef;
+
+alias bindings.CFRelease CFRelease;
+
+
+
+// CFNumberFormatter.h
+enum
+{
+    kCFNumberFormatterPadBeforePrefix = 0,
+    kCFNumberFormatterPadAfterPrefix = 1,
+    kCFNumberFormatterPadBeforeSuffix = 2,
+    kCFNumberFormatterPadAfterSuffix = 3
+}
+
+enum CFNumberFormatterRoundingMode
+{
+    kCFNumberFormatterRoundCeiling = 0,
+    kCFNumberFormatterRoundFloor = 1,
+    kCFNumberFormatterRoundDown = 2,
+    kCFNumberFormatterRoundUp = 3,
+    kCFNumberFormatterRoundHalfEven = 4,
+    kCFNumberFormatterRoundHalfDown = 5,
+    kCFNumberFormatterRoundHalfUp = 6
+}
+
+enum
+{
+    kCFNumberFormatterNoStyle = 0,
+    kCFNumberFormatterDecimalStyle = 1,
+    kCFNumberFormatterCurrencyStyle = 2,
+    kCFNumberFormatterPercentStyle = 3,
+    kCFNumberFormatterScientificStyle = 4,
+    kCFNumberFormatterSpellOutStyle = 5
+}
+
+
+
+//CFPropertyList.h
+enum CFPropertyListFormat
+{
+    kCFPropertyListOpenStepFormat = 1,
+    kCFPropertyListXMLFormat_v1_0 = 100,
+    kCFPropertyListBinaryFormat_v1_0 = 200
+}
+
+enum CFPropertyListMutabilityOptions
+{
+    kCFPropertyListImmutable = 0,
+    kCFPropertyListMutableContainers = 1,
+    kCFPropertyListMutableContainersAndLeaves = 2
+}
+
+
+
+// CFRunLoop.h
+alias void* __CFRunLoop;
+alias __CFRunLoop* CFRunLoopRef;
+
+
+
+// CFString.h
+alias uint CFStringEncoding;
+
+
+
+// CFURL.h
+alias bindings.CFURLCreateStringByAddingPercentEscapes CFURLCreateStringByAddingPercentEscapes;
+
+
+
+// CGColorSpace.h
+alias void* CGColorSpace;
+alias CGColorSpace* CGColorSpaceRef;
+
+
+
+// CGError.h
+alias int CGError;
+
+
+
+// CGEventTypes.h
+alias void* __CGEvent;
+alias __CGEvent* CGEventRef;
+
+
+
+// CGRemoteOperation.h
+alias bindings.CGWarpMouseCursorPosition CGWarpMouseCursorPosition;
+
+
+
+// Gestalt.h
+alias bindings.Gestalt Gestalt;
+
+
+
+// IconsCore.h
+alias void* OpaqueIconRef;
+alias OpaqueIconRef* IconRef;
+
+
+
+// Processes.h
+enum ProcessApplicationTransformState : uint
+{
+    kProcessTransformToForegroundApplication = 1
+}
+
+alias bindings.GetCurrentProcess GetCurrentProcess;
+alias bindings.SetFrontProcess SetFrontProcess;
+alias bindings.TransformProcessType TransformProcessType;
+
+short CPSSetProcessName (CPSProcessSerNum* PSN, String processname)
+{
+	return bindings.CPSSetProcessName(PSN, processname.ptr);
+}
+
+
+
+// Quickdraw.h
+struct Rect
+{
+    short top;
+    short left;
+    short bottom;
+    short right;
+}
+
+alias int QDRegionParseDirection;
+alias extern (C) OSStatus function (ushort message, RgnHandle rgn, /*const*/ Rect* rect, void* refCon) RegionToRectsProcPtr;
+alias RegionToRectsProcPtr RegionToRectsUPP;
+
+alias bindings.NewRgn NewRgn;
+alias bindings.RectRgn RectRgn;
+alias bindings.OpenRgn OpenRgn;
+alias bindings.OffsetRgn OffsetRgn;
+alias bindings.MoveTo MoveTo;
+alias bindings.LineTo LineTo;
+alias bindings.UnionRgn UnionRgn;
+alias bindings.CloseRgn CloseRgn;
+alias bindings.DisposeRgn DisposeRgn;
+alias bindings.PtInRgn PtInRgn;
+alias bindings.GetRegionBounds GetRegionBounds;
+alias bindings.SectRgn SectRgn;
+alias bindings.EmptyRgn EmptyRgn;
+alias bindings.DiffRgn DiffRgn;
+alias bindings.RectInRgn RectInRgn;
+alias bindings.QDRegionToRects QDRegionToRects;
+alias bindings.CopyRgn CopyRgn;
+alias bindings.SetRect SetRect;
+
+
+
+// QuickdrawTypes.h
+struct MacRegion
+{
+    ushort rgnSize; /* size in bytes; don't rely on it */
+    Rect rgnBBox; /* enclosing rectangle; in Carbon use GetRegionBounds */
+}
+
+struct Point
+{
+    short v;
+    short h;
+}
+
+alias MacRegion Region;
+alias MacRegion* RgnPtr;
+alias RgnPtr* RgnHandle;
+
+alias bool Boolean;
+alias bool BOOL;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/c/bindings.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,71 @@
+/**
+ * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Nov 18, 2008
+ * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
+ * 
+ */
+module dwt.internal.c.bindings;
+
+import dwt.internal.c.Carbon;
+public import dwt.internal.cocoa.CGPoint;
+
+extern (C):
+
+// Appearance.h
+int SetThemeCursor (ThemeCursor inCursor);
+
+
+
+// CarbonEventsCore.h
+uint GetCurrentButtonState ();
+
+
+
+// CFBase.h
+void CFRelease (CFTypeRef cf);
+
+
+
+// CFURL.h
+CFStringRef CFURLCreateStringByAddingPercentEscapes (CFAllocatorRef allocator, CFStringRef originalString,  CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding);
+
+
+
+// CGRemoteOperation.h
+CGError CGWarpMouseCursorPosition (CGPoint newCursorPosition);
+
+
+    
+// Gestalt.h
+short Gestalt (uint selector, int* response);
+
+
+
+// Processes.h
+short CPSSetProcessName (CPSProcessSerNum* PSN, char* processname);
+short GetCurrentProcess (ProcessSerialNumber* PSN);
+short SetFrontProcess (/*const*/ ProcessSerialNumber* PSN);
+int TransformProcessType (/*const*/ ProcessSerialNumber* psn, ProcessApplicationTransformState transformState);
+
+
+
+// Quickdraw.h
+RgnHandle NewRgn ();
+void RectRgn (RgnHandle rgn, /*const*/Rect* r);
+void OpenRgn ();
+void OffsetRgn (RgnHandle rgn, short dh, short dv);
+void MoveTo (short h, short v);
+void LineTo (short h, short v);
+void UnionRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn);
+void CloseRgn (RgnHandle dstRgn);
+void DisposeRgn (RgnHandle rgn);
+Boolean PtInRgn (Point pt, RgnHandle rgn);
+Rect* GetRegionBounds (RgnHandle region, Rect* bounds);
+void SectRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn);
+Boolean EmptyRgn (RgnHandle rgn);
+void DiffRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn);
+Boolean RectInRgn (/*const*/Rect* r, RgnHandle rgn);
+OSStatus QDRegionToRects (RgnHandle rgn, QDRegionParseDirection dir, RegionToRectsUPP proc, void* userData);
+void CopyRgn (RgnHandle srcRgn, RgnHandle dstRgn);
+void SetRect (Rect* r, short left, short top, short right, short bottom);
\ No newline at end of file
--- a/dwt/internal/c/carboncore/Gestalt.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.c.carboncore.Gestalt;
-
-import bindings = dwt.internal.c.carboncore.bindings;
-
-alias bindings.Gestalt Gestalt;
\ No newline at end of file
--- a/dwt/internal/c/carboncore/MacTypes.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.c.carboncore.MacTypes;
-
-/********************************************************************************
-
- Base integer types for all target OS's and CPU's
-
- UInt8            8-bit unsigned integer 
- SInt8            8-bit signed integer
- UInt16          16-bit uinteger 
- SInt16          16-bit signed integer           
- UInt32          32-bit uinteger 
- SInt32          32-bit signed integer   
- UInt64          64-bit uinteger 
- SInt64          64-bit integer   
-
- *********************************************************************************/
-alias ubyte UInt8;
-alias byte SInt8;
-alias ushort UInt16;
-alias short SInt16;
-alias uint UInt32;
-alias int SInt32;
-alias ulong UInt64;
-alias long SInt64;
-
-alias byte uint8_t;
-
-/********************************************************************************
-
- Higher level basic types
-
- OSErr                   16-bit result error code
- OSStatus                32-bit result error code
- LogicalAddress          Address in the clients virtual address space
- ConstLogicalAddress     Address in the clients virtual address space that will only be read
- PhysicalAddress         Real address as used on the hardware bus
- BytePtr                 Pointer to an array of bytes
- ByteCount               The size of an array of bytes
- ByteOffset              An offset into an array of bytes
- ItemCount               32-bit iteration count
- OptionBits              Standard 32-bit set of bit flags
- PBVersion               ?
- Duration                32-bit millisecond timer for drivers
- AbsoluteTime            64-bit clock
- ScriptCode              A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding
- LangCode                A particular language (e.g. English), as represented using a particular ScriptCode
- RegionCode              Designates a language as used in a particular region (e.g. British vs American
- English) together with other region-dependent characteristics (e.g. date format)
- FourCharCode            A 32-bit value made by packing four 1 byte characters together
- OSType                  A FourCharCode used in the OS and file system (e.g. creator)
- ResType                 A FourCharCode used to tag resources (e.g. 'DLOG')
- 
- *********************************************************************************/
-alias SInt16 OSErr;
-alias SInt32 OSStatus;
-alias void* LogicalAddress;
-alias /*const*/void* ConstLogicalAddress;
-alias void* PhysicalAddress;
-alias UInt8* BytePtr;
-alias uint ByteCount;
-alias uint ByteOffset;
-alias SInt32 Duration;
-alias UnsignedWide AbsoluteTime;
-alias UInt32 OptionBits;
-alias uint ItemCount;
-alias UInt32 PBVersion;
-alias SInt16 ScriptCode;
-alias SInt16 LangCode;
-alias SInt16 RegionCode;
-alias UInt32 FourCharCode;
-alias FourCharCode OSType;
-alias FourCharCode ResType;
-alias OSType* OSTypePtr;
-alias ResType* ResTypePtr;
-
-struct UnsignedWide
-{
-    uint hi;
-    uint lo;
-}
-
-struct ProcessSerialNumber 
-{
-    uint highLongOfPSN;
-    uint lowLongOfPSN;
-}
-
-alias ProcessSerialNumber * ProcessSerialNumberPtr;
\ No newline at end of file
--- a/dwt/internal/c/carboncore/bindings.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.c.carboncore.bindings;
-
-extern (C):
-    
-short Gestalt (uint selector, int* response);
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/c/custom.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,302 @@
+module dwt.internal.c.custom;
+
+import tango.stdc.stdlib;
+
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRange;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
+import dwt.internal.objc.cocoa.Cocoa;
+import dwt.internal.objc.runtime;
+
+extern (C):
+
+static IMP drawRect_1CALLBACK;
+
+static void drawRect(id obj, SEL sel, NSRect rect)
+{
+	return drawRect_1CALLBACK(obj, sel, &rect);
+}
+	
+IMP drawRect_CALLBACK (IMP func)
+{
+	drawRect_1CALLBACK = func;
+	return cast(IMP) &drawRect;
+}
+
+
+
+static IMP drawInteriorWithFrame_1inView_1CALLBACK;
+
+static void drawInteriorWithFrame_1inView(id obj, SEL sel, NSRect rect, id view)
+{
+	return drawInteriorWithFrame_1inView_1CALLBACK(obj, sel, &rect, view);
+}
+
+IMP drawInteriorWithFrame_inView_CALLBACK (IMP func)
+{
+	drawInteriorWithFrame_1inView_1CALLBACK = func;
+	return cast(IMP) &drawInteriorWithFrame_1inView;
+}
+
+
+
+static IMP setFrame_1CALLBACK;
+
+static void setFrame(id obj, SEL sel, NSRect rect)
+{
+	return setFrame_1CALLBACK(obj, sel, &rect);
+}
+
+IMP setFrame_CALLBACK (IMP func)
+{
+	setFrame_1CALLBACK = func;
+	return cast(IMP) &setFrame;
+}
+
+
+
+static IMP setFrameOrigin_1CALLBACK;
+
+static void setFrameOrigin(id obj, SEL sel, NSPoint point)
+{
+	return setFrameOrigin_1CALLBACK(obj, sel, &point);
+}
+
+IMP setFrameOrigin_CALLBACK (IMP func)
+{
+	setFrameOrigin_1CALLBACK = func;
+	return cast(IMP) &setFrameOrigin;
+}
+
+
+
+static IMP setFrameSize_1CALLBACK;
+
+static void setFrameSize(id obj, SEL sel, NSSize size)
+{
+	return setFrameSize_1CALLBACK(obj, sel, &size);
+}
+
+IMP setFrameSize_CALLBACK (IMP func)
+{
+    setFrameSize_1CALLBACK = func;
+	return cast(IMP) &setFrameSize;
+}
+
+
+
+static IMP hitTest_1CALLBACK;
+
+static void hitTest(id obj, SEL sel, NSPoint point)
+{
+	return hitTest_1CALLBACK(obj, sel, &point);
+}
+
+IMP hitTest_CALLBACK (IMP func)
+{
+    hitTest_1CALLBACK = func;
+	return cast(IMP) &hitTest;
+}
+
+
+
+static IMP webView_1setFrame_1CALLBACK;
+
+static void webView_1setFrame(id obj, SEL sel, id sender, NSRect rect)
+{
+	return webView_1setFrame_1CALLBACK(obj, sel, sender, &rect);
+}
+
+IMP webView_setFrame_CALLBACK (IMP func)
+{
+    webView_1setFrame_1CALLBACK = func;
+	return cast(IMP) &webView_1setFrame;
+}
+
+
+
+
+static IMP markedRange_1CALLBACK;
+
+static NSRange markedRangeProc(id obj, SEL sel)
+{
+	NSRange* ptr = cast(NSRange*) markedRange_1CALLBACK(obj, sel);
+	NSRange range = *ptr;
+	free(ptr);
+	return range;
+}
+
+IMP markedRange_CALLBACK (IMP func)
+{
+    markedRange_1CALLBACK = func;
+	return cast(IMP) &markedRangeProc;
+}
+
+
+
+static IMP selectedRange_1CALLBACK;
+
+static NSRange selectedRangeProc(id obj, SEL sel)
+{
+	NSRange* ptr = cast(NSRange*) selectedRange_1CALLBACK(obj, sel);
+	NSRange range = *ptr;
+	free(ptr);
+	return range;
+}
+
+IMP selectedRange_CALLBACK (IMP func)
+{
+    selectedRange_1CALLBACK = func;
+	return cast(IMP) &selectedRangeProc;
+}
+
+
+
+static IMP highlightSelectionInClipRect_1CALLBACK;
+
+static void highlightSelectionInClipRect(id obj, SEL sel, NSRect rect)
+{
+	return highlightSelectionInClipRect_1CALLBACK(obj, sel, &rect);
+}
+
+IMP highlightSelectionInClipRect_CALLBACK (IMP func)
+{
+    highlightSelectionInClipRect_1CALLBACK = func;
+	return cast(IMP) &highlightSelectionInClipRect;
+}
+
+
+
+static IMP attributedSubstringFromRange_1CALLBACK;
+
+static id attributedSubstringFromRangeProc(id obj, SEL sel, NSRange arg0)
+{
+	return attributedSubstringFromRange_1CALLBACK(obj, sel, &arg0);
+}
+
+IMP attributedSubstringFromRange_CALLBACK (IMP func)
+{
+    attributedSubstringFromRange_1CALLBACK = func;
+	return cast(IMP) &attributedSubstringFromRangeProc;
+}
+
+
+
+static IMP setMarkedText_1selectedRange_1CALLBACK;
+
+static void setMarkedText_1selectedRange(id obj, SEL sel, id* arg0, NSRange arg1)
+{
+	setMarkedText_1selectedRange_1CALLBACK(obj, sel, arg0, &arg1);
+}
+
+IMP setMarkedText_selectedRange_CALLBACK (IMP func)
+{
+    setMarkedText_1selectedRange_1CALLBACK = func;
+	return cast(IMP) &setMarkedText_1selectedRange;
+}
+
+
+
+static IMP characterIndexForPoint_1CALLBACK;
+
+static int characterIndexForPoint(id obj, SEL sel, NSPoint point)
+{
+	return cast(int) characterIndexForPoint_1CALLBACK(obj, sel, &point);
+}
+
+IMP characterIndexForPoint_CALLBACK (IMP func)
+{
+    characterIndexForPoint_1CALLBACK = func;
+	return cast(IMP) &characterIndexForPoint;
+}
+
+
+
+static IMP firstRectForCharacterRange_1CALLBACK;
+
+static NSRect firstRectForCharacterRangeProc(id obj, SEL sel, NSRange arg0)
+{
+	NSRect* ptr = cast(NSRect*) firstRectForCharacterRange_1CALLBACK(obj, sel, &arg0);
+	NSRect result = *ptr;
+	free(ptr);
+	return result;
+}
+
+IMP firstRectForCharacterRange_CALLBACK (IMP func)
+{
+    firstRectForCharacterRange_1CALLBACK = func;
+	return cast(IMP) &firstRectForCharacterRangeProc;
+}
+
+
+
+static IMP textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK;
+
+static NSRange textView_1willChangeSelectionFromCharacterRange_1toCharacterRange(id obj, SEL sel, id aTextView, NSRange oldSelectedCharRange, NSRange newSelectedCharRange)
+{
+	NSRange* ptr = cast(NSRange*) textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK(obj, sel, aTextView, &oldSelectedCharRange, &newSelectedCharRange);
+	NSRange result = *ptr;
+	free(ptr);
+	return result;
+}
+
+IMP textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK (IMP func)
+{
+    textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK = func;
+	return cast(IMP) &textView_1willChangeSelectionFromCharacterRange_1toCharacterRange;
+}
+
+
+
+// TODO
+IMP draggedImage_movedTo_CALLBACK (IMP func)
+{
+    return null;
+}
+
+
+
+// TODO
+IMP draggedImage_beganAt_CALLBACK (IMP func)
+{
+    return null;
+}
+
+
+
+static IMP draggedImage_1endedAt_1operation_1CALLBACK;
+
+static void draggedImage_1endedAt_1operation(id obj, SEL sel, id image, NSPoint point, NSDragOperation op)
+{
+	return draggedImage_1endedAt_1operation_1CALLBACK(obj, sel, image, &point, op);
+}
+
+IMP draggedImage_endedAt_operation_CALLBACK (IMP func)
+{
+    draggedImage_1endedAt_1operation_1CALLBACK = func;
+	return cast(IMP) &draggedImage_1endedAt_1operation;
+}
+
+
+
+static IMP accessibilityHitTest_1CALLBACK;
+
+static void accessibilityHitTest(id obj, SEL sel, NSPoint point)
+{
+	return accessibilityHitTest_1CALLBACK(obj, sel, &point);
+}
+
+IMP accessibilityHitTest_CALLBACK (IMP func)
+{
+    accessibilityHitTest_1CALLBACK = func;
+	return cast(IMP) &accessibilityHitTest;
+}
+
+
+
+// TODO
+IMP dragSelectionWithEvent_offset_slideBack_CALLBACK (IMP func)
+{
+    return null;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/c/gl.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,27 @@
+/**
+ * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 3, 2008
+ * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
+ * 
+ */
+module dwt.internal.c.gl;
+
+alias uint GLenum;
+alias ubyte GLboolean;
+alias uint GLbitfield;
+alias byte GLbyte;
+alias short GLshort;
+alias int GLint;
+alias int GLsizei;
+alias ubyte GLubyte;
+alias ushort GLushort;
+alias uint GLuint;
+alias float GLfloat;
+alias float GLclampf;
+alias double GLdouble;
+alias double GLclampd;
+alias void GLvoid;
+
+alias int GLintptr;
+alias int GLsizeiptr;
\ No newline at end of file
--- a/dwt/internal/c/hiservices/Processes.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.c.hiservices.Processes;
-
-import bindings = dwt.internal.c.hiservices.bindings;
-
-enum ProcessApplicationTransformState : uint
-{
-    kProcessTransformToForegroundApplication = 1
-}
-
-alias ProcessApplicationTransformState.kProcessTransformToForegroundApplication kProcessTransformToForegroundApplication;
-
-alias bindings.GetCurrentProcess GetCurrentProcess;
-alias bindings.SetFrontProcess SetFrontProcess;
-alias bindings.TransformProcessType TransformProcessType;
\ No newline at end of file
--- a/dwt/internal/c/hiservices/bindings.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.c.hiservices.bindings;
-
-import dwt.internal.c.carboncore.MacTypes;
-import dwt.internal.c.hiservices.Processes;
-
-extern (C):
-short GetCurrentProcess (ProcessSerialNumber* PSN);
-short SetFrontProcess (/*const*/ ProcessSerialNumber* PSN);
-int TransformProcessType (/*const*/ ProcessSerialNumber* psn, ProcessApplicationTransformState transformState);
\ No newline at end of file
--- a/dwt/internal/c/qd/Quickdraw.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.c.qd.Quickdraw;
-
-import dwt.internal.c.qd.QuickdrawTypes;
-import dwt.internal.c.carboncore.MacTypes;
-
-import bindings = dwt.internal.c.qd.bindings;
-
-struct Rect
-{
-    short top;
-    short left;
-    short bottom;
-    short right;
-}
-
-alias int QDRegionParseDirection;
-
-//template Quickdraw ()
-//{
-    alias bindings.RegionToRectsProcPtr RegionToRectsProcPtr;
-    
-    alias bindings.RegionToRectsUPP RegionToRectsUPP;
-    
-    alias bindings.NewRgn NewRgn;
-    alias bindings.RectRgn RectRgn;
-    alias bindings.OpenRgn OpenRgn;
-    alias bindings.OffsetRgn OffsetRgn;
-    alias bindings.MoveTo MoveTo;
-    alias bindings.LineTo LineTo;
-    alias bindings.UnionRgn UnionRgn;
-    alias bindings.CloseRgn CloseRgn;
-    alias bindings.DisposeRgn DisposeRgn;
-    alias bindings.PtInRgn PtInRgn;
-    alias bindings.GetRegionBounds GetRegionBounds;
-    alias bindings.SectRgn SectRgn;
-    alias bindings.EmptyRgn EmptyRgn;
-    alias bindings.DiffRgn DiffRgn;
-    alias bindings.RectInRgn RectInRgn;
-    alias bindings.QDRegionToRects QDRegionToRects;
-    alias bindings.CopyRgn CopyRgn;
-    alias bindings.SetRect SetRect;
-//}
--- a/dwt/internal/c/qd/QuickdrawTypes.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.c.qd.QuickdrawTypes;
-
-import dwt.internal.c.qd.Quickdraw;
-
-struct MacRegion
-{
-    ushort rgnSize; /* size in bytes; don't rely on it */
-    Rect rgnBBox; /* enclosing rectangle; in Carbon use GetRegionBounds */
-}
-
-struct Point
-{
-    short v;
-    short h;
-}
-
-alias MacRegion Region;
-alias MacRegion* RgnPtr;
-alias RgnPtr* RgnHandle;
-
-alias bool Boolean;
-alias bool BOOL;
--- a/dwt/internal/c/qd/bindings.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.c.qd.bindings;
-
-import dwt.internal.c.carboncore.MacTypes;
-import dwt.internal.c.qd.QuickdrawTypes;
-import dwt.internal.c.qd.Quickdraw;
-import dwt.internal.objc.runtime;
-
-
-alias extern (C) OSStatus* function (UInt16 message, RgnHandle rgn, /*const*/Rect* rect, void* refCon) RegionToRectsProcPtr;
-alias RegionToRectsProcPtr RegionToRectsUPP;
-
-extern (C):
-
-RgnHandle NewRgn ();
-void RectRgn (RgnHandle rgn, /*const*/Rect* r);
-void OpenRgn ();
-void OffsetRgn (RgnHandle rgn, short dh, short dv);
-void MoveTo (short h, short v);
-void LineTo (short h, short v);
-void UnionRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn);
-void CloseRgn (RgnHandle dstRgn);
-void DisposeRgn (RgnHandle rgn);
-Boolean PtInRgn (Point pt, RgnHandle rgn);
-Rect* GetRegionBounds (RgnHandle region, Rect* bounds);
-void SectRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn);
-Boolean EmptyRgn (RgnHandle rgn);
-void DiffRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn);
-Boolean RectInRgn (/*const*/Rect* r, RgnHandle rgn);
-OSStatus QDRegionToRects (RgnHandle rgn, QDRegionParseDirection dir, RegionToRectsUPP proc, void* userData);
-void CopyRgn (RgnHandle srcRgn, RgnHandle dstRgn);
-void SetRect (Rect* r, short left, short top, short right, short bottom);
\ No newline at end of file
--- a/dwt/internal/cocoa/CFNumberFormatter.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 31, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.CFNumberFormatter;
-
-extern (C):
-
-enum {
-    kCFNumberFormatterPadBeforePrefix = 0,
-    kCFNumberFormatterPadAfterPrefix = 1,
-    kCFNumberFormatterPadBeforeSuffix = 2,
-    kCFNumberFormatterPadAfterSuffix = 3
-}
-
-enum CFNumberFormatterRoundingMode {
-    kCFNumberFormatterRoundCeiling = 0,
-    kCFNumberFormatterRoundFloor = 1,
-    kCFNumberFormatterRoundDown = 2,
-    kCFNumberFormatterRoundUp = 3,
-    kCFNumberFormatterRoundHalfEven = 4,
-    kCFNumberFormatterRoundHalfDown = 5,
-    kCFNumberFormatterRoundHalfUp = 6
-}
-
-alias CFNumberFormatterRoundingMode.kCFNumberFormatterRoundCeiling kCFNumberFormatterRoundCeiling;
-alias CFNumberFormatterRoundingMode.kCFNumberFormatterRoundFloor kCFNumberFormatterRoundFloor;
-alias CFNumberFormatterRoundingMode.kCFNumberFormatterRoundDown kCFNumberFormatterRoundDown;
-alias CFNumberFormatterRoundingMode.kCFNumberFormatterRoundUp kCFNumberFormatterRoundUp;
-alias CFNumberFormatterRoundingMode.kCFNumberFormatterRoundHalfEven kCFNumberFormatterRoundHalfEven;
-alias CFNumberFormatterRoundingMode.kCFNumberFormatterRoundHalfDown kCFNumberFormatterRoundHalfDown;
-alias CFNumberFormatterRoundingMode.kCFNumberFormatterRoundHalfUp kCFNumberFormatterRoundHalfUp;
-
-enum {
-    kCFNumberFormatterNoStyle = 0,
-    kCFNumberFormatterDecimalStyle = 1,
-    kCFNumberFormatterCurrencyStyle = 2,
-    kCFNumberFormatterPercentStyle = 3,
-    kCFNumberFormatterScientificStyle = 4,
-    kCFNumberFormatterSpellOutStyle = 5
-}
\ No newline at end of file
--- a/dwt/internal/cocoa/CFPropertyList.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 28, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.CFPropertyList;
-
-extern (C):
-
-enum CFPropertyListFormat {
-    kCFPropertyListOpenStepFormat = 1,
-    kCFPropertyListXMLFormat_v1_0 = 100,
-    kCFPropertyListBinaryFormat_v1_0 = 200
-}
-
-alias CFPropertyListFormat.kCFPropertyListOpenStepFormat kCFPropertyListOpenStepFormat;
-alias CFPropertyListFormat.kCFPropertyListXMLFormat_v1_0 kCFPropertyListXMLFormat_v1_0;
-alias CFPropertyListFormat.kCFPropertyListBinaryFormat_v1_0 kCFPropertyListBinaryFormat_v1_0;
-
-enum CFPropertyListMutabilityOptions {
-    kCFPropertyListImmutable = 0,
-    kCFPropertyListMutableContainers = 1,
-    kCFPropertyListMutableContainersAndLeaves = 2
-}
-
-alias CFPropertyListMutabilityOptions.kCFPropertyListImmutable kCFPropertyListImmutable;
-alias CFPropertyListMutabilityOptions.kCFPropertyListMutableContainers kCFPropertyListMutableContainers;
-alias CFPropertyListMutabilityOptions.kCFPropertyListMutableContainersAndLeaves kCFPropertyListMutableContainersAndLeaves;
\ No newline at end of file
--- a/dwt/internal/cocoa/CFRunLoopRef.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 4, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.CFRunLoopRef;
-
-extern (C):
-
-alias void** CFRunLoopRef;
\ No newline at end of file
--- a/dwt/internal/cocoa/CGBase.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.CGBase;
-
-extern (C):
-
-static if ((void*).sizeof > int.sizeof) // 64bit target
-    alias double CGFloat;
-else
-    alias float CGFloat;
\ No newline at end of file
--- a/dwt/internal/cocoa/CGColorSpace.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 26, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.CGColorSpace;
-
-alias void* CGColorSpace;
-alias CGColorSpace* CGColorSpaceRef;
--- a/dwt/internal/cocoa/CGEventTypes.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 22, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.CGEventTypes;
-
-alias void* CGEventRef;
\ No newline at end of file
--- a/dwt/internal/cocoa/CGFloat.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.CGFloat;
-
-extern (C):
-
-static if ((void*).sizeof > int.sizeof) // 64bit target
-    alias double CGFloat;
-
-else
-    alias float CGFloat;
\ No newline at end of file
--- a/dwt/internal/cocoa/CGPoint.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/CGPoint.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,13 +9,11 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.CGPoint;
 
-import dwt.internal.cocoa.CGFloat;
-
-extern (C):
+import dwt.internal.c.Carbon;
 
 struct CGPoint {
     CGFloat x;
--- a/dwt/internal/cocoa/CGRect.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/CGRect.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.CGRect;
 
--- a/dwt/internal/cocoa/CGSize.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/CGSize.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.CGSize;
 
--- a/dwt/internal/cocoa/CIColor.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.CIColor;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class CIColor : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public CIColor initWithColor (NSColor color)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithColor_1, color !is null ? color.id_ : null);
-        return result !is null ? this : null;
-    }
-}
\ No newline at end of file
--- a/dwt/internal/cocoa/CIImage.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.CIImage;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSBitmapImageRep;
-import dwt.internal.cocoa.NSImage : NSCompositingOperation;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class CIImage : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void drawAtPoint (NSPoint point, NSRect fromRect, NSCompositingOperation op, CGFloat delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawAtPoint_1fromRect_1operation_1fraction_1, point, fromRect, op, delta);
-    }
-
-    public void drawInRect (NSRect rect, NSRect fromRect, NSCompositingOperation op, CGFloat delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawInRect_1fromRect_1operation_1fraction_1, rect, fromRect, op, delta);
-    }
-
-    public CIImage initWithBitmapImageRep (NSBitmapImageRep bitmapImageRep)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBitmapImageRep_1, bitmapImageRep !is null ? bitmapImageRep.id_ : null);
-        return result !is null ? this : null;
-    }
-
-}
--- a/dwt/internal/cocoa/DOMDocument.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/DOMDocument.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,229 +1,42 @@
 /*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.DOMDocument;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.WebFrame;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.objc : id;
+import objc = dwt.internal.objc.runtime;
 
 public class DOMDocument : NSObject {
 
-    public this () {
-        super();
-    }
-
-    public this (objc.id id) {
-        super(id);
-    }
-
-    //  public NSURL URLWithAttributeString(NSString String) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_URLWithAttributeString_1, String !is null ? String.id : 0);
-    //      return result !is 0 ? new NSURL(result) : null;
-    //  }
-
-    //  public DOMNode adoptNode(DOMNode source) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_adoptNode_1, source !is null ? source.id : 0);
-    //      return result !is 0 ? new DOMNode(result) : null;
-    //  }
-
-    //  public DOMAttr createAttribute(NSString name) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createAttribute_1, name !is null ? name.id : 0);
-    //      return result !is 0 ? new DOMAttr(result) : null;
-    //  }
-
-    //  public DOMAttr createAttributeNS__(NSString createAttributeNS, NSString ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createAttributeNS_1_1, createAttributeNS !is null ? createAttributeNS.id : 0,  !is null ? .id : 0);
-    //      return result !is 0 ? new DOMAttr(result) : null;
-    //  }
-
-    //  public DOMAttr createAttributeNS_qualifiedName_(NSString namespaceURI, NSString qualifiedName) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createAttributeNS_1qualifiedName_1, namespaceURI !is null ? namespaceURI.id : 0, qualifiedName !is null ? qualifiedName.id : 0);
-    //      return result !is 0 ? new DOMAttr(result) : null;
-    //  }
-
-    //  public DOMCDATASection createCDATASection(NSString data) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createCDATASection_1, data !is null ? data.id : 0);
-    //      return result !is 0 ? new DOMCDATASection(result) : null;
-    //  }
-
-    //  public DOMCSSStyleDeclaration createCSSStyleDeclaration() {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createCSSStyleDeclaration);
-    //      return result !is 0 ? new DOMCSSStyleDeclaration(result) : null;
-    //  }
-
-    //  public DOMComment createComment(NSString data) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createComment_1, data !is null ? data.id : 0);
-    //      return result !is 0 ? new DOMComment(result) : null;
-    //  }
-
-    //  public DOMDocumentFragment createDocumentFragment() {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createDocumentFragment);
-    //      return result !is 0 ? new DOMDocumentFragment(result) : null;
-    //  }
+public this() {
+    super();
+}
 
-    //  public DOMElement createElement(NSString tagName) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createElement_1, tagName !is null ? tagName.id : 0);
-    //      return result !is 0 ? new DOMElement(result) : null;
-    //  }
-
-    //  public DOMElement createElementNS__(NSString createElementNS, NSString ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createElementNS_1_1, createElementNS !is null ? createElementNS.id : 0,  !is null ? .id : 0);
-    //      return result !is 0 ? new DOMElement(result) : null;
-    //  }
-
-    //  public DOMElement createElementNS_qualifiedName_(NSString namespaceURI, NSString qualifiedName) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createElementNS_1qualifiedName_1, namespaceURI !is null ? namespaceURI.id : 0, qualifiedName !is null ? qualifiedName.id : 0);
-    //      return result !is 0 ? new DOMElement(result) : null;
-    //  }
-
-    //  public DOMEntityReference createEntityReference(NSString name) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createEntityReference_1, name !is null ? name.id : 0);
-    //      return result !is 0 ? new DOMEntityReference(result) : null;
-    //  }
-
-    //  public DOMEvent createEvent(NSString eventType) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createEvent_1, eventType !is null ? eventType.id : 0);
-    //      return result !is 0 ? new DOMEvent(result) : null;
-    //  }
-
-    //  public DOMXPathExpression createExpression__(NSString createExpression, id  ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createExpression_1_1, createExpression !is null ? createExpression.id : 0,  !is null ? .id : 0);
-    //      return result !is 0 ? new DOMXPathExpression(result) : null;
-    //  }
-
-    //  public DOMXPathExpression createExpression_resolver_(NSString expression, id  resolver) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createExpression_1resolver_1, expression !is null ? expression.id : 0, resolver !is null ? resolver.id : 0);
-    //      return result !is 0 ? new DOMXPathExpression(result) : null;
-    //  }
-
-    //  public id  createNSResolver(DOMNode nodeResolver) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createNSResolver_1, nodeResolver !is null ? nodeResolver.id : 0);
-    //      return result !is 0 ? new id (result) : null;
-    //  }
-
-    //  public DOMNodeIterator createNodeIterator____(DOMNode createNodeIterator, int , id  , bool ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createNodeIterator_1_1_1_1, createNodeIterator !is null ? createNodeIterator.id : 0, ,  !is null ? .id : 0, );
-    //      return result !is 0 ? new DOMNodeIterator(result) : null;
-    //  }
-
-    //  public DOMNodeIterator createNodeIterator_whatToShow_filter_expandEntityReferences_(DOMNode root, int whatToShow, id  filter, bool expandEntityReferences) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createNodeIterator_1whatToShow_1filter_1expandEntityReferences_1, root !is null ? root.id : 0, whatToShow, filter !is null ? filter.id : 0, expandEntityReferences);
-    //      return result !is 0 ? new DOMNodeIterator(result) : null;
-    //  }
-
-    //  public DOMProcessingInstruction createProcessingInstruction__(NSString createProcessingInstruction, NSString ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createProcessingInstruction_1_1, createProcessingInstruction !is null ? createProcessingInstruction.id : 0,  !is null ? .id : 0);
-    //      return result !is 0 ? new DOMProcessingInstruction(result) : null;
-    //  }
+public this(objc.id id) {
+    super(id);
+}
 
-    //  public DOMProcessingInstruction createProcessingInstruction_data_(NSString target, NSString data) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createProcessingInstruction_1data_1, target !is null ? target.id : 0, data !is null ? data.id : 0);
-    //      return result !is 0 ? new DOMProcessingInstruction(result) : null;
-    //  }
-
-    //  public DOMRange createRange() {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createRange);
-    //      return result !is 0 ? new DOMRange(result) : null;
-    //  }
-
-    //  public DOMText createTextNode(NSString data) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createTextNode_1, data !is null ? data.id : 0);
-    //      return result !is 0 ? new DOMText(result) : null;
-    //  }
-
-    //  public DOMTreeWalker createTreeWalker____(DOMNode createTreeWalker, int , id  , bool ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createTreeWalker_1_1_1_1, createTreeWalker !is null ? createTreeWalker.id : 0, ,  !is null ? .id : 0, );
-    //      return result !is 0 ? new DOMTreeWalker(result) : null;
-    //  }
-
-    //  public DOMTreeWalker createTreeWalker_whatToShow_filter_expandEntityReferences_(DOMNode root, int whatToShow, id  filter, bool expandEntityReferences) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_createTreeWalker_1whatToShow_1filter_1expandEntityReferences_1, root !is null ? root.id : 0, whatToShow, filter !is null ? filter.id : 0, expandEntityReferences);
-    //      return result !is 0 ? new DOMTreeWalker(result) : null;
-    //  }
-
-    //  public DOMXPathResult evaluate_____(NSString evaluate, DOMNode , id  , short , DOMXPathResult ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_evaluate_1_1_1_1_1, evaluate !is null ? evaluate.id : 0,  !is null ? .id : 0,  !is null ? .id : 0, ,  !is null ? .id : 0);
-    //      return result !is 0 ? new DOMXPathResult(result) : null;
-    //  }
-
-    //  public DOMXPathResult evaluate_contextNode_resolver_type_inResult_(NSString expression, DOMNode contextNode, id  resolver, short type, DOMXPathResult inResult) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_evaluate_1contextNode_1resolver_1type_1inResult_1, expression !is null ? expression.id : 0, contextNode !is null ? contextNode.id : 0, resolver !is null ? resolver.id : 0, type, inResult !is null ? inResult.id : 0);
-    //      return result !is 0 ? new DOMXPathResult(result) : null;
-    //  }
-
-    //  public DOMCSSStyleDeclaration getComputedStyle__(DOMElement getComputedStyle, NSString ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getComputedStyle_1_1, getComputedStyle !is null ? getComputedStyle.id : 0,  !is null ? .id : 0);
-    //      return result !is 0 ? new DOMCSSStyleDeclaration(result) : null;
-    //  }
-
-    //  public DOMCSSStyleDeclaration getComputedStyle_pseudoElement_(DOMElement element, NSString pseudoElement) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getComputedStyle_1pseudoElement_1, element !is null ? element.id : 0, pseudoElement !is null ? pseudoElement.id : 0);
-    //      return result !is 0 ? new DOMCSSStyleDeclaration(result) : null;
-    //  }
-
-    //  public DOMElement getElementById(NSString elementId) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getElementById_1, elementId !is null ? elementId.id : 0);
-    //      return result !is 0 ? new DOMElement(result) : null;
-    //  }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    //  public DOMNodeList getElementsByTagName(NSString tagname) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getElementsByTagName_1, tagname !is null ? tagname.id : 0);
-    //      return result !is 0 ? new DOMNodeList(result) : null;
-    //  }
-
-    //  public DOMNodeList getElementsByTagNameNS__(NSString getElementsByTagNameNS, NSString ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getElementsByTagNameNS_1_1, getElementsByTagNameNS !is null ? getElementsByTagNameNS.id : 0,  !is null ? .id : 0);
-    //      return result !is 0 ? new DOMNodeList(result) : null;
-    //  }
-
-    //  public DOMNodeList getElementsByTagNameNS_localName_(NSString namespaceURI, NSString localName) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getElementsByTagNameNS_1localName_1, namespaceURI !is null ? namespaceURI.id : 0, localName !is null ? localName.id : 0);
-    //      return result !is 0 ? new DOMNodeList(result) : null;
-    //  }
-
-    //  public DOMCSSRuleList getMatchedCSSRules_pseudoElement_(DOMElement element, NSString pseudoElement) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getMatchedCSSRules_1pseudoElement_1, element !is null ? element.id : 0, pseudoElement !is null ? pseudoElement.id : 0);
-    //      return result !is 0 ? new DOMCSSRuleList(result) : null;
-    //  }
-
-    //  public DOMCSSRuleList getMatchedCSSRules_pseudoElement_authorOnly_(DOMElement element, NSString pseudoElement, bool authorOnly) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getMatchedCSSRules_1pseudoElement_1authorOnly_1, element !is null ? element.id : 0, pseudoElement !is null ? pseudoElement.id : 0, authorOnly);
-    //      return result !is 0 ? new DOMCSSRuleList(result) : null;
-    //  }
+public WebFrame webFrame() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_webFrame);
+    return result !is null ? new WebFrame(result) : null;
+}
 
-    //  public DOMCSSStyleDeclaration getOverrideStyle__(DOMElement getOverrideStyle, NSString ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getOverrideStyle_1_1, getOverrideStyle !is null ? getOverrideStyle.id : 0,  !is null ? .id : 0);
-    //      return result !is 0 ? new DOMCSSStyleDeclaration(result) : null;
-    //  }
-
-    //  public DOMCSSStyleDeclaration getOverrideStyle_pseudoElement_(DOMElement element, NSString pseudoElement) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_getOverrideStyle_1pseudoElement_1, element !is null ? element.id : 0, pseudoElement !is null ? pseudoElement.id : 0);
-    //      return result !is 0 ? new DOMCSSStyleDeclaration(result) : null;
-    //  }
-
-    //  public DOMNode importNode__(DOMNode importNode, bool ) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_importNode_1_1, importNode !is null ? importNode.id : 0, );
-    //      return result !is 0 ? new DOMNode(result) : null;
-    //  }
-
-    //  public DOMNode importNode_deep_(DOMNode importedNode, bool deep) {
-    //      int result = OS.objc_msgSend(this.id, OS.sel_importNode_1deep_1, importedNode !is null ? importedNode.id : 0, deep);
-    //      return result !is 0 ? new DOMNode(result) : null;
-    //  }
-
-    public WebFrame webFrame () {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_webFrame);
-        return result !is null ? new WebFrame(result) : null;
-    }
-
-    /* DOMEventTarget */
-
-    public void addEventListener_listener_useCapture (NSString type, id listener, bool useCapture) {
-        OS.objc_msgSend(this.id, OS.sel_addEventListener_1listener_1useCapture_1, type !is null ? type.id : null,
-                listener !is null ? listener.id : null, useCapture);
-    }
 }
--- a/dwt/internal/cocoa/DOMEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/DOMEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,69 +1,40 @@
 /*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.DOMEvent;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.objc : id;
+import objc = dwt.internal.objc.runtime;
 
 public class DOMEvent : NSObject {
 
-    public this () {
-        super();
-    }
-
-    public this (objc.id id) {
-        super(id);
-    }
-
-    public bool bubbles () {
-        return OS.objc_msgSend(this.id, OS.sel_bubbles) !is null;
-    }
+public this() {
+    super();
+}
 
-    public bool cancelable () {
-        return OS.objc_msgSend(this.id, OS.sel_cancelable) !is null;
-    }
-
-    public id currentTarget () {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_currentTarget);
-        return result !is null ? new id(result) : null;
-    }
-
-    public short eventPhase () {
-        return cast(short) OS.objc_msgSend(this.id, OS.sel_eventPhase);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void initEvent___ (NSString initEvent, bool canBubbleArg, bool cancelableArg) {
-        OS.objc_msgSend(this.id, OS.sel_initEvent_1_1_1, initEvent !is null ? initEvent.id : null, canBubbleArg, cancelableArg);
-    }
-
-    public void initEvent_canBubbleArg_cancelableArg_ (NSString eventTypeArg, bool canBubbleArg, bool cancelableArg) {
-        OS.objc_msgSend(this.id, OS.sel_initEvent_1canBubbleArg_1cancelableArg_1, eventTypeArg !is null ? eventTypeArg.id : null, canBubbleArg,
-                cancelableArg);
-    }
-
-    public void preventDefault () {
-        OS.objc_msgSend(this.id, OS.sel_preventDefault);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void stopPropagation () {
-        OS.objc_msgSend(this.id, OS.sel_stopPropagation);
-    }
-
-    public id target () {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
+public void preventDefault() {
+    OS.objc_msgSend(this.id, OS.sel_preventDefault);
+}
 
-    public long timeStamp () {
-        return cast(long) OS.objc_msgSend(this.id, OS.sel_timeStamp);
-    }
-
-    public NSString type () {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_type);
-        return result !is null ? new NSString(result) : null;
-    }
 }
--- a/dwt/internal/cocoa/DOMKeyboardEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/DOMKeyboardEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,57 +1,60 @@
 /*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.DOMKeyboardEvent;
 
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.DOMUIEvent;
 import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
 
-public class DOMKeyboardEvent : NSObject {
-
-    public this () {
-        super();
-    }
+public class DOMKeyboardEvent : DOMUIEvent {
 
-    public this (int id) {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public bool altKey () {
-        return OS.objc_msgSend(this.id, OS.sel_altKey) !is 0;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public int charCode () {
-        return OS.objc_msgSend(this.id, OS.sel_charCode);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool ctrlKey () {
-        return OS.objc_msgSend(this.id, OS.sel_ctrlKey) !is 0;
-    }
+public bool altKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_altKey);
+}
 
-    public bool getModifierState (NSString keyIdentifierArg) {
-        return OS.objc_msgSend(this.id, OS.sel_getModifierState_1, keyIdentifierArg !is null ? keyIdentifierArg.id : 0) !is 0;
-    }
+public int charCode() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_charCode);
+}
 
-    public int keyCode () {
-        return OS.objc_msgSend(this.id, OS.sel_keyCode);
-    }
+public bool ctrlKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_ctrlKey);
+}
 
-    public int keyLocation () {
-        return OS.objc_msgSend(this.id, OS.sel_keyLocation);
-    }
-
-    public bool metaKey () {
-        return OS.objc_msgSend(this.id, OS.sel_metaKey) !is 0;
-    }
+public int keyCode() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_keyCode);
+}
 
-    public void preventDefault () {
-        OS.objc_msgSend(this.id, OS.sel_preventDefault);
-    }
+public bool metaKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_metaKey);
+}
 
-    public bool shiftKey () {
-        return OS.objc_msgSend(this.id, OS.sel_shiftKey) !is 0;
-    }
+public bool shiftKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_shiftKey);
+}
 
 }
--- a/dwt/internal/cocoa/DOMMouseEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/DOMMouseEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,73 +1,64 @@
 /*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.DOMMouseEvent;
 
 import dwt.dwthelper.utils;
-import dwt.internal.cocoa.NSObject;
-
-public class DOMMouseEvent : NSObject {
-
-    public this () {
-        super();
-    }
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.DOMUIEvent;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
 
-    public this (int id) {
-        super(id);
-    }
+public class DOMMouseEvent : DOMUIEvent {
 
-    public bool altKey () {
-        return OS.objc_msgSend(this.id, OS.sel_altKey) !is 0;
-    }
+public this() {
+    super();
+}
 
-    public short button () {
-        return cast(short) OS.objc_msgSend(this.id, OS.sel_button);
-    }
-
-    public int clientX () {
-        return OS.objc_msgSend(this.id, OS.sel_clientX);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public int clientY () {
-        return OS.objc_msgSend(this.id, OS.sel_clientY);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool ctrlKey () {
-        return OS.objc_msgSend(this.id, OS.sel_ctrlKey) !is 0;
-    }
+public bool altKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_altKey);
+}
 
-    public int detail () {
-        return OS.objc_msgSend(this.id, OS.sel_detail);
-    }
-
-    //public void initMouseEvent_______________(NSString initMouseEvent, bool canBubble, bool cancelable, DOMAbstractView view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, short button, id relatedTarget) {
-    //  OS.objc_msgSend(this.id, OS.sel_initMouseEvent_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1, initMouseEvent !is null ? initMouseEvent.id : 0, canBubble, cancelable, view !is null ? view.id : 0, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget !is null ? relatedTarget.id : 0);
-    //}
+public short button() {
+    return cast(short)OS.objc_msgSend(this.id, OS.sel_button);
+}
 
-    //public void initMouseEvent_canBubble_cancelable_view_detail_screenX_screenY_clientX_clientY_ctrlKey_altKey_shiftKey_metaKey_button_relatedTarget_(NSString type, bool canBubble, bool cancelable, DOMAbstractView view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, short button, id  relatedTarget) {
-    //  OS.objc_msgSend(this.id, OS.sel_initMouseEvent_1canBubble_1cancelable_1view_1detail_1screenX_1screenY_1clientX_1clientY_1ctrlKey_1altKey_1shiftKey_1metaKey_1button_1relatedTarget_1, type !is null ? type.id : 0, canBubble, cancelable, view !is null ? view.id : 0, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget !is null ? relatedTarget.id : 0);
-    //}
+public int clientX() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_clientX);
+}
 
-    public bool metaKey () {
-        return OS.objc_msgSend(this.id, OS.sel_metaKey) !is 0;
-    }
+public int clientY() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_clientY);
+}
 
-    public id relatedTarget () {
-        int result = OS.objc_msgSend(this.id, OS.sel_relatedTarget);
-        return result !is 0 ? new id(result) : null;
-    }
+public bool ctrlKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_ctrlKey);
+}
 
-    public int screenX () {
-        return OS.objc_msgSend(this.id, OS.sel_screenX);
-    }
+public bool metaKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_metaKey);
+}
 
-    public int screenY () {
-        return OS.objc_msgSend(this.id, OS.sel_screenY);
-    }
-
-    public bool shiftKey () {
-        return OS.objc_msgSend(this.id, OS.sel_shiftKey) !is 0;
-    }
+public bool shiftKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_shiftKey);
+}
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/DOMUIEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.DOMUIEvent;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.DOMEvent;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
+
+public class DOMUIEvent : DOMEvent {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public int detail() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_detail);
+}
+
+}
--- a/dwt/internal/cocoa/DOMWheelEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/DOMWheelEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,60 +1,64 @@
 /*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.DOMWheelEvent;
 
 import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
 
 public class DOMWheelEvent : NSObject {
 
-    public this () {
-        super();
-    }
+public this() {
+    super();
+}
 
-    public this (int id) {
-        super(id);
-    }
-
-    public bool altKey () {
-        return OS.objc_msgSend(this.id, OS.sel_altKey) !is 0;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public int clientX () {
-        return OS.objc_msgSend(this.id, OS.sel_clientX);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public int clientY () {
-        return OS.objc_msgSend(this.id, OS.sel_clientY);
-    }
+public bool altKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_altKey);
+}
 
-    public bool ctrlKey () {
-        return OS.objc_msgSend(this.id, OS.sel_ctrlKey) !is 0;
-    }
+public int clientX() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_clientX);
+}
 
-    public bool isHorizontal () {
-        return OS.objc_msgSend(this.id, OS.sel_isHorizontal) !is 0;
-    }
+public int clientY() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_clientY);
+}
 
-    public bool metaKey () {
-        return OS.objc_msgSend(this.id, OS.sel_metaKey) !is 0;
-    }
-
-    public int screenX () {
-        return OS.objc_msgSend(this.id, OS.sel_screenX);
-    }
+public bool ctrlKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_ctrlKey);
+}
 
-    public int screenY () {
-        return OS.objc_msgSend(this.id, OS.sel_screenY);
-    }
+public bool metaKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_metaKey);
+}
 
-    public bool shiftKey () {
-        return OS.objc_msgSend(this.id, OS.sel_shiftKey) !is 0;
-    }
+public bool shiftKey() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_shiftKey);
+}
 
-    public int wheelDelta () {
-        return OS.objc_msgSend(this.id, OS.sel_wheelDelta);
-    }
+public int wheelDelta() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_wheelDelta);
+}
 
 }
--- a/dwt/internal/cocoa/IconRef.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 27, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.IconRef;
-
-extern (C):
-
-alias void* OpaqueIconRef;
-alias OpaqueIconRef* IconRef;
\ No newline at end of file
--- a/dwt/internal/cocoa/MacGenerator.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,839 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.MacGenerator;
-
-import tango.text.xml.Document;
-
-import dwt.dwthelper.BufferedOutputStream;
-import dwt.dwthelper.FileOutputStream;
-/*import dwt.dwthelper.PrintStream;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import com.sun.org.apache.xerces.internal.parsers.DOMParser;
-import org.w3c.dom.*;*/
-
-import dwt.dwthelper.utils;
-
-public class MacGenerator {
-    String[] classes;
-    String xml[];
-    String outputDir;
-    
-    //PrintStream output;
-    
-public this(String[] xml) 
-{
-    this.xml = xml; 
-}
-    
-public void print (String str) {
-    /*PrintStream output = this.output;
-    if (output is null) output = System.out;
-    output.print(str);*/
-}
-
-public void println() {
-    /*PrintStream output = this.output;
-    if (output is null) output = System.out;
-    output.println();*/
-}
-
-public void generateConstants()  
-{
-    foreach (str ; xml)
-    {
-        Document document = new Document!(char);
-        document.parse(str);
-        
-        foreach (node ; document.root.children)
-        {
-            if ("constant" == node.name)
-            {
-                Node attribute;
-                
-                print("public static final native int ");
-                
-                foreach (a ; node.attributes)
-                    if (a.name == "name")
-                    {
-                        attribute = a;
-                        break;
-                    }
-                
-                print(attribute.value);
-                print("();");
-                println;
-            }
-        }
-    }
-}
-
-public void generateConstantsMetaData() 
-{
-    foreach (str ; xml)
-    {
-        Document document = new Document!(char);
-        document.parse(str);
-        
-        foreach (node ; document.root.children)
-        {
-            if ("constant" == node.name)
-            {
-                Node attribute;
-                
-                print("OS_");
-                
-                foreach (a ; node.attributes)
-                    if (a.name == "name")
-                    {
-                        attribute = a;
-                        break;
-                    }
-                
-                print(attribute.value);
-                print("=flags=const");
-                println;
-            }
-        }
-    }
-}
-
-public void generateEnums() 
-{
-    foreach (str ; xml)
-    {
-        Document document = new Document!(char);
-        document.parse(str);
-        
-        foreach (node ; document.root.children)
-        {
-            if ("enum" == node.name)
-            {
-                Node attributeName = null;
-                Node attributeValue = null;
-                
-                print("OS_");
-                
-                foreach (a ; node.attributes)
-                    if (a.name == "value")
-                    {
-                        attributeValue = a;
-                        break;
-                    }
-                
-                if (attributeValue !is null)
-                {
-                    print("public static final ");
-                    
-                    if (attributeValue.value.indexOf('.') !is -1)
-                        print("double ");
-                    
-                    else
-                        print("int ");
-                }
-                
-                foreach (a ; node.attributes)
-                    if (a.name == "name")
-                    {
-                        attributeName = a;
-                        break;
-                    }
-                
-                print(attributeName.value);
-                print(" = ");
-                print(attributeValue.value);
-                print(";");
-                println;
-            }
-        }
-    }
-}
-
-bool isStruct(Node node)
-{
-    String code;
-    
-    foreach (a ; node.attributes)
-        if(a.name == "type")
-        {
-            code = a.value;
-            break;
-        }
-
-    return code.startsWith("{");
-}
-
-bool isFloatingPoint(Node node) {
-    NamedNodeMap attributes = node.getAttributes();
-    String code = attributes.getNamedItem("type").getNodeValue();
-    return code.opEquals("f") || code.opEquals("d");
-}
-
-bool isObject(Node node) {
-    NamedNodeMap attributes = node.getAttributes();
-    String code = attributes.getNamedItem("type").getNodeValue();
-    return code.opEquals("@");
-}
-
-bool isBoolean(Node node) {
-    NamedNodeMap attributes = node.getAttributes();
-    String code = attributes.getNamedItem("type").getNodeValue();
-    return code.opEquals("B");
-}
-
-bool getGenerateClass(String className) {
-    if (classes !is null) {
-        for (int i = 0; i < classes.length; i++) {
-            if (className.opEquals(classes[i])) return true;
-        }
-        return false;
-    }
-    return true;
-}
-
-public bool isUnique(Node method, NodeList methods) {
-    String methodName = method.getAttributes().getNamedItem("selector").getNodeValue();
-    int index = methodName.indexOf(":");
-    if (index !is -1) methodName = methodName.substring(0, index);
-    for (int j = 0; j < methods.getLength(); j++) {
-        Node other = methods.item(j);
-        NamedNodeMap attributes = other.getAttributes();
-        Node otherSel = null;
-        if (attributes !is null) otherSel = attributes.getNamedItem("selector");
-        if (other !is method && otherSel !is null) {
-            String otherName = otherSel.getNodeValue();
-            index = otherName.indexOf(":");
-            if (index !is -1) otherName = otherName.substring(0, index);
-            if (methodName.opEquals(otherName)) {
-                return false;
-            }
-        }
-    }
-    return true;
-}
-
-public void generateClasses() {
-    for (int x = 0; x < xml.length; x++) {
-        DOMParser parser = new DOMParser();
-        parser.parse(xml[x]);
-        Document document = parser.getDocument();
-        NodeList list = document.getDocumentElement().getChildNodes();
-        for (int i = 0; i < list.getLength(); i++) {
-            Node node = list.item(i);
-            if ("class".opEquals(node.getLocalName())) {
-                NamedNodeMap attributes = node.getAttributes();
-                String name = attributes.getNamedItem("name").getNodeValue();
-                if (getGenerateClass(name)) {
-                    if (outputDir !is null) {
-                        FileOutputStream  is = new FileOutputStream(outputDir + "/" + name + ".java");
-                        out = new PrintStream(new BufferedOutputStream(is));
-                    }
-                    out("module dwt.internal.cocoa;");
-                    outln();
-                    outln();
-                    out("public class ");
-                    out(name);
-                    if (name.opEquals("NSObject")) {
-                        out(" : id {");
-                    } else {
-                        out(" : NSObject {");
-                    }
-                    outln();
-                    outln();
-                    out("public ");
-                    out(name);
-                    out("() {");
-                    outln();
-                    out("\tsuper();");
-                    outln();
-                    out("}");
-                    outln();
-                    outln();
-                    out("public ");
-                    out(name);
-                    out("(int id) {");
-                    outln();
-                    out("\tsuper(id);");
-                    outln();
-                    out("}");
-                    outln();
-                    outln();
-                    NodeList methods = node.getChildNodes();
-                    for (int j = 0; j < methods.getLength(); j++) {
-                        Node method = methods.item(j);
-                        if ("method".opEquals(method.getLocalName())) {
-                            String sel = method.getAttributes().getNamedItem("selector").getNodeValue();
-                            out("public ");
-                            bool isStatic = method.getAttributes().getNamedItem("class_method") !is null; 
-                            if (isStatic) out("static ");
-                            Node returnNode = getReturnNode(method.getChildNodes());
-                            if (getType(returnNode).opEquals("void")) returnNode = null;
-                            if (returnNode !is null) {
-                                out(getJavaType(returnNode));
-                                out(" ");
-                            } else {
-                                out("void ");
-                            }
-                            String methodName = sel;
-                            if (isUnique(method, methods)) {
-                                int index = methodName.indexOf(":");
-                                if (index !is -1) methodName = methodName.substring(0, index);
-                            } else {
-                                methodName = methodName.replaceAll(":", "_");
-                                if (isStatic) methodName = "static_" + methodName;
-                            }
-                            out(methodName);
-                            out("(");
-                            NodeList params = method.getChildNodes();
-                            bool first = true;
-                            for (int k = 0; k < params.getLength(); k++) {
-                                Node param = params.item(k);
-                                if ("arg".opEquals(param.getLocalName())) {
-                                    NamedNodeMap paramAttributes = param.getAttributes();
-                                    if (!first) out(", ");
-                                    out(getJavaType(param));
-                                    first = false;
-                                    out(" ");
-                                    String paramName = paramAttributes.getNamedItem("name").getNodeValue();
-                                    if (paramName.opEquals("bool")) paramName = "b";
-                                    out(paramName);
-                                }
-                            }
-                            out(") {");
-                            outln();
-                            if (returnNode !is null && isStruct(returnNode)) {
-                                String type = getJavaType(returnNode);
-                                out("\t");
-                                out(type);
-                                out(" result = new ");
-                                out(type);
-                                out("();");
-                                outln();
-                                out("\tOS.objc_msgSend_stret(result, ");
-                            } else if (returnNode !is null && isFloatingPoint(returnNode)) {
-                                String type = getJavaType(returnNode);
-                                out("\treturn ");
-                                if (type.opEquals("float")) out("(float)");
-                                out("OS.objc_msgSend_fpret(");
-                            } else if (returnNode !is null && isObject(returnNode)) {
-                                out("\tint result = OS.objc_msgSend(");
-                            } else {
-                                if (returnNode !is null) {
-                                    out("\treturn ");
-                                    String type = getJavaType(returnNode);
-                                    if (!(type.opEquals("int") || type.opEquals("bool"))) {
-                                        out("(");
-                                        out(type);
-                                        out(")");
-                                    }
-                                } else {
-                                    out("\t");
-                                }
-                                out("OS.objc_msgSend(");
-                            }
-                            if (isStatic) {
-                                out("OS.class_");
-                                out(name);
-                            } else {
-                                out("this.id");
-                            }
-                            out(", OS.");
-                            out(getSelConst(sel));
-                            first = false;
-                            for (int k = 0; k < params.getLength(); k++) {
-                                Node param = params.item(k);
-                                if ("arg".opEquals(param.getLocalName())) {
-                                    NamedNodeMap paramAttributes = param.getAttributes();
-                                    if (!first) out(", ");
-                                    first = false;
-                                    String paramName = paramAttributes.getNamedItem("name").getNodeValue();
-                                    if (paramName.opEquals("bool")) paramName = "b";
-                                    if (isObject(param)) {
-                                        out(paramName);
-                                        out(" !is null ? ");
-                                        out(paramName);
-                                        out(".id : 0");
-                                    } else {
-                                        out(paramName);
-                                    }
-                                }
-                            }
-                            out(")");
-                            if (returnNode !is null && isBoolean(returnNode)) {
-                                out(" !is 0");
-                            }
-                            out(";");
-                            outln();
-                            if (returnNode !is null && isObject(returnNode)) {
-                                if (!isStatic && getJavaType(returnNode).opEquals(name)) {
-                                    out("\treturn result is this.id ? this : (result !is 0 ? new ");
-                                    out(getJavaType(returnNode));
-                                    out("(result) : null);");
-                                } else {
-                                    out("\treturn result !is 0 ? new ");
-                                    out(getJavaType(returnNode));
-                                    out("(result) : null;");
-                                }
-                                outln();
-                            } else if (returnNode !is null && isStruct(returnNode)) {
-                                out("\treturn result;");
-                                outln();
-                            }
-                            out("}");
-                            outln();
-                            outln();
-                        }                   
-                    }               
-                    out("}");
-                    outln();
-                    if (outputDir !is null) {
-                        out.close();
-                        out = null;
-                    }
-                }
-            }
-        }
-    }
-}
-
-public void generateSelectorsConst() {
-    HashSet set = new HashSet();
-    for (int x = 0; x < xml.length; x++) {
-        DOMParser parser = new DOMParser();
-        parser.parse(xml[x]);
-        Document document = parser.getDocument();
-        NodeList list = document.getDocumentElement().getChildNodes();
-        for (int i = 0; i < list.getLength(); i++) {
-            Node node = list.item(i);
-            if ("class".opEquals(node.getLocalName())) {
-                NamedNodeMap attributes = node.getAttributes();
-                String name = attributes.getNamedItem("name").getNodeValue();
-                if (getGenerateClass(name)) {
-                    NodeList methods = node.getChildNodes();
-                    for (int j = 0; j < methods.getLength(); j++) {
-                        Node method = methods.item(j);
-                        if ("method".opEquals(method.getLocalName())) {
-                            String sel = method.getAttributes().getNamedItem("selector").getNodeValue();
-                            set.add(sel);
-                        }
-                    }
-                }
-            }
-        }
-    }
-    for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-        String sel = (String) iterator.next();
-        String selConst = getSelConst(sel);
-        out("public static final int ");
-        out(selConst);
-        out(" = ");
-        out("sel_registerName(\"");
-        out(sel);
-        out("\");");
-        outln();
-    }
-}
-
-public void generateSends() {
-    HashSet set = new HashSet();
-    for (int x = 0; x < xml.length; x++) {
-        DOMParser parser = new DOMParser();
-        parser.parse(xml[x]);
-        Document document = parser.getDocument();
-        NodeList list = document.getDocumentElement().getChildNodes();
-        for (int i = 0; i < list.getLength(); i++) {
-            Node node = list.item(i);
-            if ("class".opEquals(node.getLocalName())) {
-                NamedNodeMap attributes = node.getAttributes();
-                String name = attributes.getNamedItem("name").getNodeValue();
-                if (getGenerateClass(name)) {
-                    NodeList methods = node.getChildNodes();
-                    for (int j = 0; j < methods.getLength(); j++) {
-                        Node method = methods.item(j);
-                        if ("method".opEquals(method.getLocalName())) {
-                            Node returnNode = getReturnNode(method.getChildNodes());
-                            StringBuffer buffer = new StringBuffer();
-                            buffer.append("public static final native "); 
-                            if (returnNode !is null && isStruct(returnNode)) {
-                                buffer.append("void objc_msgSend_stret(");
-                                buffer.append(getJavaType(returnNode));
-                                buffer.append(" result, ");
-                            } else if (returnNode !is null && isFloatingPoint(returnNode)) {
-                                buffer.append("double objc_msgSend_fpret(");
-                            } else {
-                                buffer.append("int objc_msgSend(");
-                            }
-                            buffer.append("int id, int sel");
-                            NodeList params = method.getChildNodes();
-                            bool first = false;
-                            int count = 0;
-                            for (int k = 0; k < params.getLength(); k++) {
-                                Node param = params.item(k);
-                                if ("arg".opEquals(param.getLocalName())) {
-                                    if (!first) buffer.append(", ");
-                                    if (isStruct(param)) {
-                                        buffer.append(getJavaType(param));
-                                    } else {
-                                        buffer.append(getType(param));
-                                    }
-                                    first = false;
-                                    buffer.append(" arg");
-                                    buffer.append(String.valueOf(count++));
-                                }
-                            }
-                            buffer.append(");");
-                            set.add(buffer.toString());
-                        }
-                    }
-                }
-            }
-        }
-    }
-    for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-        out(iterator.next().toString());
-        outln();
-    }
-}
-
-public void generateSendsMetaData() {
-    HashMap set = new HashMap();
-    for (int x = 0; x < xml.length; x++) {
-        DOMParser parser = new DOMParser();
-        parser.parse(xml[x]);
-        Document document = parser.getDocument();
-        NodeList list = document.getDocumentElement().getChildNodes();
-        for (int i = 0; i < list.getLength(); i++) {
-            Node node = list.item(i);
-            if ("class".opEquals(node.getLocalName())) {
-                NamedNodeMap attributes = node.getAttributes();
-                String name = attributes.getNamedItem("name").getNodeValue();
-                if (getGenerateClass(name)) {
-                    NodeList methods = node.getChildNodes();
-                    for (int j = 0; j < methods.getLength(); j++) {
-                        Node method = methods.item(j);
-                        if ("method".opEquals(method.getLocalName())) {
-                            Node returnNode = getReturnNode(method.getChildNodes());
-                            StringBuffer buffer = new StringBuffer();
-                            if (returnNode !is null && isStruct(returnNode)) {
-                                buffer.append("OS_objc_1msgSend_1stret__");
-                                buffer.append("Lorg_eclipse_swt_internal_cocoa_");
-                                buffer.append(getJavaType(returnNode));
-                                buffer.append("_2");
-                            } else if (returnNode !is null && isFloatingPoint(returnNode)) {
-                                buffer.append("OS_objc_1msgSend_1fpret__");
-                            } else {
-                                buffer.append("OS_objc_1msgSend__");
-                            }
-                            buffer.append("II");
-                            NodeList params = method.getChildNodes();
-                            for (int k = 0; k < params.getLength(); k++) {
-                                Node param = params.item(k);
-                                if ("arg".opEquals(param.getLocalName())) {
-                                    if (isStruct(param)) {
-                                        buffer.append("Lorg_eclipse_swt_internal_cocoa_");
-                                        buffer.append(getJavaType(param));
-                                        buffer.append("_2");
-                                    } else {
-                                        buffer.append(getJNIType(param));
-                                    }
-                                }
-                            }
-                            String key = buffer.toString();
-                            if (set.get(key) is null) set.put(key, method);
-                        }
-                    }
-                }
-            }
-        }
-    }
-    for (Iterator iterator = set.keySet().iterator(); iterator.hasNext();) {
-        String key = iterator.next().toString();
-        out(key);
-        out("=flags=cast");
-        outln();
-        int count = 2;
-        if (key.indexOf("stret") !is -1) {
-            count = 3;
-            out(key);
-            out("_0=");
-            outln();
-            out(key);
-            out("_1=cast=(id)");
-            outln();
-            out(key);
-            out("_2=cast=(SEL)");
-            outln();
-        } else {
-            out(key);
-            out("_0=cast=(id)");
-            outln();
-            out(key);
-            out("_1=cast=(SEL)");
-            outln();
-        }
-        Node method = (Node)set.get(key);
-        NodeList params = method.getChildNodes();
-        for (int k = 0; k < params.getLength(); k++) {
-            Node param = params.item(k);
-            if ("arg".opEquals(param.getLocalName())) {
-                out(key);
-                out("_");
-                out(String.valueOf(count));
-                out("=");
-                if (isStruct(param)) {
-                    out("flags=struct");
-                }
-                outln();
-                count++;
-            }
-        }
-        outln();
-    }
-}
-
-
-String getSelConst(String sel) {
-    return "sel_" + sel.replaceAll(":", "_1");
-}
-
-public void generateClassesConst() {
-    HashSet set = new HashSet();
-    for (int x = 0; x < xml.length; x++) {
-        DOMParser parser = new DOMParser();
-        parser.parse(xml[x]);
-        Document document = parser.getDocument();
-        NodeList list = document.getDocumentElement().getChildNodes();
-        for (int i = 0; i < list.getLength(); i++) {
-            Node node = list.item(i);
-            if ("class".opEquals(node.getLocalName())) {
-                NamedNodeMap attributes = node.getAttributes();
-                String name = attributes.getNamedItem("name").getNodeValue();
-                if (getGenerateClass(name)) {
-                    set.add(name);
-                }
-            }
-        }
-    }
-    for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-        String cls = (String) iterator.next();
-        String clsConst = "class_" + cls;
-        out("public static final int ");
-        out(clsConst);
-        out(" = ");
-        out("objc_getClass(\"");
-        out(cls);
-        out("\");");
-        outln();
-    }
-}
-
-Node getReturnNode(NodeList list) {
-    for (int j = 0; j < list.getLength(); j++) {
-        Node node = list.item(j);
-        if ("retval".opEquals(node.getLocalName())) {
-            return node;
-        }
-    }
-    return null;
-}
-
-String getType(Node node) {
-    NamedNodeMap attributes = node.getAttributes();
-    String code = attributes.getNamedItem("type").getNodeValue();
-    if (code.opEquals("c")) return "byte";
-    if (code.opEquals("i")) return "int";
-    if (code.opEquals("s")) return "short";
-    if (code.opEquals("l")) return "int";
-    if (code.opEquals("q")) return "long";
-    if (code.opEquals("C")) return "byte";
-    if (code.opEquals("I")) return "int";
-    if (code.opEquals("S")) return "short";
-    if (code.opEquals("L")) return "int";
-    if (code.opEquals("Q")) return "long";
-    if (code.opEquals("f")) return "float";
-    if (code.opEquals("d")) return "double";
-    if (code.opEquals("B")) return "bool";
-    if (code.opEquals("v")) return "void";
-    if (code.opEquals("*")) return "int";
-    if (code.opEquals("@")) return "int";
-    if (code.opEquals("#")) return "int";
-    if (code.opEquals(":")) return "int";
-    if (code.startsWith("^")) return "int";
-    if (code.startsWith("[")) return "BAD " + code;
-    if (code.startsWith("{")) {     
-        return attributes.getNamedItem("declared_type").getNodeValue();
-    }
-    if (code.startsWith("(")) return "BAD " + code;
-    return "BAD " + code;
-}
-String getJNIType(Node node) {
-    NamedNodeMap attributes = node.getAttributes();
-    String code = attributes.getNamedItem("type").getNodeValue();
-    if (code.opEquals("c")) return "B";
-    if (code.opEquals("i")) return "I";
-    if (code.opEquals("s")) return "S";
-    if (code.opEquals("l")) return "I";
-    if (code.opEquals("q")) return "J";
-    if (code.opEquals("C")) return "B";
-    if (code.opEquals("I")) return "I";
-    if (code.opEquals("S")) return "S";
-    if (code.opEquals("L")) return "I";
-    if (code.opEquals("Q")) return "J";
-    if (code.opEquals("f")) return "F";
-    if (code.opEquals("d")) return "D";
-    if (code.opEquals("B")) return "Z";
-    if (code.opEquals("v")) return "V";
-    if (code.opEquals("*")) return "I";
-    if (code.opEquals("@")) return "I";
-    if (code.opEquals("#")) return "I";
-    if (code.opEquals(":")) return "I";
-    if (code.startsWith("^")) return "I";
-    if (code.startsWith("[")) return "BAD " + code;
-    if (code.startsWith("{")) {     
-        return "BAD " + code;
-    }
-    if (code.startsWith("(")) return "BAD " + code;
-    return "BAD " + code;
-}
-
-String getJavaType(Node node) {
-    NamedNodeMap attributes = node.getAttributes();
-    String code = attributes.getNamedItem("type").getNodeValue();
-    if (code.opEquals("c")) return "byte";
-    if (code.opEquals("i")) return "int";
-    if (code.opEquals("s")) return "short";
-    if (code.opEquals("l")) return "int";
-    if (code.opEquals("q")) return "long";
-    if (code.opEquals("C")) return "byte";
-    if (code.opEquals("I")) return "int";
-    if (code.opEquals("S")) return "short";
-    if (code.opEquals("L")) return "int";
-    if (code.opEquals("Q")) return "long";
-    if (code.opEquals("f")) return "float";
-    if (code.opEquals("d")) return "double";
-    if (code.opEquals("B")) return "bool";
-    if (code.opEquals("v")) return "void";
-    if (code.opEquals("*")) return "int";
-    if (code.opEquals("@")) {
-        String type = attributes.getNamedItem("declared_type").getNodeValue();
-        int index = type.indexOf('*');
-        if (index !is -1) type = type.substring(0, index);
-        index = type.indexOf('<');
-        if (index !is -1) type = type.substring(0, index);
-        return type;
-    }
-    if (code.opEquals("#")) return "int";
-    if (code.opEquals(":")) return "int";
-    if (code.startsWith("^")) return "int";
-    if (code.startsWith("[")) return "BAD " + code;
-    if (code.startsWith("{")) {     
-        return attributes.getNamedItem("declared_type").getNodeValue();
-    }
-    if (code.startsWith("(")) return "BAD " + code;
-    return "BAD " + code;
-}
-
-public void generateFunctions() {
-    for (int x = 0; x < xml.length; x++) {
-        DOMParser parser = new DOMParser();
-        parser.parse(xml[x]);
-        Document document = parser.getDocument();
-        NodeList list = document.getDocumentElement().getChildNodes();
-        for (int i = 0; i < list.getLength(); i++) {
-            Node node = list.item(i);
-            if ("function".opEquals(node.getLocalName())) {
-                NamedNodeMap attributes = node.getAttributes();
-                String name = attributes.getNamedItem("name").getNodeValue();
-                out("public static final native ");
-                Node returnNode = getReturnNode(node.getChildNodes());
-                if (returnNode !is null) {
-                    out(getType(returnNode));
-                    out(" ");
-                } else {
-                    out("void ");
-                }
-                out(name);
-                out("(");
-                NodeList params = node.getChildNodes();
-                bool first = true;
-                for (int j = 0; j < params.getLength(); j++) {
-                    Node param = params.item(j);
-                    if ("arg".opEquals(param.getLocalName())) {
-                        NamedNodeMap paramAttributes = param.getAttributes();
-                        if (!first) out(", ");
-                        out(getType(param));
-                        first = false;
-                        out(" ");
-                        out(paramAttributes.getNamedItem("name").getNodeValue());
-                    }
-                }
-                out(");");
-                outln();
-            }
-        }
-    }
-}
-
-public void generateOS() {
-    out("/** Classes */");
-    outln();
-    generateClassesConst();
-    outln();
-    out("/** Selectors */");
-    outln();
-    generateSelectorsConst();
-    outln();
-    out("/** Constants */");
-    outln();
-    generateEnums();
-    outln();
-    out("/** Globals */");
-    outln();
-    generateConstants();
-    outln();
-    out("/** Functions */");
-    outln();
-    generateFunctions();
-    outln();
-    out("/** Sends */");
-    outln();
-    generateSends();
-}
-
-public void generateMetadata() {
-    generateConstantsMetaData();
-    generateSendsMetaData();
-}
-
-public void setClasses(String[] classes) {
-    this.classes = classes;
-}
-
-public void setOutputDir(String dir) {
-    this.outputDir = dir;
-}
-
-public static void main(String[] args) {
-    MacGenerator gen = new MacGenerator(args);
-//  gen.setClasses(new String[]{
-//      "NSURL",
-//  });
-    gen.setOutputDir("/Users/adclabs/Desktop/workspace/dwt/Eclipse DWT PI/cocoa/org/eclipse/swt/internal/cocoa");
-//  gen.generateOS();
-//  gen.generateMetadata();
-    gen.generateClasses();
-}
-}
--- a/dwt/internal/cocoa/NSATSTypesetter.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSATSTypesetter;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSTypesetter;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSATSTypesetter : NSTypesetter
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSRect lineFragmentRectForProposedRect (NSRect proposedRect, objc.id remainingRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentRectForProposedRect_1remainingRect_1, proposedRect, remainingRect);
-        return result;
-    }
-
-    public static id sharedTypesetter ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSATSTypesetter, OS.sel_sharedTypesetter);
-        return result !is null ? new id(result) : null;
-    }
-}
--- a/dwt/internal/cocoa/NSActionCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSActionCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,146 +1,47 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSActionCell;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
+import dwt.internal.cocoa.NSText;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSActionCell : NSCell
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.SEL action ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action);
-    }
-
-    public NSView controlView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_controlView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public double doubleValue ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
-    }
+public class NSActionCell : NSCell {
 
-    public float floatValue ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue);
-    }
-
-    public int intValue ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_intValue);
-    }
-
-    public NSInteger integerValue ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_integerValue);
-    }
+public this() {
+    super();
+}
 
-    public void setAction (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector);
-    }
-
-    public void setAlignment (objc.id mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlignment_1, mode);
-    }
-
-    public void setBezeled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void setBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag);
-    }
-
-    public void setControlView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlView_1, view !is null ? view.id_ : null);
-    }
-
-    public void setEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, flag);
-    }
-
-    public void setFloatingPointFormat (bool autoRange, NSUInteger leftDigits, NSUInteger rightDigits)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFloatingPointFormat_1left_1right_1, autoRange, leftDigits, rightDigits);
-    }
-
-    public void setFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public void setImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setObjectValue (id obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setTag (NSInteger anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTag_1, anInt);
-    }
-
-    public void setTarget (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, anObject !is null ? anObject.id_ : null);
-    }
+public void setAlignment(NSTextAlignment mode) {
+    OS.objc_msgSend(this.id, OS.sel_setAlignment_, mode);
+}
 
-    public NSString StringValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger tag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag);
-    }
-
-    public id target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
+public void setImage(NSImage image) {
+    OS.objc_msgSend(this.id, OS.sel_setImage_, image !is null ? image.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSAffineTransform.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSAffineTransform.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,19 +1,20 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSAffineTransform;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSAffineTransformStruct;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
@@ -23,102 +24,90 @@
 
 public class NSAffineTransform : NSObject
 {
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+    
+public this ()
+{
+    super();
+}
 
-    public void appendTransform (NSAffineTransform transform)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendTransform_1, transform !is null ? transform.id_ : null);
-    }
+public this (objc.id id)
+{
+    super(id);
+}
 
-    public NSAffineTransform initWithTransform (NSAffineTransform transform)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTransform_1, transform !is null ? transform.id_ : null);
-        return result !is null ? this : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
+
+public void concat() {
+    OS.objc_msgSend(this.id, OS.sel_concat);
+}
 
-    public void invert ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invert);
-    }
+public NSAffineTransform initWithTransform (NSAffineTransform transform)
+{
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithTransform_1, transform !is null ? transform.id : null);
+    return result !is null ? this : null;
+}
 
-    public void set ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_set);
-    }
+public void invert ()
+{
+    OS.objc_msgSend(this.id, OS.sel_invert);
+}
 
-    public void concat ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_concat);
-    }
 
-    public void prependTransform (NSAffineTransform transform)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_prependTransform_1, transform !is null ? transform.id_ : null);
-    }
+public void prependTransform (NSAffineTransform transform)
+{
+    OS.objc_msgSend(this.id, OS.sel_prependTransform_1, transform !is null ? transform.id : null);
+}
 
-    public void rotateByDegrees (CGFloat angle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rotateByDegrees_1, angle);
-    }
+
+public void rotateByDegrees(float /*double*/ angle) {
+    OS.objc_msgSend(this.id, OS.sel_rotateByDegrees_, angle);
+}
 
-    public void rotateByRadians (CGFloat angle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rotateByRadians_1, angle);
-    }
+public void scaleXBy(float /*double*/ scaleX, float /*double*/ scaleY) {
+    OS.objc_msgSend(this.id, OS.sel_scaleXBy_yBy_, scaleX, scaleY);
+}
 
-    public void scaleBy (CGFloat scale)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scaleBy_1, scale);
-    }
+public void set() {
+    OS.objc_msgSend(this.id, OS.sel_set);
+}
 
-    public void scaleXBy (CGFloat scaleX, CGFloat scaleY)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scaleXBy_1yBy_1, scaleX, scaleY);
-    }
+public void setTransformStruct (NSAffineTransformStruct transformStruct)
+{
+    OS.objc_msgSend(this.id, OS.sel_setTransformStruct_1, transformStruct);
+}
 
-    public void setTransformStruct (NSAffineTransformStruct transformStruct)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTransformStruct_1, transformStruct);
-    }
-
-    public static NSAffineTransform transform ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAffineTransform, OS.sel_transform);
-        return result !is null ? new NSAffineTransform(result) : null;
-    }
+public static NSAffineTransform transform ()
+{
+    objc.id result = OS.objc_msgSend(OS.class_NSAffineTransform, OS.sel_transform);
+    return result !is null ? new NSAffineTransform(result) : null;
+}
 
-    public NSPoint transformPoint (NSPoint aPoint)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_transformPoint_1, aPoint);
-        return result;
-    }
+public NSPoint transformPoint (NSPoint aPoint)
+{
+    NSPoint result;
+    OS.objc_msgSend_stret(result, this.id, OS.sel_transformPoint_1, aPoint);
+    return result;
+}
 
-    public NSSize transformSize (NSSize aSize)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_transformSize_1, aSize);
-        return result;
-    }
+public NSSize transformSize (NSSize aSize)
+{
+    NSSize result;
+    OS.objc_msgSend_stret(result, this.id, OS.sel_transformSize_1, aSize);
+    return result;
+}
 
-    public NSAffineTransformStruct transformStruct ()
-    {
-        NSAffineTransformStruct result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_transformStruct);
-        return result;
-    }
+public NSAffineTransformStruct transformStruct ()
+{
+    NSAffineTransformStruct result;
+    OS.objc_msgSend_stret(result, this.id, OS.sel_transformStruct);
+    return result;
+}
 
-    public void translateXBy (CGFloat deltaX, CGFloat deltaY)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_translateXBy_1yBy_1, deltaX, deltaY);
-    }
+public void translateXBy (CGFloat deltaX, CGFloat deltaY)
+{
+    OS.objc_msgSend(this.id, OS.sel_translateXBy_1yBy_1, deltaX, deltaY);
+}
 
 }
--- a/dwt/internal/cocoa/NSAffineTransformStruct.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSAffineTransformStruct.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -9,11 +9,14 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSAffineTransformStruct;
 
 struct NSAffineTransformStruct {
-    float m11, m12, m21, m22;
-    float tX, tY;
+    //float m11, m12, m21, m22;
+    //float tX, tY;
+    public float /*double*/ m11, m12, m21, m22;
+    public float /*double*/ tX, tY;
+
 }
--- a/dwt/internal/cocoa/NSAlert.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSAlert.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,196 +1,71 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSAlert;
 
-import dwt.internal.cocoa.id;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSButton;
 import dwt.internal.cocoa.NSError;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-alias NSUInteger NSAlertStyle;
-
-public class NSAlert : NSObject
+enum NSAlertStyle : NSUInteger
 {
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+    NSWarningAlertStyle = 0,
+    NSInformationalAlertStyle = 1,
+    NSCriticalAlertStyle = 2
+}
 
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public NSButton addButtonWithTitle (NSString title)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addButtonWithTitle_1, title !is null ? title.id_ : null);
-        return result !is null  ? new NSButton(result) : null;
-    }
-
-    public NSAlertStyle alertStyle ()
-    {
-        return cast(NSAlertStyle) OS.objc_msgSend(this.id_, OS.sel_alertStyle);
-    }
-
-    public static NSAlert alertWithError (NSError error)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAlert, OS.sel_alertWithError_1, error !is null ? error.id_ : null);
-        return result !is null ? new NSAlert(result) : null;
-    }
+public class NSAlert : NSObject {
 
-    public static NSAlert alertWithMessageText (NSString message, NSString defaultButton, NSString alternateButton, NSString otherButton,
-            NSString informativeTextWithFormat)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAlert,
-                OS.sel_alertWithMessageText_1defaultButton_1alternateButton_1otherButton_1informativeTextWithFormat_1,
-                message !is null ? message.id_ : null, defaultButton !is null ? defaultButton.id_ : null,
-                alternateButton !is null ? alternateButton.id_ : null, otherButton !is null ? otherButton.id_ : null,
-                informativeTextWithFormat !is null ? informativeTextWithFormat.id_ : null);
-        return result !is null ? new NSAlert(result) : null;
-    }
-
-    public void beginSheetModalForWindow (NSWindow window, id delegatee, objc.SEL didEndSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginSheetModalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, window !is null ? window.id_ : null,
-                delegatee !is null ? delegatee.id_ : null, didEndSelector, contextInfo);
-    }
+public this () {
+    super();
+}
 
-    public NSArray buttons ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_buttons);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
+public this (objc.id id) {
+    super(id);
+}
 
-    public NSString helpAnchor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_helpAnchor);
-        return result !is null ? new NSString(result) : null;
-    }
+public this (cocoa.id id) {
+    super(id);
 
-    public NSImage icon ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_icon);
-        return result !is null ? new NSImage(result) : null;
-    }
+}
 
-    public NSString informativeText ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_informativeText);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void layout ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_layout);
-    }
-
-    public NSString messageText ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_messageText);
-        return result !is null ? new NSString(result) : null;
-    }
+public static NSAlert alertWithMessageText (NSString message, NSString defaultButton, NSString alternateButton, NSString otherButton, NSString informativeTextWithFormat) {
+    objc.id result = OS.objc_msgSend(OS.class_NSAlert, OS.sel_alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_, message !is null ? message.id : null, defaultButton !is null ? defaultButton.id : null, alternateButton !is null ? alternateButton.id : null, otherButton !is null ? otherButton.id : null, informativeTextWithFormat !is null ? informativeTextWithFormat.id : null);
+    return result !is null ? new NSAlert(result) : null;
+}
 
-    public NSInteger runModal ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModal);
-    }
-
-    public void setAccessoryView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, view !is null ? view.id_ : null);
-    }
+public NSInteger runModal () {
 
-    public void setAlertStyle (NSAlertStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlertStyle_1, style);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setHelpAnchor (NSString anchor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHelpAnchor_1, anchor !is null ? anchor.id_ : null);
-    }
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_runModal);
+}
 
-    public void setIcon (NSImage icon)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIcon_1, icon !is null ? icon.id_ : null);
-    }
-
-    public void setInformativeText (NSString informativeText)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInformativeText_1, informativeText !is null ? informativeText.id_ : null);
-    }
+public void setAlertStyle (NSAlertStyle style) {
+    OS.objc_msgSend(this.id, OS.sel_setAlertStyle_, style);
 
-    public void setMessageText (NSString messageText)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMessageText_1, messageText !is null ? messageText.id_ : null);
-    }
-
-    public void setShowsHelp (bool showsHelp)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsHelp_1, showsHelp);
-    }
+}
 
-    public void setShowsSuppressionButton (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsSuppressionButton_1, flag);
-    }
-
-    public bool showsHelp ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsHelp) !is null;
-    }
+public NSWindow window () {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_window);
+    return result !is null ? new NSWindow(result) : null;
+}
 
-    public bool showsSuppressionButton ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsSuppressionButton) !is null;
-    }
-
-    public NSButton suppressionButton ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_suppressionButton);
-        return result !is null ? new NSButton(result) : null;
-    }
-
-    public id window ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_window);
-        return result !is null ? new id(result) : null;
-    }
 }
--- a/dwt/internal/cocoa/NSAnimation.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSAnimation;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-alias float NSAnimationProgress;
-alias NSUInteger NSAnimationCurve;
-alias NSUInteger NSAnimationBlockingMode;
-
-public class NSAnimation : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addProgressMark (NSAnimationProgress progressMark)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addProgressMark_1, progressMark);
-    }
-
-    public objc.id animationBlockingMode ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_animationBlockingMode);
-    }
-
-    public objc.id animationCurve ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_animationCurve);
-    }
-
-    public void clearStartAnimation ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_clearStartAnimation);
-    }
-
-    public void clearStopAnimation ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_clearStopAnimation);
-    }
-
-    public NSAnimationProgress currentProgress ()
-    {
-        return cast(NSAnimationProgress) OS.objc_msgSend_fpret(this.id_, OS.sel_currentProgress);
-    }
-
-    public float currentValue ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_currentValue);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public double duration ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_duration);
-    }
-
-    public float frameRate ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_frameRate);
-    }
-
-    public NSAnimation initWithDuration (NSTimeInterval duration, NSAnimationCurve animationCurve)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDuration_1animationCurve_1, duration, animationCurve);
-        return result !is null ? this : null;
-    }
-
-    public bool isAnimating ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAnimating) !is null;
-    }
-
-    public NSArray progressMarks ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_progressMarks);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void removeProgressMark (NSAnimationProgress progressMark)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeProgressMark_1, progressMark);
-    }
-
-    public NSArray runLoopModesForAnimating ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_runLoopModesForAnimating);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setAnimationBlockingMode (NSAnimationBlockingMode animationBlockingMode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAnimationBlockingMode_1, animationBlockingMode);
-    }
-
-    public void setAnimationCurve (NSAnimationCurve curve)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAnimationCurve_1, curve);
-    }
-
-    public void setCurrentProgress (NSAnimationProgress progress)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrentProgress_1, progress);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setDuration (double duration)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDuration_1, duration);
-    }
-
-    public void setFrameRate (float framesPerSecond)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameRate_1, framesPerSecond);
-    }
-
-    public void setProgressMarks (NSArray progressMarks)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setProgressMarks_1, progressMarks !is null ? progressMarks.id_ : null);
-    }
-
-    public void startAnimation ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_startAnimation);
-    }
-
-    public void startWhenAnimation (NSAnimation animation, NSAnimationProgress startProgress)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_startWhenAnimation_1reachesProgress_1, animation !is null ? animation.id_ : null, startProgress);
-    }
-
-    public void stopAnimation ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopAnimation);
-    }
-
-    public void stopWhenAnimation (NSAnimation animation, NSAnimationProgress stopProgress)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopWhenAnimation_1reachesProgress_1, animation !is null ? animation.id_ : null, stopProgress);
-    }
-
-}
--- a/dwt/internal/cocoa/NSAnimationContext.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSAnimationContext;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSAnimationContext : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static void beginGrouping ()
-    {
-        OS.objc_msgSend(OS.class_NSAnimationContext, OS.sel_beginGrouping);
-    }
-
-    public static NSAnimationContext currentContext ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAnimationContext, OS.sel_currentContext);
-        return result !is null ? new NSAnimationContext(result) : null;
-    }
-
-    public double duration ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_duration);
-    }
-
-    public static void endGrouping ()
-    {
-        OS.objc_msgSend(OS.class_NSAnimationContext, OS.sel_endGrouping);
-    }
-
-    public void setDuration (double duration)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDuration_1, duration);
-    }
-
-}
--- a/dwt/internal/cocoa/NSAppleEventDescriptor.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSAppleEventDescriptor.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,284 +1,41 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSAppleEventDescriptor;
 
-import dwt.internal.c.carboncore.MacTypes : FourCharCode;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-alias FourCharCode AEKeyword;
-
-public class NSAppleEventDescriptor : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.id aeDesc ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_aeDesc);
-    }
-
-    public static NSAppleEventDescriptor appleEventWithEventClass (objc.id eventClass, objc.id eventID, NSAppleEventDescriptor targetDescriptor,
-            short returnID, objc.id transactionID)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor,
-                OS.sel_appleEventWithEventClass_1eventID_1targetDescriptor_1returnID_1transactionID_1, eventClass, eventID,
-                targetDescriptor !is null ? targetDescriptor.id_ : null, returnID, transactionID);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public NSAppleEventDescriptor attributeDescriptorForKeyword (objc.id keyword)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeDescriptorForKeyword_1, keyword);
-        return result is this.id_ ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
-    }
-
-    public bool boolValue ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_boolValue) !is null;
-    }
-
-    public NSAppleEventDescriptor coerceToDescriptorType (objc.id descriptorType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_coerceToDescriptorType_1, descriptorType);
-        return result is this.id_ ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
-    }
-
-    public NSData data ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_data);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSAppleEventDescriptor descriptorAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptorAtIndex_1, index);
-        return result is this.id_ ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
-    }
-
-    public NSAppleEventDescriptor descriptorForKeyword (objc.id keyword)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptorForKeyword_1, keyword);
-        return result is this.id_ ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
-    }
+public class NSAppleEventDescriptor : NSObject {
 
-    public objc.id descriptorType ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_descriptorType);
-    }
-
-    public static NSAppleEventDescriptor descriptorWithBoolean (bool b)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_descriptorWithBoolean_1, b);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public static NSAppleEventDescriptor static_descriptorWithDescriptorType_bytes_length_ (objc.id descriptorType, /*const*/void* bytes, NSUInteger byteCount)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_descriptorWithDescriptorType_1bytes_1length_1, descriptorType, bytes,
-                byteCount);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public static NSAppleEventDescriptor static_descriptorWithDescriptorType_data_ (objc.id descriptorType, NSData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_descriptorWithDescriptorType_1data_1, descriptorType,
-                data !is null ? data.id_ : null);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public static NSAppleEventDescriptor descriptorWithEnumCode (objc.id enumerator)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_descriptorWithEnumCode_1, enumerator);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public static NSAppleEventDescriptor descriptorWithInt32 (int signedInt)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_descriptorWithInt32_1, signedInt);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public static NSAppleEventDescriptor descriptorWithString (NSString str)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_descriptorWithString_1, str !is null ? str.id_ : null);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public static NSAppleEventDescriptor descriptorWithTypeCode (objc.id typeCode)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_descriptorWithTypeCode_1, typeCode);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public objc.id enumCodeValue ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_enumCodeValue);
-    }
-
-    public objc.id eventClass ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_eventClass);
-    }
-
-    public objc.id eventID ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_eventID);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSAppleEventDescriptor initListDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initListDescriptor);
-        return result !is null ? this : null;
-    }
-
-    public NSAppleEventDescriptor initRecordDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initRecordDescriptor);
-        return result !is null ? this : null;
-    }
-
-    public NSAppleEventDescriptor initWithAEDescNoCopy (objc.id aeDesc)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithAEDescNoCopy_1, aeDesc);
-        return result !is null ? this : null;
-    }
-
-    public NSAppleEventDescriptor initWithDescriptorType_bytes_length_ (objc.id descriptorType, /*const*/void* bytes, NSUInteger byteCount)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDescriptorType_1bytes_1length_1, descriptorType, bytes, byteCount);
-        return result !is null ? this : null;
-    }
-
-    public NSAppleEventDescriptor initWithDescriptorType_data_ (objc.id descriptorType, NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDescriptorType_1data_1, descriptorType, data !is null ? data.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSAppleEventDescriptor initWithEventClass (objc.id eventClass, objc.id eventID, NSAppleEventDescriptor targetDescriptor, objc.id returnID,
-            objc.id transactionID)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithEventClass_1eventID_1targetDescriptor_1returnID_1transactionID_1, eventClass,
-                eventID, targetDescriptor !is null ? targetDescriptor.id_ : null, returnID, transactionID);
-        return result !is null ? this : null;
-    }
-
-    public void insertDescriptor (NSAppleEventDescriptor descriptor, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertDescriptor_1atIndex_1, descriptor !is null ? descriptor.id_ : null, index);
-    }
-
-    public int int32Value ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_int32Value);
-    }
-
-    public AEKeyword keywordForDescriptorAtIndex (NSInteger index)
-    {
-        return cast(AEKeyword) OS.objc_msgSend(this.id_, OS.sel_keywordForDescriptorAtIndex_1, index);
-    }
-
-    public static NSAppleEventDescriptor listDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_listDescriptor);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public static NSAppleEventDescriptor nullDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_nullDescriptor);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSInteger numberOfItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfItems);
-    }
-
-    public NSAppleEventDescriptor paramDescriptorForKeyword (objc.id keyword)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_paramDescriptorForKeyword_1, keyword);
-        return result is this.id_ ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
-    }
-
-    public static NSAppleEventDescriptor recordDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventDescriptor, OS.sel_recordDescriptor);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public void removeDescriptorAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeDescriptorAtIndex_1, index);
-    }
-
-    public void removeDescriptorWithKeyword (objc.id keyword)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeDescriptorWithKeyword_1, keyword);
-    }
-
-    public void removeParamDescriptorWithKeyword (objc.id keyword)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeParamDescriptorWithKeyword_1, keyword);
-    }
+public NSAppleEventDescriptor initListDescriptor() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initListDescriptor);
+    return result is this.id ? this : (result !is null ? new NSAppleEventDescriptor(result) : null);
+}
 
-    public short returnID ()
-    {
-        return cast(short) OS.objc_msgSend(this.id_, OS.sel_returnID);
-    }
-
-    public void setAttributeDescriptor (NSAppleEventDescriptor descriptor, objc.id keyword)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributeDescriptor_1forKeyword_1, descriptor !is null ? descriptor.id_ : null, keyword);
-    }
-
-    public void setDescriptor (NSAppleEventDescriptor descriptor, objc.id keyword)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDescriptor_1forKeyword_1, descriptor !is null ? descriptor.id_ : null, keyword);
-    }
-
-    public void setParamDescriptor (NSAppleEventDescriptor descriptor, objc.id keyword)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setParamDescriptor_1forKeyword_1, descriptor !is null ? descriptor.id_ : null, keyword);
-    }
-
-    public NSString StringValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public objc.id transactionID ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_transactionID);
-    }
-
-    public objc.id typeCodeValue ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_typeCodeValue);
-    }
 }
--- a/dwt/internal/cocoa/NSAppleEventManager.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSAppleEventManager;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAppleEventDescriptor;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSAppleEventManager : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSAppleEventDescriptor appleEventForSuspensionID (objc.id suspensionID)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_appleEventForSuspensionID_1, suspensionID);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public NSAppleEventDescriptor currentAppleEvent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentAppleEvent);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public NSAppleEventDescriptor currentReplyAppleEvent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentReplyAppleEvent);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public short dispatchRawAppleEvent (objc.id theAppleEvent, objc.id theReply, objc.id handlerRefCon)
-    {
-        return cast(short) OS.objc_msgSend(this.id_, OS.sel_dispatchRawAppleEvent_1withRawReply_1handlerRefCon_1, theAppleEvent, theReply,
-                handlerRefCon);
-    }
-
-    public void removeEventHandlerForEventClass (objc.id eventClass, objc.id eventID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeEventHandlerForEventClass_1andEventID_1, eventClass, eventID);
-    }
-
-    public NSAppleEventDescriptor replyAppleEventForSuspensionID (objc.id suspensionID)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_replyAppleEventForSuspensionID_1, suspensionID);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public void resumeWithSuspensionID (objc.id suspensionID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resumeWithSuspensionID_1, suspensionID);
-    }
-
-    public void setCurrentAppleEventAndReplyEventWithSuspensionID (objc.id suspensionID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrentAppleEventAndReplyEventWithSuspensionID_1, suspensionID);
-    }
-
-    public void setEventHandler (id handler, objc.id handleEventSelector, objc.id eventClass, objc.id eventID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEventHandler_1andSelector_1forEventClass_1andEventID_1, handler !is null ? handler.id_ : null,
-                handleEventSelector, eventClass, eventID);
-    }
-
-    public static NSAppleEventManager sharedAppleEventManager ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAppleEventManager, OS.sel_sharedAppleEventManager);
-        return result !is null ? new NSAppleEventManager(result) : null;
-    }
-
-    public objc.id suspendCurrentAppleEvent ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_suspendCurrentAppleEvent);
-    }
-}
--- a/dwt/internal/cocoa/NSAppleScript.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSAppleScript;
-
-import dwt.internal.cocoa.NSAppleEventDescriptor;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSAppleScript : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool compileAndReturnError (objc.id** errorInfo)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_compileAndReturnError_1, errorInfo) !is null;
-    }
-
-    public NSAppleEventDescriptor executeAndReturnError (objc.id** errorInfo)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_executeAndReturnError_1, errorInfo);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public NSAppleEventDescriptor executeAppleEvent (NSAppleEventDescriptor event, objc.id** errorInfo)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_executeAppleEvent_1error_1, event !is null ? event.id_ : null, errorInfo);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public NSAppleScript initWithContentsOfURL (NSURL url, objc.id** errorInfo)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1error_1, url !is null ? url.id_ : null, errorInfo);
-        return result !is null ? this : null;
-    }
-
-    public NSAppleScript initWithSource (NSString source)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSource_1, source !is null ? source.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public bool isCompiled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isCompiled) !is null;
-    }
-
-    public NSString source ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_source);
-        return result !is null ? new NSString(result) : null;
-    }
-}
--- a/dwt/internal/cocoa/NSApplication.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSApplication.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,488 +1,135 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSApplication;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSDockTile;
 import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSException;
-import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSResponder;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSApplication : NSResponder
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void abortModal ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_abortModal);
-    }
-
-    public void activateContextHelpMode (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_activateContextHelpMode_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void activateIgnoringOtherApps (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_activateIgnoringOtherApps_1, flag);
-    }
+public class NSApplication : NSResponder {
 
-    public void addWindowsItem (NSWindow win, NSString aString, bool isFilename)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addWindowsItem_1title_1filename_1, win !is null ? win.id_ : null, aString !is null ? aString.id_ : null,
-                isFilename);
-    }
-
-    public NSImage applicationIconImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_applicationIconImage);
-        return result !is null ? new NSImage(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public void arrangeInFront (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_arrangeInFront_1, sender !is null ? sender.id_ : null);
-    }
-
-    public objc.id beginModalSessionForWindow_ (NSWindow theWindow)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_beginModalSessionForWindow_1, theWindow !is null ? theWindow.id_ : null);
-    }
-
-    public objc.id beginModalSessionForWindow_relativeToWindow_ (NSWindow theWindow, NSWindow docWindow)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_beginModalSessionForWindow_1relativeToWindow_1, theWindow !is null ? theWindow.id_ : null,
-                docWindow !is null ? docWindow.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void beginSheet (NSWindow sheet, NSWindow docWindow, id modalDelegate, objc.id didEndSelector, objc.id contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginSheet_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, sheet !is null ? sheet.id_ : null,
-                docWindow !is null ? docWindow.id_ : null, modalDelegate !is null ? modalDelegate.id_ : null, didEndSelector, contextInfo);
-    }
-
-    public void cancelUserAttentionRequest (objc.id request)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelUserAttentionRequest_1, request);
-    }
-
-    public void changeWindowsItem (NSWindow win, NSString aString, bool isFilename)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_changeWindowsItem_1title_1filename_1, win !is null ? win.id_ : null, aString !is null ? aString.id_ : null,
-                isFilename);
-    }
-
-    public NSGraphicsContext context ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_context);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSEvent currentEvent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentEvent);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public void deactivate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deactivate);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
+public void activateIgnoringOtherApps(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_activateIgnoringOtherApps_, flag);
+}
 
-    public static void detachDrawingThread (objc.id selector, id target, id argument)
-    {
-        OS.objc_msgSend(OS.class_NSApplication, OS.sel_detachDrawingThread_1toTarget_1withObject_1, selector, target !is null ? target.id_ : null,
-                argument !is null ? argument.id_ : null);
-    }
-
-    public void discardEventsMatchingMask (NSUInteger mask, NSEvent lastEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_discardEventsMatchingMask_1beforeEvent_1, mask, lastEvent !is null ? lastEvent.id_ : null);
-    }
-
-    public NSDockTile dockTile ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dockTile);
-        return result !is null ? new NSDockTile(result) : null;
-    }
+public NSEvent currentEvent() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_currentEvent);
+    return result !is null ? new NSEvent(result) : null;
+}
 
-    public void endModalSession (objc.id session)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endModalSession_1, session);
-    }
-
-    public void endSheet_ (NSWindow sheet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endSheet_1, sheet !is null ? sheet.id_ : null);
-    }
-
-    public void endSheet_returnCode_ (NSWindow sheet, NSInteger returnCode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endSheet_1returnCode_1, sheet !is null ? sheet.id_ : null, returnCode);
-    }
-
-    public void finishLaunching ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_finishLaunching);
-    }
-
-    public void hide (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_hide_1, sender !is null ? sender.id_ : null);
-    }
+public void finishLaunching() {
+    OS.objc_msgSend(this.id, OS.sel_finishLaunching);
+}
 
-    public void hideOtherApplications (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_hideOtherApplications_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool isActive ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isActive) !is null;
-    }
+public void hide(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_hide_, sender !is null ? sender.id : null);
+}
 
-    public bool isHidden ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHidden) !is null;
-    }
-
-    public bool isRunning ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRunning) !is null;
-    }
-
-    public NSWindow keyWindow ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyWindow);
-        return result !is null ? new NSWindow(result) : null;
-    }
+public void hideOtherApplications(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_hideOtherApplications_, sender !is null ? sender.id : null);
+}
 
-    public NSMenu mainMenu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mainMenu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSWindow mainWindow ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mainWindow);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-    public NSWindow makeWindowsPerform (objc.id aSelector, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeWindowsPerform_1inOrder_1, aSelector, flag);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-    public void miniaturizeAll (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_miniaturizeAll_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSWindow modalWindow ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_modalWindow);
-        return result !is null ? new NSWindow(result) : null;
-    }
+public bool isRunning() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isRunning);
+}
 
-    public NSEvent nextEventMatchingMask (NSUInteger mask, NSDate expiration, NSString mode, bool deqFlag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1, mask,
-                expiration !is null ? expiration.id_ : null, mode !is null ? mode.id_ : null, deqFlag);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public void orderFrontCharacterPalette (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontCharacterPalette_1, sender !is null ? sender.id_ : null);
-    }
+public NSWindow keyWindow() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_keyWindow);
+    return result !is null ? new NSWindow(result) : null;
+}
 
-    public void orderFrontColorPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontColorPanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFrontStandardAboutPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontStandardAboutPanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFrontStandardAboutPanelWithOptions (NSDictionary optionsDictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontStandardAboutPanelWithOptions_1, optionsDictionary !is null ? optionsDictionary.id_ : null);
-    }
-
-    public NSArray orderedDocuments ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_orderedDocuments);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSMenu mainMenu() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_mainMenu);
+    return result !is null ? new NSMenu(result) : null;
+}
 
-    public NSArray orderedWindows ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_orderedWindows);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void postEvent (NSEvent event, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postEvent_1atStart_1, event !is null ? event.id_ : null, flag);
-    }
-
-    public void preventWindowOrdering ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_preventWindowOrdering);
-    }
-
-    public void registerServicesMenuSendTypes (NSArray sendTypes, NSArray returnTypes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_registerServicesMenuSendTypes_1returnTypes_1, sendTypes !is null ? sendTypes.id_ : null,
-                returnTypes !is null ? returnTypes.id_ : null);
-    }
+public NSEvent nextEventMatchingMask(NSUInteger mask, NSDate expiration, NSString mode, bool deqFlag) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_, mask, expiration !is null ? expiration.id : null, mode !is null ? mode.id : null, deqFlag);
+    return result !is null ? new NSEvent(result) : null;
+}
 
-    public void removeWindowsItem (NSWindow win)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeWindowsItem_1, win !is null ? win.id_ : null);
-    }
-
-    public void replyToApplicationShouldTerminate (bool shouldTerminate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replyToApplicationShouldTerminate_1, shouldTerminate);
-    }
-
-    public void replyToOpenOrPrint (objc.id reply)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replyToOpenOrPrint_1, reply);
-    }
-
-    public void reportException (NSException theException)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reportException_1, theException !is null ? theException.id_ : null);
-    }
-
-    public NSInteger requestUserAttention (objc.id requestType)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_requestUserAttention_1, requestType);
-    }
-
-    public void run ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_run);
-    }
+public void orderFrontStandardAboutPanel(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_orderFrontStandardAboutPanel_, sender !is null ? sender.id : null);
+}
 
-    public objc.id runModalForWindow_ (NSWindow theWindow)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_runModalForWindow_1, theWindow !is null ? theWindow.id_ : null);
-    }
-
-    public objc.id runModalForWindow_relativeToWindow_ (NSWindow theWindow, NSWindow docWindow)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_runModalForWindow_1relativeToWindow_1, theWindow !is null ? theWindow.id_ : null,
-                docWindow !is null ? docWindow.id_ : null);
-    }
-
-    public objc.id runModalSession (objc.id session)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_runModalSession_1, session);
-    }
-
-    public void runPageLayout (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runPageLayout_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool sendAction (objc.id theAction, id theTarget, id sender)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1from_1, theAction, theTarget !is null ? theTarget.id_ : null,
-                sender !is null ? sender.id_ : null) !is null;
-    }
+public NSArray orderedWindows() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_orderedWindows);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public void sendEvent (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sendEvent_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public NSMenu servicesMenu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_servicesMenu);
-        return result !is null ? new NSMenu(result) : null;
-    }
+public void run() {
+    OS.objc_msgSend(this.id, OS.sel_run);
+}
 
-    public id servicesProvider ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_servicesProvider);
-        return result !is null ? new id(result) : null;
-    }
+public NSInteger runModalForWindow(NSWindow theWindow) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_runModalForWindow_, theWindow !is null ? theWindow.id : null);
+}
 
-    public void setApplicationIconImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setApplicationIconImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setMainMenu (NSMenu aMenu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMainMenu_1, aMenu !is null ? aMenu.id_ : null);
-    }
+public void sendEvent(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_sendEvent_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void setServicesMenu (NSMenu aMenu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setServicesMenu_1, aMenu !is null ? aMenu.id_ : null);
-    }
-
-    public void setServicesProvider (id provider)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setServicesProvider_1, provider !is null ? provider.id_ : null);
-    }
-
-    public void setWindowsMenu (NSMenu aMenu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWindowsMenu_1, aMenu !is null ? aMenu.id_ : null);
-    }
-
-    public void setWindowsNeedUpdate (bool needUpdate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWindowsNeedUpdate_1, needUpdate);
-    }
-
-    public static NSApplication sharedApplication ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSApplication, OS.sel_sharedApplication);
-        return result !is null ? new NSApplication(result) : null;
-    }
+public void setApplicationIconImage(NSImage image) {
+    OS.objc_msgSend(this.id, OS.sel_setApplicationIconImage_, image !is null ? image.id : null);
+}
 
-    public void showHelp (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showHelp_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void stop (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stop_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void stopModal ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopModal);
-    }
+public void setDelegate(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setDelegate_, anObject !is null ? anObject.id : null);
+}
 
-    public void stopModalWithCode (NSInteger returnCode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopModalWithCode_1, returnCode);
-    }
-
-    public id targetForAction_ (objc.SEL theAction)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_targetForAction_1, theAction);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id targetForAction_to_from_ (objc.SEL theAction, id theTarget, id sender)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_targetForAction_1to_1from_1, theAction, theTarget !is null ? theTarget.id_ : null,
-                sender !is null ? sender.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public static NSApplication sharedApplication() {
+    objc.id result = OS.objc_msgSend(OS.class_NSApplication, OS.sel_sharedApplication);
+    return result !is null ? new NSApplication(result) : null;
+}
 
-    public void terminate (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_terminate_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool tryToPerform (objc.SEL anAction, id anObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id_ : null) !is null;
-    }
-
-    public void unhide (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unhide_1, sender !is null ? sender.id_ : null);
-    }
+public void stop(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_stop_, sender !is null ? sender.id : null);
+}
 
-    public void unhideAllApplications (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unhideAllApplications_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void unhideWithoutActivation ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unhideWithoutActivation);
-    }
-
-    public void updateWindows ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateWindows);
-    }
+public void terminate(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_terminate_, sender !is null ? sender.id : null);
+}
 
-    public void updateWindowsItem (NSWindow win)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateWindowsItem_1, win !is null ? win.id_ : null);
-    }
-
-    public id validRequestorForSendType (NSString sendType, NSString returnType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id_ : null,
-                returnType !is null ? returnType.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public void unhideAllApplications(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_unhideAllApplications_, sender !is null ? sender.id : null);
+}
 
-    public NSWindow windowWithWindowNumber (NSInteger windowNum)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowWithWindowNumber_1, windowNum);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-    public NSArray windows ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windows);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSMenu windowsMenu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowsMenu);
-        return result !is null ? new NSMenu(result) : null;
-    }
+public NSArray windows() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_windows);
+    return result !is null ? new NSArray(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSArchiver.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSArchiver;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSMutableData;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSArchiver : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static bool archiveRootObject (id rootObject, NSString path)
-    {
-        return OS.objc_msgSend(OS.class_NSArchiver, OS.sel_archiveRootObject_1toFile_1, rootObject !is null ? rootObject.id_ : null,
-                path !is null ? path.id_ : null) !is null;
-    }
-
-    public static NSData archivedDataWithRootObject (id rootObject)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSArchiver, OS.sel_archivedDataWithRootObject_1, rootObject !is null ? rootObject.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSMutableData archiverData ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_archiverData);
-        return result !is null ? new NSMutableData(result) : null;
-    }
-
-    public NSString classNameEncodedForTrueClassName (NSString trueName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_classNameEncodedForTrueClassName_1, trueName !is null ? trueName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void encodeClassName (NSString trueName, NSString inArchiveName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeClassName_1intoClassName_1, trueName !is null ? trueName.id_ : null,
-                inArchiveName !is null ? inArchiveName.id_ : null);
-    }
-
-    public void encodeConditionalObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeConditionalObject_1, object !is null ? object.id_ : null);
-    }
-
-    public void encodeRootObject (id rootObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeRootObject_1, rootObject !is null ? rootObject.id_ : null);
-    }
-
-    public NSArchiver initForWritingWithMutableData (NSMutableData mdata)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initForWritingWithMutableData_1, mdata !is null ? mdata.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public void replaceObject (id object, id newObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceObject_1withObject_1, object !is null ? object.id_ : null, newObject !is null ? newObject.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSArray.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSArray.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,342 +1,60 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSArray;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSEnumerator;
-import dwt.internal.cocoa.NSIndexSet;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSArray : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addObserver_forKeyPath_options_context_ (NSObject observer, NSString keyPath, objc.id options, objc.id context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObserver_1forKeyPath_1options_1context_1, observer !is null ? observer.id_ : null,
-                keyPath !is null ? keyPath.id_ : null, options, context);
-    }
-
-    public void addObserver_toObjectsAtIndexes_forKeyPath_options_context_ (NSObject observer, NSIndexSet indexes, NSString keyPath, objc.id options,
-            objc.id context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObserver_1toObjectsAtIndexes_1forKeyPath_1options_1context_1, observer !is null ? observer.id_ : null,
-                indexes !is null ? indexes.id_ : null, keyPath !is null ? keyPath.id_ : null, options, context);
-    }
-
-    public static id array ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_array);
-        return result !is null ? new id(result) : null;
-    }
+public class NSArray : NSObject {
 
-    public NSArray arrayByAddingObject (id anObject)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrayByAddingObject_1, anObject !is null ? anObject.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
-
-    public NSArray arrayByAddingObjectsFromArray (NSArray otherArray)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrayByAddingObjectsFromArray_1, otherArray !is null ? otherArray.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
-
-    public static id arrayWithArray (NSArray array)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithArray_1, array !is null ? array.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id arrayWithContentsOfFile (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithContentsOfFile_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id arrayWithContentsOfURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id arrayWithObject (id anObject)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObject_1, anObject !is null ? anObject.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_arrayWithObjects_ (id arrayWithObjects)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObjects_1, arrayWithObjects !is null ? arrayWithObjects.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public static id static_arrayWithObjects_count_ (/*const*/objc.id* objects, NSUInteger cnt)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObjects_1count_1, objects, cnt);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString componentsJoinedByString (NSString separator)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_componentsJoinedByString_1, separator !is null ? separator.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool containsObject (id anObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsObject_1, anObject !is null ? anObject.id_ : null) !is null;
-    }
-
-    public NSUInteger count ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString descriptionWithLocale_ (id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString descriptionWithLocale_indent_ (id locale, objc.id level)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1indent_1, locale !is null ? locale.id_ : null, level);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSArray filteredArrayUsingPredicate (NSPredicate predicate)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_filteredArrayUsingPredicate_1, predicate !is null ? predicate.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
-
-    public id firstObjectCommonWithArray (NSArray otherArray)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_firstObjectCommonWithArray_1, otherArray !is null ? otherArray.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void getObjects_ (objc.id objects)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getObjects_1, objects);
-    }
-
-    public void getObjects_range_ (objc.id objects, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getObjects_1range_1, objects, range);
-    }
-
-    public NSUInteger indexOfObject_ (id anObject)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public NSUInteger indexOfObject_inRange_ (id anObject, NSRange range)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfObject_1inRange_1, anObject !is null ? anObject.id_ : null, range);
-    }
-
-    public NSUInteger indexOfObjectIdenticalTo_ (id anObject)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfObjectIdenticalTo_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public NSUInteger indexOfObjectIdenticalTo_inRange_ (id anObject, NSRange range)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfObjectIdenticalTo_1inRange_1, anObject !is null ? anObject.id_ : null, range);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSArray initWithArray_ (NSArray array)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithArray_1, array !is null ? array.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSArray initWithArray_copyItems_ (NSArray array, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithArray_1copyItems_1, array !is null ? array.id_ : null, flag);
-        return result !is null ? this : null;
-    }
-
-    public NSArray initWithContentsOfFile (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1, path !is null ? path.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSArray initWithContentsOfURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSArray initWithObjects_ (id initWithObjects)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1, initWithObjects !is null ? initWithObjects.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSArray initWithObjects_count_ (/*const*/objc.id* objects, NSUInteger cnt)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1count_1, objects, cnt);
-        return result !is null ? this : null;
-    }
+public static NSArray array() {
+    objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_array);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public bool isEqualToArray (NSArray otherArray)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToArray_1, otherArray !is null ? otherArray.id_ : null) !is null;
-    }
-
-    public id lastObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_lastObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void makeObjectsPerformSelector_ (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeObjectsPerformSelector_1, aSelector);
-    }
-
-    public void makeObjectsPerformSelector_withObject_ (objc.SEL aSelector, id argument)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeObjectsPerformSelector_1withObject_1, aSelector, argument !is null ? argument.id_ : null);
-    }
-
-    public objc.id objectAtIndex (NSUInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectAtIndex_1, index);
-        return result;
-    //  return result !is null ? new id(result) : null;
-    }
-
-    public NSEnumerator objectEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public NSArray objectsAtIndexes (NSIndexSet indexes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectsAtIndexes_1, indexes !is null ? indexes.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
+public static NSArray arrayWithObject(cocoa.id anObject) {
+    objc.id result = OS.objc_msgSend(OS.class_NSArray, OS.sel_arrayWithObject_, anObject !is null ? anObject.id : null);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public NSArray pathsMatchingExtensions (NSArray filterTypes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathsMatchingExtensions_1, filterTypes !is null ? filterTypes.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
-
-    public void removeObserver_forKeyPath_ (NSObject observer, NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObserver_1forKeyPath_1, observer !is null ? observer.id_ : null, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void removeObserver_fromObjectsAtIndexes_forKeyPath_ (NSObject observer, NSIndexSet indexes, NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObserver_1fromObjectsAtIndexes_1forKeyPath_1, observer !is null ? observer.id_ : null,
-                indexes !is null ? indexes.id_ : null, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public NSEnumerator reverseObjectEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_reverseObjectEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public void setValue (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public NSData sortedArrayHint ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayHint);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSArray sortedArrayUsingDescriptors (NSArray sortDescriptors)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayUsingDescriptors_1, sortDescriptors !is null ? sortDescriptors.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
+public bool containsObject(cocoa.id anObject) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_containsObject_, anObject !is null ? anObject.id : null);
+}
 
-    public NSArray sortedArrayUsingFunction_context_ (objc.id comparator, objc.id context)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayUsingFunction_1context_1, comparator, context);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
-
-    public NSArray sortedArrayUsingFunction_context_hint_ (objc.id comparator, objc.id context, NSData hint)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayUsingFunction_1context_1hint_1, comparator, context,
-                hint !is null ? hint.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
-
-    public NSArray sortedArrayUsingSelector (objc.id comparator)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortedArrayUsingSelector_1, comparator);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
+public NSUInteger count() {
+    return OS.objc_msgSend(this.id, OS.sel_count);
+}
 
-    public NSArray subarrayWithRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subarrayWithRange_1, range);
-        return result is this.id_ ? this : (result !is null ? new NSArray(result) : null);
-    }
-
-    public id valueForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool writeToFile (NSString path, bool useAuxiliaryFile)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1, path !is null ? path.id_ : null, useAuxiliaryFile) !is null;
-    }
-
-    public bool writeToURL (NSURL url, bool atomically)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1atomically_1, url !is null ? url.id_ : null, atomically) !is null;
-    }
+public cocoa.id objectAtIndex(NSUInteger index) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_objectAtIndex_, index);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSArrayController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSArrayController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSIndexSet;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObjectController;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSArrayController : NSObjectController
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void add (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_add_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void addObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObject_1,
-                object !is null ? object.id_ : null);
-    }
-
-    public void addObjects (NSArray objects)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObjects_1,
-                objects !is null ? objects.id_ : null);
-    }
-
-    public bool addSelectedObjects (NSArray objects)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_addSelectedObjects_1,
-                objects !is null ? objects.id_ : null) !is null;
-    }
-
-    public bool addSelectionIndexes (NSIndexSet indexes)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_addSelectionIndexes_1,
-                indexes !is null ? indexes.id_ : null) !is null;
-    }
-
-    public bool alwaysUsesMultipleValuesMarker ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_alwaysUsesMultipleValuesMarker) !is null;
-    }
-
-    public NSArray arrangeObjects (NSArray objects)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrangeObjects_1,
-                objects !is null ? objects.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id arrangedObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrangedObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray automaticRearrangementKeyPaths ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_,
-                OS.sel_automaticRearrangementKeyPaths);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool automaticallyRearrangesObjects ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_automaticallyRearrangesObjects) !is null;
-    }
-
-    public bool avoidsEmptySelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_avoidsEmptySelection) !is null;
-    }
-
-    public bool canInsert ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canInsert) !is null;
-    }
-
-    public bool canSelectNext ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canSelectNext) !is null;
-    }
-
-    public bool canSelectPrevious ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canSelectPrevious) !is null;
-    }
-
-    public bool clearsFilterPredicateOnInsertion ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_clearsFilterPredicateOnInsertion) !is null;
-    }
-
-    public void didChangeArrangementCriteria ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_didChangeArrangementCriteria);
-    }
-
-    public NSPredicate filterPredicate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_filterPredicate);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public void insert (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insert_1,
-                sender !is null ? sender.id_ : null);
-    }
-
-    public void insertObject (id object, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertObject_1atArrangedObjectIndex_1,
-                object !is null ? object.id_ : null, index);
-    }
-
-    public void insertObjects (NSArray objects, NSIndexSet indexes)
-    {
-        OS.objc_msgSend(this.id_,
-                OS.sel_insertObjects_1atArrangedObjectIndexes_1,
-                objects !is null ? objects.id_ : null,
-                indexes !is null ? indexes.id_ : null);
-    }
-
-    public bool preservesSelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_preservesSelection) !is null;
-    }
-
-    public void rearrangeObjects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rearrangeObjects);
-    }
-
-    public void remove (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_remove_1,
-                sender !is null ? sender.id_ : null);
-    }
-
-    public void removeObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObject_1,
-                object !is null ? object.id_ : null);
-    }
-
-    public void removeObjectAtArrangedObjectIndex (NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectAtArrangedObjectIndex_1,
-                index);
-    }
-
-    public void removeObjects (NSArray objects)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjects_1,
-                objects !is null ? objects.id_ : null);
-    }
-
-    public void removeObjectsAtArrangedObjectIndexes (NSIndexSet indexes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectsAtArrangedObjectIndexes_1,
-                indexes !is null ? indexes.id_ : null);
-    }
-
-    public bool removeSelectedObjects (NSArray objects)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_removeSelectedObjects_1,
-                objects !is null ? objects.id_ : null) !is null;
-    }
-
-    public bool removeSelectionIndexes (NSIndexSet indexes)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_removeSelectionIndexes_1,
-                indexes !is null ? indexes.id_ : null) !is null;
-    }
-
-    public void selectNext (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectNext_1,
-                sender !is null ? sender.id_ : null);
-    }
-
-    public void selectPrevious (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectPrevious_1,
-                sender !is null ? sender.id_ : null);
-    }
-
-    public NSArray selectedObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSUInteger selectionIndex ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_selectionIndex);
-    }
-
-    public NSIndexSet selectionIndexes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectionIndexes);
-        return result !is null ? new NSIndexSet(result) : null;
-    }
-
-    public bool selectsInsertedObjects ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_selectsInsertedObjects) !is null;
-    }
-
-    public void setAlwaysUsesMultipleValuesMarker (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlwaysUsesMultipleValuesMarker_1,
-                flag);
-    }
-
-    public void setAutomaticallyRearrangesObjects (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutomaticallyRearrangesObjects_1,
-                flag);
-    }
-
-    public void setAvoidsEmptySelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAvoidsEmptySelection_1, flag);
-    }
-
-    public void setClearsFilterPredicateOnInsertion (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setClearsFilterPredicateOnInsertion_1,
-                flag);
-    }
-
-    public void setFilterPredicate (NSPredicate filterPredicate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFilterPredicate_1,
-                filterPredicate !is null ? filterPredicate.id_ : null);
-    }
-
-    public void setPreservesSelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPreservesSelection_1, flag);
-    }
-
-    public bool setSelectedObjects (NSArray objects)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setSelectedObjects_1,
-                objects !is null ? objects.id_ : null) !is null;
-    }
-
-    public bool setSelectionIndex (NSUInteger index)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setSelectionIndex_1, index) !is null;
-    }
-
-    public bool setSelectionIndexes (NSIndexSet indexes)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setSelectionIndexes_1,
-                indexes !is null ? indexes.id_ : null) !is null;
-    }
-
-    public void setSelectsInsertedObjects (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectsInsertedObjects_1, flag);
-    }
-
-    public void setSortDescriptors (NSArray sortDescriptors)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSortDescriptors_1,
-                sortDescriptors !is null ? sortDescriptors.id_ : null);
-    }
-
-    public NSArray sortDescriptors ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortDescriptors);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSAssertionHandler.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSAssertionHandler;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSAssertionHandler : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSAssertionHandler currentHandler ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSAssertionHandler, OS.sel_currentHandler);
-        return result !is null ? new NSAssertionHandler(result) : null;
-    }
-
-    public void handleFailureInFunction (NSString functionName, NSString fileName, NSInteger line, NSString description)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_handleFailureInFunction_1file_1lineNumber_1description_1, functionName !is null ? functionName.id_ : null,
-                fileName !is null ? fileName.id_ : null, line, description !is null ? description.id_ : null);
-    }
-
-    public void handleFailureInMethod (objc.SEL selector, id object, NSString fileName, NSInteger line, NSString description)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_handleFailureInMethod_1object_1file_1lineNumber_1description_1, selector, object !is null ? object.id_ : null,
-                fileName !is null ? fileName.id_ : null, line, description !is null ? description.id_ : null);
-    }
-}
--- a/dwt/internal/cocoa/NSAttributedString.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSAttributedString.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,140 +1,96 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSAttributedString;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSAttributedString : NSObject
-{
-    public this ()
-    {
-        super();
-    }
+public class NSAttributedString : NSObject {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public id attribute_atIndex_effectiveRange_ (NSString attrName, NSUInteger location, objc.id range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attribute_1atIndex_1effectiveRange_1, attrName !is null ? attrName.id_ : null, location,
-                range);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public id attribute_atIndex_longestEffectiveRange_inRange_ (NSString attrName, NSUInteger location, objc.id range, NSRange rangeLimit)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attribute_1atIndex_1longestEffectiveRange_1inRange_1,
-                attrName !is null ? attrName.id_ : null, location, range, rangeLimit);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSAttributedString attributedSubStringFromRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedSubStringFromRange_1, range);
-        return result is this.id_ ? this : (result !is null ? new NSAttributedString(result) : null);
-    }
-
-    public NSDictionary attributesAtIndex_effectiveRange_ (int location, objc.id range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributesAtIndex_1effectiveRange_1, location, range);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public NSDictionary attributesAtIndex(NSUInteger location, NSRangePointer range, NSRange rangeLimit) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_attributesAtIndex_longestEffectiveRange_inRange_, location, range, rangeLimit);
+    return result !is null ? new NSDictionary(result) : null;
+}
 
-    public NSDictionary attributesAtIndex_longestEffectiveRange_inRange_ (NSUInteger location, objc.id range, NSRange rangeLimit)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributesAtIndex_1longestEffectiveRange_1inRange_1, location, range, rangeLimit);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public NSRange doubleClickAtIndex(int /*long*/ location) {
+    NSRange result = NSRange();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_doubleClickAtIndex_, location);
+    return result;
+}
 
-    public NSAttributedString initWithAttributedString (NSAttributedString attrStr)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithAttributedString_1, attrStr !is null ? attrStr.id_ : null);
-        return result !is null ? this : null;
-    }
+public void drawAtPoint(NSPoint point) {
+    OS.objc_msgSend(this.id, OS.sel_drawAtPoint_, point);
+}
 
-    public NSAttributedString initWithString_ (NSString str)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, str !is null ? str.id_ : null);
-        return result !is null ? this : null;
-    }
+public void drawInRect(NSRect rect) {
+    OS.objc_msgSend(this.id, OS.sel_drawInRect_, rect);
+}
 
-    public NSAttributedString initWithString_attributes_ (NSString str, NSDictionary attrs)
-    {
-        objc.id
-                result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1attributes_1, str !is null ? str.id_ : null, attrs !is null ? attrs.id_ : null);
-        return result !is null ? this : null;
-    }
+public NSAttributedString initWithString(NSString str, NSDictionary attrs) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_attributes_, str !is null ? str.id : null, attrs !is null ? attrs.id : null);
+    return result is this.id ? this : (result !is null ? new NSAttributedString(result) : null);
+}
 
-    public bool isEqualToAttributedString (NSAttributedString other)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToAttributedString_1, other !is null ? other.id_ : null) !is null;
-    }
+public int /*long*/ nextWordFromIndex(int /*long*/ location, bool isForward) {
+    return OS.objc_msgSend(this.id, OS.sel_nextWordFromIndex_forward_, location, isForward);
+}
 
-    public NSUInteger length ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_length);
-    }
-
-    public NSString String ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_string);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSSize size() {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_size);
+    return result;
+}
 
-    public NSSize size ()
-    {
-        NSSize result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_size);
-        return result;
-    }
+public NSAttributedString attributedSubstringFromRange(NSRange range) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_attributedSubstringFromRange_, range);
+    return result is this.id ? this : (result !is null ? new NSAttributedString(result) : null);
+}
 
-    public void drawAtPoint (NSPoint pt)
-    {
-        OS.objc_msgSend(id_, OS.sel_drawAtPoint_, pt);
-    }
-
-    public void drawInRect (NSRect rect)
-    {
-        OS.objc_msgSend(id_, OS.sel_drawInRect_1, rect);
-    }
+public NSAttributedString initWithString(NSString str) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_, str !is null ? str.id : null);
+    return result is this.id ? this : (result !is null ? new NSAttributedString(result) : null);
+}
 
-    public void drawInRect (NSRect rect, objc.id options)
-    {
-        OS.objc_msgSend(id_, OS.sel_drawInRect_1, rect, options);
-    }
+public NSUInteger length() {
+    return OS.objc_msgSend(this.id, OS.sel_length);
+}
 
-    public NSUInteger nextWordFromIndex (NSUInteger index, bool forward)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(id_, OS.sel_nextWordFromIndex_1forward_1, index, forward);
-    }
+public NSString string() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_string);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSRange doubleClickAtIndex (NSUInteger index)
-    {
-        NSRange result;
-        OS.objc_msgSend_struct(&result, id_, OS.sel_doubleClickAtIndex_1, index);
-        return result;
-    }
 }
--- a/dwt/internal/cocoa/NSAutoreleasePool.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSAutoreleasePool.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,105 +1,40 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSAutoreleasePool;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSAutoreleasePool : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static void static_addObject_ (id anObject)
-    {
-        OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_addObject_1, anObject !is null ? anObject.id_ : null);
-    }
+public class NSAutoreleasePool : NSObject {
 
-    public void addObject_ (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public static NSUInteger autoreleasedObjectCount ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_autoreleasedObjectCount);
-    }
-
-    public void drain ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drain);
-    }
-
-    public static void enableFreedObjectCheck (bool enable)
-    {
-        OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_enableFreedObjectCheck_1, enable);
-    }
+public this() {
+    super();
+}
 
-    public static void enableRelease (bool enable)
-    {
-        OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_enableRelease_1, enable);
-    }
-
-    public static NSUInteger poolCountHighWaterMark ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_poolCountHighWaterMark);
-    }
-
-    public static NSUInteger poolCountHighWaterResolution ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_poolCountHighWaterResolution);
-    }
-
-    public static void resetTotalAutoreleasedObjects ()
-    {
-        OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_resetTotalAutoreleasedObjects);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static void setPoolCountHighWaterMark (NSUInteger count)
-    {
-        OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_setPoolCountHighWaterMark_1, count);
-    }
-
-    public static void setPoolCountHighWaterResolution (NSUInteger res)
-    {
-        OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_setPoolCountHighWaterResolution_1, res);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static void showPools ()
-    {
-        OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_showPools);
-    }
-
-    public static NSUInteger topAutoreleasePoolCount ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_topAutoreleasePoolCount);
-    }
-
-    public static NSUInteger totalAutoreleasedObjects ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_totalAutoreleasedObjects);
-    }
+public static void enableFreedObjectCheck(bool enable) {
+    OS.objc_msgSend(OS.class_NSAutoreleasePool, OS.sel_enableFreedObjectCheck_, enable);
+}
 
 }
--- a/dwt/internal/cocoa/NSBezierPath.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSBezierPath.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,26 +1,28 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSBezierPath;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSAffineTransform;
 import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 enum NSBezierPathElement
@@ -31,11 +33,6 @@
     NSClosePathBezierPathElement
 }
 
-alias NSBezierPathElement.NSMoveToBezierPathElement NSMoveToBezierPathElement;
-alias NSBezierPathElement.NSLineToBezierPathElement NSLineToBezierPathElement;
-alias NSBezierPathElement.NSCurveToBezierPathElement NSCurveToBezierPathElement;
-alias NSBezierPathElement.NSClosePathBezierPathElement NSClosePathBezierPathElement;
-
 enum NSLineCapStyle
 {
     NSButtLineCapStyle = 0,
@@ -43,10 +40,6 @@
     NSSquareLineCapStyle = 2
 }
 
-alias NSLineCapStyle.NSButtLineCapStyle NSButtLineCapStyle;
-alias NSLineCapStyle.NSRoundLineCapStyle NSRoundLineCapStyle;
-alias NSLineCapStyle.NSSquareLineCapStyle NSSquareLineCapStyle;
-
 enum NSLineJoinStyle
 {
     NSMiterLineJoinStyle = 0,
@@ -54,402 +47,181 @@
     NSBevelLineJoinStyle = 2
 }
 
-alias NSLineJoinStyle.NSMiterLineJoinStyle NSMiterLineJoinStyle;
-alias NSLineJoinStyle.NSRoundLineJoinStyle NSRoundLineJoinStyle;
-alias NSLineJoinStyle.NSBevelLineJoinStyle NSBevelLineJoinStyle;
-
 enum NSWindingRule
 {
     NSNonZeroWindingRule = 0,
     NSEvenOddWindingRule = 1
 }
 
-alias NSWindingRule.NSNonZeroWindingRule NSNonZeroWindingRule;
-alias NSWindingRule.NSEvenOddWindingRule NSEvenOddWindingRule;
-
-public class NSBezierPath : NSObject
-{
-    public this ()
-    {
-        super();
-    }
+public class NSBezierPath : NSObject {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addClip ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addClip);
-    }
+public this() {
+    super();
+}
 
-    public void appendBezierPath (NSBezierPath path)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPath_1, path !is null ? path.id_ : null);
-    }
-
-    public void appendBezierPathWithArcFromPoint (NSPoint point1, NSPoint point2, CGFloat radius)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithArcFromPoint_1toPoint_1radius_1, point1, point2, radius);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_ (NSPoint center, CGFloat radius, CGFloat startAngle, CGFloat endAngle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithArcWithCenter_1radius_1startAngle_1endAngle_1, center, radius, startAngle, endAngle);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_ (NSPoint center, CGFloat radius, CGFloat startAngle,
-            CGFloat endAngle, bool clockwise)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithArcWithCenter_1radius_1startAngle_1endAngle_1clockwise_1, center, radius, startAngle,
-                endAngle, clockwise);
-    }
-
-    public void appendBezierPathWithGlyph (NSGlyph glyph, NSFont font)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithGlyph_1inFont_1, glyph, font !is null ? font.id_ : null);
-    }
+public void addClip() {
+    OS.objc_msgSend(this.id, OS.sel_addClip);
+}
 
-    public void appendBezierPathWithGlyphs (NSGlyph* glyphs, NSInteger count, NSFont font)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithGlyphs_1count_1inFont_1, glyphs, count, font !is null ? font.id_ : null);
-    }
-
-    public void appendBezierPathWithOvalInRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithOvalInRect_1, rect);
-    }
+public void appendBezierPath(NSBezierPath path) {
+    OS.objc_msgSend(this.id, OS.sel_appendBezierPath_, path !is null ? path.id : null);
+}
 
-    public void appendBezierPathWithPackedGlyphs (/*const*/char* packedGlyphs)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithPackedGlyphs_1, packedGlyphs);
-    }
-
-    public void appendBezierPathWithPoints (NSPointArray points, NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithPoints_1count_1, points, count);
-    }
+public void appendBezierPathWithArcWithCenter(NSPoint center, CGFloat radius, CGFloat startAngle, CGFloat endAngle) {
+    OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_, center, radius, startAngle, endAngle);
+}
 
-    public void appendBezierPathWithRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithRect_1, rect);
-    }
-
-    public void appendBezierPathWithRoundedRect (NSRect rect, CGFloat xRadius, CGFloat yRadius)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBezierPathWithRoundedRect_1xRadius_1yRadius_1, rect, xRadius, yRadius);
-    }
+public void appendBezierPathWithArcWithCenter(NSPoint center, CGFloat radius, CGFloat startAngle, CGFloat endAngle, bool clockwise) {
+    OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_, center, radius, startAngle, endAngle, clockwise);
+}
 
-    public static NSBezierPath bezierPath ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPath);
-        return result !is null ? new NSBezierPath(result) : null;
-    }
+public void appendBezierPathWithGlyphs(NSGlyph* glyphs, NSInteger count, NSFont font) {
+    OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithGlyphs_count_inFont_, glyphs, count, font !is null ? font.id : null);
+}
 
-    public NSBezierPath bezierPathByFlatteningPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_bezierPathByFlatteningPath);
-        return result is this.id_ ? this : (result !is null ? new NSBezierPath(result) : null);
-    }
-
-    public NSBezierPath bezierPathByReversingPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_bezierPathByReversingPath);
-        return result is this.id_ ? this : (result !is null ? new NSBezierPath(result) : null);
-    }
+public void appendBezierPathWithOvalInRect(NSRect rect) {
+    OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithOvalInRect_, rect);
+}
 
-    public static NSBezierPath bezierPathWithOvalInRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPathWithOvalInRect_1, rect);
-        return result !is null ? new NSBezierPath(result) : null;
-    }
+public void appendBezierPathWithRect(NSRect rect) {
+    OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithRect_, rect);
+}
 
-    public static NSBezierPath bezierPathWithRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPathWithRect_1, rect);
-        return result !is null ? new NSBezierPath(result) : null;
-    }
-
-    public static NSBezierPath bezierPathWithRoundedRect (NSRect rect, CGFloat xRadius, CGFloat yRadius)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPathWithRoundedRect_1xRadius_1yRadius_1, rect, xRadius, yRadius);
-        return result !is null ? new NSBezierPath(result) : null;
-    }
+public void appendBezierPathWithRoundedRect(NSRect rect, CGFloat xRadius, CGFloat yRadius) {
+    OS.objc_msgSend(this.id, OS.sel_appendBezierPathWithRoundedRect_xRadius_yRadius_, rect, xRadius, yRadius);
+}
 
-    public NSRect bounds ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_bounds);
-        return result;
-    }
-
-    public bool cachesBezierPath ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_cachesBezierPath) !is null;
-    }
+public static NSBezierPath bezierPath() {
+    objc.id result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPath);
+    return result !is null ? new NSBezierPath(result) : null;
+}
 
-    public static void clipRect (NSRect rect)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_clipRect_1, rect);
-    }
-
-    public void closePath ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_closePath);
-    }
-
-    public bool containsPoint (NSPoint point)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsPoint_1, point) !is null;
-    }
+public NSBezierPath bezierPathByFlatteningPath() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_bezierPathByFlatteningPath);
+    return result is this.id ? this : (result !is null ? new NSBezierPath(result) : null);
+}
 
-    public NSRect controlPointBounds ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_controlPointBounds);
-        return result;
-    }
+public static NSBezierPath bezierPathWithRect(NSRect rect) {
+    objc.id result = OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_bezierPathWithRect_, rect);
+    return result !is null ? new NSBezierPath(result) : null;
+}
 
-    public NSPoint currentPoint ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_currentPoint);
-        return result;
-    }
-
-    public void curveToPoint (NSPoint endPoint, NSPoint controlPoint1, NSPoint controlPoint2)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_curveToPoint_1controlPoint1_1controlPoint2_1, endPoint, controlPoint1, controlPoint2);
-    }
-
-    public static CGFloat defaultFlatness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSBezierPath, OS.sel_defaultFlatness);
-    }
+public NSRect bounds() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_bounds);
+    return result;
+}
 
-    public static NSLineCapStyle defaultLineCapStyle ()
-    {
-        return cast(NSLineCapStyle) OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_defaultLineCapStyle);
-    }
-
-    public static NSLineJoinStyle defaultLineJoinStyle ()
-    {
-        return cast(NSLineJoinStyle) OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_defaultLineJoinStyle);
-    }
-
-    public static CGFloat defaultLineWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSBezierPath, OS.sel_defaultLineWidth);
-    }
+public void closePath() {
+    OS.objc_msgSend(this.id, OS.sel_closePath);
+}
 
-    public static CGFloat defaultMiterLimit ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSBezierPath, OS.sel_defaultMiterLimit);
-    }
+public bool containsPoint(NSPoint point) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_containsPoint_, point);
+}
 
-    public static NSWindingRule defaultWindingRule ()
-    {
-        return cast(NSWindingRule) OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_defaultWindingRule);
-    }
-
-    public static void drawPackedGlyphs (/*const*/char* packedGlyphs, NSPoint point)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_drawPackedGlyphs_1atPoint_1, packedGlyphs, point);
-    }
+public NSRect controlPointBounds() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_controlPointBounds);
+    return result;
+}
 
-    public NSBezierPathElement elementAtIndex_ (NSInteger index)
-    {
-        return cast(NSBezierPathElement) OS.objc_msgSend(this.id_, OS.sel_elementAtIndex_1, index);
-    }
-
-    public NSBezierPathElement elementAtIndex_associatedPoints_ (NSInteger index, NSPointArray points)
-    {
-        return cast(NSBezierPathElement) OS.objc_msgSend(this.id_, OS.sel_elementAtIndex_1associatedPoints_1, index, points);
-    }
+public NSPoint currentPoint() {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_currentPoint);
+    return result;
+}
 
-    public NSInteger elementCount ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_elementCount);
-    }
-
-    public void fill ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_fill);
-    }
+public void curveToPoint(NSPoint endPoint, NSPoint controlPoint1, NSPoint controlPoint2) {
+    OS.objc_msgSend(this.id, OS.sel_curveToPoint_controlPoint1_controlPoint2_, endPoint, controlPoint1, controlPoint2);
+}
 
-    public static void fillRect (NSRect rect)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_fillRect_1, rect);
-    }
-
-    public CGFloat flatness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_flatness);
-    }
+public static CGFloat defaultFlatness() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSBezierPath, OS.sel_defaultFlatness);
+}
 
-    public void getLineDash (CGFloat* pattern, NSInteger* count, CGFloat* phase)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getLineDash_1count_1phase_1, pattern, count, phase);
-    }
+public NSBezierPathElement elementAtIndex(NSInteger index, NSPointArray points) {
+    return cast(NSBezierPathElement) OS.objc_msgSend(this.id, OS.sel_elementAtIndex_associatedPoints_, index, points);
+}
 
-    public bool isEmpty ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEmpty) !is null;
-    }
-
-    public NSLineCapStyle lineCapStyle ()
-    {
-        return cast(NSLineCapStyle) OS.objc_msgSend(this.id_, OS.sel_lineCapStyle);
-    }
+public NSInteger elementCount() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_elementCount);
+}
 
-    public NSLineJoinStyle lineJoinStyle ()
-    {
-        return cast(NSLineJoinStyle) OS.objc_msgSend(this.id_, OS.sel_lineJoinStyle);
-    }
-
-    public void lineToPoint (NSPoint point)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_lineToPoint_1, point);
-    }
+public void fill() {
+    OS.objc_msgSend(this.id, OS.sel_fill);
+}
 
-    public CGFloat lineWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineWidth);
-    }
+public static void fillRect(NSRect rect) {
+    OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_fillRect_, rect);
+}
 
-    public CGFloat miterLimit ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_miterLimit);
-    }
-
-    public void moveToPoint (NSPoint point)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveToPoint_1, point);
-    }
+public bool isEmpty() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isEmpty);
+}
 
-    public void relativeCurveToPoint (NSPoint endPoint, NSPoint controlPoint1, NSPoint controlPoint2)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_relativeCurveToPoint_1controlPoint1_1controlPoint2_1, endPoint, controlPoint1, controlPoint2);
-    }
-
-    public void relativeLineToPoint (NSPoint point)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_relativeLineToPoint_1, point);
-    }
+public void lineToPoint(NSPoint point) {
+    OS.objc_msgSend(this.id, OS.sel_lineToPoint_, point);
+}
 
-    public void relativeMoveToPoint (NSPoint point)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_relativeMoveToPoint_1, point);
-    }
+public void moveToPoint(NSPoint point) {
+    OS.objc_msgSend(this.id, OS.sel_moveToPoint_, point);
+}
 
-    public void removeAllPoints ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllPoints);
-    }
-
-    public void setAssociatedPoints (NSPointArray points, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAssociatedPoints_1atIndex_1, points, index);
-    }
+public void removeAllPoints() {
+    OS.objc_msgSend(this.id, OS.sel_removeAllPoints);
+}
 
-    public void setCachesBezierPath (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCachesBezierPath_1, flag);
-    }
-
-    public void setClip ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setClip);
-    }
+public void setClip() {
+    OS.objc_msgSend(this.id, OS.sel_setClip);
+}
 
-    public static void setDefaultFlatness (CGFloat flatness)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_setDefaultFlatness_1, flatness);
-    }
-
-    public static void setDefaultLineCapStyle (NSLineCapStyle lineCapStyle)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_setDefaultLineCapStyle_1, lineCapStyle);
-    }
-
-    public static void setDefaultLineJoinStyle (NSLineJoinStyle lineJoinStyle)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_setDefaultLineJoinStyle_1, lineJoinStyle);
-    }
+public static void setDefaultFlatness(CGFloat flatness) {
+    OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_setDefaultFlatness_, flatness);
+}
 
-    public static void setDefaultLineWidth (CGFloat lineWidth)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_setDefaultLineWidth_1, lineWidth);
-    }
-
-    public static void setDefaultMiterLimit (CGFloat limit)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_setDefaultMiterLimit_1, limit);
-    }
+public void setLineCapStyle(NSLineCapStyle lineCapStyle) {
+    OS.objc_msgSend(this.id, OS.sel_setLineCapStyle_, lineCapStyle);
+}
 
-    public static void setDefaultWindingRule (NSWindingRule windingRule)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_setDefaultWindingRule_1, windingRule);
-    }
+public void setLineDash(/*const*/CGFloat* pattern, NSInteger count, CGFloat phase) {
+    OS.objc_msgSend(this.id, OS.sel_setLineDash_count_phase_, pattern, count, phase);
+}
 
-    public void setFlatness (CGFloat flatness)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFlatness_1, flatness);
-    }
-
-    public void setLineCapStyle (NSLineCapStyle lineCapStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineCapStyle_1, lineCapStyle);
-    }
+public void setLineJoinStyle(NSLineJoinStyle lineJoinStyle) {
+    OS.objc_msgSend(this.id, OS.sel_setLineJoinStyle_, lineJoinStyle);
+}
 
-    public void setLineDash (/*const*/CGFloat* pattern, NSInteger count, CGFloat phase)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineDash_1count_1phase_1, pattern, count, phase);
-    }
-
-    public void setLineJoinStyle (NSLineJoinStyle lineJoinStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineJoinStyle_1, lineJoinStyle);
-    }
+public void setLineWidth(CGFloat lineWidth) {
+    OS.objc_msgSend(this.id, OS.sel_setLineWidth_, lineWidth);
+}
 
-    public void setLineWidth (CGFloat lineWidth)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineWidth_1, lineWidth);
-    }
+public void setMiterLimit(CGFloat miterLimit) {
+    OS.objc_msgSend(this.id, OS.sel_setMiterLimit_, miterLimit);
+}
 
-    public void setMiterLimit (CGFloat miterLimit)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMiterLimit_1, miterLimit);
-    }
-
-    public void setWindingRule (NSWindingRule windingRule)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWindingRule_1, windingRule);
-    }
+public void setWindingRule(NSWindingRule windingRule) {
+    OS.objc_msgSend(this.id, OS.sel_setWindingRule_, windingRule);
+}
 
-    public void stroke ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stroke);
-    }
-
-    public static void strokeLineFromPoint (NSPoint point1, NSPoint point2)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_strokeLineFromPoint_1toPoint_1, point1, point2);
-    }
+public void stroke() {
+    OS.objc_msgSend(this.id, OS.sel_stroke);
+}
 
-    public static void strokeRect (NSRect rect)
-    {
-        OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_strokeRect_1, rect);
-    }
+public static void strokeRect(NSRect rect) {
+    OS.objc_msgSend(OS.class_NSBezierPath, OS.sel_strokeRect_, rect);
+}
 
-    public void transformUsingAffineTransform (NSAffineTransform transform)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_transformUsingAffineTransform_1, transform !is null ? transform.id_ : null);
-    }
+public void transformUsingAffineTransform(NSAffineTransform transform) {
+    OS.objc_msgSend(this.id, OS.sel_transformUsingAffineTransform_, transform !is null ? transform.id : null);
+}
 
-    public NSWindingRule windingRule ()
-    {
-        return cast(NSWindingRule) OS.objc_msgSend(this.id_, OS.sel_windingRule);
-    }
 }
--- a/dwt/internal/cocoa/NSBitmapImageRep.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSBitmapImageRep.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,34 +1,32 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSBitmapImageRep;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.CIImage;
-import dwt.internal.cocoa.id;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSData;
 import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSImageRep;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-enum NSTIFFCompression : NSUInteger
-{
+enum NSTIFFCompression : NSUInteger {
     NSTIFFCompressionNone = 1,
     NSTIFFCompressionCCITTFAX3 = 3,
     NSTIFFCompressionCCITTFAX4 = 4,
@@ -39,260 +37,59 @@
     NSTIFFCompressionOldJPEG = 32865
 }
 
-alias NSTIFFCompression.NSTIFFCompressionNone NSTIFFCompressionNone;
-alias NSTIFFCompression.NSTIFFCompressionCCITTFAX3 NSTIFFCompressionCCITTFAX3;
-alias NSTIFFCompression.NSTIFFCompressionCCITTFAX4 NSTIFFCompressionCCITTFAX4;
-alias NSTIFFCompression.NSTIFFCompressionLZW NSTIFFCompressionLZW;
-alias NSTIFFCompression.NSTIFFCompressionJPEG NSTIFFCompressionJPEG;
-alias NSTIFFCompression.NSTIFFCompressionNEXT NSTIFFCompressionNEXT;
-alias NSTIFFCompression.NSTIFFCompressionPackBits NSTIFFCompressionPackBits;
-alias NSTIFFCompression.NSTIFFCompressionOldJPEG NSTIFFCompressionOldJPEG;
-
-enum NSBitmapFormat : NSUInteger
-{
+enum NSBitmapFormat : NSUInteger {
     NSAlphaFirstBitmapFormat = 1 << 0,
     NSAlphaNonpremultipliedBitmapFormat = 1 << 1,
     NSFloatingPointSamplesBitmapFormat = 1 << 2
 }
 
-alias NSBitmapFormat.NSAlphaFirstBitmapFormat NSAlphaFirstBitmapFormat;
-alias NSBitmapFormat.NSAlphaNonpremultipliedBitmapFormat NSAlphaNonpremultipliedBitmapFormat;
-alias NSBitmapFormat.NSFloatingPointSamplesBitmapFormat NSFloatingPointSamplesBitmapFormat;
-
-public class NSBitmapImageRep : NSImageRep
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.id CGImage ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_CGImage);
-    }
-
-    public NSData TIFFRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_TIFFRepresentation);
-        return result !is null ? new NSData(result) : null;
-    }
+public class NSBitmapImageRep : NSImageRep {
+    
+public this () {
+    super();
+}
 
-    public static NSData static_TIFFRepresentationOfImageRepsInArray_ (NSArray array)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_TIFFRepresentationOfImageRepsInArray_1, array !is null ? array.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public static NSData static_TIFFRepresentationOfImageRepsInArray_usingCompression_factor_ (NSArray array, objc.id comp, float factor)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_TIFFRepresentationOfImageRepsInArray_1usingCompression_1factor_1,
-                array !is null ? array.id_ : null, comp, factor);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData TIFFRepresentationUsingCompression (objc.id comp, float factor)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_TIFFRepresentationUsingCompression_1factor_1, comp, factor);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public objc.id bitmapData ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_bitmapData);
-    }
-
-    public objc.id bitmapFormat ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_bitmapFormat);
-    }
+public this (objc.id id) {
+    super(id);
+}
 
-    public NSInteger bitsPerPixel ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_bitsPerPixel);
-    }
-
-    public NSInteger bytesPerPlane ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_bytesPerPlane);
-    }
+public this (cocoa.id id) {
+    super(id);
 
-    public NSInteger bytesPerRow ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_bytesPerRow);
-    }
-
-    public bool canBeCompressedUsing (objc.id compression)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canBeCompressedUsing_1, compression) !is null;
-    }
-
-    public NSColor colorAtX (NSInteger x, NSInteger y)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorAtX_1y_1, x, y);
-        return result !is null ? new NSColor(result) : null;
-    }
+}
 
-    public void colorizeByMappingGray (CGFloat midPoint, NSColor midPointColor, NSColor shadowColor, NSColor lightColor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_colorizeByMappingGray_1toColor_1blackMapping_1whiteMapping_1, midPoint,
-                midPointColor !is null ? midPointColor.id_ : null, shadowColor !is null ? shadowColor.id_ : null,
-                lightColor !is null ? lightColor.id_ : null);
-    }
-
-    public void getBitmapDataPlanes (objc.id data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getBitmapDataPlanes_1, data);
-    }
-
-    public void getCompression (NSTIFFCompression* compression, float* factor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getCompression_1factor_1, compression, factor);
-    }
+public objc.id bitmapData () {
+    return OS.objc_msgSend(this.id, OS.sel_bitmapData);
+}
 
-    public void getPixel (/*NSUInteger[]*/NSUInteger* p, NSInteger x, NSInteger y)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getPixel_1atX_1y_1, p, x, y);
-    }
-
-    public static void getTIFFCompressionTypes (/*const*/NSTIFFCompression** list, NSInteger* numTypes)
-    {
-        OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_getTIFFCompressionTypes_1count_1, list, numTypes);
-    }
-
-    public static id imageRepWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSArray imageRepsWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepsWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSInteger bitsPerPixel () {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_bitsPerPixel);
+}
 
-    public NSInteger incrementalLoadFromData (NSData data, bool complete)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_incrementalLoadFromData_1complete_1, data !is null ? data.id_ : null, complete);
-    }
-
-    public NSBitmapImageRep initForIncrementalLoad ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initForIncrementalLoad);
-        return result !is null ? this : null;
-    }
-
-    public NSBitmapImageRep initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_ (
-            ubyte** planes, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, bool alpha, bool isPlanar, NSString colorSpaceName,
-            NSBitmapFormat bitmapFormat, NSInteger rBytes, NSInteger pBits)
-    {
-        objc.id
-                result = OS.objc_msgSend(
-                        this.id_,
-                        OS.sel_initWithBitmapDataPlanes_1pixelsWide_1pixelsHigh_1bitsPerSample_1samplesPerPixel_1hasAlpha_1isPlanar_1colorSpaceName_1bitmapFormat_1bytesPerRow_1bitsPerPixel_1,
-                        planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName !is null ? colorSpaceName.id_ : null, bitmapFormat, rBytes,
-                        pBits);
-        return result !is null ? this : null;
-    }
+public NSInteger bytesPerPlane () {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_bytesPerPlane);
+}
 
-    public NSBitmapImageRep initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_ (
-            ubyte** planes, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, bool alpha, bool isPlanar, NSString colorSpaceName, NSInteger rBytes, NSInteger pBits)
-    {
-        objc.id
-                result = OS.objc_msgSend(
-                        this.id_,
-                        OS.sel_initWithBitmapDataPlanes_1pixelsWide_1pixelsHigh_1bitsPerSample_1samplesPerPixel_1hasAlpha_1isPlanar_1colorSpaceName_1bytesPerRow_1bitsPerPixel_1,
-                        planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName !is null ? colorSpaceName.id_ : null, rBytes, pBits);
-        return result !is null ? this : null;
-    }
-
-    public NSBitmapImageRep initWithCGImage (objc.id cgImage)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCGImage_1, cgImage);
-        return result !is null ? this : null;
-    }
+public NSInteger bytesPerRow () {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_bytesPerRow);
+}
 
-    public NSBitmapImageRep initWithCIImage (CIImage ciImage)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCIImage_1, ciImage !is null ? ciImage.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSBitmapImageRep initWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSBitmapImageRep initWithFocusedViewRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFocusedViewRect_1, rect);
-        return result !is null ? this : null;
-    }
+public NSBitmapImageRep initWithBitmapDataPlanes (ubyte** planes, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, bool alpha, bool isPlanar, NSString colorSpaceName, NSBitmapFormat bitmapFormat, NSInteger rBytes, NSInteger pBits) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_, planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName !is null ? colorSpaceName.id : null, bitmapFormat, rBytes, pBits);
+    return result !is null ? this : null;
+}
 
-    public bool isPlanar ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isPlanar) !is null;
-    }
-
-    public static NSString localizedNameForTIFFCompressionType (objc.id compression)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_localizedNameForTIFFCompressionType_1, compression);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger numberOfPlanes ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfPlanes);
-    }
-
-    public static NSData representationOfImageRepsInArray (NSArray imageReps, objc.id storageType, NSDictionary properties)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_representationOfImageRepsInArray_1usingType_1properties_1,
-                imageReps !is null ? imageReps.id_ : null, storageType, properties !is null ? properties.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData representationUsingType (objc.id storageType, NSDictionary properties)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representationUsingType_1properties_1, storageType,
-                properties !is null ? properties.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
+public NSBitmapImageRep initWithBitmapDataPlanes (ubyte** planes, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, bool alpha, bool isPlanar, NSString colorSpaceName, NSInteger rBytes, NSInteger pBits) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_, planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName !is null ? colorSpaceName.id : null, rBytes, pBits);
+    return result !is null ? this : null;
+}
 
-    public NSInteger samplesPerPixel ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_samplesPerPixel);
-    }
-
-    public void setColor (NSColor color, NSInteger x, NSInteger y)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColor_1atX_1y_1, color !is null ? color.id_ : null, x, y);
-    }
-
-    public void setCompression (NSTIFFCompression compression, float factor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCompression_1factor_1, compression, factor);
-    }
+public bool isPlanar () {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isPlanar);
+}
 
-    public void setPixel (/*NSUInteger[]*/NSUInteger* p, NSInteger x, NSInteger y)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPixel_1atX_1y_1, p, x, y);
-    }
+public NSInteger samplesPerPixel () {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_samplesPerPixel);
+}
 
-    public void setProperty (NSString property, id value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setProperty_1withValue_1, property !is null ? property.id_ : null, value !is null ? value.id_ : null);
-    }
-
-    public id valueForProperty (NSString property)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForProperty_1, property !is null ? property.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
 }
--- a/dwt/internal/cocoa/NSBox.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSBox.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,34 +1,34 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSBox;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSCell;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 alias NSUInteger NSBoxType;
 
-enum
-{
+enum {
     NSBoxPrimary = 0,
     NSBoxSecondary = 1,
     NSBoxSeparator = 2,
@@ -36,8 +36,7 @@
     NSBoxCustom = 4
 }
 
-enum NSTitlePosition
-{
+enum NSTitlePosition {
     NSNoTitle = 0,
     NSAboveTop = 1,
     NSAtTop = 2,
@@ -47,177 +46,68 @@
     NSBelowBottom = 6
 }
 
-public class NSBox : NSView
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSColor borderColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_borderColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public class NSBox : NSView {
+    
+public this () {
+    super();
+}
 
-    public NSRect borderRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_borderRect);
-        return result;
-    }
+public this (objc.id id) {
+    super(id);
+}
 
-    public NSBorderType borderType ()
-    {
-        return cast(NSBorderType) OS.objc_msgSend(this.id_, OS.sel_borderType);
-    }
-
-    public CGFloat borderWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_borderWidth);
-    }
-
-    public NSBoxType boxType ()
-    {
-        return cast(NSBoxType) OS.objc_msgSend(this.id_, OS.sel_boxType);
-    }
+public this (cocoa.id id) {
+    super(id);
+}
 
-    public NSView contentView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public NSSize contentViewMargins ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentViewMargins);
-        return result;
-    }
-
-    public CGFloat cornerRadius ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_cornerRadius);
-    }
+public CGFloat borderWidth () {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_borderWidth);
+}
 
-    public NSColor fillColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fillColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public bool isTransparent ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isTransparent) !is null;
-    }
+public NSSize contentViewMargins () {
+    NSSize result;
+    OS.objc_msgSend_stret(result, this.id, OS.sel_contentViewMargins);
+    return result;
+}
 
-    public void setBorderColor (NSColor borderColor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBorderColor_1, borderColor !is null ? borderColor.id_ : null);
-    }
+public void setBorderType (NSBorderType aType) {
+    OS.objc_msgSend(this.id, OS.sel_setBorderType_1, aType);
+}
 
-    public void setBorderType (NSBorderType aType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBorderType_1, aType);
-    }
-
-    public void setBorderWidth (CGFloat borderWidth)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBorderWidth_1, borderWidth);
-    }
+public void setBorderWidth (CGFloat borderWidth) {
+    OS.objc_msgSend(this.id, OS.sel_setBorderWidth_1, borderWidth);
+}
 
-    public void setBoxType (NSBoxType boxType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBoxType_1, boxType);
-    }
-
-    public void setContentView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentView_1, aView !is null ? aView.id_ : null);
-    }
+public void setBoxType (NSBoxType boxType) {
+    OS.objc_msgSend(this.id, OS.sel_setBoxType_1, boxType);
+}
 
-    public void setContentViewMargins (NSSize offsetSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentViewMargins_1, offsetSize);
-    }
-
-    public void setCornerRadius (CGFloat cornerRadius)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCornerRadius_1, cornerRadius);
-    }
+public void setContentView (NSView aView) {
+    OS.objc_msgSend(this.id, OS.sel_setContentView_, aView !is null ? aView.id : null);
+}
 
-    public void setFillColor (NSColor fillColor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFillColor_1, fillColor !is null ? fillColor.id_ : null);
-    }
-
-    public void setFrameFromContentFrame (NSRect contentFrame)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameFromContentFrame_1, contentFrame);
-    }
+public void setContentViewMargins (NSSize offsetSize) {
+    OS.objc_msgSend(this.id, OS.sel_setContentViewMargins_, offsetSize);
+}
 
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTitleFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public void setTitlePosition (NSTitlePosition aPosition)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitlePosition_1, aPosition);
-    }
+public void setTitle (NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_setTitle_, aString !is null ? aString.id : null);
+}
 
-    public void setTitleWithMnemonic (NSString StringWithAmpersand)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, StringWithAmpersand !is null ? StringWithAmpersand.id_ : null);
-    }
-
-    public void setTransparent (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTransparent_1, flag);
-    }
+public void setTitleFont (NSFont fontObj) {
+    OS.objc_msgSend(this.id, OS.sel_setTitleFont_, fontObj !is null ? fontObj.id : null);
+}
 
-    public void sizeToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
+public void setTitlePosition (NSTitlePosition aPosition) {
+    OS.objc_msgSend(this.id, OS.sel_setTitlePosition_, aPosition);
+}
 
-    public NSCell titleCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleCell);
-        return result !is null ? new NSCell(result) : null;
-    }
-
-    public NSFont titleFont ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleFont);
-        return result !is null ? new NSFont(result) : null;
-    }
+public void sizeToFit () {
+    OS.objc_msgSend(this.id, OS.sel_sizeToFit);
+}
 
-    public NSTitlePosition titlePosition ()
-    {
-        return cast(NSTitlePosition) OS.objc_msgSend(this.id_, OS.sel_titlePosition);
-    }
-
-    public NSRect titleRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_titleRect);
-        return result;
-    }
+public NSCell titleCell () {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_titleCell);
+    return result !is null ? new NSCell(result) : null;
 }
+}
--- a/dwt/internal/cocoa/NSBrowser.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,552 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSBrowser;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSIndexSet;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMatrix;
-import dwt.internal.cocoa.NSPoint : NSPointPointer;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSScroller;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSBrowser : NSControl
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool acceptsArrowKeys ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsArrowKeys) !is null;
-    }
-
-    public void addColumn ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addColumn);
-    }
-
-    public bool allowsBranchSelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsBranchSelection) !is null;
-    }
-
-    public bool allowsEmptySelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsEmptySelection) !is null;
-    }
-
-    public bool allowsMultipleSelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsMultipleSelection) !is null;
-    }
-
-    public bool allowsTypeSelect ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsTypeSelect) !is null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public bool canDragRowsWithIndexes (NSIndexSet rowIndexes, NSInteger column, NSEvent event)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canDragRowsWithIndexes_1inColumn_1withEvent_1, rowIndexes !is null ? rowIndexes.id_ : null, column,
-                event !is null ? event.id_ : null) !is null;
-    }
-
-    public static objc.Class cellClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSBrowser, OS.sel_cellClass);
-    }
-
-    public id cellPrototype ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cellPrototype);
-        return result !is null ? new id(result) : null;
-    }
-
-    public CGFloat columnContentWidthForColumnWidth (CGFloat columnWidth)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_columnContentWidthForColumnWidth_1, columnWidth);
-    }
-
-    public NSInteger columnOfMatrix (NSMatrix matrix)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_columnOfMatrix_1, matrix !is null ? matrix.id_ : null);
-    }
-
-    public objc.id columnResizingType ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_columnResizingType);
-    }
-
-    public CGFloat columnWidthForColumnContentWidth (CGFloat columnContentWidth)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_columnWidthForColumnContentWidth_1, columnContentWidth);
-    }
-
-    public NSString columnsAutosaveName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_columnsAutosaveName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void displayAllColumns ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayAllColumns);
-    }
-
-    public void displayColumn (NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayColumn_1, column);
-    }
-
-    public void doClick (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_doClick_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void doDoubleClick (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_doDoubleClick_1, sender !is null ? sender.id_ : null);
-    }
-
-    public objc.SEL doubleAction ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction);
-    }
-
-    public NSImage draggingImageForRowsWithIndexes (NSIndexSet rowIndexes, NSInteger column, NSEvent event, NSPointPointer dragImageOffset)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_draggingImageForRowsWithIndexes_1inColumn_1withEvent_1offset_1,
-                rowIndexes !is null ? rowIndexes.id_ : null, column, event !is null ? event.id_ : null, dragImageOffset);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public void drawTitleOfColumn (NSInteger column, NSRect aRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawTitleOfColumn_1inRect_1, column, aRect);
-    }
-
-    public NSInteger firstVisibleColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_firstVisibleColumn);
-    }
-
-    public NSRect frameOfColumn (NSInteger column)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_frameOfColumn_1, column);
-        return result;
-    }
-
-    public NSRect frameOfInsideOfColumn (NSInteger column)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_frameOfInsideOfColumn_1, column);
-        return result;
-    }
-
-    public bool hasHorizontalScroller ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasHorizontalScroller) !is null;
-    }
-
-    public bool isLoaded ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLoaded) !is null;
-    }
-
-    public bool isTitled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isTitled) !is null;
-    }
-
-    public NSInteger lastColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_lastColumn);
-    }
-
-    public NSInteger lastVisibleColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_lastVisibleColumn);
-    }
-
-    public void loadColumnZero ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_loadColumnZero);
-    }
-
-    public id loadedCellAtRow (NSInteger row, NSInteger col)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_loadedCellAtRow_1column_1, row, col);
-        return result !is null ? new id(result) : null;
-    }
-
-    public objc.Class matrixClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_matrixClass);
-    }
-
-    public NSMatrix matrixInColumn (NSInteger column)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_matrixInColumn_1, column);
-        return result !is null ? new NSMatrix(result) : null;
-    }
-
-    public NSInteger maxVisibleColumns ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_maxVisibleColumns);
-    }
-
-    public CGFloat minColumnWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_minColumnWidth);
-    }
-
-    public NSInteger numberOfVisibleColumns ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfVisibleColumns);
-    }
-
-    public NSString path ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_path);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString pathSeparator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathSeparator);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString pathToColumn (NSInteger column)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathToColumn_1, column);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool prefersAllColumnUserResizing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_prefersAllColumnUserResizing) !is null;
-    }
-
-    public void reloadColumn (NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadColumn_1, column);
-    }
-
-    public static void removeSavedColumnsWithAutosaveName (NSString name)
-    {
-        OS.objc_msgSend(OS.class_NSBrowser, OS.sel_removeSavedColumnsWithAutosaveName_1, name !is null ? name.id_ : null);
-    }
-
-    public bool reusesColumns ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_reusesColumns) !is null;
-    }
-
-    public void scrollColumnToVisible (NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollColumnToVisible_1, column);
-    }
-
-    public void scrollColumnsLeftBy (NSInteger shiftAmount)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollColumnsLeftBy_1, shiftAmount);
-    }
-
-    public void scrollColumnsRightBy (NSInteger shiftAmount)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollColumnsRightBy_1, shiftAmount);
-    }
-
-    public void scrollViaScroller (NSScroller sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollViaScroller_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectAll (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectAll_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectRow (NSInteger row, NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectRow_1inColumn_1, row, column);
-    }
-
-    public void selectRowIndexes (NSIndexSet indexes, NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectRowIndexes_1inColumn_1, indexes !is null ? indexes.id_ : null, column);
-    }
-
-    public id selectedCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedCell);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id selectedCellInColumn (NSInteger column)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedCellInColumn_1, column);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray selectedCells ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedCells);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSInteger selectedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedColumn);
-    }
-
-    public NSInteger selectedRowInColumn (NSInteger column)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedRowInColumn_1, column);
-    }
-
-    public NSIndexSet selectedRowIndexesInColumn (NSInteger column)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedRowIndexesInColumn_1, column);
-        return result !is null ? new NSIndexSet(result) : null;
-    }
-
-    public bool sendAction ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendAction) !is null;
-    }
-
-    public bool sendsActionOnArrowKeys ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendsActionOnArrowKeys) !is null;
-    }
-
-    public bool separatesColumns ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_separatesColumns) !is null;
-    }
-
-    public void setAcceptsArrowKeys (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAcceptsArrowKeys_1, flag);
-    }
-
-    public void setAllowsBranchSelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsBranchSelection_1, flag);
-    }
-
-    public void setAllowsEmptySelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsEmptySelection_1, flag);
-    }
-
-    public void setAllowsMultipleSelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsMultipleSelection_1, flag);
-    }
-
-    public void setAllowsTypeSelect (bool value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsTypeSelect_1, value);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    //public void setCellClass(Class factoryId) {
-    //  OS.objc_msgSend(this.id_, OS.sel_setCellClass_1, factoryId);
-    //}
-
-    public void setCellPrototype (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCellPrototype_1, aCell !is null ? aCell.id_ : null);
-    }
-
-    public void setColumnResizingType (objc.id columnResizingType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColumnResizingType_1, columnResizingType);
-    }
-
-    public void setColumnsAutosaveName (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColumnsAutosaveName_1, name !is null ? name.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDoubleAction (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, aSelector);
-    }
-
-    public void setDraggingSourceOperationMask (objc.id mask, bool isLocal)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDraggingSourceOperationMask_1forLocal_1, mask, isLocal);
-    }
-
-    public void setHasHorizontalScroller (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasHorizontalScroller_1, flag);
-    }
-
-    public void setLastColumn (NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLastColumn_1, column);
-    }
-
-    public void setMatrixClass (objc.Class factoryId)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMatrixClass_1, factoryId);
-    }
-
-    public void setMaxVisibleColumns (NSInteger columnCount)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxVisibleColumns_1, columnCount);
-    }
-
-    public void setMinColumnWidth (CGFloat columnWidth)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinColumnWidth_1, columnWidth);
-    }
-
-    public bool setPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setPath_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public void setPathSeparator (NSString newString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPathSeparator_1, newString !is null ? newString.id_ : null);
-    }
-
-    public void setPrefersAllColumnUserResizing (bool prefersAllColumnResizing)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPrefersAllColumnUserResizing_1, prefersAllColumnResizing);
-    }
-
-    public void setReusesColumns (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReusesColumns_1, flag);
-    }
-
-    public void setSendsActionOnArrowKeys (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSendsActionOnArrowKeys_1, flag);
-    }
-
-    public void setSeparatesColumns (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSeparatesColumns_1, flag);
-    }
-
-    public void setTakesTitleFromPreviousColumn (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTakesTitleFromPreviousColumn_1, flag);
-    }
-
-    public void setTitle (NSString aString, NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1ofColumn_1, aString !is null ? aString.id_ : null, column);
-    }
-
-    public void setTitled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitled_1, flag);
-    }
-
-    public void setWidth (CGFloat columnWidth, NSInteger columnIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWidth_1ofColumn_1, columnWidth, columnIndex);
-    }
-
-    public bool takesTitleFromPreviousColumn ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_takesTitleFromPreviousColumn) !is null;
-    }
-
-    public void tile ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_tile);
-    }
-
-    public NSRect titleFrameOfColumn (NSInteger column)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_titleFrameOfColumn_1, column);
-        return result;
-    }
-
-    public CGFloat titleHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_titleHeight);
-    }
-
-    public NSString titleOfColumn (NSInteger column)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleOfColumn_1, column);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void updateScroller ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateScroller);
-    }
-
-    public void validateVisibleColumns ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_validateVisibleColumns);
-    }
-
-    public CGFloat widthOfColumn (NSInteger column)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_widthOfColumn_1, column);
-    }
-}
--- a/dwt/internal/cocoa/NSBrowserCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSBrowserCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,104 +1,47 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSBrowserCell;
 
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSCell;
 import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSImage;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSBrowserCell : NSCell
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSImage alternateImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_alternateImage);
-        return result !is null ? new NSImage(result) : null;
-    }
+public class NSBrowserCell : NSCell {
+    
+public this () {
+    super();
+}
 
-    public static NSImage branchImage ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBrowserCell, OS.sel_branchImage);
-        return result !is null ? new NSImage(result) : null;
-    }
+public this (objc.id id) {
+    super(id);
+}
 
-    public NSColor highlightColorInView (NSView controlView)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_highlightColorInView_1, controlView !is null ? controlView.id_ : null);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSImage highlightedBranchImage ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBrowserCell, OS.sel_highlightedBranchImage);
-        return result !is null ? new NSImage(result) : null;
-    }
+public this (cocoa.id id) {
+    super(id);
 
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public bool isLeaf ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLeaf) !is null;
-    }
-
-    public bool isLoaded ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLoaded) !is null;
-    }
-
-    public void reset ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reset);
-    }
+}
 
-    public void set ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_set);
-    }
-
-    public void setAlternateImage (NSImage newAltImage)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternateImage_1, newAltImage !is null ? newAltImage.id_ : null);
-    }
+public NSColor highlightColorInView (NSView controlView) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_highlightColorInView_, controlView !is null ? controlView.id : null);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public void setImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null);
-    }
+public void setLeaf (bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setLeaf_, flag);
+}
 
-    public void setLeaf (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLeaf_1, flag);
-    }
-
-    public void setLoaded (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLoaded_1, flag);
-    }
 }
--- a/dwt/internal/cocoa/NSBundle.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSBundle.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,15 +1,15 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSBundle;
 
@@ -19,265 +19,52 @@
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSBundle : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSArray allBundles ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_allBundles);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray allFrameworks ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_allFrameworks);
-        return result !is null ? new NSArray(result) : null;
-    }
+public class NSBundle : NSObject {
 
-    public NSString builtInPlugInsPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_builtInPlugInsPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSBundle bundleForClass (objc.Class aClass)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_bundleForClass_1, aClass);
-        return result !is null ? new NSBundle(result) : null;
-    }
-
-    public NSString bundleIdentifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_bundleIdentifier);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString bundlePath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_bundlePath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSBundle bundleWithIdentifier (NSString identifier)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_bundleWithIdentifier_1, identifier !is null ? identifier.id_ : null);
-        return result !is null ? new NSBundle(result) : null;
-    }
-
-    public static NSBundle bundleWithPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_bundleWithPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSBundle(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public objc.Class classNamed (NSString className)
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_classNamed_1, className !is null ? className.id_ : null);
-    }
-
-    public NSString developmentLocalization ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_developmentLocalization);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray executableArchitectures ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_executableArchitectures);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString executablePath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_executablePath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary infoDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_infoDictionary);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSBundle initWithPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPath_1, path !is null ? path.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public bool isLoaded ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLoaded) !is null;
-    }
-
-    //public bool load() {
-    //  return OS.objc_msgSend(this.id_, OS.sel_load) !is null;
-    //}
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool loadAndReturnError (objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_loadAndReturnError_1, error) !is null;
-    }
-
-    public NSArray localizations ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizations);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSDictionary localizedInfoDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedInfoDictionary);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString localizedStringForKey (NSString key, NSString value, NSString tableName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedStringForKey_1value_1table_1, key !is null ? key.id_ : null,
-                value !is null ? value.id_ : null, tableName !is null ? tableName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public static bool loadNibFile(NSString fileName, NSDictionary context, NSZone* zone) {
+    return OS.objc_msgSend_bool(OS.class_NSBundle, OS.sel_loadNibFile_externalNameTable_withZone_, fileName !is null ? fileName.id : null,
+            context !is null ? context.id : null, zone);
+}
 
-    public static NSBundle mainBundle ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_mainBundle);
-        return result !is null ? new NSBundle(result) : null;
-    }
-
-    public id objectForInfoDictionaryKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectForInfoDictionaryKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString pathForAuxiliaryExecutable (NSString executableName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathForAuxiliaryExecutable_1, executableName !is null ? executableName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString pathForResource_ofType_ (NSString name, NSString ext)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathForResource_1ofType_1, name !is null ? name.id_ : null, ext !is null ? ext.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSString bundleIdentifier() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_bundleIdentifier);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSString pathForResource_ofType_inDirectory_ (NSString name, NSString ext, NSString subpath)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathForResource_1ofType_1inDirectory_1, name !is null ? name.id_ : null,
-                ext !is null ? ext.id_ : null, subpath !is null ? subpath.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString static_pathForResource_ofType_inDirectory_ (NSString name, NSString ext, NSString bundlePath)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_pathForResource_1ofType_1inDirectory_1, name !is null ? name.id_ : null,
-                ext !is null ? ext.id_ : null, bundlePath !is null ? bundlePath.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString pathForResource_ofType_inDirectory_forLocalization_ (NSString name, NSString ext, NSString subpath, NSString localizationName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathForResource_1ofType_1inDirectory_1forLocalization_1, name !is null ? name.id_ : null,
-                ext !is null ? ext.id_ : null, subpath !is null ? subpath.id_ : null, localizationName !is null ? localizationName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSArray static_pathsForResourcesOfType_inDirectory_ (NSString ext, NSString bundlePath)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_pathsForResourcesOfType_1inDirectory_1, ext !is null ? ext.id_ : null,
-                bundlePath !is null ? bundlePath.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray pathsForResourcesOfType_inDirectory_ (NSString ext, NSString subpath)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathsForResourcesOfType_1inDirectory_1, ext !is null ? ext.id_ : null,
-                subpath !is null ? subpath.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSString bundlePath() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_bundlePath);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSArray pathsForResourcesOfType_inDirectory_forLocalization_ (NSString ext, NSString subpath, NSString localizationName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathsForResourcesOfType_1inDirectory_1forLocalization_1, ext !is null ? ext.id_ : null,
-                subpath !is null ? subpath.id_ : null, localizationName !is null ? localizationName.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray preferredLocalizations ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_preferredLocalizations);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray static_preferredLocalizationsFromArray_ (NSArray localizationsArray)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_preferredLocalizationsFromArray_1,
-                localizationsArray !is null ? localizationsArray.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray static_preferredLocalizationsFromArray_forPreferences_ (NSArray localizationsArray, NSArray preferencesArray)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_preferredLocalizationsFromArray_1forPreferences_1,
-                localizationsArray !is null ? localizationsArray.id_ : null, preferencesArray !is null ? preferencesArray.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool preflightAndReturnError (objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_preflightAndReturnError_1, error) !is null;
-    }
+public static NSBundle bundleWithPath(NSString path) {
+    objc.id result = OS.objc_msgSend(OS.class_NSBundle, OS.sel_bundleWithPath_, path !is null ? path.id : null);
+    return result !is null ? new NSBundle(result) : null;
+}
 
-    public objc.Class principalClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_principalClass);
-    }
-
-    public NSString privateFrameworksPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_privateFrameworksPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString resourcePath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resourcePath);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSDictionary infoDictionary() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_infoDictionary);
+    return result !is null ? new NSDictionary(result) : null;
+}
 
-    public NSString sharedFrameworksPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sharedFrameworksPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString sharedSupportPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sharedSupportPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool unload ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_unload) !is null;
-    }
-
-    public static bool loadNibFile (id fileName, id dict, id zone)
-    {
-        return OS.objc_msgSend(OS.class_NSBundle, OS.sel_loadNibFile_1externalNameTable_1withZone_1, fileName.id_, dict.id_, 0) !is null;
-    }
+public cocoa.id objectForInfoDictionaryKey(NSString key) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_objectForInfoDictionaryKey_, key !is null ? key.id : null);
+    return result !is null ? new cocoa.id(result) : null;
 
 }
+
+}
--- a/dwt/internal/cocoa/NSButton.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSButton.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,20 +1,21 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSButton;
 
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSButtonCell : NSBezelStyle, NSButtonType;
+import dwt.internal.cocoa.NSButtonCell;
 import dwt.internal.cocoa.NSCell;
 import dwt.internal.cocoa.NSControl;
 import dwt.internal.cocoa.NSEvent;
@@ -25,220 +26,66 @@
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSButton : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSButton : NSControl {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool allowsMixedState ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsMixedState) !is null;
-    }
-
-    public NSImage alternateImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_alternateImage);
-        return result !is null ? new NSImage(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSString alternateTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_alternateTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSAttributedString attributedAlternateTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedAlternateTitle);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSAttributedString attributedTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedTitle);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public objc.id bezelStyle ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_bezelStyle);
-    }
-
-    public void getPeriodicDelay (float* delay, float* interval)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getPeriodicDelay_1interval_1, delay, interval);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void highlight (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_highlight_1, flag);
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
+public void setAllowsMixedState(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAllowsMixedState_, flag);
+}
 
-    public objc.id imagePosition ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_imagePosition);
-    }
-
-    public bool isBordered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBordered) !is null;
-    }
-
-    public bool isTransparent ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isTransparent) !is null;
-    }
+public void setAttributedTitle(NSAttributedString aString) {
+    OS.objc_msgSend(this.id, OS.sel_setAttributedTitle_, aString !is null ? aString.id : null);
+}
 
-    public NSString keyEquivalent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyEquivalent);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger keyEquivalentModifierMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_keyEquivalentModifierMask);
-    }
+public void setBezelStyle(NSBezelStyle bezelStyle) {
+    OS.objc_msgSend(this.id, OS.sel_setBezelStyle_, bezelStyle);
+}
 
-    public bool performKeyEquivalent (NSEvent key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_performKeyEquivalent_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public void setAllowsMixedState (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsMixedState_1, flag);
-    }
-
-    public void setAlternateImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternateImage_1, image !is null ? image.id_ : null);
-    }
+public void setBordered(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setBordered_, flag);
+}
 
-    public void setAlternateTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternateTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setAttributedAlternateTitle (NSAttributedString obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedAlternateTitle_1, obj !is null ? obj.id_ : null);
-    }
+public void setButtonType(NSButtonType aType) {
+    OS.objc_msgSend(this.id, OS.sel_setButtonType_, aType);
+}
 
-    public void setAttributedTitle (NSAttributedString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setBezelStyle (NSBezelStyle bezelStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezelStyle_1, bezelStyle);
-    }
-
-    public void setBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag);
-    }
+public void setImage(NSImage image) {
+    OS.objc_msgSend(this.id, OS.sel_setImage_, image !is null ? image.id : null);
+}
 
-    public void setButtonType (NSButtonType aType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setButtonType_1, aType);
-    }
-
-    public void setImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setImagePosition (NSCellImagePosition aPosition)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImagePosition_1, aPosition);
-    }
+public void setImagePosition(NSCellImagePosition aPosition) {
+    OS.objc_msgSend(this.id, OS.sel_setImagePosition_, aPosition);
+}
 
-    public void setKeyEquivalent (NSString charCode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyEquivalent_1, charCode !is null ? charCode.id_ : null);
-    }
-
-    public void setKeyEquivalentModifierMask (NSUInteger mask)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyEquivalentModifierMask_1, mask);
-    }
-
-    public void setNextState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNextState);
-    }
+public void setState(NSInteger value) {
+    OS.objc_msgSend(this.id, OS.sel_setState_, value);
+}
 
-    public void setPeriodicDelay (float delay, float interval)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPeriodicDelay_1interval_1, delay, interval);
-    }
-
-    public void setShowsBorderOnlyWhileMouseInside (bool show)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsBorderOnlyWhileMouseInside_1, show);
-    }
+public void setTitle(NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_setTitle_, aString !is null ? aString.id : null);
+}
 
-    public void setSound (NSSound aSound)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSound_1, aSound !is null ? aSound.id_ : null);
-    }
-
-    public void setState (NSInteger value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setState_1, value);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
+public NSInteger state() {
+    return OS.objc_msgSend(this.id, OS.sel_state);
+}
 
-    public void setTitleWithMnemonic (NSString StringWithAmpersand)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, StringWithAmpersand !is null ? StringWithAmpersand.id_ : null);
-    }
-
-    public void setTransparent (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTransparent_1, flag);
-    }
-
-    public bool showsBorderOnlyWhileMouseInside ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsBorderOnlyWhileMouseInside) !is null;
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSButton, OS.sel_cellClass);
+}
 
-    public NSSound sound ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sound);
-        return result !is null ? new NSSound(result) : null;
-    }
-
-    public NSInteger state ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_state);
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSButton, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSButtonCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSButtonCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,69 +1,45 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSButtonCell;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.NSAttributedString;
 import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSound;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-enum NSBezelStyle : NSUInteger
-{
-    NSRoundedBezelStyle           = 1,
-    NSRegularSquareBezelStyle     = 2,
-    NSThickSquareBezelStyle       = 3,
-    NSThickerSquareBezelStyle     = 4,
-    NSDisclosureBezelStyle        = 5,
-    NSShadowlessSquareBezelStyle  = 6,
-    NSCircularBezelStyle          = 7,
-    NSTexturedSquareBezelStyle    = 8,
-    NSHelpButtonBezelStyle        = 9,
-    NSSmallSquareBezelStyle       = 10,
-    NSTexturedRoundedBezelStyle   = 11,
-    NSRoundRectBezelStyle         = 12,
-    NSRecessedBezelStyle          = 13,
+enum NSBezelStyle : NSUInteger {
+    NSRoundedBezelStyle = 1,
+    NSRegularSquareBezelStyle = 2,
+    NSThickSquareBezelStyle = 3,
+    NSThickerSquareBezelStyle = 4,
+    NSDisclosureBezelStyle = 5,
+    NSShadowlessSquareBezelStyle = 6,
+    NSCircularBezelStyle = 7,
+    NSTexturedSquareBezelStyle = 8,
+    NSHelpButtonBezelStyle = 9,
+    NSSmallSquareBezelStyle = 10,
+    NSTexturedRoundedBezelStyle = 11,
+    NSRoundRectBezelStyle = 12,
+    NSRecessedBezelStyle = 13,
     NSRoundedDisclosureBezelStyle = 14,
 }
 
-alias NSBezelStyle.NSRoundedBezelStyle NSRoundedBezelStyle;
-alias NSBezelStyle.NSRegularSquareBezelStyle NSRegularSquareBezelStyle;
-alias NSBezelStyle.NSThickSquareBezelStyle NSThickSquareBezelStyle;
-alias NSBezelStyle.NSThickerSquareBezelStyle NSThickerSquareBezelStyle;
-alias NSBezelStyle.NSDisclosureBezelStyle NSDisclosureBezelStyle;
-alias NSBezelStyle.NSShadowlessSquareBezelStyle NSShadowlessSquareBezelStyle;
-alias NSBezelStyle.NSCircularBezelStyle NSCircularBezelStyle;
-alias NSBezelStyle.NSTexturedSquareBezelStyle NSTexturedSquareBezelStyle;
-alias NSBezelStyle.NSHelpButtonBezelStyle NSHelpButtonBezelStyle;
-alias NSBezelStyle.NSSmallSquareBezelStyle NSSmallSquareBezelStyle;
-alias NSBezelStyle.NSTexturedRoundedBezelStyle NSTexturedRoundedBezelStyle;
-alias NSBezelStyle.NSRoundRectBezelStyle NSRoundRectBezelStyle;
-alias NSBezelStyle.NSRecessedBezelStyle NSRecessedBezelStyle;
-alias NSBezelStyle.NSRoundedDisclosureBezelStyle NSRoundedDisclosureBezelStyle;
-
-enum NSButtonType : NSUInteger
-{
+enum NSButtonType : NSUInteger {
     NSMomentaryLightButton = 0,
     NSPushOnPushOffButton = 1,
     NSToggleButton = 2,
@@ -76,317 +52,35 @@
     NSMomentaryLight = 7
 }
 
-alias NSButtonType.NSMomentaryLightButton NSMomentaryLightButton;
-alias NSButtonType.NSPushOnPushOffButton NSPushOnPushOffButton;
-alias NSButtonType.NSToggleButton NSToggleButton;
-alias NSButtonType.NSSwitchButton NSSwitchButton;
-alias NSButtonType.NSRadioButton NSRadioButton;
-alias NSButtonType.NSMomentaryChangeButton NSMomentaryChangeButton;
-alias NSButtonType.NSOnOffButton NSOnOffButton;
-alias NSButtonType.NSMomentaryPushInButton NSMomentaryPushInButton;
-alias NSButtonType.NSMomentaryPushButton NSMomentaryPushButton;
-alias NSButtonType.NSMomentaryLight NSMomentaryLight;
-
-public class NSButtonCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSImage alternateImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_alternateImage);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSString alternateMnemonic ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_alternateMnemonic);
-        return result !is null ? new NSString(result) : null;
-    }
+public class NSButtonCell : NSActionCell {
 
-    public NSUInteger alternateMnemonicLocation ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_alternateMnemonicLocation);
-    }
-
-    public NSString alternateTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_alternateTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSAttributedString attributedAlternateTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedAlternateTitle);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSAttributedString attributedTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedTitle);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public objc.id bezelStyle ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_bezelStyle);
-    }
-
-    public void drawBezelWithFrame (NSRect frame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawBezelWithFrame_1inView_1, frame, controlView !is null ? controlView.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void drawImage (NSImage image, NSRect frame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawImage_1withFrame_1inView_1, image !is null ? image.id_ : null, frame,
-                controlView !is null ? controlView.id_ : null);
-    }
-
-    public NSRect drawTitle (NSAttributedString title, NSRect frame, NSView controlView)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_drawTitle_1withFrame_1inView_1, title !is null ? title.id_ : null, frame,
-                controlView !is null ? controlView.id_ : null);
-        return result;
-    }
-
-    public void getPeriodicDelay (float* delay, float* interval)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getPeriodicDelay_1interval_1, delay, interval);
-    }
-
-    public objc.id gradientType ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_gradientType);
-    }
-
-    public NSInteger highlightsBy ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_highlightsBy);
-    }
-
-    public bool imageDimsWhenDisabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_imageDimsWhenDisabled) !is null;
-    }
-
-    public objc.id imagePosition ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_imagePosition);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public objc.id imageScaling ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_imageScaling);
-    }
-
-    public bool isOpaque ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOpaque) !is null;
-    }
-
-    public bool isTransparent ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isTransparent) !is null;
-    }
-
-    public NSString keyEquivalent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyEquivalent);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSFont keyEquivalentFont ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyEquivalentFont);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSUInteger keyEquivalentModifierMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_keyEquivalentModifierMask);
-    }
-
-    public void mouseEntered (NSEvent event)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseEntered_1, event !is null ? event.id_ : null);
-    }
-
-    public void mouseExited (NSEvent event)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseExited_1, event !is null ? event.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void performClick (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performClick_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void setAlternateImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternateImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setAlternateMnemonicLocation (NSUInteger location)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternateMnemonicLocation_1, location);
-    }
-
-    public void setAlternateTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternateTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setAlternateTitleWithMnemonic (NSString StringWithAmpersand)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternateTitleWithMnemonic_1, StringWithAmpersand !is null ? StringWithAmpersand.id_ : null);
-    }
-
-    public void setAttributedAlternateTitle (NSAttributedString obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedAlternateTitle_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setAttributedTitle (NSAttributedString obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedTitle_1, obj !is null ? obj.id_ : null);
-    }
+public void setBackgroundColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, color !is null ? color.id : null);
+}
 
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setBezelStyle (objc.id bezelStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezelStyle_1, bezelStyle);
-    }
-
-    public void setButtonType (objc.id aType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setButtonType_1, aType);
-    }
-
-    public void setFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public void setGradientType (objc.id type)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGradientType_1, type);
-    }
-
-    public void setHighlightsBy (NSInteger aType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHighlightsBy_1, aType);
-    }
-
-    public void setImageDimsWhenDisabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageDimsWhenDisabled_1, flag);
-    }
-
-    public void setImagePosition (objc.id aPosition)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImagePosition_1, aPosition);
-    }
+public void setButtonType(objc.id aType) {
+    OS.objc_msgSend(this.id, OS.sel_setButtonType_, aType);
+}
 
-    public void setImageScaling (objc.id scaling)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageScaling_1, scaling);
-    }
-
-    public void setKeyEquivalent (NSString aKeyEquivalent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyEquivalent_1, aKeyEquivalent !is null ? aKeyEquivalent.id_ : null);
-    }
-
-    public void setKeyEquivalentFont_ (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyEquivalentFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public void setKeyEquivalentFont_size_ (NSString fontName, CGFloat fontSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyEquivalentFont_1size_1, fontName !is null ? fontName.id_ : null, fontSize);
-    }
-
-    public void setKeyEquivalentModifierMask (NSUInteger mask)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyEquivalentModifierMask_1, mask);
-    }
-
-    public void setPeriodicDelay (float delay, float interval)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPeriodicDelay_1interval_1, delay, interval);
-    }
-
-    public void setShowsBorderOnlyWhileMouseInside (bool show)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsBorderOnlyWhileMouseInside_1, show);
-    }
-
-    public void setShowsStateBy (NSInteger aType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsStateBy_1, aType);
-    }
+public void setImagePosition(objc.id aPosition) {
+    OS.objc_msgSend(this.id, OS.sel_setImagePosition_, aPosition);
+}
 
-    public void setSound (NSSound aSound)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSound_1, aSound !is null ? aSound.id_ : null);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTitleWithMnemonic (NSString StringWithAmpersand)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, StringWithAmpersand !is null ? StringWithAmpersand.id_ : null);
-    }
-
-    public void setTransparent (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTransparent_1, flag);
-    }
-
-    public bool showsBorderOnlyWhileMouseInside ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsBorderOnlyWhileMouseInside) !is null;
-    }
-
-    public NSInteger showsStateBy ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_showsStateBy);
-    }
-
-    public NSSound sound ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sound);
-        return result !is null ? new NSSound(result) : null;
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSString title() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_title);
+    return result !is null ? new NSString(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSCIImageRep.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCIImageRep;
-
-import dwt.internal.cocoa.CIImage;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSImageRep;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCIImageRep : NSImageRep
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public CIImage CIImagee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_CIImage);
-        return result !is null ? new CIImage(result) : null;
-    }
-
-    public static id imageRepWithCIImage (CIImage image)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCIImageRep, OS.sel_imageRepWithCIImage_1, image !is null ? image.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSCIImageRep initWithCIImage (CIImage image)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCIImage_1, image !is null ? image.id_ : null);
-        return result !is null ? this : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSCachedImageRep.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCachedImageRep;
-
-import dwt.internal.cocoa.NSImageRep;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSWindow;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCachedImageRep : NSImageRep
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSCachedImageRep initWithSize (NSSize size, objc.id depth, bool flag, bool alpha)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSize_1depth_1separate_1alpha_1, size, depth, flag, alpha);
-        return result !is null ? this : null;
-    }
-
-    public NSCachedImageRep initWithWindow (NSWindow win, NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindow_1rect_1, win !is null ? win.id_ : null, rect);
-        return result !is null ? this : null;
-    }
-
-    public NSRect rect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rect);
-        return result;
-    }
-
-    public NSWindow window ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_window);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSCachedURLResponse.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCachedURLResponse;
-
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSURLResponse;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCachedURLResponse : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData data ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_data);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSCachedURLResponse initWithResponse_data_ (NSURLResponse response, NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithResponse_1data_1, response !is null ? response.id_ : null,
-                data !is null ? data.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_ (NSURLResponse response, NSData data, NSDictionary userInfo,
-            objc.id storagePolicy)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithResponse_1data_1userInfo_1storagePolicy_1, response !is null ? response.id_ : null,
-                data !is null ? data.id_ : null, userInfo !is null ? userInfo.id_ : null, storagePolicy);
-        return result !is null ? this : null;
-    }
-
-    public NSURLResponse response ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_response);
-        return result !is null ? new NSURLResponse(result) : null;
-    }
-
-    public objc.id storagePolicy ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_storagePolicy);
-    }
-
-    public NSDictionary userInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_userInfo);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSCalendar.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCalendar;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSDateComponents;
-import dwt.internal.cocoa.NSLocale;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTimeZone;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCalendar : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static id autoupdatingCurrentCalendar ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCalendar, OS.sel_autoupdatingCurrentCalendar);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString calendarIdentifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_calendarIdentifier);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDateComponents components_fromDate_ (NSUInteger unitFlags, NSDate date)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_components_1fromDate_1, unitFlags, date !is null ? date.id_ : null);
-        return result !is null ? new NSDateComponents(result) : null;
-    }
-
-    public NSDateComponents components_fromDate_toDate_options_ (NSUInteger unitFlags, NSDate startingDate, NSDate resultDate, NSUInteger opts)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_components_1fromDate_1toDate_1options_1, unitFlags,
-                startingDate !is null ? startingDate.id_ : null, resultDate !is null ? resultDate.id_ : null, opts);
-        return result !is null ? new NSDateComponents(result) : null;
-    }
-
-    public static id currentCalendar ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCalendar, OS.sel_currentCalendar);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDate dateByAddingComponents (NSDateComponents comps, NSDate date, NSUInteger opts)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateByAddingComponents_1toDate_1options_1, comps !is null ? comps.id_ : null,
-                date !is null ? date.id_ : null, opts);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSDate dateFromComponents (NSDateComponents comps)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateFromComponents_1, comps !is null ? comps.id_ : null);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSUInteger firstWeekday ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_firstWeekday);
-    }
-
-    public NSCalendar initWithCalendarIdentifier (NSString ident)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCalendarIdentifier_1, ident !is null ? ident.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSLocale locale ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_locale);
-        return result !is null ? new NSLocale(result) : null;
-    }
-
-    public NSRange maximumRangeOfUnit (objc.id unit)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_maximumRangeOfUnit_1, unit);
-        return result;
-    }
-
-    public NSUInteger minimumDaysInFirstWeek ()
-    {
-        return cast(NSUInteger)OS.objc_msgSend(this.id_, OS.sel_minimumDaysInFirstWeek);
-    }
-
-    public NSRange minimumRangeOfUnit (objc.id unit)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_minimumRangeOfUnit_1, unit);
-        return result;
-    }
-
-    public NSUInteger ordinalityOfUnit (objc.id smaller, objc.id larger, NSDate date)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_ordinalityOfUnit_1inUnit_1forDate_1, smaller, larger, date !is null ? date.id_ : null);
-    }
-
-    public NSRange rangeOfUnit_inUnit_forDate_ (objc.id smaller, objc.id larger, NSDate date)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfUnit_1inUnit_1forDate_1, smaller, larger, date !is null ? date.id_ : null);
-        return result;
-    }
-
-    public bool rangeOfUnit_startDate_interval_forDate_ (objc.id unit, objc.id datep, objc.id tip, NSDate date)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_rangeOfUnit_1startDate_1interval_1forDate_1, unit, datep, tip, date !is null ? date.id_ : null) !is null;
-    }
-
-    public void setFirstWeekday (NSUInteger weekday)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFirstWeekday_1, weekday);
-    }
-
-    public void setLocale (NSLocale locale)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocale_1, locale !is null ? locale.id_ : null);
-    }
-
-    public void setMinimumDaysInFirstWeek (NSUInteger mdw)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinimumDaysInFirstWeek_1, mdw);
-    }
-
-    public void setTimeZone (NSTimeZone tz)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeZone_1, tz !is null ? tz.id_ : null);
-    }
-
-    public NSTimeZone timeZone ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_timeZone);
-        return result !is null ? new NSTimeZone(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSCalendarDate.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSCalendarDate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,196 +1,87 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSCalendarDate;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTimeZone;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSCalendarDate : NSDate
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSCalendarDate : NSDate {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSCalendarDate calendarDate ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_calendarDate);
-        return result !is null ? new NSCalendarDate(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSString calendarFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_calendarFormat);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSCalendarDate dateByAddingYears (NSInteger year, NSInteger month, NSInteger day, NSInteger hour, NSInteger minute, NSInteger second)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateByAddingYears_1months_1days_1hours_1minutes_1seconds_1, year, month, day, hour, minute,
-                second);
-        return result is this.id_ ? this : (result !is null ? new NSCalendarDate(result) : null);
-    }
-
-    public static id static_dateWithString_calendarFormat_ (NSString description, NSString format)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithString_1calendarFormat_1,
-                description !is null ? description.id_ : null, format !is null ? format.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static id static_dateWithString_calendarFormat_locale_ (NSString description, NSString format, id locale)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithString_1calendarFormat_1locale_1,
-                description !is null ? description.id_ : null, format !is null ? format.id_ : null, locale !is null ? locale.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSCalendarDate dateWithYear (NSInteger year, NSInteger month, NSInteger day, NSInteger hour, NSInteger minute, NSInteger second, NSTimeZone aTimeZone)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithYear_1month_1day_1hour_1minute_1second_1timeZone_1, year, month,
-                day, hour, minute, second, aTimeZone !is null ? aTimeZone.id_ : null);
-        return result !is null ? new NSCalendarDate(result) : null;
-    }
-
-    public NSInteger dayOfCommonEra ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_dayOfCommonEra);
-    }
+public static NSCalendarDate calendarDate() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_calendarDate);
+    return result !is null ? new NSCalendarDate(result) : null;
+}
 
-    public NSInteger dayOfMonth ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_dayOfMonth);
-    }
-
-    public NSInteger dayOfWeek ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_dayOfWeek);
-    }
+public static NSCalendarDate dateWithYear(NSInteger year, NSUInteger month, NSUInteger day, NSUInteger hour, NSUInteger minute, NSUInteger second, NSTimeZone aTimeZone) {
+    objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithYear_month_day_hour_minute_second_timeZone_, year, month, day, hour, minute, second, aTimeZone !is null ? aTimeZone.id : null);
+    return result !is null ? new NSCalendarDate(result) : null;
+}
 
-    public NSInteger dayOfYear ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_dayOfYear);
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString descriptionWithCalendarFormat_ (NSString format)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithCalendarFormat_1, format !is null ? format.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSInteger dayOfMonth() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_dayOfMonth);
+}
 
-    public NSString descriptionWithCalendarFormat_locale_ (NSString format, id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithCalendarFormat_1locale_1, format !is null ? format.id_ : null,
-                locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSInteger hourOfDay() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_hourOfDay);
+}
 
-    public NSString descriptionWithLocale (id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger hourOfDay ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_hourOfDay);
-    }
+public NSInteger minuteOfHour() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_minuteOfHour);
+}
 
-    public NSCalendarDate initWithString_ (NSString description)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, description !is null ? description.id_ : null);
-        return result !is null ? this : null;
-    }
+public NSInteger monthOfYear() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_monthOfYear);
+}
 
-    public NSCalendarDate initWithString_calendarFormat_ (NSString description, NSString format)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1calendarFormat_1, description !is null ? description.id_ : null,
-                format !is null ? format.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSCalendarDate initWithString_calendarFormat_locale_ (NSString description, NSString format, id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1calendarFormat_1locale_1, description !is null ? description.id_ : null,
-                format !is null ? format.id_ : null, locale !is null ? locale.id_ : null);
-        return result !is null ? this : null;
-    }
+public NSInteger secondOfMinute() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_secondOfMinute);
+}
 
-    public id initWithYear (NSInteger year, NSUInteger month, NSUInteger day, NSUInteger hour, NSUInteger minute, NSUInteger second, NSTimeZone aTimeZone)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithYear_1month_1day_1hour_1minute_1second_1timeZone_1, year, month, day, hour, minute,
-                second, aTimeZone !is null ? aTimeZone.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public NSTimeZone timeZone() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_timeZone);
+    return result !is null ? new NSTimeZone(result) : null;
+}
 
-    public NSInteger minuteOfHour ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_minuteOfHour);
-    }
-
-    public NSInteger monthOfYear ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_monthOfYear);
-    }
-
-    public NSInteger secondOfMinute ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_secondOfMinute);
-    }
+public int /*long*/yearOfCommonEra() {
+    return OS.objc_msgSend(this.id, OS.sel_yearOfCommonEra);
+}
 
-    public void setCalendarFormat (NSString format)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCalendarFormat_1, format !is null ? format.id_ : null);
-    }
-
-    public void setTimeZone (NSTimeZone aTimeZone)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeZone_1, aTimeZone !is null ? aTimeZone.id_ : null);
-    }
+public static NSDate dateWithTimeIntervalSinceNow(double secs) {
+    objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithTimeIntervalSinceNow_, secs);
+    return result !is null ? new NSCalendarDate(result) : null;
+}
 
-    public NSTimeZone timeZone ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_timeZone);
-        return result !is null ? new NSTimeZone(result) : null;
-    }
-
-    public NSInteger yearOfCommonEra ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_yearOfCommonEra);
-    }
-
-    public void years (NSInteger* yp, NSInteger* mop, NSInteger* dp, NSInteger* hp, NSInteger* mip, NSInteger* sp, NSCalendarDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_years_1months_1days_1hours_1minutes_1seconds_1sinceDate_1, yp, mop, dp, hp, mip, sp,
-                date !is null ? date.id_ : null);
-    }
+public static NSDate distantFuture() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_distantFuture);
+    return result !is null ? new NSCalendarDate(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,40 +1,33 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSCell;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSFormatter;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSText;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-/*alias NSUInteger NSControlSize;*/
-
 enum NSControlSize : NSUInteger
 {
     NSRegularControlSize,
@@ -42,847 +35,105 @@
     NSMiniControlSize
 }
 
-alias NSControlSize.NSRegularControlSize NSRegularControlSize;
-alias NSControlSize.NSSmallControlSize NSSmallControlSize;
-alias NSControlSize.NSMiniControlSize NSMiniControlSize;
-
-/*alias NSUInteger NSCellAttribute;*/
-
-enum NSCellAttribute : NSUInteger
+enum NSImageScaling : NSUInteger
 {
-    NSCellDisabled = 0,
-    NSCellState = 1,
-    NSPushInCell = 2,
-    NSCellEditable = 3,
-    NSChangeGrayCell = 4,
-    NSCellHighlighted = 5,
-    NSCellLightsByContents = 6,
-    NSCellLightsByGray = 7,
-    NSChangeBackgroundCell = 8,
-    NSCellLightsByBackground = 9,
-    NSCellIsBordered = 10,
-    NSCellHasOverlappingImage = 11,
-    NSCellHasImageHorizontal = 12,
-    NSCellHasImageOnLeftOrBottom = 13,
-    NSCellChangesContents = 14,
-    NSCellIsInsetButton = 15,
-    NSCellAllowsMixedState = 16
+    NSImageScaleProportionallyDown = 0,
+    NSImageScaleAxesIndependently,
+    NSImageScaleNone,
+    NSImageScaleProportionallyUpOrDown
 }
 
-alias NSCellAttribute.NSCellDisabled NSCellDisabled;
-alias NSCellAttribute.NSCellState NSCellState;
-alias NSCellAttribute.NSPushInCell NSPushInCell;
-alias NSCellAttribute.NSCellEditable NSCellEditable;
-alias NSCellAttribute.NSChangeGrayCell NSChangeGrayCell;
-alias NSCellAttribute.NSCellHighlighted NSCellHighlighted;
-alias NSCellAttribute.NSCellLightsByContents NSCellLightsByContents;
-alias NSCellAttribute.NSCellLightsByGray NSCellLightsByGray;
-alias NSCellAttribute.NSChangeBackgroundCell NSChangeBackgroundCell;
-alias NSCellAttribute.NSCellLightsByBackground NSCellLightsByBackground;
-alias NSCellAttribute.NSCellIsBordered NSCellIsBordered;
-alias NSCellAttribute.NSCellHasOverlappingImage NSCellHasOverlappingImage;
-alias NSCellAttribute.NSCellHasImageHorizontal NSCellHasImageHorizontal;
-alias NSCellAttribute.NSCellHasImageOnLeftOrBottom NSCellHasImageOnLeftOrBottom;
-alias NSCellAttribute.NSCellChangesContents NSCellChangesContents;
-alias NSCellAttribute.NSCellIsInsetButton NSCellIsInsetButton;
-alias NSCellAttribute.NSCellAllowsMixedState NSCellAllowsMixedState;
-
-enum NSControlTint : NSUInteger
-{
-    NSDefaultControlTint = 0,
-    NSBlueControlTint = 1,
-    NSGraphiteControlTint = 6,
-    NSClearControlTint = 7
-}
-
-alias NSControlTint.NSDefaultControlTint NSDefaultControlTint;
-alias NSControlTint.NSBlueControlTint NSBlueControlTint;
-alias NSControlTint.NSGraphiteControlTint NSGraphiteControlTint;
-alias NSControlTint.NSClearControlTint NSClearControlTint;
-
 enum NSCellImagePosition : NSUInteger
 {
-    NSNoImage = 0,
-    NSImageOnly = 1,
-    NSImageLeft = 2,
-    NSImageRight = 3,
-    NSImageBelow = 4,
-    NSImageAbove = 5,
+    NSNoImage       = 0,
+    NSImageOnly     = 1,
+    NSImageLeft     = 2,
+    NSImageRight    = 3,
+    NSImageBelow    = 4,
+    NSImageAbove    = 5,
     NSImageOverlaps = 6
 }
 
-alias NSCellImagePosition.NSNoImage NSNoImage;
-alias NSCellImagePosition.NSImageOnly NSImageOnly;
-alias NSCellImagePosition.NSImageLeft NSImageLeft;
-alias NSCellImagePosition.NSImageRight NSImageRight;
-alias NSCellImagePosition.NSImageBelow NSImageBelow;
-alias NSCellImagePosition.NSImageAbove NSImageAbove;
-alias NSCellImagePosition.NSImageOverlaps NSImageOverlaps;
-
-public class NSCell : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool acceptsFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstResponder) !is null;
-    }
-
-    public objc.SEL action ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action);
-    }
-
-    public objc.id alignment ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_alignment);
-    }
-
-    public bool allowsEditingTextAttributes ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsEditingTextAttributes) !is null;
-    }
+public class NSCell : NSObject {
 
-    public bool allowsMixedState ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsMixedState) !is null;
-    }
-
-    public bool allowsUndo ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsUndo) !is null;
-    }
-
-    public NSAttributedString attributedStringValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedStringValue);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public objc.id backgroundStyle ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_backgroundStyle);
-    }
-
-    public objc.id baseWritingDirection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_baseWritingDirection);
-    }
-
-    public void calcDrawInfo (NSRect aRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_calcDrawInfo_1, aRect);
-    }
-
-    public NSInteger cellAttribute (objc.id aParameter)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_cellAttribute_1, aParameter);
-    }
-
-    public NSSize cellSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_cellSize);
-        return result;
-    }
-
-    public NSSize cellSizeForBounds (NSRect aRect)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_cellSizeForBounds_1, aRect);
-        return result;
-    }
+public this() {
+    super();
+}
 
-    public objc.id compare (id otherCell)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_compare_1, otherCell !is null ? otherCell.id_ : null);
-    }
-
-    public bool continueTracking (NSPoint lastPoint, NSPoint currentPoint, NSView controlView)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_continueTracking_1at_1inView_1, lastPoint, currentPoint, controlView !is null ? controlView.id_ : null) !is null;
-    }
-
-    public objc.id controlSize ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_controlSize);
-    }
-
-    public objc.id controlTint ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_controlTint);
-    }
-
-    public NSView controlView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_controlView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public static objc.id defaultFocusRingType ()
-    {
-        return OS.objc_msgSend(OS.class_NSCell, OS.sel_defaultFocusRingType);
-    }
-
-    public static NSMenu defaultMenu ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCell, OS.sel_defaultMenu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public double doubleValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
-    }
-
-    public void drawInteriorWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawInteriorWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void drawWithExpansionFrame (NSRect cellFrame, NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawWithExpansionFrame_1inView_1, cellFrame, view !is null ? view.id_ : null);
-    }
-
-    public void drawWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public NSRect drawingRectForBounds (NSRect theRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_drawingRectForBounds_1, theRect);
-        return result;
-    }
-
-    public void editWithFrame (NSRect aRect, NSView controlView, NSText textObj, id anObject, NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_editWithFrame_1inView_1editor_1delegate_1event_1, aRect, controlView !is null ? controlView.id_ : null,
-                textObj !is null ? textObj.id_ : null, anObject !is null ? anObject.id_ : null, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void endEditing (NSText textObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endEditing_1, textObj !is null ? textObj.id_ : null);
-    }
-
-    public NSInteger entryType ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_entryType);
-    }
-
-    public NSRect expansionFrameWithFrame (NSRect cellFrame, NSView view)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_expansionFrameWithFrame_1inView_1, cellFrame, view !is null ? view.id_ : null);
-        return result;
-    }
-
-    public float floatValue ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue);
-    }
-
-    public objc.id focusRingType ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_focusRingType);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSFont font ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_font);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public id formatter ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_formatter);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void getPeriodicDelay (float* delay, float* interval)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getPeriodicDelay_1interval_1, delay, interval);
-    }
-
-    public bool hasValidObjectValue ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasValidObjectValue) !is null;
-    }
-
-    public void highlight (bool flag, NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_highlight_1withFrame_1inView_1, flag, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public NSColor highlightColorWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_highlightColorWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSUInteger hitTestForEvent (NSEvent event, NSRect cellFrame, NSView controlView)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_hitTestForEvent_1inRect_1ofView_1, event !is null ? event.id_ : null, cellFrame,
-                controlView !is null ? controlView.id_ : null);
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
+public NSSize cellSizeForBounds(NSRect aRect) {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_cellSizeForBounds_, aRect);
+    return result;
+}
 
-    public NSRect imageRectForBounds (NSRect theRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_imageRectForBounds_1, theRect);
-        return result;
-    }
-
-    public bool importsGraphics ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_importsGraphics) !is null;
-    }
-
-    public NSCell initImageCell (NSImage image)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initImageCell_1, image !is null ? image.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSCell initTextCell (NSString aString)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initTextCell_1, aString !is null ? aString.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public int intValue ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_intValue);
-    }
-
-    public NSInteger integerValue ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_integerValue);
-    }
-
-    public objc.id interiorBackgroundStyle ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_interiorBackgroundStyle);
-    }
-
-    public bool isBezeled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBezeled) !is null;
-    }
-
-    public bool isBordered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBordered) !is null;
-    }
+public void drawInteriorWithFrame(NSRect cellFrame, NSView controlView) {
+    OS.objc_msgSend(this.id, OS.sel_drawInteriorWithFrame_inView_, cellFrame, controlView !is null ? controlView.id : null);
+}
 
-    public bool isContinuous ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isContinuous) !is null;
-    }
-
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
-
-    public bool isEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
-    }
-
-    public bool isEntryAcceptable (NSString aString)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEntryAcceptable_1, aString !is null ? aString.id_ : null) !is null;
-    }
-
-    public bool isHighlighted ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHighlighted) !is null;
-    }
-
-    public bool isOpaque ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOpaque) !is null;
-    }
-
-    public bool isScrollable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isScrollable) !is null;
-    }
-
-    public bool isSelectable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelectable) !is null;
-    }
-
-    public NSString keyEquivalent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyEquivalent);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSRect drawingRectForBounds(NSRect theRect) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_drawingRectForBounds_, theRect);
+    return result;
+}
 
-    public objc.id lineBreakMode ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_lineBreakMode);
-    }
-
-    public NSMenu menu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSMenu menuForEvent (NSEvent event, NSRect cellFrame, NSView view)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuForEvent_1inRect_1ofView_1, event !is null ? event.id_ : null, cellFrame,
-                view !is null ? view.id_ : null);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSString mnemonic ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mnemonic);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSFont font() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_font);
+    return result !is null ? new NSFont(result) : null;
+}
 
-    public NSUInteger mnemonicLocation ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_mnemonicLocation);
-    }
-
-    public NSInteger mouseDownFlags ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_mouseDownFlags);
-    }
-
-    public NSInteger nextState ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_nextState);
-    }
-
-    public id objectValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValue);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void performClick (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performClick_1, sender !is null ? sender.id_ : null);
-    }
-
-    public static bool prefersTrackingUntilMouseUp ()
-    {
-        return OS.objc_msgSend(OS.class_NSCell, OS.sel_prefersTrackingUntilMouseUp) !is null;
-    }
+public void setAllowsMixedState(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAllowsMixedState_, flag);
+}
 
-    public bool refusesFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_refusesFirstResponder) !is null;
-    }
-
-    public id representedObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void resetCursorRect (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resetCursorRect_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public void selectWithFrame (NSRect aRect, NSView controlView, NSText textObj, id anObject, NSInteger selStart, NSInteger selLength)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectWithFrame_1inView_1editor_1delegate_1start_1length_1, aRect,
-                controlView !is null ? controlView.id_ : null, textObj !is null ? textObj.id_ : null, anObject !is null ? anObject.id_ : null, selStart,
-                selLength);
-    }
-
-    public NSInteger sendActionOn (NSInteger mask)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_sendActionOn_1, mask);
-    }
-
-    public bool sendsActionOnEndEditing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendsActionOnEndEditing) !is null;
-    }
-
-    public void setAction (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector);
-    }
-
-    public void setAlignment (objc.id mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlignment_1, mode);
-    }
+public void setAttributedStringValue(NSAttributedString obj) {
+    OS.objc_msgSend(this.id, OS.sel_setAttributedStringValue_, obj !is null ? obj.id : null);
+}
 
-    public void setAllowsEditingTextAttributes (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsEditingTextAttributes_1, flag);
-    }
-
-    public void setAllowsMixedState (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsMixedState_1, flag);
-    }
-
-    public void setAllowsUndo (bool allowsUndo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsUndo_1, allowsUndo);
-    }
-
-    public void setAttributedStringValue (NSAttributedString obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedStringValue_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setBackgroundStyle (objc.id style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundStyle_1, style);
-    }
-
-    public void setBaseWritingDirection (objc.id writingDirection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBaseWritingDirection_1, writingDirection);
-    }
-
-    public void setBezeled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag);
-    }
-
-    public void setBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag);
-    }
-
-    public void setCellAttribute (NSCellAttribute aParameter, NSInteger value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCellAttribute_1to_1, aParameter, value);
-    }
-
-    public void setContinuous (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContinuous_1, flag);
-    }
+public void setFont(NSFont fontObj) {
+    OS.objc_msgSend(this.id, OS.sel_setFont_, fontObj !is null ? fontObj.id : null);
+}
 
-    public void setControlSize (objc.id size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, size);
-    }
-
-    public void setControlTint (objc.id controlTint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlTint_1, controlTint);
-    }
-
-    public void setControlView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlView_1, view !is null ? view.id_ : null);
-    }
-
-    public void setDoubleValue (double aDouble)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleValue_1, aDouble);
-    }
-
-    public void setEditable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, flag);
-    }
-
-    public void setEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, flag);
-    }
-
-    public void setEntryType (NSInteger aType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEntryType_1, aType);
-    }
-
-    public void setFloatValue (float aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFloatValue_1, aFloat);
-    }
-
-    public void setFloatingPointFormat (bool autoRange, NSUInteger leftDigits, NSUInteger rightDigits)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFloatingPointFormat_1left_1right_1, autoRange, leftDigits, rightDigits);
-    }
-
-    public void setFocusRingType (objc.id focusRingType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFocusRingType_1, focusRingType);
-    }
+public void setFormatter(NSFormatter newFormatter) {
+    OS.objc_msgSend(this.id, OS.sel_setFormatter_, newFormatter !is null ? newFormatter.id : null);
+}
 
-    public void setFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public void setFormatter (NSFormatter newFormatter)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFormatter_1, newFormatter !is null ? newFormatter.id_ : null);
-    }
-
-    public void setHighlighted (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHighlighted_1, flag);
-    }
-
-    public void setImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setImportsGraphics (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImportsGraphics_1, flag);
-    }
+public void setHighlighted(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setHighlighted_, flag);
+}
 
-    public void setIntValue (int anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntValue_1, anInt);
-    }
-
-    public void setIntegerValue (int anInteger)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntegerValue_1, anInteger);
-    }
-
-    public void setLineBreakMode (objc.id mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineBreakMode_1, mode);
-    }
-
-    public void setMenu (NSMenu aMenu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1, aMenu !is null ? aMenu.id_ : null);
-    }
-
-    public void setMnemonicLocation (NSUInteger location)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMnemonicLocation_1, location);
-    }
+public void setImage(NSImage image) {
+    OS.objc_msgSend(this.id, OS.sel_setImage_, image !is null ? image.id : null);
+}
 
-    public void setNextState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNextState);
-    }
-
-    public void setObjectValue (id obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setRefusesFirstResponder (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRefusesFirstResponder_1, flag);
-    }
-
-    public void setRepresentedObject (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRepresentedObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setScrollable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScrollable_1, flag);
-    }
-
-    public void setSelectable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectable_1, flag);
-    }
-
-    public void setSendsActionOnEndEditing (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSendsActionOnEndEditing_1, flag);
-    }
-
-    public void setShowsFirstResponder (bool showFR)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsFirstResponder_1, showFR);
-    }
-
-    public void setState (NSInteger value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setState_1, value);
-    }
+public void setTitle(NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_setTitle_, aString !is null ? aString.id : null);
+}
 
-    public void setStringValue (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStringValue_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTag (NSInteger anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTag_1, anInt);
-    }
-
-    public void setTarget (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTitleWithMnemonic (NSString StringWithAmpersand)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, StringWithAmpersand !is null ? StringWithAmpersand.id_ : null);
-    }
-
-    public void setTruncatesLastVisibleLine (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTruncatesLastVisibleLine_1, flag);
-    }
-
-    public void setType (objc.id aType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setType_1, aType);
-    }
-
-    public NSText setUpFieldEditorAttributes (NSText textObj)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_setUpFieldEditorAttributes_1, textObj !is null ? textObj.id_ : null);
-        return result !is null ? new NSText(result) : null;
-    }
-
-    public void setWraps (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWraps_1, flag);
-    }
-
-    public bool showsFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsFirstResponder) !is null;
-    }
+public void setWraps(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setWraps_, flag);
+}
 
-    public bool startTrackingAt (NSPoint startPoint, NSView controlView)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_startTrackingAt_1inView_1, startPoint, controlView !is null ? controlView.id_ : null) !is null;
-    }
-
-    public NSInteger state ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_state);
-    }
-
-    public void stopTracking (NSPoint lastPoint, NSPoint stopPoint, NSView controlView, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopTracking_1at_1inView_1mouseIsUp_1, lastPoint, stopPoint, controlView !is null ? controlView.id_ : null,
-                flag);
-    }
-
-    public NSString StringValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger tag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag);
-    }
-
-    public void takeDoubleValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeDoubleValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void takeFloatValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeFloatValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void takeIntValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeIntValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void takeIntegerValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeIntegerValueFrom_1, sender !is null ? sender.id_ : null);
-    }
+public NSString title() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_title);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public void takeObjectValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeObjectValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void takeStringValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeStringValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public id target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSRect titleRectForBounds(NSRect theRect) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_titleRectForBounds_, theRect);
+    return result;
+}
 
-    public NSRect titleRectForBounds (NSRect theRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_titleRectForBounds_1, theRect);
-        return result;
-    }
-
-    public bool trackMouse (NSEvent theEvent, NSRect cellFrame, NSView controlView, bool flag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_trackMouse_1inRect_1ofView_1untilMouseUp_1, theEvent !is null ? theEvent.id_ : null, cellFrame,
-                controlView !is null ? controlView.id_ : null, flag) !is null;
-    }
-
-    public bool truncatesLastVisibleLine ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_truncatesLastVisibleLine) !is null;
-    }
-
-    public objc.id type ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_type);
-    }
-
-    public bool wantsNotificationForMarkedText ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_wantsNotificationForMarkedText) !is null;
-    }
-
-    public bool wraps ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_wraps) !is null;
-    }
+public bool wraps() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_wraps);
+}
 
 }
--- a/dwt/internal/cocoa/NSCharacterSet.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSCharacterSet.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,183 +1,45 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSCharacterSet;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSCharacterSet : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static id alphanumericCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_alphanumericCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSData bitmapRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_bitmapRepresentation);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public static id capitalizedLetterCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_capitalizedLetterCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool characterIsMember (short aCharacter)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_characterIsMember_1, aCharacter) !is null;
-    }
+public class NSCharacterSet : NSObject {
 
-    public static id characterSetWithBitmapRepresentation (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithBitmapRepresentation_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id characterSetWithCharactersInString (NSString aString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithCharactersInString_1, aString !is null ? aString.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id characterSetWithContentsOfFile (NSString fName)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithContentsOfFile_1, fName !is null ? fName.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public static id characterSetWithRange (NSRange aRange)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_characterSetWithRange_1, aRange);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id controlCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_controlCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id decimalDigitCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_decimalDigitCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id decomposableCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_decomposableCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool hasMemberInPlane (byte thePlane)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasMemberInPlane_1, thePlane) !is null;
-    }
-
-    public static id illegalCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_illegalCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSCharacterSet invertedSet ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_invertedSet);
-        return result is this.id_ ? this : (result !is null ? new NSCharacterSet(result) : null);
-    }
-
-    public bool isSupersetOfSet (NSCharacterSet theOtherSet)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSupersetOfSet_1, theOtherSet !is null ? theOtherSet.id_ : null) !is null;
-    }
-
-    public static id letterCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_letterCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool longCharacterIsMember (dchar theLongChar)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_longCharacterIsMember_1, theLongChar) !is null;
-    }
-
-    public static id lowercaseLetterCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_lowercaseLetterCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static id newlineCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_newlineCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id nonBaseCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_nonBaseCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id punctuationCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_punctuationCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
+public bool characterIsMember(wchar aCharacter) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_characterIsMember_, aCharacter);
+}
 
-    public static id symbolCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_symbolCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id uppercaseLetterCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_uppercaseLetterCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id whitespaceAndNewlineCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_whitespaceAndNewlineCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id whitespaceCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_whitespaceCharacterSet);
-        return result !is null ? new id(result) : null;
-    }
+public static cocoa.id decimalDigitCharacterSet() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCharacterSet, OS.sel_decimalDigitCharacterSet);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSClassDescription.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSClassDescription;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSClassDescription : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray attributeKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSClassDescription classDescriptionForClass (objc.Class aClass)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSClassDescription, OS.sel_classDescriptionForClass_1, aClass);
-        return result !is null ? new NSClassDescription(result) : null;
-    }
-
-    public static void invalidateClassDescriptionCache ()
-    {
-        OS.objc_msgSend(OS.class_NSClassDescription, OS.sel_invalidateClassDescriptionCache);
-    }
-
-    public NSString inverseForRelationshipKey (NSString relationshipKey)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_inverseForRelationshipKey_1, relationshipKey !is null ? relationshipKey.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static void registerClassDescription (NSClassDescription description, objc.Class aClass)
-    {
-        OS.objc_msgSend(OS.class_NSClassDescription, OS.sel_registerClassDescription_1forClass_1, description !is null ? description.id_ : null,
-                aClass);
-    }
-
-    public NSArray toManyRelationshipKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toManyRelationshipKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray toOneRelationshipKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toOneRelationshipKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSClipView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSClipView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,134 +1,41 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSClipView;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSCursor;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSNotification;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSClipView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool autoscroll (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autoscroll_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public class NSClipView : NSView {
 
-    public NSPoint constrainScrollPoint (NSPoint newOrigin)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_constrainScrollPoint_1, newOrigin);
-        return result;
-    }
-
-    public bool copiesOnScroll ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_copiesOnScroll) !is null;
-    }
-
-    public NSCursor documentCursor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documentCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
-
-    public NSRect documentRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_documentRect);
-        return result;
-    }
+public this() {
+    super();
+}
 
-    public id documentView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documentView);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSRect documentVisibleRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_documentVisibleRect);
-        return result;
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
-
-    public void scrollToPoint (NSPoint newOrigin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollToPoint_1, newOrigin);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void setCopiesOnScroll (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCopiesOnScroll_1, flag);
-    }
-
-    public void setDocumentCursor (NSCursor anObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDocumentCursor_1, anObj !is null ? anObj.id_ : null);
-    }
-
-    public void setDocumentView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDocumentView_1, aView !is null ? aView.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
-
-    public void viewBoundsChanged (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewBoundsChanged_1, notification !is null ? notification.id_ : null);
-    }
-
-    public void viewFrameChanged (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewFrameChanged_1, notification !is null ? notification.id_ : null);
-    }
+public void scrollToPoint(NSPoint newOrigin) {
+    OS.objc_msgSend(this.id, OS.sel_scrollToPoint_, newOrigin);
+}
 
 }
--- a/dwt/internal/cocoa/NSCloneCommand.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCloneCommand;
-
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCloneCommand : NSScriptCommand
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScriptObjectSpecifier keySpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keySpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public void setReceiversSpecifier (NSScriptObjectSpecifier receiversRef)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReceiversSpecifier_1, receiversRef !is null ? receiversRef.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSCloseCommand.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCloseCommand;
-
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSSaveOptions
-{
-    NSSaveOptionsYes = 0,
-    NSSaveOptionsNo,
-    NSSaveOptionsAsk
-}
-
-alias NSSaveOptions.NSSaveOptionsYes NSSaveOptionsYes;
-alias NSSaveOptions.NSSaveOptionsNo NSSaveOptionsNo;
-alias NSSaveOptions.NSSaveOptionsAsk NSSaveOptionsAsk;
-
-public class NSCloseCommand : NSScriptCommand
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSSaveOptions saveOptions ()
-    {
-        return cast(NSSaveOptions) OS.objc_msgSend(this.id_, OS.sel_saveOptions);
-    }
-
-}
--- a/dwt/internal/cocoa/NSCoder.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSCoder.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,341 +1,40 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSCoder;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSZone;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSCoder : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool allowsKeyedCoding ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsKeyedCoding) !is null;
-    }
-
-    public bool containsValueForKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsValueForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public void decodeArrayOfObjCType (/*const*/char* itemType, NSUInteger count, void* array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_decodeArrayOfObjCType_1count_1at_1, itemType, count, array);
-    }
-
-    public bool decodeBoolForKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_decodeBoolForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public /*const*/ubyte* decodeBytesForKey (NSString key, NSUInteger* lengthp)
-    {
-        return cast(/*const*/ubyte*) OS.objc_msgSend(this.id_, OS.sel_decodeBytesForKey_1returnedLength_1, key !is null ? key.id_ : null, lengthp);
-    }
-
-    public void* decodeBytesWithReturnedLength (NSUInteger* lengthp)
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_decodeBytesWithReturnedLength_1, lengthp);
-    }
-
-    public NSData decodeDataObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decodeDataObject);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public double decodeDoubleForKey (NSString key)
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_decodeDoubleForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public float decodeFloatForKey (NSString key)
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_decodeFloatForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public int decodeInt32ForKey (NSString key)
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_decodeInt32ForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public long decodeInt64ForKey (NSString key)
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_decodeInt64ForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public int decodeIntForKey (NSString key)
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_decodeIntForKey_1, key !is null ? key.id_ : null);
-    }
+public class NSCoder : NSObject {
 
-    public NSInteger decodeIntegerForKey (NSString key)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_decodeIntegerForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public id decodeNXObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decodeNXObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id decodeObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decodeObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id decodeObjectForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decodeObjectForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSPoint decodePoint ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decodePoint);
-        return result;
-    }
-
-    public NSPoint decodePointForKey (NSString key)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decodePointForKey_1, key !is null ? key.id_ : null);
-        return result;
-    }
+public this() {
+    super();
+}
 
-    public id decodePropertyList ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decodePropertyList);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSRect decodeRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decodeRect);
-        return result;
-    }
-
-    public NSRect decodeRectForKey (NSString key)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decodeRectForKey_1, key !is null ? key.id_ : null);
-        return result;
-    }
-
-    public NSSize decodeSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decodeSize);
-        return result;
-    }
-
-    public NSSize decodeSizeForKey (NSString key)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decodeSizeForKey_1, key !is null ? key.id_ : null);
-        return result;
-    }
-
-    public void decodeValueOfObjCType (/*const*/char* type, void* data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_decodeValueOfObjCType_1at_1, type, data);
-    }
-
-    public void decodeValuesOfObjCTypes (/*const*/char* decodeValuesOfObjCTypes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_decodeValuesOfObjCTypes_1, decodeValuesOfObjCTypes);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void encodeArrayOfObjCType (/*const*/char* type, NSUInteger count, void* array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeArrayOfObjCType_1count_1at_1, type, count, array);
-    }
-
-    public void encodeBool (bool boolv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeBool_1forKey_1, boolv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeBycopyObject (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeBycopyObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void encodeByrefObject (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeByrefObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void encodeBytes_length_ (/*const*/void* byteaddr, NSUInteger length)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeBytes_1length_1, byteaddr, length);
-    }
-
-    public void encodeBytes_length_forKey_ (byte* bytesp, NSUInteger lenv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeBytes_1length_1forKey_1, bytesp, lenv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeConditionalObject_ (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeConditionalObject_1, object !is null ? object.id_ : null);
-    }
-
-    public void encodeConditionalObject_forKey_ (id objv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeConditionalObject_1forKey_1, objv !is null ? objv.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public void encodeDataObject (NSData data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeDataObject_1, data !is null ? data.id_ : null);
-    }
-
-    public void encodeDouble (double realv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeDouble_1forKey_1, realv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeFloat (float realv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeFloat_1forKey_1, realv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeInt32 (int intv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeInt32_1forKey_1, intv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeInt64 (long intv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeInt64_1forKey_1, intv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeInt (int intv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeInt_1forKey_1, intv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeInteger (NSInteger intv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeInteger_1forKey_1, intv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeNXObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeNXObject_1, object !is null ? object.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void encodeObject_ (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeObject_1, object !is null ? object.id_ : null);
-    }
-
-    public void encodeObject_forKey_ (id objv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeObject_1forKey_1, objv !is null ? objv.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public void encodePoint_ (NSPoint point)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodePoint_1, point);
-    }
-
-    public void encodePoint_forKey_ (NSPoint point, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodePoint_1forKey_1, point, key !is null ? key.id_ : null);
-    }
-
-    public void encodePropertyList (id aPropertyList)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodePropertyList_1, aPropertyList !is null ? aPropertyList.id_ : null);
-    }
-
-    public void encodeRect_ (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeRect_1, rect);
-    }
-
-    public void encodeRect_forKey_ (NSRect rect, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeRect_1forKey_1, rect, key !is null ? key.id_ : null);
-    }
-
-    public void encodeRootObject (id rootObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeRootObject_1, rootObject !is null ? rootObject.id_ : null);
-    }
+public int systemVersion() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_systemVersion);
+}
 
-    public void encodeSize_ (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeSize_1, size);
-    }
-
-    public void encodeSize_forKey_ (NSSize size, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeSize_1forKey_1, size, key !is null ? key.id_ : null);
-    }
-
-    public void encodeValueOfObjCType (/*const*/char* type, void* addr)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeValueOfObjCType_1at_1, type, addr);
-    }
-
-    public void encodeValuesOfObjCTypes (/*const*/char* encodeValuesOfObjCTypes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeValuesOfObjCTypes_1, encodeValuesOfObjCTypes);
-    }
-
-    public NSZone* objectZone ()
-    {
-        return cast(NSZone*) OS.objc_msgSend(this.id_, OS.sel_objectZone);
-    }
-
-    public void setObjectZone (objc.id zone)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectZone_1, zone);
-    }
-
-    public uint systemVersion ()
-    {
-        return cast(uint) OS.objc_msgSend(this.id_, OS.sel_systemVersion);
-    }
-
-    public NSInteger versionForClassName (NSString className)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_versionForClassName_1, className !is null ? className.id_ : null);
-    }
 }
--- a/dwt/internal/cocoa/NSCollectionView.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCollectionView;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCollectionViewItem;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSIndexSet;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCollectionView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool allowsMultipleSelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsMultipleSelection) !is null;
-    }
-
-    public NSArray backgroundColors ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColors);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray content ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_content);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool isFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFirstResponder) !is null;
-    }
-
-    public bool isSelectable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelectable) !is null;
-    }
-
-    public NSCollectionViewItem itemPrototype ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemPrototype);
-        return result !is null ? new NSCollectionViewItem(result) : null;
-    }
-
-    public NSSize maxItemSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_maxItemSize);
-        return result;
-    }
-
-    public NSUInteger maxNumberOfColumns ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_maxNumberOfColumns);
-    }
-
-    public NSUInteger maxNumberOfRows ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_maxNumberOfRows);
-    }
-
-    public NSSize minItemSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_minItemSize);
-        return result;
-    }
-
-    public NSCollectionViewItem newItemForRepresentedObject (id object)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_newItemForRepresentedObject_1, object !is null ? object.id_ : null);
-        return result !is null ? new NSCollectionViewItem(result) : null;
-    }
-
-    public NSIndexSet selectionIndexes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectionIndexes);
-        return result !is null ? new NSIndexSet(result) : null;
-    }
-
-    public void setAllowsMultipleSelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsMultipleSelection_1, flag);
-    }
-
-    public void setBackgroundColors (NSArray colors)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColors_1, colors !is null ? colors.id_ : null);
-    }
-
-    public void setContent (NSArray content)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContent_1, content !is null ? content.id_ : null);
-    }
-
-    public void setItemPrototype (NSCollectionViewItem prototype)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setItemPrototype_1, prototype !is null ? prototype.id_ : null);
-    }
-
-    public void setMaxItemSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxItemSize_1, size);
-    }
-
-    public void setMaxNumberOfColumns (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxNumberOfColumns_1, number);
-    }
-
-    public void setMaxNumberOfRows (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxNumberOfRows_1, number);
-    }
-
-    public void setMinItemSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinItemSize_1, size);
-    }
-
-    public void setSelectable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectable_1, flag);
-    }
-
-    public void setSelectionIndexes (NSIndexSet indexes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectionIndexes_1, indexes !is null ? indexes.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSCollectionViewItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCollectionViewItem;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSCollectionView;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCollectionViewItem : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSCollectionView collectionView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_collectionView);
-        return result !is null ? new NSCollectionView(result) : null;
-    }
-
-    public bool isSelected ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelected) !is null;
-    }
-
-    public id representedObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setRepresentedObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRepresentedObject_1, object !is null ? object.id_ : null);
-    }
-
-    public void setSelected (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelected_1, flag);
-    }
-
-    public void setView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null);
-    }
-
-    public NSView view ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_view);
-        return result !is null ? new NSView(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSColor.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSColor.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,623 +1,187 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSColor;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.CIColor;
-import dwt.internal.cocoa.NSArray;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSColorSpace;
-import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPasteboard;
-import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSColor : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSColor : NSObject {
 
-    public CGFloat alphaComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_alphaComponent);
-    }
-
-    public static NSColor alternateSelectedControlColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor alternateSelectedControlTextColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlTextColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public static NSColor blackColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_blackColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public CGFloat blackComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_blackComponent);
-    }
-
-    public NSColor blendedColorWithFraction (CGFloat fraction, NSColor color)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_blendedColorWithFraction_1ofColor_1, fraction, color !is null ? color.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSColor(result) : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static NSColor blueColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_blueColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public CGFloat blueComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_blueComponent);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public CGFloat brightnessComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_brightnessComponent);
-    }
-
-    public static NSColor brownColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_brownColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public CGFloat alphaComponent() {
+    return cast(CGFloat)OS.objc_msgSend_fpret(this.id, OS.sel_alphaComponent);
+}
 
-    public NSString catalogNameComponent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_catalogNameComponent);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSColor clearColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_clearColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor colorForControlTint (objc.id controlTint)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorForControlTint_1, controlTint);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor colorFromPasteboard (NSPasteboard pasteBoard)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorFromPasteboard_1, pasteBoard !is null ? pasteBoard.id_ : null);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSString colorNameComponent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorNameComponent);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSColorSpace colorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
+public static NSColor alternateSelectedControlTextColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlTextColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public NSString colorSpaceName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorSpaceName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSColor colorUsingColorSpace (NSColorSpace space)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorUsingColorSpace_1, space !is null ? space.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSColor(result) : null);
-    }
-
-    public NSColor colorUsingColorSpaceName_ (NSString colorSpace)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorUsingColorSpaceName_1, colorSpace !is null ? colorSpace.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSColor(result) : null);
-    }
+public static NSColor blackColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_blackColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public NSColor colorUsingColorSpaceName_device_ (NSString colorSpace, NSDictionary deviceDescription)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorUsingColorSpaceName_1device_1, colorSpace !is null ? colorSpace.id_ : null,
-                deviceDescription !is null ? deviceDescription.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSColor(result) : null);
-    }
+public CGFloat blueComponent() {
+    return cast(CGFloat)OS.objc_msgSend_fpret(this.id, OS.sel_blueComponent);
+}
 
-    public NSColor colorWithAlphaComponent (CGFloat alpha)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorWithAlphaComponent_1, alpha);
-        return result is this.id_ ? this : (result !is null ? new NSColor(result) : null);
-    }
-
-    public static NSColor colorWithCIColor (CIColor color)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCIColor_1, color !is null ? color.id_ : null);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor clearColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_clearColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor colorWithCalibratedHue (CGFloat hue, CGFloat saturation, CGFloat brightness, CGFloat alpha)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCalibratedHue_1saturation_1brightness_1alpha_1, hue, saturation,
-                brightness, alpha);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor colorWithCalibratedRed (CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCalibratedRed_1green_1blue_1alpha_1, red, green, blue, alpha);
-        return result !is null ? new NSColor(result) : null;
-    }
+public NSColor colorUsingColorSpace(NSColorSpace space) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpace_, space !is null ? space.id : null);
+    return result is this.id ? this : (result !is null ? new NSColor(result) : null);
+}
 
-    public static NSColor colorWithCalibratedWhite (CGFloat white, CGFloat alpha)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCalibratedWhite_1alpha_1, white, alpha);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor colorWithCatalogName (NSString listName, NSString colorName)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCatalogName_1colorName_1, listName !is null ? listName.id_ : null,
-                colorName !is null ? colorName.id_ : null);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor colorWithColorSpace (NSColorSpace space, /*const*/CGFloat* components, NSInteger numberOfComponents)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithColorSpace_1components_1count_1, space !is null ? space.id_ : null,
-                components, numberOfComponents);
-        return result !is null ? new NSColor(result) : null;
-    }
+public NSColor colorUsingColorSpaceName(NSString colorSpace) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpaceName_, colorSpace !is null ? colorSpace.id : null);
+    return result is this.id ? this : (result !is null ? new NSColor(result) : null);
+}
 
-    public static NSColor colorWithDeviceCyan (CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceCyan_1magenta_1yellow_1black_1alpha_1, cyan, magenta, yellow, black,
-                alpha);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor colorWithDeviceHue (CGFloat hue, CGFloat saturation, CGFloat brightness, CGFloat alpha)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceHue_1saturation_1brightness_1alpha_1, hue, saturation, brightness,
-                alpha);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor colorWithDeviceRed(CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha) {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceRed_green_blue_alpha_, red, green, blue, alpha);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor colorWithDeviceRed (CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceRed_1green_1blue_1alpha_1, red, green, blue, alpha);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor colorWithDeviceWhite (CGFloat white, CGFloat alpha)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceWhite_1alpha_1, white, alpha);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor colorWithPatternImage (NSImage image)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithPatternImage_1, image !is null ? image.id_ : null);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSArray controlAlternatingRowBackgroundColors ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlAlternatingRowBackgroundColors);
-        return result !is null ? new NSArray(result) : null;
-    }
+public static NSColor colorWithPatternImage(NSImage image) {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithPatternImage_, image !is null ? image.id : null);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor controlBackgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlBackgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor controlColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor controlDarkShadowColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlDarkShadowColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor controlDarkShadowColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlDarkShadowColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor controlHighlightColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlHighlightColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor controlLightHighlightColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlLightHighlightColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor controlShadowColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlShadowColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor controlHighlightColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlHighlightColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor controlTextColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlTextColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static objc.id currentControlTint ()
-    {
-        return OS.objc_msgSend(OS.class_NSColor, OS.sel_currentControlTint);
-    }
-
-    public static NSColor cyanColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_cyanColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public CGFloat cyanComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_cyanComponent);
-    }
+public static NSColor controlLightHighlightColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlLightHighlightColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor darkGrayColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_darkGrayColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor disabledControlTextColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_disabledControlTextColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void drawSwatchInRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawSwatchInRect_1, rect);
-    }
-
-    public void getComponents (CGFloat[] components)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getComponents_1, components);
-    }
+public static NSColor controlShadowColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlShadowColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public void getCyan (CGFloat* cyan, CGFloat* magenta, CGFloat* yellow, CGFloat* black, CGFloat* alpha)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getCyan_1magenta_1yellow_1black_1alpha_1, cyan, magenta, yellow, black, alpha);
-    }
-
-    public void getHue (CGFloat* hue, CGFloat* saturation, CGFloat* brightness, CGFloat* alpha)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getHue_1saturation_1brightness_1alpha_1, hue, saturation, brightness, alpha);
-    }
-
-    public void getRed (CGFloat* red, CGFloat* green, CGFloat* blue, CGFloat* alpha)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getRed_1green_1blue_1alpha_1, red, green, blue, alpha);
-    }
-
-    public void getWhite (CGFloat* white, CGFloat* alpha)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getWhite_1alpha_1, white, alpha);
-    }
-
-    public static NSColor grayColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_grayColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor greenColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_greenColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor controlTextColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_controlTextColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public CGFloat greenComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_greenComponent);
-    }
-
-    public static NSColor gridColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_gridColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor headerColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_headerColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor disabledControlTextColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_disabledControlTextColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor headerTextColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_headerTextColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public void getComponents(float[] /*double[]*/ components) {
+    OS.objc_msgSend(this.id, OS.sel_getComponents_, components);
+}
 
-    public static NSColor highlightColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_highlightColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSColor highlightWithLevel (CGFloat val)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_highlightWithLevel_1, val);
-        return result is this.id_ ? this : (result !is null ? new NSColor(result) : null);
-    }
-
-    public CGFloat hueComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_hueComponent);
-    }
+public CGFloat greenComponent() {
+    return cast(CGFloat)OS.objc_msgSend_fpret(this.id, OS.sel_greenComponent);
+}
 
-    public static bool ignoresAlpha ()
-    {
-        return OS.objc_msgSend(OS.class_NSColor, OS.sel_ignoresAlpha) !is null;
-    }
-
-    public static NSColor keyboardFocusIndicatorColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_keyboardFocusIndicatorColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor knobColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_knobColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public NSInteger numberOfComponents() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfComponents);
+}
 
-    public static NSColor lightGrayColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_lightGrayColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSString localizedCatalogNameComponent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedCatalogNameComponent);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString localizedColorNameComponent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedColorNameComponent);
-        return result !is null ? new NSString(result) : null;
-    }
+public CGFloat redComponent() {
+    return cast(CGFloat)OS.objc_msgSend_fpret(this.id, OS.sel_redComponent);
+}
 
-    public static NSColor magentaColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_magentaColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public CGFloat magentaComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_magentaComponent);
-    }
-
-    public NSInteger numberOfComponents ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfComponents);
-    }
+public static NSColor secondarySelectedControlColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_secondarySelectedControlColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor orangeColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_orangeColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSImage patternImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_patternImage);
-        return result !is null ? new NSImage(result) : null;
-    }
+public static NSColor selectedControlTextColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedControlTextColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor purpleColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_purpleColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor redColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_redColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor selectedTextBackgroundColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedTextBackgroundColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public CGFloat redComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_redComponent);
-    }
-
-    public CGFloat saturationComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_saturationComponent);
-    }
-
-    public static NSColor scrollBarColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_scrollBarColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor secondarySelectedControlColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_secondarySelectedControlColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor selectedControlColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedControlColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor selectedControlTextColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedControlTextColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor selectedTextColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedTextColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor selectedKnobColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedKnobColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor selectedMenuItemColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedMenuItemColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor selectedMenuItemTextColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedMenuItemTextColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public void set() {
+    OS.objc_msgSend(this.id, OS.sel_set);
+}
 
-    public static NSColor selectedTextBackgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedTextBackgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public void setFill() {
+    OS.objc_msgSend(this.id, OS.sel_setFill);
+}
 
-    public static NSColor selectedTextColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_selectedTextColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void set ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_set);
-    }
-
-    public void setFill ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFill);
-    }
+public void setStroke() {
+    OS.objc_msgSend(this.id, OS.sel_setStroke);
+}
 
-    public static void setIgnoresAlpha (bool flag)
-    {
-        OS.objc_msgSend(OS.class_NSColor, OS.sel_setIgnoresAlpha_1, flag);
-    }
-
-    public void setStroke ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStroke);
-    }
-
-    public static NSColor shadowColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_shadowColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor textBackgroundColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textBackgroundColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public NSColor shadowWithLevel (CGFloat val)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shadowWithLevel_1, val);
-        return result is this.id_ ? this : (result !is null ? new NSColor(result) : null);
-    }
-
-    public static NSColor textBackgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textBackgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor textColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor textColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor whiteColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_whiteColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public CGFloat whiteComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_whiteComponent);
-    }
-
-    public static NSColor windowBackgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowBackgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor windowBackgroundColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowBackgroundColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static NSColor windowFrameColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowFrameColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public static NSColor windowFrameTextColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowFrameTextColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public static NSColor windowFrameColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowFrameColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public void writeToPasteboard (NSPasteboard pasteBoard)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_writeToPasteboard_1, pasteBoard !is null ? pasteBoard.id_ : null);
-    }
-
-    public static NSColor yellowColor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_yellowColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public CGFloat yellowComponent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_yellowComponent);
-    }
+public static NSColor windowFrameTextColor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowFrameTextColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSColorList.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSColorList;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSColorList : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray allKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray availableColorLists ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorList, OS.sel_availableColorLists);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSColorList colorListNamed (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorList, OS.sel_colorListNamed_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSColorList(result) : null;
-    }
-
-    public NSColor colorWithKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorWithKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSColorList initWithName_ (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1, name !is null ? name.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSColorList initWithName_fromFile_ (NSString name, NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1fromFile_1, name !is null ? name.id_ : null, path !is null ? path.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public void insertColor (NSColor color, NSString key, NSUInteger loc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertColor_1key_1atIndex_1, color !is null ? color.id_ : null, key !is null ? key.id_ : null, loc);
-    }
-
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void removeColorWithKey (NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeColorWithKey_1, key !is null ? key.id_ : null);
-    }
-
-    public void removeFile ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFile);
-    }
-
-    public void setColor (NSColor color, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColor_1forKey_1, color !is null ? color.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public bool writeToFile (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1, path !is null ? path.id_ : null) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSColorPanel.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSColorPanel.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,146 +1,51 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSColorPanel;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSColorList;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSPanel;
-import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-alias NSInteger NSColorPanelMode;
-
-public class NSColorPanel : NSPanel
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSColorPanel : NSPanel {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public CGFloat alpha ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_alpha);
-    }
+public this() {
+    super();
+}
 
-    public void attachColorList (NSColorList colorList)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_attachColorList_1, colorList !is null ? colorList.id_ : null);
-    }
-
-    public NSColor color ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_color);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void detachColorList (NSColorList colorList)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_detachColorList_1, colorList !is null ? colorList.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static bool dragColor (NSColor color, NSEvent theEvent, NSView sourceView)
-    {
-        return OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_dragColor_1withEvent_1fromView_1, color !is null ? color.id_ : null,
-                theEvent !is null ? theEvent.id_ : null, sourceView !is null ? sourceView.id_ : null) !is null;
-    }
-
-    public bool isContinuous ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isContinuous) !is null;
-    }
-
-    public objc.id mode ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_mode);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setAccessoryView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void setAction (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector);
-    }
-
-    public void setColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setContinuous (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContinuous_1, flag);
-    }
-
-    public void setMode (objc.id mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMode_1, mode);
-    }
-
-    public static void setPickerMask (NSUInteger mask)
-    {
-        OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_setPickerMask_1, mask);
-    }
+public NSColor color() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_color);
+    return result !is null ? new NSColor(result) : null;
+}
 
-    public static void setPickerMode (NSColorPanelMode mode)
-    {
-        OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_setPickerMode_1, mode);
-    }
-
-    public void setShowsAlpha (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsAlpha_1, flag);
-    }
-
-    public void setTarget (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, anObject !is null ? anObject.id_ : null);
-    }
+public void setColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setColor_, color !is null ? color.id : null);
+}
 
-    public static NSColorPanel sharedColorPanel ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_sharedColorPanel);
-        return result !is null ? new NSColorPanel(result) : null;
-    }
-
-    public static bool sharedColorPanelExists ()
-    {
-        return OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_sharedColorPanelExists) !is null;
-    }
-
-    public bool showsAlpha ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsAlpha) !is null;
-    }
+public static NSColorPanel sharedColorPanel() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColorPanel, OS.sel_sharedColorPanel);
+    return result !is null ? new NSColorPanel(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSColorPicker.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSColorPicker;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSButtonCell;
-import dwt.internal.cocoa.NSColorList;
-import dwt.internal.cocoa.NSColorPanel;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSColorPicker : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void attachColorList (NSColorList colorList)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_attachColorList_1, colorList !is null ? colorList.id_ : null);
-    }
-
-    public NSString buttonToolTip ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_buttonToolTip);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSColorPanel colorPanel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorPanel);
-        return result !is null ? new NSColorPanel(result) : null;
-    }
-
-    public void detachColorList (NSColorList colorList)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_detachColorList_1, colorList !is null ? colorList.id_ : null);
-    }
-
-    public NSColorPicker initWithPickerMask (NSUInteger mask, NSColorPanel owningColorPanel)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPickerMask_1colorPanel_1, mask,
-                owningColorPanel !is null ? owningColorPanel.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public void insertNewButtonImage (NSImage newButtonImage, NSButtonCell buttonCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertNewButtonImage_1in_1, newButtonImage !is null ? newButtonImage.id_ : null,
-                buttonCell !is null ? buttonCell.id_ : null);
-    }
-
-    public NSSize minContentSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_minContentSize);
-        return result;
-    }
-
-    public NSImage provideNewButtonImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_provideNewButtonImage);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public void setMode (objc.id mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMode_1, mode);
-    }
-
-    public void viewSizeChanged (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewSizeChanged_1, sender !is null ? sender.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSColorSpace.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSColorSpace.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,149 +1,42 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
+
 module dwt.internal.cocoa.NSColorSpace;
 
-import dwt.internal.cocoa.CGColorSpace;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-alias NSInteger NSColorSpaceModel;
+public class NSColorSpace : NSObject {
 
-enum
-{
-    NSUnknownColorSpaceModel = -1,
-    NSGrayColorSpaceModel,
-    NSRGBColorSpaceModel,
-    NSCMYKColorSpaceModel,
-    NSLABColorSpaceModel,
-    NSDeviceNColorSpaceModel,
-    NSIndexedColorSpaceModel,
-    NSPatternColorSpaceModel
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
 }
 
-public class NSColorSpace : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.id CGColorSpace ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_CGColorSpace);
-    }
-
-    public NSData ICCProfileData ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_ICCProfileData);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public static NSColorSpace adobeRGB1998ColorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_adobeRGB1998ColorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
-
-    public NSColorSpaceModel colorSpaceModel ()
-    {
-        return cast(NSColorSpaceModel) OS.objc_msgSend(this.id_, OS.sel_colorSpaceModel);
-    }
-
-    public void* colorSyncProfile ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_colorSyncProfile);
-    }
-
-    public static NSColorSpace deviceCMYKColorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_deviceCMYKColorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
-
-    public static NSColorSpace deviceGrayColorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_deviceGrayColorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static NSColorSpace deviceRGBColorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_deviceRGBColorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
-
-    public static NSColorSpace genericCMYKColorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_genericCMYKColorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
-
-    public static NSColorSpace genericGrayColorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_genericGrayColorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
-
-    public static NSColorSpace genericRGBColorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_genericRGBColorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
-
-    public NSColorSpace initWithCGColorSpace (CGColorSpaceRef cgColorSpace)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCGColorSpace_1, cgColorSpace);
-        return result !is null ? this : null;
-    }
-
-    public NSColorSpace initWithColorSyncProfile (void* prof)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithColorSyncProfile_1, prof);
-        return result !is null ? this : null;
-    }
-
-    public NSColorSpace initWithICCProfileData (NSData iccData)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithICCProfileData_1, iccData !is null ? iccData.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSString localizedName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger numberOfColorComponents ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfColorComponents);
-    }
-
-    public static NSColorSpace sRGBColorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_sRGBColorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
+public static NSColorSpace deviceRGBColorSpace() {
+    objc.id result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_deviceRGBColorSpace);
+    return result !is null ? new NSColorSpace(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSColorWell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSColorWell;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSColorWell : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void activate (bool exclusive)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_activate_1, exclusive);
-    }
-
-    public NSColor color ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_color);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void deactivate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deactivate);
-    }
-
-    public void drawWellInside (NSRect insideRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawWellInside_1, insideRect);
-    }
-
-    public bool isActive ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isActive) !is null;
-    }
-
-    public bool isBordered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBordered) !is null;
-    }
-
-    public void setBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag);
-    }
-
-    public void setColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void takeColorFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeColorFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSComboBox.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSComboBox.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,219 +1,90 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSComboBox;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSSize;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSTextField;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSComboBox : NSTextField
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSComboBox : NSTextField {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addItemWithObjectValue (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItemWithObjectValue_1, object !is null ? object.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void addItemsWithObjectValues (NSArray objects)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItemsWithObjectValues_1, objects !is null ? objects.id_ : null);
-    }
-
-    public bool completes ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_completes) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public id dataSource ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataSource);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void deselectItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deselectItemAtIndex_1, index);
-    }
-
-    public bool hasVerticalScroller ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasVerticalScroller) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSInteger indexOfItemWithObjectValue (id object)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithObjectValue_1, object !is null ? object.id_ : null);
-    }
-
-    public NSInteger indexOfSelectedItem ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfSelectedItem);
-    }
+public void addItemWithObjectValue(cocoa.id object) {
+    OS.objc_msgSend(this.id, OS.sel_addItemWithObjectValue_, object !is null ? object.id : null);
+}
 
-    public void insertItemWithObjectValue (id object, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertItemWithObjectValue_1atIndex_1, object !is null ? object.id_ : null, index);
-    }
-
-    public NSSize intercellSpacing ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_intercellSpacing);
-        return result;
-    }
+public void deselectItemAtIndex(NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_deselectItemAtIndex_, index);
+}
 
-    public bool isButtonBordered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isButtonBordered) !is null;
-    }
-
-    public CGFloat itemHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_itemHeight);
-    }
+public NSInteger indexOfSelectedItem() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_indexOfSelectedItem);
+}
 
-    public objc.id itemObjectValueAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemObjectValueAtIndex_1, index);
-        return result !is null ? result : null;
-    }
-
-    public void noteNumberOfItemsChanged ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteNumberOfItemsChanged);
-    }
-
-    public NSInteger numberOfItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfItems);
-    }
-
-    public NSInteger numberOfVisibleItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfVisibleItems);
-    }
+public void insertItemWithObjectValue(cocoa.id object, NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_insertItemWithObjectValue_atIndex_, object !is null ? object.id : null, index);
+}
 
-    public id objectValueOfSelectedItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValueOfSelectedItem);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray objectValues ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValues);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void reloadData ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadData);
-    }
-
-    public void removeAllItems ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllItems);
-    }
+public cocoa.id itemObjectValueAtIndex(NSInteger index) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_itemObjectValueAtIndex_, index);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
-    public void removeItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemAtIndex_1, index);
-    }
-
-    public void removeItemWithObjectValue (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemWithObjectValue_1, object !is null ? object.id_ : null);
-    }
+public NSInteger numberOfItems() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfItems);
+}
 
-    public void scrollItemAtIndexToTop (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollItemAtIndexToTop_1, index);
-    }
+public NSInteger numberOfVisibleItems() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfVisibleItems);
+}
 
-    public void scrollItemAtIndexToVisible (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollItemAtIndexToVisible_1, index);
-    }
-
-    public void selectItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItemAtIndex_1, index);
-    }
+public void removeAllItems() {
+    OS.objc_msgSend(this.id, OS.sel_removeAllItems);
+}
 
-    public void selectItemWithObjectValue (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItemWithObjectValue_1, object !is null ? object.id_ : null);
-    }
-
-    public void setButtonBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setButtonBordered_1, flag);
-    }
+public void removeItemAtIndex(NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_removeItemAtIndex_, index);
+}
 
-    public void setCompletes (bool completes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCompletes_1, completes);
-    }
-
-    public void setDataSource (id aSource)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDataSource_1, aSource !is null ? aSource.id_ : null);
-    }
-
-    public void setHasVerticalScroller (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasVerticalScroller_1, flag);
-    }
+public void selectItemAtIndex(NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_selectItemAtIndex_, index);
+}
 
-    public void setIntercellSpacing (NSSize aSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntercellSpacing_1, aSize);
-    }
-
-    public void setItemHeight (CGFloat itemHeight)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setItemHeight_1, itemHeight);
-    }
+public void setNumberOfVisibleItems(NSInteger visibleItems) {
+    OS.objc_msgSend(this.id, OS.sel_setNumberOfVisibleItems_, visibleItems);
+}
 
-    public void setNumberOfVisibleItems (NSInteger visibleItems)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfVisibleItems_1, visibleItems);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSComboBox, OS.sel_cellClass);
+}
 
-    public void setUsesDataSource (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesDataSource_1, flag);
-    }
-
-    public bool usesDataSource ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesDataSource) !is null;
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSComboBox, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSComboBoxCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSComboBoxCell;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTextFieldCell;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSComboBoxCell : NSTextFieldCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addItemWithObjectValue (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItemWithObjectValue_1, object !is null ? object.id_ : null);
-    }
-
-    public void addItemsWithObjectValues (NSArray objects)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItemsWithObjectValues_1, objects !is null ? objects.id_ : null);
-    }
-
-    public NSString completedString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_completedString_1, string !is null ? string.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool completes ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_completes) !is null;
-    }
-
-    public id dataSource ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataSource);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void deselectItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deselectItemAtIndex_1, index);
-    }
-
-    public bool hasVerticalScroller ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasVerticalScroller) !is null;
-    }
-
-    public NSInteger indexOfItemWithObjectValue (id object)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithObjectValue_1, object !is null ? object.id_ : null);
-    }
-
-    public NSInteger indexOfSelectedItem ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfSelectedItem);
-    }
-
-    public void insertItemWithObjectValue (id object, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertItemWithObjectValue_1atIndex_1, object !is null ? object.id_ : null, index);
-    }
-
-    public NSSize intercellSpacing ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_intercellSpacing);
-        return result;
-    }
-
-    public bool isButtonBordered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isButtonBordered) !is null;
-    }
-
-    public CGFloat itemHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_itemHeight);
-    }
-
-    public id itemObjectValueAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemObjectValueAtIndex_1, index);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void noteNumberOfItemsChanged ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteNumberOfItemsChanged);
-    }
-
-    public NSInteger numberOfItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfItems);
-    }
-
-    public NSInteger numberOfVisibleItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfVisibleItems);
-    }
-
-    public id objectValueOfSelectedItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValueOfSelectedItem);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray objectValues ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValues);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void reloadData ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadData);
-    }
-
-    public void removeAllItems ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllItems);
-    }
-
-    public void removeItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemAtIndex_1, index);
-    }
-
-    public void removeItemWithObjectValue (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemWithObjectValue_1, object !is null ? object.id_ : null);
-    }
-
-    public void scrollItemAtIndexToTop (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollItemAtIndexToTop_1, index);
-    }
-
-    public void scrollItemAtIndexToVisible (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollItemAtIndexToVisible_1, index);
-    }
-
-    public void selectItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItemAtIndex_1, index);
-    }
-
-    public void selectItemWithObjectValue (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItemWithObjectValue_1, object !is null ? object.id_ : null);
-    }
-
-    public void setButtonBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setButtonBordered_1, flag);
-    }
-
-    public void setCompletes (bool completes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCompletes_1, completes);
-    }
-
-    public void setDataSource (id aSource)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDataSource_1, aSource !is null ? aSource.id_ : null);
-    }
-
-    public void setHasVerticalScroller (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasVerticalScroller_1, flag);
-    }
-
-    public void setIntercellSpacing (NSSize aSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntercellSpacing_1, aSize);
-    }
-
-    public void setItemHeight (CGFloat itemHeight)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setItemHeight_1, itemHeight);
-    }
-
-    public void setNumberOfVisibleItems (NSInteger visibleItems)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfVisibleItems_1, visibleItems);
-    }
-
-    public void setUsesDataSource (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesDataSource_1, flag);
-    }
-
-    public bool usesDataSource ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesDataSource) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSComparisonPredicate.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSComparisonPredicate;
-
-import dwt.internal.cocoa.NSExpression;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSComparisonPredicateModifier
-{
-    NSDirectPredicateModifier = 0,
-    NSAllPredicateModifier,
-    NSAnyPredicateModifier,
-}
-
-alias NSComparisonPredicateModifier.NSDirectPredicateModifier NSDirectPredicateModifier;
-alias NSComparisonPredicateModifier.NSAllPredicateModifier NSAllPredicateModifier;
-alias NSComparisonPredicateModifier.NSAnyPredicateModifier NSAnyPredicateModifier;
-
-public class NSComparisonPredicate : NSPredicate
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.id comparisonPredicateModifier ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_comparisonPredicateModifier);
-    }
-
-    public objc.SEL customSelector ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_customSelector);
-    }
-
-    public NSComparisonPredicate initWithLeftExpression_rightExpression_customSelector_ (NSExpression lhs, NSExpression rhs, objc.SEL selector)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLeftExpression_1rightExpression_1customSelector_1, lhs !is null ? lhs.id_ : null,
-                rhs !is null ? rhs.id_ : null, selector);
-        return result !is null ? this : null;
-    }
-
-    public NSComparisonPredicate initWithLeftExpression_rightExpression_modifier_type_options_ (NSExpression lhs, NSExpression rhs, objc.id modifier,
-            objc.id type, NSUInteger options)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLeftExpression_1rightExpression_1modifier_1type_1options_1,
-                lhs !is null ? lhs.id_ : null, rhs !is null ? rhs.id_ : null, modifier, type, options);
-        return result !is null ? this : null;
-    }
-
-    public NSExpression leftExpression ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_leftExpression);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public NSUInteger options ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_options);
-    }
-
-    public objc.id predicateOperatorType ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_predicateOperatorType);
-    }
-
-    public static NSPredicate static_predicateWithLeftExpression_rightExpression_customSelector_ (NSExpression lhs, NSExpression rhs,
-            objc.SEL selector)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSComparisonPredicate, OS.sel_predicateWithLeftExpression_1rightExpression_1customSelector_1,
-                lhs !is null ? lhs.id_ : null, rhs !is null ? rhs.id_ : null, selector);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public static NSPredicate static_predicateWithLeftExpression_rightExpression_modifier_type_options_ (NSExpression lhs, NSExpression rhs,
-            objc.id modifier, objc.id type, NSUInteger options)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSComparisonPredicate,
-                OS.sel_predicateWithLeftExpression_1rightExpression_1modifier_1type_1options_1, lhs !is null ? lhs.id_ : null,
-                rhs !is null ? rhs.id_ : null, modifier, type, options);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public NSExpression rightExpression ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rightExpression);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSCompoundPredicate.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCompoundPredicate;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCompoundPredicate : NSPredicate
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSPredicate andPredicateWithSubpredicates (NSArray subpredicates)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCompoundPredicate, OS.sel_andPredicateWithSubpredicates_1,
-                subpredicates !is null ? subpredicates.id_ : null);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public objc.id compoundPredicateType ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_compoundPredicateType);
-    }
-
-    public id initWithType (objc.id type, NSArray subpredicates)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithType_1subpredicates_1, type, subpredicates !is null ? subpredicates.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSPredicate notPredicateWithSubpredicate (NSPredicate predicate)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCompoundPredicate, OS.sel_notPredicateWithSubpredicate_1,
-                predicate !is null ? predicate.id_ : null);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public static NSPredicate orPredicateWithSubpredicates (NSArray subpredicates)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCompoundPredicate, OS.sel_orPredicateWithSubpredicates_1,
-                subpredicates !is null ? subpredicates.id_ : null);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public NSArray subpredicates ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subpredicates);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSCondition.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCondition;
-
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCondition : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void broadcast ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_broadcast);
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setName (NSString n)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setName_1, n !is null ? n.id_ : null);
-    }
-
-    public void signal ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_signal);
-    }
-
-    //public void wait() {
-    //  OS.objc_msgSend(this.id_, OS.sel_wait);
-    //}
-
-    public bool waitUntilDate (NSDate limit)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_waitUntilDate_1, limit !is null ? limit.id_ : null) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSConditionLock.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSConditionLock;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSConditionLock : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSInteger condition ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_condition);
-    }
-
-    public id initWithCondition (NSInteger condition)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCondition_1, condition);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool lockBeforeDate (NSDate limit)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_lockBeforeDate_1, limit !is null ? limit.id_ : null) !is null;
-    }
-
-    public void lockWhenCondition_ (NSInteger condition)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_lockWhenCondition_1, condition);
-    }
-
-    public bool lockWhenCondition_beforeDate_ (NSInteger condition, NSDate limit)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_lockWhenCondition_1beforeDate_1, condition, limit !is null ? limit.id_ : null) !is null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setName (NSString n)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setName_1, n !is null ? n.id_ : null);
-    }
-
-    public bool tryLock ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tryLock) !is null;
-    }
-
-    public bool tryLockWhenCondition (NSInteger condition)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tryLockWhenCondition_1, condition) !is null;
-    }
-
-    public void unlockWithCondition (NSInteger condition)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unlockWithCondition_1, condition);
-    }
-
-}
--- a/dwt/internal/cocoa/NSConnection.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSConnection;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSConnection;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSDistantObject;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.NSPortNameServer;
-import dwt.internal.cocoa.NSRunLoop;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSConnection : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addRequestMode (NSString rmode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addRequestMode_1, rmode !is null ? rmode.id_ : null);
-    }
-
-    public void addRunLoop (NSRunLoop runloop)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addRunLoop_1, runloop !is null ? runloop.id_ : null);
-    }
-
-    public static NSArray allConnections ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_allConnections);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static id connectionWithReceivePort (NSPort receivePort, NSPort sendPort)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithReceivePort_1sendPort_1,
-                receivePort !is null ? receivePort.id_ : null, sendPort !is null ? sendPort.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_connectionWithRegisteredName_host_ (NSString name, NSString hostName)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithRegisteredName_1host_1, name !is null ? name.id_ : null,
-                hostName !is null ? hostName.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_connectionWithRegisteredName_host_usingNameServer_ (NSString name, NSString hostName, NSPortNameServer server)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_connectionWithRegisteredName_1host_1usingNameServer_1,
-                name !is null ? name.id_ : null, hostName !is null ? hostName.id_ : null, server !is null ? server.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id currentConversation ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_currentConversation);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSConnection defaultConnection ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_defaultConnection);
-        return result !is null ? new NSConnection(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void enableMultipleThreads ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enableMultipleThreads);
-    }
-
-    public bool independentConversationQueueing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_independentConversationQueueing) !is null;
-    }
-
-    public id initWithReceivePort (NSPort receivePort, NSPort sendPort)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithReceivePort_1sendPort_1, receivePort !is null ? receivePort.id_ : null,
-                sendPort !is null ? sendPort.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void invalidate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidate);
-    }
-
-    public bool isValid ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isValid) !is null;
-    }
-
-    public NSArray localObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool multipleThreadsEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_multipleThreadsEnabled) !is null;
-    }
-
-    public NSPort receivePort ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_receivePort);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public bool registerName_ (NSString name)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_registerName_1, name !is null ? name.id_ : null) !is null;
-    }
-
-    public bool registerName_withNameServer_ (NSString name, NSPortNameServer server)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_registerName_1withNameServer_1, name !is null ? name.id_ : null, server !is null ? server.id_ : null) !is null;
-    }
-
-    public NSArray remoteObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_remoteObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void removeRequestMode (NSString rmode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeRequestMode_1, rmode !is null ? rmode.id_ : null);
-    }
-
-    public void removeRunLoop (NSRunLoop runloop)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeRunLoop_1, runloop !is null ? runloop.id_ : null);
-    }
-
-    public double replyTimeout ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_replyTimeout);
-    }
-
-    public NSArray requestModes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_requestModes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public double requestTimeout ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_requestTimeout);
-    }
-
-    public id rootObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rootObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDistantObject rootProxy ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rootProxy);
-        return result !is null ? new NSDistantObject(result) : null;
-    }
-
-    public static NSDistantObject static_rootProxyForConnectionWithRegisteredName_host_ (NSString name, NSString hostName)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_rootProxyForConnectionWithRegisteredName_1host_1,
-                name !is null ? name.id_ : null, hostName !is null ? hostName.id_ : null);
-        return result !is null ? new NSDistantObject(result) : null;
-    }
-
-    public static NSDistantObject static_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ (NSString name, NSString hostName,
-            NSPortNameServer server)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_rootProxyForConnectionWithRegisteredName_1host_1usingNameServer_1,
-                name !is null ? name.id_ : null, hostName !is null ? hostName.id_ : null, server !is null ? server.id_ : null);
-        return result !is null ? new NSDistantObject(result) : null;
-    }
-
-    public void runInNewThread ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runInNewThread);
-    }
-
-    public NSPort sendPort ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sendPort);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public static id static_serviceConnectionWithName_rootObject_ (NSString name, id root)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_serviceConnectionWithName_1rootObject_1, name !is null ? name.id_ : null,
-                root !is null ? root.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_serviceConnectionWithName_rootObject_usingNameServer_ (NSString name, id root, NSPortNameServer server)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSConnection, OS.sel_serviceConnectionWithName_1rootObject_1usingNameServer_1,
-                name !is null ? name.id_ : null, root !is null ? root.id_ : null, server !is null ? server.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setIndependentConversationQueueing (bool yorn)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIndependentConversationQueueing_1, yorn);
-    }
-
-    public void setReplyTimeout (double ti)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReplyTimeout_1, ti);
-    }
-
-    public void setRequestTimeout (double ti)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRequestTimeout_1, ti);
-    }
-
-    public void setRootObject (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRootObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public NSDictionary statistics ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_statistics);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSControl.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSControl.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,372 +1,122 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSControl;
 
 import dwt.dwthelper.utils;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAttributedString;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSFormatter;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSText;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
-import obj = dwt.internal.objc.runtime;
-
-public class NSControl : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
+import objc = dwt.internal.objc.runtime;
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool abortEditing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_abortEditing) !is null;
-    }
+public class NSControl : NSView {
 
-    public String action ()
-    {
-        return fromStringz(cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action));
-    }
-
-    public objc.id alignment ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_alignment);
-    }
-
-    public NSAttributedString attributedStringValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedStringValue);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public objc.id baseWritingDirection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_baseWritingDirection);
-    }
+public this() {
+    super();
+}
 
-    public void calcSize ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_calcSize);
-    }
-
-    public objc.id cell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cell);
-        return result !is null ? result : null;
-    }
-
-    public static objc.Class cellClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSControl, OS.sel_cellClass);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSText currentEditor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentEditor);
-        return result !is null ? new NSText(result) : null;
-    }
-
-    public double doubleValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void drawCell (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawCell_1, aCell !is null ? aCell.id_ : null);
-    }
-
-    public void drawCellInside (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawCellInside_1, aCell !is null ? aCell.id_ : null);
-    }
-
-    public float floatValue ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue);
-    }
+public objc.SEL action() {
+    return cast(objc.SEL) OS.objc_msgSend(this.id, OS.sel_action);
+}
 
-    public NSFont font ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_font);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public id formatter ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_formatter);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool ignoresMultiClick ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_ignoresMultiClick) !is null;
-    }
+public NSCell cell() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_cell);
+    return result !is null ? new NSCell(result) : null;
+}
 
-    public int intValue ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_intValue);
-    }
-
-    public NSInteger integerValue ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_integerValue);
-    }
-
-    public bool isContinuous ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isContinuous) !is null;
-    }
-
-    public bool isEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
-    }
-
-    public void mouseDown (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseDown_1, theEvent !is null ? theEvent.id_ : null);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSControl, OS.sel_cellClass);
+}
 
-    public id objectValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValue);
-        return result !is null ? new id(result) : null;
-    }
+public NSText currentEditor() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_currentEditor);
+    return result !is null ? new NSText(result) : null;
+}
 
-    public void performClick (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performClick_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool refusesFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_refusesFirstResponder) !is null;
-    }
-
-    public void selectCell (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectCell_1, aCell !is null ? aCell.id_ : null);
-    }
+public double doubleValue() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue);
+}
 
-    public id selectedCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedCell);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger selectedTag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedTag);
-    }
+public NSFont font() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_font);
+    return result !is null ? new NSFont(result) : null;
+}
 
-    public bool sendAction (String theAction, id theTarget)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1, theAction.ptr, theTarget !is null ? theTarget.id_ : null) !is null;
-    }
-
-    public NSInteger sendActionOn (NSInteger mask)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_sendActionOn_1, mask);
-    }
-
-    public void setAction (String aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector.ptr);
-    }
+public bool sendAction(objc.SEL theAction, cocoa.id theTarget) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_sendAction_to_, theAction, theTarget !is null ? theTarget.id : null);
+}
 
-    public void setAlignment (objc.id mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlignment_1, mode);
-    }
-
-    public void setAttributedStringValue (NSAttributedString obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedStringValue_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setBaseWritingDirection (objc.id writingDirection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBaseWritingDirection_1, writingDirection);
-    }
-
-    public void setCell (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCell_1, aCell !is null ? aCell.id_ : null);
-    }
+public void setAction(objc.SEL aSelector) {
+    OS.objc_msgSend(this.id, OS.sel_setAction_, aSelector);
+}
 
-    public static void setCellClass (objc.Class factoryId)
-    {
-        OS.objc_msgSend(OS.class_NSControl, OS.sel_setCellClass_1, factoryId);
-    }
-
-    public void setContinuous (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContinuous_1, flag);
-    }
+public void setAlignment(NSTextAlignment mode) {
+    OS.objc_msgSend(this.id, OS.sel_setAlignment_, mode);
+}
 
-    public void setDoubleValue (double aDouble)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleValue_1, aDouble);
-    }
-
-    public void setEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, flag);
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSControl, OS.sel_setCellClass_, factoryId);
+}
 
-    public void setFloatValue (float aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFloatValue_1, aFloat);
-    }
-
-    public void setFloatingPointFormat (bool autoRange, NSUInteger leftDigits, NSUInteger rightDigits)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFloatingPointFormat_1left_1right_1, autoRange, leftDigits, rightDigits);
-    }
-
-    public void setFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public void setFormatter (NSFormatter newFormatter)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFormatter_1, newFormatter !is null ? newFormatter.id_ : null);
-    }
+public void setDoubleValue(double aDouble) {
+    OS.objc_msgSend(this.id, OS.sel_setDoubleValue_, aDouble);
+}
 
-    public void setIgnoresMultiClick (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIgnoresMultiClick_1, flag);
-    }
-
-    public void setIntValue (int anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntValue_1, anInt);
-    }
+public void setEnabled(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setEnabled_, flag);
+}
 
-    public void setIntegerValue (NSInteger anInteger)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntegerValue_1, anInteger);
-    }
-
-    public void setNeedsDisplay ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNeedsDisplay);
-    }
-
-    public void setObjectValue (id obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, obj !is null ? obj.id_ : null);
-    }
+public void setFont(NSFont fontObj) {
+    OS.objc_msgSend(this.id, OS.sel_setFont_, fontObj !is null ? fontObj.id : null);
+}
 
-    public void setRefusesFirstResponder (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRefusesFirstResponder_1, flag);
-    }
-
-    public void setStringValue (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStringValue_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTag (NSInteger anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTag_1, anInt);
-    }
-
-    public void setTarget (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, anObject !is null ? anObject.id_ : null);
-    }
+public void setFormatter(NSFormatter newFormatter) {
+    OS.objc_msgSend(this.id, OS.sel_setFormatter_, newFormatter !is null ? newFormatter.id : null);
+}
 
-    public void sizeToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
-    }
+public void setStringValue(NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_setStringValue_, aString !is null ? aString.id : null);
+}
 
-    public NSString stringValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger tag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag);
-    }
-
-    public void takeDoubleValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeDoubleValueFrom_1, sender !is null ? sender.id_ : null);
-    }
+public void setTarget(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setTarget_, anObject !is null ? anObject.id : null);
+}
 
-    public void takeFloatValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeFloatValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void takeIntValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeIntValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void takeIntegerValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeIntegerValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void takeObjectValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeObjectValueFrom_1, sender !is null ? sender.id_ : null);
-    }
+public void sizeToFit() {
+    OS.objc_msgSend(this.id, OS.sel_sizeToFit);
+}
 
-    public void takeStringValueFrom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeStringValueFrom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public id target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
+public NSString stringValue() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringValue);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public void updateCell (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateCell_1, aCell !is null ? aCell.id_ : null);
-    }
-
-    public void updateCellInside (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateCellInside_1, aCell !is null ? aCell.id_ : null);
-    }
-
-    public void validateEditing ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_validateEditing);
-    }
+public cocoa.id target() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_target);
+    return result !is null ? new id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSController : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool commitEditing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_commitEditing) !is null;
-    }
-
-    public void commitEditingWithDelegate (id delegatee, bool didCommitSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_commitEditingWithDelegate_1didCommitSelector_1contextInfo_1, delegatee !is null ? delegatee.id_ : null,
-                didCommitSelector, contextInfo);
-    }
-
-    public void discardEditing ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_discardEditing);
-    }
-
-    public bool isEditing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditing) !is null;
-    }
-
-    public void objectDidBeginEditing (id editor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_objectDidBeginEditing_1, editor !is null ? editor.id_ : null);
-    }
-
-    public void objectDidEndEditing (id editor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_objectDidEndEditing_1, editor !is null ? editor.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSCountedSet.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCountedSet;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSEnumerator;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMutableSet;
-import dwt.internal.cocoa.NSSet;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCountedSet : NSMutableSet
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObject_1, object !is null ? object.id_ : null);
-    }
-
-    public NSUInteger countForObject (id object)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_countForObject_1, object !is null ? object.id_ : null);
-    }
-
-    public NSCountedSet initWithSet (NSSet set)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSet_1, set !is null ? set.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSEnumerator objectEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public void removeObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObject_1, object !is null ? object.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSCreateCommand.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCreateCommand;
-
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCreateCommand : NSScriptCommand
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScriptClassDescription createClassDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_createClassDescription);
-        return result !is null ? new NSScriptClassDescription(result) : null;
-    }
-
-    public NSDictionary resolvedKeyDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resolvedKeyDictionary);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSCursor.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSCursor.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,212 +1,106 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSCursor;
 
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSEvent;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSImage;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSCursor : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSCursor : NSObject {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public static NSCursor IBeamCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_IBeamCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static NSCursor arrowCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_arrowCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static NSCursor closedHandCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_closedHandCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
 
-    public static NSCursor crosshairCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_crosshairCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
-
-    public static NSCursor currentCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_currentCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
+public static NSCursor IBeamCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_IBeamCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public static NSCursor disappearingItemCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_disappearingItemCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
+public static NSCursor arrowCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_arrowCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public static void hide ()
-    {
-        OS.objc_msgSend(OS.class_NSCursor, OS.sel_hide);
-    }
-
-    public NSPoint hotSpot ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_hotSpot);
-        return result;
-    }
+public static NSCursor crosshairCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_crosshairCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSCursor initWithImage_foregroundColorHint_backgroundColorHint_hotSpot_ (NSImage newImage, NSColor fg, NSColor bg, NSPoint hotSpot)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithImage_1foregroundColorHint_1backgroundColorHint_1hotSpot_1,
-                newImage !is null ? newImage.id_ : null, fg !is null ? fg.id_ : null, bg !is null ? bg.id_ : null, hotSpot);
-        return result !is null ? this : null;
-    }
+public NSCursor initWithImage(NSImage newImage, NSPoint aPoint) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithImage_hotSpot_, newImage !is null ? newImage.id : null, aPoint);
+    return result is this.id ? this : (result !is null ? new NSCursor(result) : null);
+}
 
-    public NSCursor initWithImage_hotSpot_ (NSImage newImage, NSPoint aPoint)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithImage_1hotSpot_1, newImage !is null ? newImage.id_ : null, aPoint);
-        return result !is null ? this : null;
-    }
-
-    public bool isSetOnMouseEntered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSetOnMouseEntered) !is null;
-    }
-
-    public bool isSetOnMouseExited ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSetOnMouseExited) !is null;
-    }
+public static NSCursor pointingHandCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_pointingHandCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public void mouseEntered (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseEntered_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void mouseExited (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseExited_1, theEvent !is null ? theEvent.id_ : null);
-    }
+public static NSCursor resizeDownCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeDownCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public static NSCursor openHandCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_openHandCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
-
-    public static NSCursor pointingHandCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_pointingHandCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
+public static NSCursor resizeLeftCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeLeftCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public void pop ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_pop);
-    }
-
-    public static void static_pop ()
-    {
-        OS.objc_msgSend(OS.class_NSCursor, OS.sel_pop);
-    }
+public static NSCursor resizeLeftRightCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeLeftRightCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public void push ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_push);
-    }
-
-    public static NSCursor resizeDownCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeDownCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
-
-    public static NSCursor resizeLeftCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeLeftCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
+public static NSCursor resizeRightCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeRightCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public static NSCursor resizeLeftRightCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeLeftRightCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
-
-    public static NSCursor resizeRightCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeRightCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
+public static NSCursor resizeUpCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeUpCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public static NSCursor resizeUpCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeUpCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
-
-    public static NSCursor resizeUpDownCursor ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeUpDownCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
+public static NSCursor resizeUpDownCursor() {
+    objc.id result = OS.objc_msgSend(OS.class_NSCursor, OS.sel_resizeUpDownCursor);
+    return result !is null ? new NSCursor(result) : null;
+}
 
-    public void set ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_set);
-    }
-
-    public static void setHiddenUntilMouseMoves (bool flag)
-    {
-        OS.objc_msgSend(OS.class_NSCursor, OS.sel_setHiddenUntilMouseMoves_1, flag);
-    }
+public void set() {
+    OS.objc_msgSend(this.id, OS.sel_set);
+}
 
-    public void setOnMouseEntered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOnMouseEntered_1, flag);
-    }
+public static void setHiddenUntilMouseMoves(bool flag) {
+    OS.objc_msgSend(OS.class_NSCursor, OS.sel_setHiddenUntilMouseMoves_, flag);
+}
 
-    public void setOnMouseExited (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOnMouseExited_1, flag);
-    }
-
-    public static void unhide ()
-    {
-        OS.objc_msgSend(OS.class_NSCursor, OS.sel_unhide);
-    }
+public void setOnMouseEntered(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setOnMouseEntered_, flag);
+}
 
 }
--- a/dwt/internal/cocoa/NSCustomImageRep.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSCustomImageRep;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSImageRep;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSCustomImageRep : NSImageRep
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public objc.SEL drawSelector ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_drawSelector);
-    }
-
-    public NSCustomImageRep initWithDrawSelector (char[] aMethod, id anObject)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDrawSelector_1delegate_1, aMethod, anObject !is null ? anObject.id_ : null);
-        return result !is null ? this : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,218 +1,58 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSData;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSData : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void* bytes ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_bytes);
-    }
-
-    public static id data ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_data);
-        return result !is null ? new id(result) : null;
-    }
+public class NSData : NSObject {
 
-    public static id dataWithBytes (/*const*/void* bytes, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithBytes_1length_1, bytes, length);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_dataWithBytesNoCopy_length_ (void* bytes, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithBytesNoCopy_1length_1, bytes, length);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_dataWithBytesNoCopy_length_freeWhenDone_ (void* bytes, NSUInteger length, bool b)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithBytesNoCopy_1length_1freeWhenDone_1, bytes, length, b);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_dataWithContentsOfFile_ (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithContentsOfFile_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public static id static_dataWithContentsOfFile_options_error_ (NSString path, NSUInteger readOptionsMask, objc.id** errorPtr)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithContentsOfFile_1options_1error_1, path !is null ? path.id_ : null,
-                readOptionsMask, errorPtr);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id dataWithContentsOfMappedFile (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithContentsOfMappedFile_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_dataWithContentsOfURL_ (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static id static_dataWithContentsOfURL_options_error_ (NSURL url, NSUInteger readOptionsMask, objc.id** errorPtr)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithContentsOfURL_1options_1error_1, url !is null ? url.id_ : null,
-                readOptionsMask, errorPtr);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id dataWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void getBytes_ (void* buffer)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getBytes_1, buffer);
-    }
-
-    public void getBytes_length_ (void* buffer, NSUInteger length)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getBytes_1length_1, buffer, length);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void getBytes_range_ (void* buffer, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getBytes_1range_1, buffer, range);
-    }
-
-    public NSData initWithBytes (void* bytes, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBytes_1length_1, bytes, length);
-        return result !is null ? this : null;
-    }
-
-    public NSData initWithBytesNoCopy_length_ (void* bytes, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBytesNoCopy_1length_1, bytes, length);
-        return result !is null ? this : null;
-    }
-
-    public NSData initWithBytesNoCopy_length_freeWhenDone_ (void* bytes, NSUInteger length, bool b)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBytesNoCopy_1length_1freeWhenDone_1, bytes, length, b);
-        return result !is null ? this : null;
-    }
+public /*const*/void* bytes() {
+    return cast(/*const*/void*) OS.objc_msgSend(this.id, OS.sel_bytes);
+}
 
-    public NSData initWithContentsOfFile_ (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1, path !is null ? path.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSData initWithContentsOfFile_options_error_ (NSString path, NSUInteger readOptionsMask, objc.id** errorPtr)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1options_1error_1, path !is null ? path.id_ : null, readOptionsMask,
-                errorPtr);
-        return result !is null ? this : null;
-    }
-
-    public NSData initWithContentsOfMappedFile (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfMappedFile_1, path !is null ? path.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSData initWithContentsOfURL_ (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? this : null;
-    }
+public static NSData dataWithBytes(/*const*/void*, NSUInteger length) {
+    objc.id result = OS.objc_msgSend(OS.class_NSData, OS.sel_dataWithBytes_length_, bytes, length);
+    return result !is null ? new NSData(result) : null;
+}
 
-    public NSData initWithContentsOfURL_options_error_ (NSURL url, NSUInteger readOptionsMask, objc.id** errorPtr)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1options_1error_1, url !is null ? url.id_ : null, readOptionsMask,
-                errorPtr);
-        return result !is null ? this : null;
-    }
-
-    public NSData initWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public bool isEqualToData (NSData other)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToData_1, other !is null ? other.id_ : null) !is null;
-    }
-
-    public NSUInteger length ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_length);
-    }
+public void getBytes(void* buffer) {
+    OS.objc_msgSend(this.id, OS.sel_getBytes_, buffer);
+}
 
-    public NSData subdataWithRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subdataWithRange_1, range);
-        return result is this.id_ ? this : (result !is null ? new NSData(result) : null);
-    }
-
-    public bool writeToFile_atomically_ (NSString path, bool useAuxiliaryFile)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1, path !is null ? path.id_ : null, useAuxiliaryFile) !is null;
-    }
+public void getBytes(void* buffer, NSUInteger length) {
+    OS.objc_msgSend(this.id, OS.sel_getBytes_length_, buffer, length);
+}
 
-    public bool writeToFile_options_error_ (NSString path, NSUInteger writeOptionsMask, objc.id** errorPtr)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1options_1error_1, path !is null ? path.id_ : null, writeOptionsMask, errorPtr) !is null;
-    }
-
-    public bool writeToURL_atomically_ (NSURL url, bool atomically)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1atomically_1, url !is null ? url.id_ : null, atomically) !is null;
-    }
-
-    public bool writeToURL_options_error_ (NSURL url, NSUInteger writeOptionsMask, objc.id** errorPtr)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1options_1error_1, url !is null ? url.id_ : null, writeOptionsMask, errorPtr) !is null;
-    }
+public NSUInteger length() {
+    return OS.objc_msgSend(this.id, OS.sel_length);
+}
 
 }
--- a/dwt/internal/cocoa/NSDate.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSDate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,19 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSDate;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSCalendarDate;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
@@ -23,175 +24,33 @@
 
 alias double NSTimeInterval;
 
-public class NSDate : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id addTimeInterval (double seconds)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addTimeInterval_1, seconds);
-        return result !is null ? new id(result) : null;
-    }
+public class NSDate : NSObject {
 
-    public objc.id compare (NSDate other)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_compare_1, other !is null ? other.id_ : null);
-    }
-
-    public static NSDate date ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_date);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSCalendarDate dateWithCalendarFormat (NSString format, NSTimeZone aTimeZone)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateWithCalendarFormat_1timeZone_1, format !is null ? format.id_ : null,
-                aTimeZone !is null ? aTimeZone.id_ : null);
-        return result !is null ? new NSCalendarDate(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public static id static_dateWithNaturalLanguageString_ (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithNaturalLanguageString_1, string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_dateWithNaturalLanguageString_locale_ (NSString string, id locale)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithNaturalLanguageString_1locale_1, string !is null ? string.id_ : null,
-                locale !is null ? locale.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id dateWithString (NSString aString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithString_1, aString !is null ? aString.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static id dateWithTimeIntervalSince1970 (double secs)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithTimeIntervalSince1970_1, secs);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSDate dateWithTimeIntervalSinceNow (double secs)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithTimeIntervalSinceNow_1, secs);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public static id dateWithTimeIntervalSinceReferenceDate (double secs)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithTimeIntervalSinceReferenceDate_1, secs);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSString descriptionWithCalendarFormat (NSString format, NSTimeZone aTimeZone, id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithCalendarFormat_1timeZone_1locale_1, format !is null ? format.id_ : null,
-                aTimeZone !is null ? aTimeZone.id_ : null, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString descriptionWithLocale (id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSDate distantFuture ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_distantFuture);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public static NSDate distantPast ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_distantPast);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSDate earlierDate (NSDate anotherDate)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_earlierDate_1, anotherDate !is null ? anotherDate.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDate(result) : null);
-    }
-
-    public NSDate initWithString (NSString description)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, description !is null ? description.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSDate initWithTimeInterval (double secsToBeAdded, NSDate anotherDate)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTimeInterval_1sinceDate_1, secsToBeAdded,
-                anotherDate !is null ? anotherDate.id_ : null);
-        return result !is null ? this : null;
-    }
+public NSCalendarDate dateWithCalendarFormat(NSString format, NSTimeZone aTimeZone) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_dateWithCalendarFormat_timeZone_, format !is null ? format.id : null, aTimeZone !is null ? aTimeZone.id : null);
+    return result !is null ? new NSCalendarDate(result) : null;
+}
 
-    public NSDate initWithTimeIntervalSinceNow (double secsToBeAddedToNow)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTimeIntervalSinceNow_1, secsToBeAddedToNow);
-        return result !is null ? this : null;
-    }
-
-    public NSDate initWithTimeIntervalSinceReferenceDate (double secsToBeAdded)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTimeIntervalSinceReferenceDate_1, secsToBeAdded);
-        return result !is null ? this : null;
-    }
-
-    public bool isEqualToDate (NSDate otherDate)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToDate_1, otherDate !is null ? otherDate.id_ : null) !is null;
-    }
-
-    public NSDate laterDate (NSDate anotherDate)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_laterDate_1, anotherDate !is null ? anotherDate.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDate(result) : null);
-    }
+public static NSDate dateWithTimeIntervalSinceNow(double secs) {
+    objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_dateWithTimeIntervalSinceNow_, secs);
+    return result !is null ? new NSDate(result) : null;
+}
 
-    public double timeIntervalSince1970 ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_timeIntervalSince1970);
-    }
-
-    public double timeIntervalSinceDate (NSDate anotherDate)
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_timeIntervalSinceDate_1, anotherDate !is null ? anotherDate.id_ : null);
-    }
-
-    public double timeIntervalSinceNow ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_timeIntervalSinceNow);
-    }
-
-    public static double static_timeIntervalSinceReferenceDate ()
-    {
-        return OS.objc_msgSend_fpret(OS.class_NSDate, OS.sel_timeIntervalSinceReferenceDate);
-    }
-
-    public double timeIntervalSinceReferenceDate ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_timeIntervalSinceReferenceDate);
-    }
+public static NSDate distantFuture() {
+    objc.id result = OS.objc_msgSend(OS.class_NSDate, OS.sel_distantFuture);
+    return result !is null ? new NSDate(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSDateComponents.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDateComponents;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDateComponents : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSInteger day ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_day);
-    }
-
-    public NSInteger era ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_era);
-    }
-
-    public NSInteger hour ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_hour);
-    }
-
-    public NSInteger minute ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_minute);
-    }
-
-    public NSInteger month ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_month);
-    }
-
-    public NSInteger second ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_second);
-    }
-
-    public void setDay (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDay_1, v);
-    }
-
-    public void setEra (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEra_1, v);
-    }
-
-    public void setHour (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHour_1, v);
-    }
-
-    public void setMinute (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinute_1, v);
-    }
-
-    public void setMonth (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMonth_1, v);
-    }
-
-    public void setSecond (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSecond_1, v);
-    }
-
-    public void setWeek (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWeek_1, v);
-    }
-
-    public void setWeekday (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWeekday_1, v);
-    }
-
-    public void setWeekdayOrdinal (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWeekdayOrdinal_1, v);
-    }
-
-    public void setYear (NSInteger v)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setYear_1, v);
-    }
-
-    public NSInteger week ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_week);
-    }
-
-    public NSInteger weekday ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_weekday);
-    }
-
-    public NSInteger weekdayOrdinal ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_weekdayOrdinal);
-    }
-
-    public NSInteger year ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_year);
-    }
-
-}
--- a/dwt/internal/cocoa/NSDateFormatter.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,424 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDateFormatter;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCalendar;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSFormatter;
-import dwt.internal.cocoa.NSLocale;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTimeZone;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDateFormatter : NSFormatter
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString AMSymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_AMSymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString PMSymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_PMSymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool allowsNaturalLanguage ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsNaturalLanguage) !is null;
-    }
-
-    public NSCalendar calendar ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_calendar);
-        return result !is null ? new NSCalendar(result) : null;
-    }
-
-    public NSString dateFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateFormat);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDate dateFromString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateFromString_1, string !is null ? string.id_ : null);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public objc.id dateStyle ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_dateStyle);
-    }
-
-    public NSDate defaultDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaultDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public static objc.id defaultFormatterBehavior ()
-    {
-        return OS.objc_msgSend(OS.class_NSDateFormatter, OS.sel_defaultFormatterBehavior);
-    }
-
-    public NSArray eraSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_eraSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public objc.id formatterBehavior ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_formatterBehavior);
-    }
-
-    public bool generatesCalendarDates ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_generatesCalendarDates) !is null;
-    }
-
-    public bool getObjectValue (objc.id* obj, NSString string, NSRange* rangep, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getObjectValue_1forString_1range_1error_1, obj, string !is null ? string.id_ : null, rangep, error) !is null;
-    }
-
-    public NSDate gregorianStartDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_gregorianStartDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public id initWithDateFormat (NSString format, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDateFormat_1allowNaturalLanguage_1, format !is null ? format.id_ : null, flag);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isLenient ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLenient) !is null;
-    }
-
-    public NSLocale locale ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_locale);
-        return result !is null ? new NSLocale(result) : null;
-    }
-
-    public NSArray longEraSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_longEraSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray monthSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_monthSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray quarterSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_quarterSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setAMSymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAMSymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setCalendar (NSCalendar calendar)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCalendar_1, calendar !is null ? calendar.id_ : null);
-    }
-
-    public void setDateFormat (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDateFormat_1, string !is null ? string.id_ : null);
-    }
-
-    public void setDateStyle (objc.id style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDateStyle_1, style);
-    }
-
-    public void setDefaultDate (NSDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDefaultDate_1, date !is null ? date.id_ : null);
-    }
-
-    public static void setDefaultFormatterBehavior (objc.id behavior)
-    {
-        OS.objc_msgSend(OS.class_NSDateFormatter, OS.sel_setDefaultFormatterBehavior_1, behavior);
-    }
-
-    public void setEraSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEraSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setFormatterBehavior (objc.id behavior)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFormatterBehavior_1, behavior);
-    }
-
-    public void setGeneratesCalendarDates (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGeneratesCalendarDates_1, b);
-    }
-
-    public void setGregorianStartDate (NSDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGregorianStartDate_1, date !is null ? date.id_ : null);
-    }
-
-    public void setLenient (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLenient_1, b);
-    }
-
-    public void setLocale (NSLocale locale)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocale_1, locale !is null ? locale.id_ : null);
-    }
-
-    public void setLongEraSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLongEraSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setMonthSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMonthSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setPMSymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPMSymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setQuarterSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setQuarterSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setShortMonthSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShortMonthSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setShortQuarterSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShortQuarterSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setShortStandaloneMonthSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShortStandaloneMonthSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setShortStandaloneQuarterSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShortStandaloneQuarterSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setShortStandaloneWeekdaySymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShortStandaloneWeekdaySymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setShortWeekdaySymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShortWeekdaySymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setStandaloneMonthSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStandaloneMonthSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setStandaloneQuarterSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStandaloneQuarterSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setStandaloneWeekdaySymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStandaloneWeekdaySymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setTimeStyle (objc.id style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeStyle_1, style);
-    }
-
-    public void setTimeZone (NSTimeZone tz)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeZone_1, tz !is null ? tz.id_ : null);
-    }
-
-    public void setTwoDigitStartDate (NSDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTwoDigitStartDate_1, date !is null ? date.id_ : null);
-    }
-
-    public void setVeryShortMonthSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVeryShortMonthSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setVeryShortStandaloneMonthSymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVeryShortStandaloneMonthSymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setVeryShortStandaloneWeekdaySymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVeryShortStandaloneWeekdaySymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setVeryShortWeekdaySymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVeryShortWeekdaySymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public void setWeekdaySymbols (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWeekdaySymbols_1, array !is null ? array.id_ : null);
-    }
-
-    public NSArray shortMonthSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shortMonthSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray shortQuarterSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shortQuarterSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray shortStandaloneMonthSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shortStandaloneMonthSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray shortStandaloneQuarterSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shortStandaloneQuarterSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray shortStandaloneWeekdaySymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shortStandaloneWeekdaySymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray shortWeekdaySymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shortWeekdaySymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray standaloneMonthSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_standaloneMonthSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray standaloneQuarterSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_standaloneQuarterSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray standaloneWeekdaySymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_standaloneWeekdaySymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString stringFromDate (NSDate date)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringFromDate_1, date !is null ? date.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public objc.id timeStyle ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_timeStyle);
-    }
-
-    public NSTimeZone timeZone ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_timeZone);
-        return result !is null ? new NSTimeZone(result) : null;
-    }
-
-    public NSDate twoDigitStartDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_twoDigitStartDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSArray veryShortMonthSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_veryShortMonthSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray veryShortStandaloneMonthSymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_veryShortStandaloneMonthSymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray veryShortStandaloneWeekdaySymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_veryShortStandaloneWeekdaySymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray veryShortWeekdaySymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_veryShortWeekdaySymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray weekdaySymbols ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_weekdaySymbols);
-        return result !is null ? new NSArray(result) : null;
-    }
-}
--- a/dwt/internal/cocoa/NSDatePicker.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSDatePicker.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,208 +1,93 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSDatePicker;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSCalendar;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSControl;
 import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSLocale;
-import dwt.internal.cocoa.NSTimeZone;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSDatePicker : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public class NSDatePicker : NSControl {
 
-    public NSCalendar calendar ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_calendar);
-        return result !is null ? new NSCalendar(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public objc.id datePickerElements ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_datePickerElements);
-    }
-
-    public objc.id datePickerMode ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_datePickerMode);
-    }
-
-    public objc.id datePickerStyle ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_datePickerStyle);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSDate dateValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateValue);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
-
-    public bool isBezeled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBezeled) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool isBordered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBordered) !is null;
-    }
-
-    public NSLocale locale ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_locale);
-        return result !is null ? new NSLocale(result) : null;
-    }
+public NSDate dateValue() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_dateValue);
+    return result !is null ? new NSDate(result) : null;
+}
 
-    public NSDate maxDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_maxDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSDate minDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_minDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
+public void setBackgroundColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, color !is null ? color.id : null);
+}
 
-    public void setBezeled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag);
-    }
-
-    public void setBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag);
-    }
-
-    public void setCalendar (NSCalendar newCalendar)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCalendar_1, newCalendar !is null ? newCalendar.id_ : null);
-    }
-
-    public void setDatePickerElements (objc.id elementFlags)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDatePickerElements_1, elementFlags);
-    }
+public void setDatePickerElements(NSDatePickerElementFlags elementFlags) {
+    OS.objc_msgSend(this.id, OS.sel_setDatePickerElements_, elementFlags);
+}
 
-    public void setDatePickerMode (objc.id newMode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDatePickerMode_1, newMode);
-    }
-
-    public void setDatePickerStyle (objc.id newStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDatePickerStyle_1, newStyle);
-    }
+public void setDatePickerStyle(NSDatePickerStyle newStyle) {
+    OS.objc_msgSend(this.id, OS.sel_setDatePickerStyle_, newStyle);
+}
 
-    public void setDateValue (NSDate newStartDate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDateValue_1, newStartDate !is null ? newStartDate.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
+public void setDateValue(NSDate newStartDate) {
+    OS.objc_msgSend(this.id, OS.sel_setDateValue_, newStartDate !is null ? newStartDate.id : null);
+}
 
-    public void setLocale (NSLocale newLocale)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocale_1, newLocale !is null ? newLocale.id_ : null);
-    }
-
-    public void setMaxDate (NSDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxDate_1, date !is null ? date.id_ : null);
-    }
+public void setDrawsBackground(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_, flag);
+}
 
-    public void setMinDate (NSDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinDate_1, date !is null ? date.id_ : null);
-    }
-
-    public void setTextColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextColor_1, color !is null ? color.id_ : null);
-    }
+public void setTextColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setTextColor_, color !is null ? color.id : null);
+}
 
-    public void setTimeInterval (double newTimeInterval)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeInterval_1, newTimeInterval);
-    }
-
-    public void setTimeZone (NSTimeZone newTimeZone)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeZone_1, newTimeZone !is null ? newTimeZone.id_ : null);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSDatePicker, OS.sel_cellClass);
+}
 
-    public NSColor textColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public double timeInterval ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_timeInterval);
-    }
-
-    public NSTimeZone timeZone ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_timeZone);
-        return result !is null ? new NSTimeZone(result) : null;
-    }
+public static void setCellClass(int /*long*/ factoryId) {
+    OS.objc_msgSend(OS.class_NSDatePicker, OS.sel_setCellClass_, factoryId);
+}
 
 }
+
+enum NSDatePickerElementFlags : NSUInteger
+{
+    NSHourMinuteDatePickerElementFlag = 0x000c,
+    NSHourMinuteSecondDatePickerElementFlag = 0x000e,
+    NSTimeZoneDatePickerElementFlag = 0x0010,
+    NSYearMonthDatePickerElementFlag = 0x00c0,
+    NSYearMonthDayDatePickerElementFlag = 0x00e0,
+    NSEraDatePickerElementFlag = 0x0100,
+}
+
+enum NSDatePickerStyle : NSUInteger
+{
+    NSTextFieldAndStepperDatePickerStyle = 0,
+    NSClockAndCalendarDatePickerStyle = 1,
+    NSTextFieldDatePickerStyle = 2
+}
\ No newline at end of file
--- a/dwt/internal/cocoa/NSDatePickerCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDatePickerCell;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.NSCalendar;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSLocale;
-import dwt.internal.cocoa.NSTimeZone;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDatePickerCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSCalendar calendar ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_calendar);
-        return result !is null ? new NSCalendar(result) : null;
-    }
-
-    public objc.id datePickerElements ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_datePickerElements);
-    }
-
-    public objc.id datePickerMode ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_datePickerMode);
-    }
-
-    public objc.id datePickerStyle ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_datePickerStyle);
-    }
-
-    public NSDate dateValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateValue);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
-
-    public NSLocale locale ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_locale);
-        return result !is null ? new NSLocale(result) : null;
-    }
-
-    public NSDate maxDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_maxDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSDate minDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_minDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setCalendar (NSCalendar newCalendar)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCalendar_1, newCalendar !is null ? newCalendar.id_ : null);
-    }
-
-    public void setDatePickerElements (objc.id elementFlags)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDatePickerElements_1, elementFlags);
-    }
-
-    public void setDatePickerMode (objc.id newMode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDatePickerMode_1, newMode);
-    }
-
-    public void setDatePickerStyle (objc.id newStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDatePickerStyle_1, newStyle);
-    }
-
-    public void setDateValue (NSDate newStartDate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDateValue_1, newStartDate !is null ? newStartDate.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
-
-    public void setLocale (NSLocale newLocale)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocale_1, newLocale !is null ? newLocale.id_ : null);
-    }
-
-    public void setMaxDate (NSDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxDate_1, date !is null ? date.id_ : null);
-    }
-
-    public void setMinDate (NSDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinDate_1, date !is null ? date.id_ : null);
-    }
-
-    public void setTextColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setTimeInterval (double newTimeInterval)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeInterval_1, newTimeInterval);
-    }
-
-    public void setTimeZone (NSTimeZone newTimeZone)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeZone_1, newTimeZone !is null ? newTimeZone.id_ : null);
-    }
-
-    public NSColor textColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public double timeInterval ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_timeInterval);
-    }
-
-    public NSTimeZone timeZone ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_timeZone);
-        return result !is null ? new NSTimeZone(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSDecimal.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDecimal;
-
-import dwt.internal.cocoa.OS;
-import dwt.internal.cocoa.NSInteger;
-
-struct NSDecimal
-{
-    uint _exponent;
-    uint _length;
-    uint _isNegative;
-    uint _isCompact;
-    uint _reserved;
-    ushort[/*OS.NSDecimalMaxSize*/8] _mantissa;
-}
-
-enum NSCalculationError : NSUInteger
-{
-    NSCalculationNoError = 0,
-    NSCalculationLossOfPrecision, // Result lost precision
-    NSCalculationUnderflow, // Result became 0
-    NSCalculationOverflow, // Result exceeds possible representation
-    NSCalculationDivideByZero
-}
-
-alias NSCalculationError.NSCalculationNoError NSCalculationNoError;
-alias NSCalculationError.NSCalculationLossOfPrecision NSCalculationLossOfPrecision;
-alias NSCalculationError.NSCalculationUnderflow NSCalculationUnderflow;
-alias NSCalculationError.NSCalculationOverflow NSCalculationOverflow;
-alias NSCalculationError.NSCalculationDivideByZero NSCalculationDivideByZero;
-
-enum
-{
-    NSRoundPlain, // Round up on a tie
-    NSRoundDown, // Always down == truncate
-    NSRoundUp, // Always up
-    NSRoundBankers // on a tie round so last digit is even
-}
-
-alias NSUInteger NSRoundingMode;
-
-/*alias NSRoundingMode.NSRoundPlain NSRoundPlain;
-alias NSRoundingMode.NSRoundDown NSRoundDown;
-alias NSRoundingMode.NSRoundUp NSRoundUp;
-alias NSRoundingMode.NSRoundBankers NSRoundBankers;*/
--- a/dwt/internal/cocoa/NSDecimalNumber.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDecimalNumber;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSComparisonResult;
-import dwt.internal.cocoa.NSDecimal;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSNumber;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDecimalNumber : NSNumber
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSComparisonResult compare (NSNumber decimalNumber)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1, decimalNumber !is null ? decimalNumber.id_ : null);
-    }
-
-    public NSDecimalNumber decimalNumberByAdding_ (NSDecimalNumber decimalNumber)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByAdding_1, decimalNumber !is null ? decimalNumber.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByAdding_withBehavior_ (NSDecimalNumber decimalNumber, id behavior)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByAdding_1withBehavior_1, decimalNumber !is null ? decimalNumber.id_ : null,
-                behavior !is null ? behavior.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByDividingBy_ (NSDecimalNumber decimalNumber)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByDividingBy_1, decimalNumber !is null ? decimalNumber.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByDividingBy_withBehavior_ (NSDecimalNumber decimalNumber, id behavior)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByDividingBy_1withBehavior_1, decimalNumber !is null ? decimalNumber.id_ : null,
-                behavior !is null ? behavior.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByMultiplyingBy_ (NSDecimalNumber decimalNumber)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByMultiplyingBy_1, decimalNumber !is null ? decimalNumber.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByMultiplyingBy_withBehavior_ (NSDecimalNumber decimalNumber, id behavior)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByMultiplyingBy_1withBehavior_1,
-                decimalNumber !is null ? decimalNumber.id_ : null, behavior !is null ? behavior.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByMultiplyingByPowerOf10_ (short power)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByMultiplyingByPowerOf10_1, power);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByMultiplyingByPowerOf10_withBehavior_ (short power, id behavior)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByMultiplyingByPowerOf10_1withBehavior_1, power,
-                behavior !is null ? behavior.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByRaisingToPower_ (NSUInteger power)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByRaisingToPower_1, power);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByRaisingToPower_withBehavior_ (uint power, id behavior)
-    {
-        objc.id
-                result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByRaisingToPower_1withBehavior_1, power, behavior !is null ? behavior.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberByRoundingAccordingToBehavior (id behavior)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberByRoundingAccordingToBehavior_1, behavior !is null ? behavior.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberBySubtracting_ (NSDecimalNumber decimalNumber)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberBySubtracting_1, decimalNumber !is null ? decimalNumber.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public NSDecimalNumber decimalNumberBySubtracting_withBehavior_ (NSDecimalNumber decimalNumber, id behavior)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalNumberBySubtracting_1withBehavior_1,
-                decimalNumber !is null ? decimalNumber.id_ : null, behavior !is null ? behavior.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSDecimalNumber(result) : null);
-    }
-
-    public static NSDecimalNumber decimalNumberWithDecimal (NSDecimal dcm)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_decimalNumberWithDecimal_1, dcm);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public static NSDecimalNumber decimalNumberWithMantissa (long mantissa, short exponent, bool flag)
-    {
-        objc.id
-                result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_decimalNumberWithMantissa_1exponent_1isNegative_1, mantissa, exponent, flag);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public static NSDecimalNumber static_decimalNumberWithString_ (NSString numberValue)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_decimalNumberWithString_1, numberValue !is null ? numberValue.id_ : null);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public static NSDecimalNumber static_decimalNumberWithString_locale_ (NSString numberValue, id locale)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_decimalNumberWithString_1locale_1,
-                numberValue !is null ? numberValue.id_ : null, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public NSDecimal decimalValue ()
-    {
-        NSDecimal result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decimalValue);
-        return result;
-    }
-
-    public static id defaultBehavior ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_defaultBehavior);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString descriptionWithLocale (id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public double doubleValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
-    }
-
-    public id initWithDecimal (NSDecimal dcm)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDecimal_1, dcm);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithMantissa (ulong mantissa, short exponent, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithMantissa_1exponent_1isNegative_1, mantissa, exponent, flag);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithString_ (NSString numberValue)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, numberValue !is null ? numberValue.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithString_locale_ (NSString numberValue, id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1locale_1, numberValue !is null ? numberValue.id_ : null,
-                locale !is null ? locale.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSDecimalNumber maximumDecimalNumber ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_maximumDecimalNumber);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public static NSDecimalNumber minimumDecimalNumber ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_minimumDecimalNumber);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public static NSDecimalNumber notANumber ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_notANumber);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public /*const char* */byte* objCType ()
-    {
-        return cast(/*const char* */byte*) OS.objc_msgSend(this.id_, OS.sel_objCType);
-    }
-
-    public static NSDecimalNumber one ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_one);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public static void setDefaultBehavior (id behavior)
-    {
-        OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_setDefaultBehavior_1, behavior !is null ? behavior.id_ : null);
-    }
-
-    public static NSDecimalNumber zero ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumber, OS.sel_zero);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSDecimalNumberHandler.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDecimalNumberHandler;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDecimalNumberHandler : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static id decimalNumberHandlerWithRoundingMode (objc.id roundingMode, short scale, bool exact, bool overflow, bool underflow,
-            bool divideByZero)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumberHandler,
-                OS.sel_decimalNumberHandlerWithRoundingMode_1scale_1raiseOnExactness_1raiseOnOverflow_1raiseOnUnderflow_1raiseOnDivideByZero_1,
-                roundingMode, scale, exact, overflow, underflow, divideByZero);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id defaultDecimalNumberHandler ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDecimalNumberHandler, OS.sel_defaultDecimalNumberHandler);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithRoundingMode (objc.id roundingMode, short scale, bool exact, bool overflow, bool underflow, bool divideByZero)
-    {
-        objc.id result = OS.objc_msgSend(this.id_,
-                OS.sel_initWithRoundingMode_1scale_1raiseOnExactness_1raiseOnOverflow_1raiseOnUnderflow_1raiseOnDivideByZero_1, roundingMode, scale,
-                exact, overflow, underflow, divideByZero);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSDeleteCommand.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDeleteCommand;
-
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDeleteCommand : NSScriptCommand
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScriptObjectSpecifier keySpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keySpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public void setReceiversSpecifier (NSScriptObjectSpecifier receiversRef)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReceiversSpecifier_1, receiversRef !is null ? receiversRef.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSDictionary.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSDictionary.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,330 +1,69 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSDictionary;
 
-
-import dwt.internal.c.carboncore.MacTypes : OSType;
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDate;
 import dwt.internal.cocoa.NSEnumerator;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-
-public class NSDictionary : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray allKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray allKeysForObject (id anObject)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allKeysForObject_1, anObject !is null ? anObject.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray allValues ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allValues);
-        return result !is null ? new NSArray(result) : null;
-    }
+public class NSDictionary : NSObject {
 
-    public NSUInteger count ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString descriptionInStringsFileFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionInStringsFileFormat);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString descriptionWithLocale_ (id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString descriptionWithLocale_indent_ (id locale, NSUInteger level)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1indent_1, locale !is null ? locale.id_ : null, level);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static id dictionary ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionary);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id dictionaryWithContentsOfFile (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithContentsOfFile_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public static id dictionaryWithContentsOfURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id dictionaryWithDictionary (NSDictionary dict)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithDictionary_1, dict !is null ? dict.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id dictionaryWithObject (id object, id key)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithObject_1forKey_1, object !is null ? object.id_ : null,
-                key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_dictionaryWithObjects_forKeys_ (NSArray objects, NSArray keys)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithObjects_1forKeys_1, objects !is null ? objects.id_ : null,
-                keys !is null ? keys.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_dictionaryWithObjects_forKeys_count_ (objc.id* objects, objc.id* keys, NSUInteger cnt)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithObjects_1forKeys_1count_1, objects, keys, cnt);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static id dictionaryWithObjectsAndKeys (id dictionaryWithObjectsAndKeys)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithObjectsAndKeys_1,
-                dictionaryWithObjectsAndKeys !is null ? dictionaryWithObjectsAndKeys.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDate fileCreationDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileCreationDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public bool fileExtensionHidden ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileExtensionHidden) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSNumber fileGroupOwnerAccountID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileGroupOwnerAccountID);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public NSString fileGroupOwnerAccountName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileGroupOwnerAccountName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public OSType fileHFSCreatorCode ()
-    {
-        return cast(OSType) OS.objc_msgSend(this.id_, OS.sel_fileHFSCreatorCode);
-    }
-
-    public OSType fileHFSTypeCode ()
-    {
-        return cast(OSType) OS.objc_msgSend(this.id_, OS.sel_fileHFSTypeCode);
-    }
-
-    public bool fileIsAppendOnly ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileIsAppendOnly) !is null;
-    }
+public NSArray allKeys() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_allKeys);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public bool fileIsImmutable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileIsImmutable) !is null;
-    }
-
-    public NSDate fileModificationDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileModificationDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSNumber fileOwnerAccountID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileOwnerAccountID);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public NSString fileOwnerAccountName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileOwnerAccountName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger filePosixPermissions ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_filePosixPermissions);
-    }
-
-    public ulong fileSize ()
-    {
-        return cast(ulong) OS.objc_msgSend(this.id_, OS.sel_fileSize);
-    }
+public NSUInteger count() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_count);
+}
 
-    public NSUInteger fileSystemFileNumber ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_fileSystemFileNumber);
-    }
-
-    public NSInteger fileSystemNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_fileSystemNumber);
-    }
-
-    public NSString fileType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void getObjects (objc.id* objects, objc.id* keys)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getObjects_1andKeys_1, objects, keys);
-    }
-
-    public id initWithContentsOfFile (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithContentsOfURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithDictionary_ (NSDictionary otherDictionary)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDictionary_1, otherDictionary !is null ? otherDictionary.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public static NSDictionary dictionaryWithObject(cocoa.id object, cocoa.id key) {
+    objc.id result = OS.objc_msgSend(OS.class_NSDictionary, OS.sel_dictionaryWithObject_forKey_, object !is null ? object.id : null, key !is null ? key.id : null);
+    return result !is null ? new NSDictionary(result) : null;
+}
 
-    public id initWithDictionary_copyItems_ (NSDictionary otherDictionary, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDictionary_1copyItems_1, otherDictionary !is null ? otherDictionary.id_ : null, flag);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithObjects_forKeys_ (NSArray objects, NSArray keys)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1forKeys_1, objects !is null ? objects.id_ : null,
-                keys !is null ? keys.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithObjects_forKeys_count_ (objc.id* objects, objc.id* keys, NSUInteger cnt)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1forKeys_1count_1, objects, keys, cnt);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithObjectsAndKeys (id initWithObjectsAndKeys)
-    {
-        objc.id
-                result = OS.objc_msgSend(this.id_, OS.sel_initWithObjectsAndKeys_1, initWithObjectsAndKeys !is null ? initWithObjectsAndKeys.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isEqualToDictionary (NSDictionary otherDictionary)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToDictionary_1, otherDictionary !is null ? otherDictionary.id_ : null) !is null;
-    }
-
-    public NSEnumerator keyEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
+public NSEnumerator objectEnumerator() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator);
+    return result !is null ? new NSEnumerator(result) : null;
+}
 
-    public NSArray keysSortedByValueUsingSelector (objc.SEL comparator)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keysSortedByValueUsingSelector_1, comparator);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSEnumerator objectEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public id objectForKey (id aKey)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectForKey_1, aKey !is null ? aKey.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public cocoa.id objectForKey(cocoa.id aKey) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_objectForKey_, aKey !is null ? aKey.id : null);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
-    public NSArray objectsForKeys (NSArray keys, id marker)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectsForKeys_1notFoundMarker_1, keys !is null ? keys.id_ : null,
-                marker !is null ? marker.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id valueForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool writeToFile (NSString path, bool useAuxiliaryFile)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1, path !is null ? path.id_ : null, useAuxiliaryFile) !is null;
-    }
-
-    public bool writeToURL (NSURL url, bool atomically)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1atomically_1, url !is null ? url.id_ : null, atomically) !is null;
-    }
+public cocoa.id valueForKey(NSString key) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_valueForKey_, key !is null ? key.id : null);
+    return result !is null ? new id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSDictionaryController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDictionaryController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSArrayController;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDictionaryController : NSArrayController
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray excludedKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_excludedKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray includedKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_includedKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString initialKey ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initialKey);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initialValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initialValue);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary localizedKeyDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedKeyDictionary);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString localizedKeyTable ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedKeyTable);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id newObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_newObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setExcludedKeys (NSArray keys)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setExcludedKeys_1, keys !is null ? keys.id_ : null);
-    }
-
-    public void setIncludedKeys (NSArray keys)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIncludedKeys_1, keys !is null ? keys.id_ : null);
-    }
-
-    public void setInitialKey (NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInitialKey_1, key !is null ? key.id_ : null);
-    }
-
-    public void setInitialValue (id value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInitialValue_1, value !is null ? value.id_ : null);
-    }
-
-    public void setLocalizedKeyDictionary (NSDictionary dictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocalizedKeyDictionary_1, dictionary !is null ? dictionary.id_ : null);
-    }
-
-    public void setLocalizedKeyTable (NSString stringsFileName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocalizedKeyTable_1, stringsFileName !is null ? stringsFileName.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSDirectoryEnumerator.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSDirectoryEnumerator.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,49 +1,40 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSDirectoryEnumerator;
 
-import dwt.internal.cocoa.NSDictionary;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSEnumerator;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSDirectoryEnumerator : NSEnumerator
-{
-    public this ()
-    {
-        super();
-    }
+public class NSDirectoryEnumerator : NSEnumerator {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSDictionary directoryAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_directoryAttributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSDictionary fileAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileAttributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public void skipDescendents() {
+    OS.objc_msgSend(this.id, OS.sel_skipDescendents);
+}
 
-    public void skipDescendents ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_skipDescendents);
-    }
 }
--- a/dwt/internal/cocoa/NSDistantObject.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDistantObject;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSConnection;
-import dwt.internal.cocoa.NSProxy;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDistantObject : NSProxy
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSConnection connectionForProxy ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_connectionForProxy);
-        return result !is null ? new NSConnection(result) : null;
-    }
-
-    public id initWithLocal (id target, NSConnection connection)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLocal_1connection_1, target !is null ? target.id_ : null,
-                connection !is null ? connection.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithTarget (id target, NSConnection connection)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTarget_1connection_1, target !is null ? target.id_ : null,
-                connection !is null ? connection.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSDistantObject proxyWithLocal (id target, NSConnection connection)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDistantObject, OS.sel_proxyWithLocal_1connection_1, target !is null ? target.id_ : null,
-                connection !is null ? connection.id_ : null);
-        return result !is null ? new NSDistantObject(result) : null;
-    }
-
-    public static NSDistantObject proxyWithTarget (id target, NSConnection connection)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDistantObject, OS.sel_proxyWithTarget_1connection_1, target !is null ? target.id_ : null,
-                connection !is null ? connection.id_ : null);
-        return result !is null ? new NSDistantObject(result) : null;
-    }
-
-//PUBLIC VOID SETPROTOCOLFORPROXY(PROTOCOL PROTO) {
-//  OS.OBJC_MSGSEND(THIS.ID, OS.SEL_SETPROTOCOLFORPROXY_1, PROTO !is NULL ? PROTO.ID : null);
-//}
-
-}
--- a/dwt/internal/cocoa/NSDistantObjectRequest.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDistantObjectRequest;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSConnection;
-import dwt.internal.cocoa.NSException;
-import dwt.internal.cocoa.NSInvocation;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDistantObjectRequest : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSConnection connection ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_connection);
-        return result !is null ? new NSConnection(result) : null;
-    }
-
-    public id conversation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_conversation);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInvocation invocation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_invocation);
-        return result !is null ? new NSInvocation(result) : null;
-    }
-
-    public void replyWithException (NSException exception)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replyWithException_1, exception !is null ? exception.id_ : null);
-    }
-}
--- a/dwt/internal/cocoa/NSDistributedLock.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDistributedLock;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDistributedLock : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void breakLock ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_breakLock);
-    }
-
-    public id initWithPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDate lockDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_lockDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public static NSDistributedLock lockWithPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDistributedLock, OS.sel_lockWithPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSDistributedLock(result) : null;
-    }
-
-    public bool tryLock ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tryLock) !is null;
-    }
-
-    public void unlock ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unlock);
-    }
-}
--- a/dwt/internal/cocoa/NSDistributedNotificationCenter.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDistributedNotificationCenter;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSNotificationCenter;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDistributedNotificationCenter : NSNotificationCenter
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addObserver_selector_name_object_ (id observer, objc.SEL aSelector, NSString aName, NSString anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObserver_1selector_1name_1object_1, observer !is null ? observer.id_ : null, aSelector,
-                aName !is null ? aName.id_ : null, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void addObserver_selector_name_object_suspensionBehavior_ (id observer, objc.SEL selector, NSString name, NSString object,
-            objc.id suspensionBehavior)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObserver_1selector_1name_1object_1suspensionBehavior_1, observer !is null ? observer.id_ : null, selector,
-                name !is null ? name.id_ : null, object !is null ? object.id_ : null, suspensionBehavior);
-    }
-
-    public static NSNotificationCenter defaultCenter ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDistributedNotificationCenter, OS.sel_defaultCenter);
-        return result !is null ? new NSNotificationCenter(result) : null;
-    }
-
-    public static NSDistributedNotificationCenter notificationCenterForType (NSString notificationCenterType)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDistributedNotificationCenter, OS.sel_notificationCenterForType_1,
-                notificationCenterType !is null ? notificationCenterType.id_ : null);
-        return result !is null ? new NSDistributedNotificationCenter(result) : null;
-    }
-
-    public void postNotificationName_object_ (NSString aName, NSString anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1, aName !is null ? aName.id_ : null, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void postNotificationName_object_userInfo_ (NSString aName, NSString anObject, NSDictionary aUserInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1userInfo_1, aName !is null ? aName.id_ : null,
-                anObject !is null ? anObject.id_ : null, aUserInfo !is null ? aUserInfo.id_ : null);
-    }
-
-    public void postNotificationName_object_userInfo_deliverImmediately_ (NSString name, NSString object, NSDictionary userInfo,
-            bool deliverImmediately)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1userInfo_1deliverImmediately_1, name !is null ? name.id_ : null,
-                object !is null ? object.id_ : null, userInfo !is null ? userInfo.id_ : null, deliverImmediately);
-    }
-
-    public void postNotificationName_object_userInfo_options_ (NSString name, NSString object, NSDictionary userInfo, NSUInteger options)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1userInfo_1options_1, name !is null ? name.id_ : null,
-                object !is null ? object.id_ : null, userInfo !is null ? userInfo.id_ : null, options);
-    }
-
-    public void removeObserver (id observer, NSString aName, NSString anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObserver_1name_1object_1, observer !is null ? observer.id_ : null, aName !is null ? aName.id_ : null,
-                anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setSuspended (bool suspended)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSuspended_1, suspended);
-    }
-
-    public bool suspended ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_suspended) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSDockTile.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDockTile;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDockTile : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString badgeLabel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_badgeLabel);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSView contentView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public void display ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_display);
-    }
-
-    public id owner ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_owner);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setBadgeLabel (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBadgeLabel_1, string !is null ? string.id_ : null);
-    }
-
-    public void setContentView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentView_1, view !is null ? view.id_ : null);
-    }
-
-    public void setShowsApplicationBadge (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsApplicationBadge_1, flag);
-    }
-
-    public bool showsApplicationBadge ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsApplicationBadge) !is null;
-    }
-
-    public NSSize size ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_size);
-        return result;
-    }
-}
--- a/dwt/internal/cocoa/NSDocument.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,655 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDocument;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCloseCommand;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSError;
-import dwt.internal.cocoa.NSFileWrapper;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPageLayout;
-import dwt.internal.cocoa.NSPrintInfo;
-import dwt.internal.cocoa.NSPrintOperation;
-import dwt.internal.cocoa.NSSavePanel;
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSUndoManager;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSWindow;
-import dwt.internal.cocoa.NSWindowController;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSSaveOperationType
-{
-    NSSaveOperation = 0,
-    NSSaveAsOperation = 1,
-    NSSaveToOperation = 2,
-    NSAutosaveOperation = 3
-}
-
-alias NSSaveOperationType.NSSaveOperation NSSaveOperation;
-alias NSSaveOperationType.NSSaveAsOperation NSSaveAsOperation;
-alias NSSaveOperationType.NSSaveToOperation NSSaveToOperation;
-alias NSSaveOperationType.NSAutosaveOperation NSAutosaveOperation;;
-
-public class NSDocument : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addWindowController (NSWindowController windowController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addWindowController_1, windowController !is null ? windowController.id_ : null);
-    }
-
-    public void autosaveDocumentWithDelegate (id delegatee, objc.SEL didAutosaveSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_autosaveDocumentWithDelegate_1didAutosaveSelector_1contextInfo_1, delegatee !is null ? delegatee.id_ : null,
-                didAutosaveSelector, contextInfo);
-    }
-
-    public NSURL autosavedContentsFileURL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_autosavedContentsFileURL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public NSString autosavingFileType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_autosavingFileType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void canCloseDocumentWithDelegate (id delegatee, objc.SEL shouldCloseSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_canCloseDocumentWithDelegate_1shouldCloseSelector_1contextInfo_1, delegatee !is null ? delegatee.id_ : null,
-                shouldCloseSelector, contextInfo);
-    }
-
-    public void close ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_close);
-    }
-
-    public NSData dataOfType (NSString typeName, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataOfType_1error_1, typeName !is null ? typeName.id_ : null, outError);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData dataRepresentationOfType (NSString type)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataRepresentationOfType_1, type !is null ? type.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSString displayName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary fileAttributesToWriteToFile (NSString fullDocumentPath, NSString documentTypeName, objc.id saveOperationType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileAttributesToWriteToFile_1ofType_1saveOperation_1,
-                fullDocumentPath !is null ? fullDocumentPath.id_ : null, documentTypeName !is null ? documentTypeName.id_ : null, saveOperationType);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary fileAttributesToWriteToURL (NSURL absoluteURL, NSString typeName, objc.id saveOperation, NSURL absoluteOriginalContentsURL,
-            objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileAttributesToWriteToURL_1ofType_1forSaveOperation_1originalContentsURL_1error_1,
-                absoluteURL !is null ? absoluteURL.id_ : null, typeName !is null ? typeName.id_ : null, saveOperation,
-                absoluteOriginalContentsURL !is null ? absoluteOriginalContentsURL.id_ : null, outError);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDate fileModificationDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileModificationDate);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSString fileName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString fileNameExtensionForType (NSString typeName, objc.id saveOperation)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileNameExtensionForType_1saveOperation_1, typeName !is null ? typeName.id_ : null,
-                saveOperation);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool fileNameExtensionWasHiddenInLastRunSavePanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileNameExtensionWasHiddenInLastRunSavePanel) !is null;
-    }
-
-    public NSString fileType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString fileTypeFromLastRunSavePanel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileTypeFromLastRunSavePanel);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSURL fileURL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileURL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public NSFileWrapper fileWrapperOfType (NSString typeName, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileWrapperOfType_1error_1, typeName !is null ? typeName.id_ : null, outError);
-        return result !is null ? new NSFileWrapper(result) : null;
-    }
-
-    public NSFileWrapper fileWrapperRepresentationOfType (NSString type)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileWrapperRepresentationOfType_1, type !is null ? type.id_ : null);
-        return result !is null ? new NSFileWrapper(result) : null;
-    }
-
-    public id handleCloseScriptCommand (NSCloseCommand command)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_handleCloseScriptCommand_1, command !is null ? command.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id handlePrintScriptCommand (NSScriptCommand command)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_handlePrintScriptCommand_1, command !is null ? command.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id handleSaveScriptCommand (NSScriptCommand command)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_handleSaveScriptCommand_1, command !is null ? command.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool hasUnautosavedChanges ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasUnautosavedChanges) !is null;
-    }
-
-    public bool hasUndoManager ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasUndoManager) !is null;
-    }
-
-    public NSDocument initForURL (NSURL absoluteDocumentURL, NSURL absoluteDocumentContentsURL, NSString typeName, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initForURL_1withContentsOfURL_1ofType_1error_1,
-                absoluteDocumentURL !is null ? absoluteDocumentURL.id_ : null,
-                absoluteDocumentContentsURL !is null ? absoluteDocumentContentsURL.id_ : null, typeName !is null ? typeName.id_ : null, outError);
-        return result !is null ? this : null;
-    }
-
-    public NSDocument initWithContentsOfFile (NSString absolutePath, NSString typeName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1ofType_1, absolutePath !is null ? absolutePath.id_ : null,
-                typeName !is null ? typeName.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSDocument initWithContentsOfURL_ofType_ (NSURL absoluteURL, NSString typeName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1ofType_1, absoluteURL !is null ? absoluteURL.id_ : null,
-                typeName !is null ? typeName.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSDocument initWithContentsOfURL_ofType_error_ (NSURL absoluteURL, NSString typeName, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1ofType_1error_1, absoluteURL !is null ? absoluteURL.id_ : null,
-                typeName !is null ? typeName.id_ : null, outError);
-        return result !is null ? this : null;
-    }
-
-    public NSDocument initWithType (NSString typeName, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithType_1error_1, typeName !is null ? typeName.id_ : null, outError);
-        return result !is null ? this : null;
-    }
-
-    public bool isDocumentEdited ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDocumentEdited) !is null;
-    }
-
-    public static bool isNativeType (NSString type)
-    {
-        return OS.objc_msgSend(OS.class_NSDocument, OS.sel_isNativeType_1, type !is null ? type.id_ : null) !is null;
-    }
-
-    public bool keepBackupFile ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_keepBackupFile) !is null;
-    }
-
-    public NSString lastComponentOfFileName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_lastComponentOfFileName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool loadDataRepresentation (NSData data, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_loadDataRepresentation_1ofType_1, data !is null ? data.id_ : null, type !is null ? type.id_ : null) !is null;
-    }
-
-    public bool loadFileWrapperRepresentation (NSFileWrapper wrapper, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_loadFileWrapperRepresentation_1ofType_1, wrapper !is null ? wrapper.id_ : null,
-                type !is null ? type.id_ : null) !is null;
-    }
-
-    public void makeWindowControllers ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeWindowControllers);
-    }
-
-    public NSScriptObjectSpecifier objectSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectSpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public bool preparePageLayout (NSPageLayout pageLayout)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_preparePageLayout_1, pageLayout !is null ? pageLayout.id_ : null) !is null;
-    }
-
-    public bool prepareSavePanel (NSSavePanel savePanel)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_prepareSavePanel_1, savePanel !is null ? savePanel.id_ : null) !is null;
-    }
-
-    public bool presentError_ (NSError error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_presentError_1, error !is null ? error.id_ : null) !is null;
-    }
-
-    public void presentError_modalForWindow_delegatee_didPresentSelector_contextInfo_ (NSError error, NSWindow window, id delegatee,
-            objc.SEL didPresentSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_presentError_1modalForWindow_1delegate_1didPresentSelector_1contextInfo_1, error !is null ? error.id_ : null,
-                window !is null ? window.id_ : null, delegatee !is null ? delegatee.id_ : null, didPresentSelector, contextInfo);
-    }
-
-    public void printDocument (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_printDocument_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void printDocumentWithSettings (NSDictionary printSettings, bool showPrintPanel, id delegatee, objc.SEL didPrintSelector,
-            void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_printDocumentWithSettings_1showPrintPanel_1delegate_1didPrintSelector_1contextInfo_1,
-                printSettings !is null ? printSettings.id_ : null, showPrintPanel, delegatee !is null ? delegatee.id_ : null, didPrintSelector,
-                contextInfo);
-    }
-
-    public NSPrintInfo printInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printInfo);
-        return result !is null ? new NSPrintInfo(result) : null;
-    }
-
-    public NSPrintOperation printOperationWithSettings (NSDictionary printSettings, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printOperationWithSettings_1error_1, printSettings !is null ? printSettings.id_ : null,
-                outError);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
-
-    public void printShowingPrintPanel (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_printShowingPrintPanel_1, flag);
-    }
-
-    public bool readFromData (NSData data, NSString typeName, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readFromData_1ofType_1error_1, data !is null ? data.id_ : null, typeName !is null ? typeName.id_ : null,
-                outError) !is null;
-    }
-
-    public bool readFromFile (NSString fileName, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readFromFile_1ofType_1, fileName !is null ? fileName.id_ : null, type !is null ? type.id_ : null) !is null;
-    }
-
-    public bool readFromFileWrapper (NSFileWrapper fileWrapper, NSString typeName, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readFromFileWrapper_1ofType_1error_1, fileWrapper !is null ? fileWrapper.id_ : null,
-                typeName !is null ? typeName.id_ : null, outError) !is null;
-    }
-
-    public bool readFromURL_ofType_ (NSURL url, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readFromURL_1ofType_1, url !is null ? url.id_ : null, type !is null ? type.id_ : null) !is null;
-    }
-
-    public bool readFromURL_ofType_error_ (NSURL absoluteURL, NSString typeName, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readFromURL_1ofType_1error_1, absoluteURL !is null ? absoluteURL.id_ : null,
-                typeName !is null ? typeName.id_ : null, outError) !is null;
-    }
-
-    public static NSArray readableTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDocument, OS.sel_readableTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void removeWindowController (NSWindowController windowController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeWindowController_1, windowController !is null ? windowController.id_ : null);
-    }
-
-    public void revertDocumentToSaved (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_revertDocumentToSaved_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool revertToContentsOfURL (NSURL absoluteURL, NSString typeName, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_revertToContentsOfURL_1ofType_1error_1, absoluteURL !is null ? absoluteURL.id_ : null,
-                typeName !is null ? typeName.id_ : null, outError) !is null;
-    }
-
-    public bool revertToSavedFromFile (NSString fileName, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_revertToSavedFromFile_1ofType_1, fileName !is null ? fileName.id_ : null,
-                type !is null ? type.id_ : null) !is null;
-    }
-
-    public bool revertToSavedFromURL (NSURL url, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_revertToSavedFromURL_1ofType_1, url !is null ? url.id_ : null, type !is null ? type.id_ : null) !is null;
-    }
-
-    public NSInteger runModalPageLayoutWithPrintInfo_ (NSPrintInfo printInfo)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModalPageLayoutWithPrintInfo_1, printInfo !is null ? printInfo.id_ : null);
-    }
-
-    public void runModalPageLayoutWithPrintInfo_delegatee_didRunSelector_contextInfo_ (NSPrintInfo printInfo, id delegatee, objc.SEL didRunSelector,
-            void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runModalPageLayoutWithPrintInfo_1delegate_1didRunSelector_1contextInfo_1,
-                printInfo !is null ? printInfo.id_ : null, delegatee !is null ? delegatee.id_ : null, didRunSelector, contextInfo);
-    }
-
-    public void runModalPrintOperation (NSPrintOperation printOperation, id delegatee, objc.SEL didRunSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runModalPrintOperation_1delegate_1didRunSelector_1contextInfo_1,
-                printOperation !is null ? printOperation.id_ : null, delegatee !is null ? delegatee.id_ : null, didRunSelector, contextInfo);
-    }
-
-    public void runModalSavePanelForSaveOperation (objc.id saveOperation, id delegatee, objc.SEL didSaveSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runModalSavePanelForSaveOperation_1delegate_1didSaveSelector_1contextInfo_1, saveOperation,
-                delegatee !is null ? delegatee.id_ : null, didSaveSelector, contextInfo);
-    }
-
-    public void runPageLayout (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runPageLayout_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void saveDocument (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveDocument_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void saveDocumentAs (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveDocumentAs_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void saveDocumentTo (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveDocumentTo_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void saveDocumentWithDelegate (id delegatee, objc.SEL didSaveSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveDocumentWithDelegate_1didSaveSelector_1contextInfo_1, delegatee !is null ? delegatee.id_ : null,
-                didSaveSelector, contextInfo);
-    }
-
-    public void saveToFile (NSString fileName, objc.id saveOperation, id delegatee, objc.SEL didSaveSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveToFile_1saveOperation_1delegate_1didSaveSelector_1contextInfo_1, fileName !is null ? fileName.id_ : null,
-                saveOperation, delegatee !is null ? delegatee.id_ : null, didSaveSelector, contextInfo);
-    }
-
-    public void saveToURL_ofType_forSaveOperation_delegatee_didSaveSelector_contextInfo_ (NSURL absoluteURL, NSString typeName,
-            objc.id saveOperation, id delegatee, objc.SEL didSaveSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveToURL_1ofType_1forSaveOperation_1delegate_1didSaveSelector_1contextInfo_1,
-                absoluteURL !is null ? absoluteURL.id_ : null, typeName !is null ? typeName.id_ : null, saveOperation,
-                delegatee !is null ? delegatee.id_ : null, didSaveSelector, contextInfo);
-    }
-
-    public bool saveToURL_ofType_forSaveOperation_error_ (NSURL absoluteURL, NSString typeName, objc.id saveOperation, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_saveToURL_1ofType_1forSaveOperation_1error_1, absoluteURL !is null ? absoluteURL.id_ : null,
-                typeName !is null ? typeName.id_ : null, saveOperation, outError) !is null;
-    }
-
-    public void setAutosavedContentsFileURL (NSURL absoluteURL)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutosavedContentsFileURL_1, absoluteURL !is null ? absoluteURL.id_ : null);
-    }
-
-    public void setFileModificationDate (NSDate modificationDate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFileModificationDate_1, modificationDate !is null ? modificationDate.id_ : null);
-    }
-
-    public void setFileName (NSString fileName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFileName_1, fileName !is null ? fileName.id_ : null);
-    }
-
-    public void setFileType (NSString typeName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFileType_1, typeName !is null ? typeName.id_ : null);
-    }
-
-    public void setFileURL (NSURL absoluteURL)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFileURL_1, absoluteURL !is null ? absoluteURL.id_ : null);
-    }
-
-    public void setHasUndoManager (bool hasUndoManager)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasUndoManager_1, hasUndoManager);
-    }
-
-    public void setLastComponentOfFileName (NSString str)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLastComponentOfFileName_1, str !is null ? str.id_ : null);
-    }
-
-    public void setPrintInfo (NSPrintInfo printInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPrintInfo_1, printInfo !is null ? printInfo.id_ : null);
-    }
-
-    public void setUndoManager (NSUndoManager undoManager)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUndoManager_1, undoManager !is null ? undoManager.id_ : null);
-    }
-
-    public void setWindow (NSWindow window)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWindow_1, window !is null ? window.id_ : null);
-    }
-
-    public bool shouldChangePrintInfo (NSPrintInfo newPrintInfo)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldChangePrintInfo_1, newPrintInfo !is null ? newPrintInfo.id_ : null) !is null;
-    }
-
-    public void shouldCloseWindowController (NSWindowController windowController, id delegatee, objc.SEL shouldCloseSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_shouldCloseWindowController_1delegate_1shouldCloseSelector_1contextInfo_1,
-                windowController !is null ? windowController.id_ : null, delegatee !is null ? delegatee.id_ : null, shouldCloseSelector, contextInfo);
-    }
-
-    public bool shouldRunSavePanelWithAccessoryView ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldRunSavePanelWithAccessoryView) !is null;
-    }
-
-    public void showWindows ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showWindows);
-    }
-
-    public NSUndoManager undoManager ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_undoManager);
-        return result !is null ? new NSUndoManager(result) : null;
-    }
-
-    public void updateChangeCount (objc.id change)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateChangeCount_1, change);
-    }
-
-    public bool validateUserInterfaceItem (id anItem)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_validateUserInterfaceItem_1, anItem !is null ? anItem.id_ : null) !is null;
-    }
-
-    public NSError willPresentError (NSError error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_willPresentError_1, error !is null ? error.id_ : null);
-        return result !is null ? new NSError(result) : null;
-    }
-
-    public void windowControllerDidLoadNib (NSWindowController windowController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_windowControllerDidLoadNib_1, windowController !is null ? windowController.id_ : null);
-    }
-
-    public void windowControllerWillLoadNib (NSWindowController windowController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_windowControllerWillLoadNib_1, windowController !is null ? windowController.id_ : null);
-    }
-
-    public NSArray windowControllers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowControllers);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSWindow windowForSheet ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowForSheet);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-    public NSString windowNibName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowNibName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSArray writableTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDocument, OS.sel_writableTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray writableTypesForSaveOperation (objc.id saveOperation)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_writableTypesForSaveOperation_1, saveOperation);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool writeSafelyToURL (NSURL absoluteURL, NSString typeName, objc.id saveOperation, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeSafelyToURL_1ofType_1forSaveOperation_1error_1, absoluteURL !is null ? absoluteURL.id_ : null,
-                typeName !is null ? typeName.id_ : null, saveOperation, outError) !is null;
-    }
-
-    public bool writeToFile_ofType_ (NSString fileName, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1ofType_1, fileName !is null ? fileName.id_ : null, type !is null ? type.id_ : null) !is null;
-    }
-
-    public bool writeToFile_ofType_originalFile_saveOperation_ (NSString fullDocumentPath, NSString documentTypeName,
-            NSString fullOriginalDocumentPath, objc.id saveOperationType)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1ofType_1originalFile_1saveOperation_1,
-                fullDocumentPath !is null ? fullDocumentPath.id_ : null, documentTypeName !is null ? documentTypeName.id_ : null,
-                fullOriginalDocumentPath !is null ? fullOriginalDocumentPath.id_ : null, saveOperationType) !is null;
-    }
-
-    public bool writeToURL_ofType_ (NSURL url, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1ofType_1, url !is null ? url.id_ : null, type !is null ? type.id_ : null) !is null;
-    }
-
-    public bool writeToURL_ofType_error_ (NSURL absoluteURL, NSString typeName, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1ofType_1error_1, absoluteURL !is null ? absoluteURL.id_ : null,
-                typeName !is null ? typeName.id_ : null, outError) !is null;
-    }
-
-    public bool writeToURL_ofType_forSaveOperation_originalContentsURL_error_ (NSURL absoluteURL, NSString typeName, objc.id saveOperation,
-            NSURL absoluteOriginalContentsURL, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1ofType_1forSaveOperation_1originalContentsURL_1error_1,
-                absoluteURL !is null ? absoluteURL.id_ : null, typeName !is null ? typeName.id_ : null, saveOperation,
-                absoluteOriginalContentsURL !is null ? absoluteOriginalContentsURL.id_ : null, outError) !is null;
-    }
-
-    public bool writeWithBackupToFile (NSString fullDocumentPath, NSString documentTypeName, objc.id saveOperationType)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeWithBackupToFile_1ofType_1saveOperation_1,
-                fullDocumentPath !is null ? fullDocumentPath.id_ : null, documentTypeName !is null ? documentTypeName.id_ : null, saveOperationType) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSDocumentController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDocumentController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDocument;
-import dwt.internal.cocoa.NSError;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSOpenPanel;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSWindow;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDocumentController : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray URLsFromRunningOpenPanel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URLsFromRunningOpenPanel);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void addDocument (NSDocument document)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addDocument_1, document !is null ? document.id_ : null);
-    }
-
-    public double autosavingDelay ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_autosavingDelay);
-    }
-
-    public void clearRecentDocuments (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_clearRecentDocuments_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void closeAllDocumentsWithDelegate (id delegatee, objc.id didCloseAllSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_closeAllDocumentsWithDelegate_1didCloseAllSelector_1contextInfo_1, delegatee !is null ? delegatee.id_ : null,
-                didCloseAllSelector, contextInfo);
-    }
-
-    public NSString currentDirectory ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentDirectory);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id currentDocument ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentDocument);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString defaultType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaultType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString displayNameForType (NSString typeName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayNameForType_1, typeName !is null ? typeName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public objc.Class documentClassForType (NSString typeName)
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_documentClassForType_1, typeName !is null ? typeName.id_ : null);
-    }
-
-    public NSArray documentClassNames ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documentClassNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id documentForFileName (NSString fileName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documentForFileName_1, fileName !is null ? fileName.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id documentForURL (NSURL absoluteURL)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documentForURL_1, absoluteURL !is null ? absoluteURL.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id documentForWindow (NSWindow window)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documentForWindow_1, window !is null ? window.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray documents ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documents);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray fileExtensionsFromType (NSString typeName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileExtensionsFromType_1, typeName !is null ? typeName.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray fileNamesFromRunningOpenPanel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileNamesFromRunningOpenPanel);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool hasEditedDocuments ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasEditedDocuments) !is null;
-    }
-
-    public id makeDocumentForURL (NSURL absoluteDocumentURL, NSURL absoluteDocumentContentsURL, NSString typeName, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeDocumentForURL_1withContentsOfURL_1ofType_1error_1,
-                absoluteDocumentURL !is null ? absoluteDocumentURL.id_ : null,
-                absoluteDocumentContentsURL !is null ? absoluteDocumentContentsURL.id_ : null, typeName !is null ? typeName.id_ : null, outError);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id makeDocumentWithContentsOfFile (NSString fileName, NSString type)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeDocumentWithContentsOfFile_1ofType_1, fileName !is null ? fileName.id_ : null,
-                type !is null ? type.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id makeDocumentWithContentsOfURL_ofType_ (NSURL url, NSString type)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeDocumentWithContentsOfURL_1ofType_1, url !is null ? url.id_ : null,
-                type !is null ? type.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id makeDocumentWithContentsOfURL_ofType_error_ (NSURL absoluteURL, NSString typeName, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeDocumentWithContentsOfURL_1ofType_1error_1,
-                absoluteURL !is null ? absoluteURL.id_ : null, typeName !is null ? typeName.id_ : null, outError);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id makeUntitledDocumentOfType_ (NSString type)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeUntitledDocumentOfType_1, type !is null ? type.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id makeUntitledDocumentOfType_error_ (NSString typeName, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeUntitledDocumentOfType_1error_1, typeName !is null ? typeName.id_ : null, outError);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSUInteger maximumRecentDocumentCount ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_maximumRecentDocumentCount);
-    }
-
-    public void newDocument (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_newDocument_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void noteNewRecentDocument (NSDocument document)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteNewRecentDocument_1, document !is null ? document.id_ : null);
-    }
-
-    public void noteNewRecentDocumentURL (NSURL absoluteURL)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteNewRecentDocumentURL_1, absoluteURL !is null ? absoluteURL.id_ : null);
-    }
-
-    public void openDocument (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_openDocument_1, sender !is null ? sender.id_ : null);
-    }
-
-    public id openDocumentWithContentsOfFile (NSString fileName, bool display)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_openDocumentWithContentsOfFile_1display_1, fileName !is null ? fileName.id_ : null, display);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id openDocumentWithContentsOfURL_display_ (NSURL url, bool display)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_openDocumentWithContentsOfURL_1display_1, url !is null ? url.id_ : null, display);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id openDocumentWithContentsOfURL_display_error_ (NSURL absoluteURL, bool displayDocument, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_openDocumentWithContentsOfURL_1display_1error_1,
-                absoluteURL !is null ? absoluteURL.id_ : null, displayDocument, outError);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id openUntitledDocumentAndDisplay (bool displayDocument, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_openUntitledDocumentAndDisplay_1error_1, displayDocument, outError);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id openUntitledDocumentOfType (NSString type, bool display)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_openUntitledDocumentOfType_1display_1, type !is null ? type.id_ : null, display);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool presentError_ (NSError error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_presentError_1, error !is null ? error.id_ : null) !is null;
-    }
-
-    public void presentError_modalForWindow_delegate_didPresentSelector_contextInfo_ (NSError error, NSWindow window, id delegatee,
-            objc.SEL didPresentSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_presentError_1modalForWindow_1delegate_1didPresentSelector_1contextInfo_1, error !is null ? error.id_ : null,
-                window !is null ? window.id_ : null, delegatee !is null ? delegatee.id_ : null, didPresentSelector, contextInfo);
-    }
-
-    public NSArray recentDocumentURLs ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_recentDocumentURLs);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void removeDocument (NSDocument document)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeDocument_1, document !is null ? document.id_ : null);
-    }
-
-    public bool reopenDocumentForURL (NSURL absoluteDocumentURL, NSURL absoluteDocumentContentsURL, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_reopenDocumentForURL_1withContentsOfURL_1error_1,
-                absoluteDocumentURL !is null ? absoluteDocumentURL.id_ : null,
-                absoluteDocumentContentsURL !is null ? absoluteDocumentContentsURL.id_ : null, outError) !is null;
-    }
-
-    public void reviewUnsavedDocumentsWithAlertTitle (NSString title, bool cancellable, id delegatee, objc.SEL didReviewAllSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reviewUnsavedDocumentsWithAlertTitle_1cancellable_1delegate_1didReviewAllSelector_1contextInfo_1,
-                title !is null ? title.id_ : null, cancellable, delegatee !is null ? delegatee.id_ : null, didReviewAllSelector, contextInfo);
-    }
-
-    public NSInteger runModalOpenPanel (NSOpenPanel openPanel, NSArray types)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModalOpenPanel_1forTypes_1, openPanel !is null ? openPanel.id_ : null,
-                types !is null ? types.id_ : null);
-    }
-
-    public void saveAllDocuments (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveAllDocuments_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void setAutosavingDelay (double autosavingDelay)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutosavingDelay_1, autosavingDelay);
-    }
-
-    public void setShouldCreateUI (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShouldCreateUI_1, flag);
-    }
-
-    public static id sharedDocumentController ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSDocumentController, OS.sel_sharedDocumentController);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool shouldCreateUI ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldCreateUI) !is null;
-    }
-
-    public NSString typeForContentsOfURL (NSURL inAbsoluteURL, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typeForContentsOfURL_1error_1, inAbsoluteURL !is null ? inAbsoluteURL.id_ : null, outError);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString typeFromFileExtension (NSString fileNameExtensionOrHFSFileType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typeFromFileExtension_1,
-                fileNameExtensionOrHFSFileType !is null ? fileNameExtensionOrHFSFileType.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool validateUserInterfaceItem (id anItem)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_validateUserInterfaceItem_1, anItem !is null ? anItem.id_ : null) !is null;
-    }
-
-    public NSError willPresentError (NSError error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_willPresentError_1, error !is null ? error.id_ : null);
-        return result !is null ? new NSError(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSDrawer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSDrawer;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRect : NSRectEdge;
-import dwt.internal.cocoa.NSResponder;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSWindow;
-import dwt.internal.cocoa.OS;
-//import dwt.internal.objc.foundation.NSGeometry;
-import objc = dwt.internal.objc.runtime;
-
-public class NSDrawer : NSResponder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void close ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_close);
-    }
-
-    public void close_ (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_close_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSSize contentSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentSize);
-        return result;
-    }
-
-    public NSView contentView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSRectEdge edge ()
-    {
-        return cast(NSRectEdge) OS.objc_msgSend(this.id_, OS.sel_edge);
-    }
-
-    public NSDrawer initWithContentSize (NSSize contentSize, NSRectEdge edge)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentSize_1preferredEdge_1, contentSize, edge);
-        return result !is null ? this : null;
-    }
-
-    public CGFloat leadingOffset ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_leadingOffset);
-    }
-
-    public NSSize maxContentSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_maxContentSize);
-        return result;
-    }
-
-    public NSSize minContentSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_minContentSize);
-        return result;
-    }
-
-    public void open ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_open);
-    }
-
-    public void open_ (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_open_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void openOnEdge (NSRectEdge edge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_openOnEdge_1, edge);
-    }
-
-    public NSWindow parentWindow ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_parentWindow);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-    public NSRectEdge preferredEdge ()
-    {
-        return cast(NSRectEdge) OS.objc_msgSend(this.id_, OS.sel_preferredEdge);
-    }
-
-    public void setContentSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentSize_1, size);
-    }
-
-    public void setContentView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setLeadingOffset (CGFloat offset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLeadingOffset_1, offset);
-    }
-
-    public void setMaxContentSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxContentSize_1, size);
-    }
-
-    public void setMinContentSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinContentSize_1, size);
-    }
-
-    public void setParentWindow (NSWindow parent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setParentWindow_1, parent !is null ? parent.id_ : null);
-    }
-
-    public void setPreferredEdge (NSRectEdge edge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPreferredEdge_1, edge);
-    }
-
-    public void setTrailingOffset (CGFloat offset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTrailingOffset_1, offset);
-    }
-
-    public NSInteger state ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_state);
-    }
-
-    public void toggle (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggle_1, sender !is null ? sender.id_ : null);
-    }
-
-    public CGFloat trailingOffset ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_trailingOffset);
-    }
-
-}
--- a/dwt/internal/cocoa/NSEPSImageRep.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSEPSImageRep;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSImageRep;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSEPSImageRep : NSImageRep
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData EPSRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_EPSRepresentation);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSRect boundingBox ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundingBox);
-        return result;
-    }
-
-    public static id imageRepWithData (NSData epsData)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSEPSImageRep, OS.sel_imageRepWithData_1, epsData !is null ? epsData.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithData (NSData epsData)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, epsData !is null ? epsData.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void prepareGState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_prepareGState);
-    }
-
-}
--- a/dwt/internal/cocoa/NSEnumerator.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSEnumerator.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,55 +1,41 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSEnumerator;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-struct NSFastEnumerationState
-{
-    uint state;
-    objc.id* itemsPtr;
-    uint* mutationsPtr;
-    /*unsigned long extra[5];*/ uint* extra;
+public class NSEnumerator : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
 }
 
-public class NSEnumerator : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray allObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id nextObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextObject);
-        return result !is null ? new id(result) : null;
-    }
+public cocoa.id nextObject() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_nextObject);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSError.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSError.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,99 +1,53 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSError;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSError : NSObject
-{
+public class NSError : NSObject {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public NSInteger code ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_code);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSString domain ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_domain);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static id errorWithDomain (NSString domain, NSInteger code, NSDictionary dict)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSError, OS.sel_errorWithDomain_1code_1userInfo_1, domain !is null ? domain.id_ : null, code,
-                dict !is null ? dict.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public id initWithDomain (NSString domain, NSInteger code, NSDictionary dict)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDomain_1code_1userInfo_1, domain !is null ? domain.id_ : null, code,
-                dict !is null ? dict.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString localizedDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedDescription);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString localizedFailureReason ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedFailureReason);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSInteger code() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_code);
+}
 
-    public NSArray localizedRecoveryOptions ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedRecoveryOptions);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString localizedRecoverySuggestion ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedRecoverySuggestion);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSString localizedDescription() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedDescription);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public id recoveryAttempter ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_recoveryAttempter);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary userInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_userInfo);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public NSDictionary userInfo() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_userInfo);
+    return result !is null ? new NSDictionary(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSEvent.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,420 +1,130 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSEvent;
 
-import dwt.internal.cocoa.CGEventTypes;
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.IOLLEvent;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSDate;
 import dwt.internal.cocoa.NSGraphicsContext;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTrackingArea;
 import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 enum NSEventType
 {
-    NSLeftMouseDown = 1,
-    NSLeftMouseUp = 2,
-    NSRightMouseDown = 3,
-    NSRightMouseUp = 4,
-    NSMouseMoved = 5,
-    NSLeftMouseDragged = 6,
-    NSRightMouseDragged = 7,
-    NSMouseEntered = 8,
-    NSMouseExited = 9,
-    NSKeyDown = 10,
-    NSKeyUp = 11,
-    NSFlagsChanged = 12,
-    NSAppKitDefined = 13,
-    NSSystemDefined = 14,
+    NSLeftMouseDown      = 1,
+    NSLeftMouseUp        = 2,
+    NSRightMouseDown     = 3,
+    NSRightMouseUp       = 4,
+    NSMouseMoved         = 5,
+    NSLeftMouseDragged   = 6,
+    NSRightMouseDragged  = 7,
+    NSMouseEntered       = 8,
+    NSMouseExited        = 9,
+    NSKeyDown            = 10,
+    NSKeyUp              = 11,
+    NSFlagsChanged       = 12,
+    NSAppKitDefined      = 13,
+    NSSystemDefined      = 14,
     NSApplicationDefined = 15,
-    NSPeriodic = 16,
-    NSCursorUpdate = 17,
-    NSScrollWheel = 22,
-    NSTabletPoint = 23,
-    NSTabletProximity = 24,
-    NSOtherMouseDown = 25,
-    NSOtherMouseUp = 26,
-    NSOtherMouseDragged = 27
+    NSPeriodic           = 16,
+    NSCursorUpdate       = 17,
+    NSScrollWheel        = 22,
+    NSTabletPoint        = 23,
+    NSTabletProximity    = 24,
+    NSOtherMouseDown     = 25,
+    NSOtherMouseUp       = 26,
+    NSOtherMouseDragged  = 27
 }
 
-alias NSEventType.NSLeftMouseDown NSLeftMouseDown;
-alias NSEventType.NSLeftMouseUp NSLeftMouseUp;
-alias NSEventType.NSRightMouseDown NSRightMouseDown;
-alias NSEventType.NSRightMouseUp NSRightMouseUp;
-alias NSEventType.NSMouseMoved NSMouseMoved;
-alias NSEventType.NSLeftMouseDragged NSLeftMouseDragged;
-alias NSEventType.NSRightMouseDragged NSRightMouseDragged;
-alias NSEventType.NSMouseEntered NSMouseEntered;
-alias NSEventType.NSMouseExited NSMouseExited;
-alias NSEventType.NSKeyDown NSKeyDown;
-alias NSEventType.NSKeyUp NSKeyUp;
-alias NSEventType.NSFlagsChanged NSFlagsChanged;
-alias NSEventType.NSAppKitDefined NSAppKitDefined;
-alias NSEventType.NSSystemDefined NSSystemDefined;
-alias NSEventType.NSApplicationDefined NSApplicationDefined;
-alias NSEventType.NSPeriodic NSPeriodic;
-alias NSEventType.NSCursorUpdate NSCursorUpdate;
-alias NSEventType.NSScrollWheel NSScrollWheel;
-alias NSEventType.NSTabletPoint NSTabletPoint;
-alias NSEventType.NSTabletProximity NSTabletProximity;
-alias NSEventType.NSOtherMouseDown NSOtherMouseDown;
-alias NSEventType.NSOtherMouseUp NSOtherMouseUp;
-alias NSEventType.NSOtherMouseDragged NSOtherMouseDragged;
+public class NSEvent : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
 
-enum NSPointingDeviceType
-{
-    NSUnknownPointingDevice = NX_TABLET_POINTER_UNKNOWN,
-    NSPenPointingDevice = NX_TABLET_POINTER_PEN,
-    NSCursorPointingDevice = NX_TABLET_POINTER_CURSOR,
-    NSEraserPointingDevice = NX_TABLET_POINTER_ERASER
+public this(cocoa.id id) {
+    super(id);
+}
+
+public NSInteger buttonNumber() {
+    return OS.objc_msgSend(this.id, OS.sel_buttonNumber);
+}
+
+public NSString characters() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_characters);
+    return result !is null ? new NSString(result) : null;
 }
 
-alias NSPointingDeviceType.NSUnknownPointingDevice NSUnknownPointingDevice;
-alias NSPointingDeviceType.NSPenPointingDevice NSPenPointingDevice;
-alias NSPointingDeviceType.NSCursorPointingDevice NSCursorPointingDevice;
-alias NSPointingDeviceType.NSEraserPointingDevice NSEraserPointingDevice;
-
-public class NSEvent : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public CGEventRef CGEvent ()
-    {
-        return cast(CGEventRef) OS.objc_msgSend(this.id_, OS.sel_CGEvent);
-    }
-
-    public NSInteger absoluteX ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_absoluteX);
-    }
-
-    public NSInteger absoluteY ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_absoluteY);
-    }
-
-    public NSInteger absoluteZ ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_absoluteZ);
-    }
+public NSString charactersIgnoringModifiers() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_charactersIgnoringModifiers);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSUInteger buttonMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_buttonMask);
-    }
-
-    public NSInteger buttonNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_buttonNumber);
-    }
-
-    public NSUInteger capabilityMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_capabilityMask);
-    }
-
-    public NSString characters ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_characters);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString charactersIgnoringModifiers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_charactersIgnoringModifiers);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger clickCount ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_clickCount);
-    }
-
-    public NSGraphicsContext context ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_context);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
+public NSInteger clickCount() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_clickCount);
+}
 
-    public NSInteger data1 ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_data1);
-    }
-
-    public NSInteger data2 ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_data2);
-    }
-
-    public CGFloat deltaX ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_deltaX);
-    }
-
-    public CGFloat deltaY ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_deltaY);
-    }
-
-    public CGFloat deltaZ ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_deltaZ);
-    }
-
-    public NSUInteger deviceID ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_deviceID);
-    }
-
-    public static NSEvent enterExitEventWithType (objc.id type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum,
-            NSGraphicsContext context, NSInteger eNum, NSInteger tNum, void* data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSEvent,
-                OS.sel_enterExitEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1trackingNumber_1userData_1,
-                type, location, flags, time, wNum, context !is null ? context.id_ : null, eNum, tNum, data);
-        return result !is null ? new NSEvent(result) : null;
-    }
+public CGFloat deltaX() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_deltaX);
+}
 
-    public NSInteger eventNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_eventNumber);
-    }
-
-    public /*const*/void* eventRef ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_eventRef);
-    }
-
-    public static NSEvent eventWithCGEvent (CGEventRef cgEvent)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_eventWithCGEvent_1, cgEvent);
-        return result !is null ? new NSEvent(result) : null;
-    }
+public CGFloat deltaY() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_deltaY);
+}
 
-    public static NSEvent eventWithEventRef (/*const*/void* eventRef)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_eventWithEventRef_1, eventRef);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public bool isARepeat ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isARepeat) !is null;
-    }
-
-    public bool isEnteringProximity ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnteringProximity) !is null;
-    }
-
-    public static bool isMouseCoalescingEnabled ()
-    {
-        return OS.objc_msgSend(OS.class_NSEvent, OS.sel_isMouseCoalescingEnabled) !is null;
-    }
-
-    public short keyCode ()
-    {
-        return cast(short) OS.objc_msgSend(this.id_, OS.sel_keyCode);
-    }
+public ushort keyCode() {
+    return cast(ushort) OS.objc_msgSend(this.id, OS.sel_keyCode);
+}
 
-    public static NSEvent keyEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum,
-            NSGraphicsContext context, NSString keys, NSString ukeys, bool flag, short code)
-    {
-        objc.id
-                result = OS.objc_msgSend(
-                        OS.class_NSEvent,
-                        OS.sel_keyEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1characters_1charactersIgnoringModifiers_1isARepeat_1keyCode_1,
-                        type, location, flags, time, wNum, context !is null ? context.id_ : null, keys !is null ? keys.id_ : null,
-                        ukeys !is null ? ukeys.id_ : null, flag, code);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public NSPoint locationInWindow ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_locationInWindow);
-        return result;
-    }
-
-    public NSUInteger modifierFlags ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_modifierFlags);
-    }
-
-    public static NSEvent mouseEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum,
-            NSGraphicsContext context, NSInteger eNum, NSInteger cNum, float pressure)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSEvent,
-                OS.sel_mouseEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1clickCount_1pressure_1, type,
-                location, flags, time, wNum, context !is null ? context.id_ : null, eNum, cNum, pressure);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public static NSPoint mouseLocation ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, OS.class_NSEvent, OS.sel_mouseLocation);
-        return result;
-    }
+public NSPoint locationInWindow() {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_locationInWindow);
+    return result;
+}
 
-    public static NSEvent otherEventWithType (NSEventType type, NSPoint location, NSUInteger flags, NSTimeInterval time, NSInteger wNum, NSGraphicsContext context,
-            short subtype, NSInteger d1, NSInteger d2)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSEvent,
-                OS.sel_otherEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1subtype_1data1_1data2_1, type, location, flags,
-                time, wNum, context !is null ? context.id_ : null, subtype, d1, d2);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public NSUInteger pointingDeviceID ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_pointingDeviceID);
-    }
-
-    public NSUInteger pointingDeviceSerialNumber ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_pointingDeviceSerialNumber);
-    }
-
-    public NSPointingDeviceType pointingDeviceType ()
-    {
-        return cast(NSPointingDeviceType) OS.objc_msgSend(this.id_, OS.sel_pointingDeviceType);
-    }
-
-    public float pressure ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_pressure);
-    }
-
-    public float rotation ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_rotation);
-    }
-
-    public static void setMouseCoalescingEnabled (bool flag)
-    {
-        OS.objc_msgSend(OS.class_NSEvent, OS.sel_setMouseCoalescingEnabled_1, flag);
-    }
-
-    public static void startPeriodicEventsAfterDelay (double delay, double period)
-    {
-        OS.objc_msgSend(OS.class_NSEvent, OS.sel_startPeriodicEventsAfterDelay_1withPeriod_1, delay, period);
-    }
+public int /*long*/ modifierFlags() {
+    return OS.objc_msgSend(this.id, OS.sel_modifierFlags);
+}
 
-    public static void stopPeriodicEvents ()
-    {
-        OS.objc_msgSend(OS.class_NSEvent, OS.sel_stopPeriodicEvents);
-    }
-
-    public short subtype ()
-    {
-        return cast(short) OS.objc_msgSend(this.id_, OS.sel_subtype);
-    }
-
-    public NSUInteger systemTabletID ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_systemTabletID);
-    }
-
-    public NSUInteger tabletID ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_tabletID);
-    }
-
-    public float tangentialPressure ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_tangentialPressure);
-    }
-
-    public NSPoint tilt ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_tilt);
-        return result;
-    }
-
-    public NSTimeInterval timestamp ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_timestamp);
-    }
-
-    public NSTrackingArea trackingArea ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_trackingArea);
-        return result !is null ? new NSTrackingArea(result) : null;
-    }
+public static NSPoint mouseLocation() {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, OS.class_NSEvent, OS.sel_mouseLocation);
+    return result;
+}
 
-    public NSInteger trackingNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_trackingNumber);
-    }
-
-    public NSEventType type ()
-    {
-        return cast(NSEventType) OS.objc_msgSend(this.id_, OS.sel_type);
-    }
-
-    public long uniqueID ()
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_uniqueID);
-    }
-
-    public void* userData ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_userData);
-    }
+public static NSEvent otherEventWithType(NSEventType type, NSPoint location, NSUInteger flags, double time, NSTimeInterval wNum, NSGraphicsContext context, short subtype, NSInteger d1, NSInteger d2) {
+    objc.id result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_, type, location, flags, time, wNum, context !is null ? context.id : null, subtype, d1, d2);
+    return result !is null ? new NSEvent(result) : null;
+}
 
-    public id vendorDefined ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_vendorDefined);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSUInteger vendorID ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_vendorID);
-    }
+public NSEventType type() {
+    return OS.objc_msgSend(this.id, OS.sel_type);
+}
 
-    public NSUInteger vendorPointingDeviceType ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_vendorPointingDeviceType);
-    }
-
-    public NSWindow window ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_window);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-    public NSInteger windowNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_windowNumber);
-    }
+public NSWindow window() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_window);
+    return result !is null ? new NSWindow(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSException.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSException;
-
-import tango.stdc.stdarg : va_list;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSException : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray callStackReturnAddresses ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_callStackReturnAddresses);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSException exceptionWithName (NSString name, NSString reason, NSDictionary userInfo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSException, OS.sel_exceptionWithName_1reason_1userInfo_1, name !is null ? name.id_ : null,
-                reason !is null ? reason.id_ : null, userInfo !is null ? userInfo.id_ : null);
-        return result !is null ? new NSException(result) : null;
-    }
-
-    public id initWithName (NSString aName, NSString aReason, NSDictionary aUserInfo)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1reason_1userInfo_1, aName !is null ? aName.id_ : null,
-                aReason !is null ? aReason.id_ : null, aUserInfo !is null ? aUserInfo.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void raise ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_raise);
-    }
-
-    public static void static_raise_format_ (NSString name, NSString format)
-    {
-        OS.objc_msgSend(OS.class_NSException, OS.sel_raise_1format_1, name !is null ? name.id_ : null, format !is null ? format.id_ : null);
-    }
-
-    public static void static_raise_format_arguments_ (NSString name, NSString format, va_list argList)
-    {
-        OS.objc_msgSend(OS.class_NSException, OS.sel_raise_1format_1arguments_1, name !is null ? name.id_ : null, format !is null ? format.id_ : null,
-                argList);
-    }
-
-    public NSString reason ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_reason);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary userInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_userInfo);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSExpression.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSExpression;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSMutableDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSExpressionType
-{
-    NSConstantValueExpressionType = 0,
-    NSEvaluatedObjectExpressionType,
-    NSVariableExpressionType,
-    NSKeyPathExpressionType,
-    NSFunctionExpressionType,
-    NSAggregateExpressionType,
-    NSSubqueryExpressionType,
-    NSUnionSetExpressionType,
-    NSIntersectSetExpressionType,
-    NSMinusSetExpressionType
-}
-
-public class NSExpression : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray arguments ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arguments);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id collection ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_collection);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id constantValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_constantValue);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSExpression expressionForAggregate (NSArray subexpressions)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForAggregate_1, subexpressions !is null ? subexpressions.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression expressionForConstantValue (id obj)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForConstantValue_1, obj !is null ? obj.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression expressionForEvaluatedObject ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForEvaluatedObject);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression static_expressionForFunction_arguments_ (NSString name, NSArray parameters)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForFunction_1arguments_1, name !is null ? name.id_ : null,
-                parameters !is null ? parameters.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression static_expressionForFunction_selectorName_arguments_ (NSExpression target, NSString name, NSArray parameters)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForFunction_1selectorName_1arguments_1,
-                target !is null ? target.id_ : null, name !is null ? name.id_ : null, parameters !is null ? parameters.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression expressionForIntersectSet (NSExpression left, NSExpression right)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForIntersectSet_1with_1, left !is null ? left.id_ : null,
-                right !is null ? right.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression expressionForKeyPath (NSString keyPath)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression expressionForMinusSet (NSExpression left, NSExpression right)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForMinusSet_1with_1, left !is null ? left.id_ : null,
-                right !is null ? right.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression expressionForSubquery (NSExpression expression, NSString variable, id predicate)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForSubquery_1usingIteratorVariable_1predicate_1,
-                expression !is null ? expression.id_ : null, variable !is null ? variable.id_ : null, predicate !is null ? predicate.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression expressionForUnionSet (NSExpression left, NSExpression right)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForUnionSet_1with_1, left !is null ? left.id_ : null,
-                right !is null ? right.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public static NSExpression expressionForVariable (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSExpression, OS.sel_expressionForVariable_1, string !is null ? string.id_ : null);
-        return result !is null ? new NSExpression(result) : null;
-    }
-
-    public NSExpressionType expressionType ()
-    {
-        return cast(NSExpressionType) OS.objc_msgSend(this.id_, OS.sel_expressionType);
-    }
-
-    public id expressionValueWithObject (id object, NSMutableDictionary context)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_expressionValueWithObject_1context_1, object !is null ? object.id_ : null,
-                context !is null ? context.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString functionn ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_function);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initWithExpressionType (NSExpressionType type)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithExpressionType_1, type);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString keyPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSExpression leftExpression ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_leftExpression);
-        return result is this.id_ ? this : (result !is null ? new NSExpression(result) : null);
-    }
-
-    public NSExpression operand ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_operand);
-        return result is this.id_ ? this : (result !is null ? new NSExpression(result) : null);
-    }
-
-    public NSPredicate predicate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_predicate);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public NSExpression rightExpression ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rightExpression);
-        return result is this.id_ ? this : (result !is null ? new NSExpression(result) : null);
-    }
-
-    public NSString variable ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_variable);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSFileHandle.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSFileHandle;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSFileHandle : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void acceptConnectionInBackgroundAndNotify ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_acceptConnectionInBackgroundAndNotify);
-    }
-
-    public void acceptConnectionInBackgroundAndNotifyForModes (NSArray modes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_acceptConnectionInBackgroundAndNotifyForModes_1, modes !is null ? modes.id_ : null);
-    }
-
-    public NSData availableData ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableData);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void closeFile ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_closeFile);
-    }
-
-    public int fileDescriptor ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_fileDescriptor);
-    }
-
-    public static id fileHandleForReadingAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForReadingAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id fileHandleForUpdatingAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForUpdatingAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id fileHandleForWritingAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForWritingAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id fileHandleWithNullDevice ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleWithNullDevice);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id fileHandleWithStandardError ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleWithStandardError);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id fileHandleWithStandardInput ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleWithStandardInput);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id fileHandleWithStandardOutput ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleWithStandardOutput);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithFileDescriptor_ (int fd)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFileDescriptor_1, fd);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithFileDescriptor_closeOnDealloc_ (int fd, bool closeopt)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFileDescriptor_1closeOnDealloc_1, fd, closeopt);
-        return result !is null ? new id(result) : null;
-    }
-
-    public long offsetInFile ()
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_offsetInFile);
-    }
-
-    public NSData readDataOfLength (NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_readDataOfLength_1, length);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData readDataToEndOfFile ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_readDataToEndOfFile);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void readInBackgroundAndNotify ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_readInBackgroundAndNotify);
-    }
-
-    public void readInBackgroundAndNotifyForModes (NSArray modes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_readInBackgroundAndNotifyForModes_1, modes !is null ? modes.id_ : null);
-    }
-
-    public void readToEndOfFileInBackgroundAndNotify ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_readToEndOfFileInBackgroundAndNotify);
-    }
-
-    public void readToEndOfFileInBackgroundAndNotifyForModes (NSArray modes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_readToEndOfFileInBackgroundAndNotifyForModes_1, modes !is null ? modes.id_ : null);
-    }
-
-    public long seekToEndOfFile ()
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_seekToEndOfFile);
-    }
-
-    public void seekToFileOffset (long offset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_seekToFileOffset_1, offset);
-    }
-
-    public void synchronizeFile ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_synchronizeFile);
-    }
-
-    public void truncateFileAtOffset (long offset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_truncateFileAtOffset_1, offset);
-    }
-
-    public void waitForDataInBackgroundAndNotify ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_waitForDataInBackgroundAndNotify);
-    }
-
-    public void waitForDataInBackgroundAndNotifyForModes (NSArray modes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_waitForDataInBackgroundAndNotifyForModes_1, modes !is null ? modes.id_ : null);
-    }
-
-    public void writeData (NSData data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_writeData_1, data !is null ? data.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSFileManager.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSFileManager.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,287 +1,59 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSFileManager;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSData;
 import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSDirectoryEnumerator;
-import dwt.internal.cocoa.NSInteger;
+import dwt.internal.cocoa.NSError;
+import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSFileManager : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSDictionary attributesOfFileSystemForPath (NSString path, objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributesOfFileSystemForPath_1error_1, path !is null ? path.id_ : null, error);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary attributesOfItemAtPath (NSString path, objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributesOfItemAtPath_1error_1, path !is null ? path.id_ : null, error);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public class NSFileManager : NSObject {
 
-    public bool changeCurrentDirectoryPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_changeCurrentDirectoryPath_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public bool changeFileAttributes (NSDictionary attributes, NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_changeFileAttributes_1atPath_1, attributes !is null ? attributes.id_ : null,
-                path !is null ? path.id_ : null) !is null;
-    }
-
-    public NSArray componentsToDisplayForPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_componentsToDisplayForPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSData contentsAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentsAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public bool contentsEqualAtPath (NSString path1, NSString path2)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_contentsEqualAtPath_1andPath_1, path1 !is null ? path1.id_ : null, path2 !is null ? path2.id_ : null) !is null;
-    }
-
-    public NSArray contentsOfDirectoryAtPath (NSString path, objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentsOfDirectoryAtPath_1error_1, path !is null ? path.id_ : null, error);
-        return result !is null ? new NSArray(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public bool copyItemAtPath (NSString srcPath, NSString dstPath, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_copyItemAtPath_1toPath_1error_1, srcPath !is null ? srcPath.id_ : null,
-                dstPath !is null ? dstPath.id_ : null, error) !is null;
-    }
-
-    public bool copyPath (NSString src, NSString dest, id handler)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_copyPath_1toPath_1handler_1, src !is null ? src.id_ : null, dest !is null ? dest.id_ : null,
-                handler !is null ? handler.id_ : null) !is null;
-    }
-
-    public bool createDirectoryAtPath_attributes_ (NSString path, NSDictionary attributes)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_createDirectoryAtPath_1attributes_1, path !is null ? path.id_ : null,
-                attributes !is null ? attributes.id_ : null) !is null;
-    }
-
-    public bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_ (NSString path, bool createIntermediates,
-            NSDictionary attributes, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_createDirectoryAtPath_1withIntermediateDirectories_1attributes_1error_1,
-                path !is null ? path.id_ : null, createIntermediates, attributes !is null ? attributes.id_ : null, error) !is null;
-    }
-
-    public bool createFileAtPath (NSString path, NSData data, NSDictionary attr)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_createFileAtPath_1contents_1attributes_1, path !is null ? path.id_ : null,
-                data !is null ? data.id_ : null, attr !is null ? attr.id_ : null) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool createSymbolicLinkAtPath_pathContent_ (NSString path, NSString otherpath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_createSymbolicLinkAtPath_1pathContent_1, path !is null ? path.id_ : null,
-                otherpath !is null ? otherpath.id_ : null) !is null;
-    }
-
-    public bool createSymbolicLinkAtPath_withDestinationPath_error_ (NSString path, NSString destPath, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_createSymbolicLinkAtPath_1withDestinationPath_1error_1, path !is null ? path.id_ : null,
-                destPath !is null ? destPath.id_ : null, error) !is null;
-    }
-
-    public NSString currentDirectoryPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentDirectoryPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSFileManager defaultManager ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFileManager, OS.sel_defaultManager);
-        return result !is null ? new NSFileManager(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString destinationOfSymbolicLinkAtPath (NSString path, objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_destinationOfSymbolicLinkAtPath_1error_1, path !is null ? path.id_ : null, error);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSArray directoryContentsAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_directoryContentsAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString displayNameAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayNameAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDirectoryEnumerator enumeratorAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_enumeratorAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSDirectoryEnumerator(result) : null;
-    }
-
-    public NSDictionary fileAttributesAtPath (NSString path, bool yorn)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileAttributesAtPath_1traverseLink_1, path !is null ? path.id_ : null, yorn);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public bool fileExistsAtPath_ (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileExistsAtPath_1, path !is null ? path.id_ : null) !is null;
-    }
+public bool createFileAtPath(NSString path, NSData data, NSDictionary attr) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_createFileAtPath_contents_attributes_, path !is null ? path.id : null, data !is null ? data.id : null, attr !is null ? attr.id : null);
+}
 
-    public bool fileExistsAtPath_isDirectory_ (NSString path, bool* isDirectory)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileExistsAtPath_1isDirectory_1, path !is null ? path.id_ : null, isDirectory) !is null;
-    }
-
-    public NSDictionary fileSystemAttributesAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileSystemAttributesAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public /*const*/char* fileSystemRepresentationWithPath (NSString path)
-    {
-        return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_fileSystemRepresentationWithPath_1, path !is null ? path.id_ : null);
-    }
-
-    public bool isDeletableFileAtPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDeletableFileAtPath_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public bool isExecutableFileAtPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isExecutableFileAtPath_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public bool isReadableFileAtPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isReadableFileAtPath_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public bool isWritableFileAtPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isWritableFileAtPath_1, path !is null ? path.id_ : null) !is null;
-    }
+public static NSFileManager defaultManager() {
+    objc.id result = OS.objc_msgSend(OS.class_NSFileManager, OS.sel_defaultManager);
+    return result !is null ? new NSFileManager(result) : null;
+}
 
-    public bool linkItemAtPath (NSString srcPath, NSString dstPath, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_linkItemAtPath_1toPath_1error_1, srcPath !is null ? srcPath.id_ : null,
-                dstPath !is null ? dstPath.id_ : null, error) !is null;
-    }
-
-    public bool linkPath (NSString src, NSString dest, id handler)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_linkPath_1toPath_1handler_1, src !is null ? src.id_ : null, dest !is null ? dest.id_ : null,
-                handler !is null ? handler.id_ : null) !is null;
-    }
-
-    public bool moveItemAtPath (NSString srcPath, NSString dstPath, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_moveItemAtPath_1toPath_1error_1, srcPath !is null ? srcPath.id_ : null,
-                dstPath !is null ? dstPath.id_ : null, error) !is null;
-    }
-
-    public bool movePath (NSString src, NSString dest, id handler)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_movePath_1toPath_1handler_1, src !is null ? src.id_ : null, dest !is null ? dest.id_ : null,
-                handler !is null ? handler.id_ : null) !is null;
-    }
-
-    public NSString pathContentOfSymbolicLinkAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathContentOfSymbolicLinkAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSDirectoryEnumerator enumeratorAtPath(NSString path) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_enumeratorAtPath_, path !is null ? path.id : null);
+    return result !is null ? new NSDirectoryEnumerator(result) : null;
+}
 
-    public bool removeFileAtPath (NSString path, id handler)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_removeFileAtPath_1handler_1, path !is null ? path.id_ : null, handler !is null ? handler.id_ : null) !is null;
-    }
-
-    public bool removeItemAtPath (NSString path, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_removeItemAtPath_1error_1, path !is null ? path.id_ : null, error) !is null;
-    }
-
-    public bool setAttributes (NSDictionary attributes, NSString path, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setAttributes_1ofItemAtPath_1error_1, attributes !is null ? attributes.id_ : null,
-                path !is null ? path.id_ : null, error) !is null;
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public NSString stringWithFileSystemRepresentation (/*const*/char* str, NSUInteger len)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringWithFileSystemRepresentation_1length_1, str, len);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray subpathsAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subpathsAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray subpathsOfDirectoryAtPath (NSString path, objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subpathsOfDirectoryAtPath_1error_1, path !is null ? path.id_ : null, error);
-        return result !is null ? new NSArray(result) : null;
-    }
+public bool removeItemAtPath(NSString path, ref NSError error) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_removeItemAtPath_error_, path !is null ? path.id : null, error !is null ? &error.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSFileWrapper.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSFileWrapper;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSFileWrapper;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSFileWrapper : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString addFileWithPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addFileWithPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString addFileWrapper (NSFileWrapper doc)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addFileWrapper_1, doc !is null ? doc.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString addRegularFileWithContents (NSData data, NSString filename)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addRegularFileWithContents_1preferredFilename_1, data !is null ? data.id_ : null,
-                filename !is null ? filename.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString addSymbolicLinkWithDestination (NSString path, NSString filename)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addSymbolicLinkWithDestination_1preferredFilename_1, path !is null ? path.id_ : null,
-                filename !is null ? filename.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary fileAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileAttributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary fileWrappers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileWrappers);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString filename ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_filename);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSImage icon ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_icon);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public id initDirectoryWithFileWrappers (NSDictionary docs)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initDirectoryWithFileWrappers_1, docs !is null ? docs.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initRegularFileWithContents (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initRegularFileWithContents_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initSymbolicLinkWithDestination (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initSymbolicLinkWithDestination_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithSerializedRepresentation (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSerializedRepresentation_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isDirectory ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDirectory) !is null;
-    }
-
-    public bool isRegularFile ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRegularFile) !is null;
-    }
-
-    public bool isSymbolicLink ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSymbolicLink) !is null;
-    }
-
-    public NSString keyForFileWrapper (NSFileWrapper doc)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyForFileWrapper_1, doc !is null ? doc.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool needsToBeUpdatedFromPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_needsToBeUpdatedFromPath_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public NSString preferredFilename ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_preferredFilename);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSData regularFileContents ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_regularFileContents);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void removeFileWrapper (NSFileWrapper doc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFileWrapper_1, doc !is null ? doc.id_ : null);
-    }
-
-    public NSData serializedRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_serializedRepresentation);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void setFileAttributes (NSDictionary attributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFileAttributes_1, attributes !is null ? attributes.id_ : null);
-    }
-
-    public void setFilename (NSString filename)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFilename_1, filename !is null ? filename.id_ : null);
-    }
-
-    public void setIcon (NSImage icon)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIcon_1, icon !is null ? icon.id_ : null);
-    }
-
-    public void setPreferredFilename (NSString filename)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPreferredFilename_1, filename !is null ? filename.id_ : null);
-    }
-
-    public NSString symbolicLinkDestination ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_symbolicLinkDestination);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool updateFromPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_updateFromPath_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public bool writeToFile (NSString path, bool atomicFlag, bool updateFilenamesFlag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1updateFilenames_1, path !is null ? path.id_ : null, atomicFlag,
-                updateFilenamesFlag) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSFont.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSFont.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,474 +1,89 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSFont;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAffineTransform;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCharacterSet;
-import dwt.internal.cocoa.NSCell : NSControlSize;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSFontDescriptor;
-import dwt.internal.cocoa.NSGraphicsContext;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSCell;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
-//import dwt.internal.objc.foundation.NSGeometry;
 import objc = dwt.internal.objc.runtime;
 
 alias uint NSGlyph;
 
-enum NSMultibyteGlyphPacking
-{
-    NSNativeShortGlyphPacking = 5
+public class NSFont : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
 }
 
-enum NSGlyphRelation
-{
-    NSGlyphBelow = 1,
-    NSGlyphAbove = 2
+public CGFloat ascender() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_ascender);
+}
+
+public CGFloat descender() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_descender);
 }
 
-enum NSFontRenderingMode
-{
-    NSFontDefaultRenderingMode = 0,
-    NSFontAntialiasedRenderingMode = 1,
-    NSFontIntegerAdvancementsRenderingMode = 2,
-    NSFontAntialiasedIntegerAdvancementsRenderingMode = 3
+public NSString familyName() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_familyName);
+    return result !is null ? new NSString(result) : null;
+}
+
+public NSString fontName() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_fontName);
+    return result !is null ? new NSString(result) : null;
 }
 
-public class NSFont : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSSize advancementForGlyph (NSGlyph ag)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_advancementForGlyph_1, ag);
-        return result;
-    }
-
-    public NSDictionary afmDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_afmDictionary);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public CGFloat ascender ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_ascender);
-    }
-
-    public static NSFont boldSystemFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_boldSystemFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSRect boundingRectForFont ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundingRectForFont);
-        return result;
-    }
-
-    public NSRect boundingRectForGlyph (NSGlyph aGlyph)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundingRectForGlyph_1, aGlyph);
-        return result;
-    }
-
-    public CGFloat capHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_capHeight);
-    }
-
-    public static NSFont controlContentFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_controlContentFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSCharacterSet coveredCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_coveredCharacterSet);
-        return result !is null ? new NSCharacterSet(result) : null;
-    }
-
-    public CGFloat defaultLineHeightForFont ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_defaultLineHeightForFont);
-    }
-
-    public CGFloat descender ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_descender);
-    }
-
-    public NSString displayName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString encodingScheme ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_encodingScheme);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString familyName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_familyName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSFontDescriptor fontDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontDescriptor);
-        return result !is null ? new NSFontDescriptor(result) : null;
-    }
+public static NSFont fontWithName(NSString fontName, float /*double*/ fontSize) {
+    objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_fontWithName_size_, fontName !is null ? fontName.id : null, fontSize);
+    return result !is null ? new NSFont(result) : null;
+}
 
-    public NSString fontName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSFont static_fontWithDescriptor_size_ (NSFontDescriptor fontDescriptor, CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_fontWithDescriptor_1size_1, fontDescriptor !is null ? fontDescriptor.id_ : null,
-                fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static NSFont static_fontWithDescriptor_textTransform_ (NSFontDescriptor fontDescriptor, NSAffineTransform textTransform)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_fontWithDescriptor_1textTransform_1,
-                fontDescriptor !is null ? fontDescriptor.id_ : null, textTransform !is null ? textTransform.id_ : null);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static NSFont static_fontWithName_matrix_ (NSString fontName, CGFloat fontMatrix)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_fontWithName_1matrix_1, fontName !is null ? fontName.id_ : null, fontMatrix);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static NSFont static_fontWithName_size_ (NSString fontName, CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_fontWithName_1size_1, fontName !is null ? fontName.id_ : null, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public void getAdvancements_forGlyphs_count_ (NSSizeArray advancements, /*const*/NSGlyph* glyphs, NSUInteger glyphCount)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getAdvancements_1forGlyphs_1count_1, advancements, glyphs, glyphCount);
-    }
-
-    public void getAdvancements_forPackedGlyphs_length_ (NSSizeArray advancements, /*const*/void* packedGlyphs, NSUInteger length)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getAdvancements_1forPackedGlyphs_1length_1, advancements, packedGlyphs, length);
-    }
-
-    public void getBoundingRects (NSRectArray bounds, /*const*/NSGlyph* glyphs, NSUInteger glyphCount)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getBoundingRects_1forGlyphs_1count_1, bounds, glyphs, glyphCount);
-    }
-
-    public bool glyphIsEncoded (NSGlyph aGlyph)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_glyphIsEncoded_1, aGlyph) !is null;
-    }
+public CGFloat leading() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_leading);
+}
 
-    public NSMultibyteGlyphPacking glyphPacking ()
-    {
-        return cast(NSMultibyteGlyphPacking) OS.objc_msgSend(this.id_, OS.sel_glyphPacking);
-    }
-
-    public NSGlyph glyphWithName (NSString aName)
-    {
-        return cast(NSGlyph) OS.objc_msgSend(this.id_, OS.sel_glyphWithName_1, aName !is null ? aName.id_ : null);
-    }
-
-    public bool isBaseFont ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBaseFont) !is null;
-    }
-
-    public bool isFixedPitch ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFixedPitch) !is null;
-    }
-
-    public CGFloat italicAngle ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_italicAngle);
-    }
-
-    public static NSFont labelFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_labelFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static CGFloat labelFontSize ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_labelFontSize);
-    }
-
-    public CGFloat leading ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_leading);
-    }
-
-    public /*const*/CGFloat* matrix ()
-    {
-        return cast(/*const*/CGFloat*) OS.objc_msgSend(this.id_, OS.sel_matrix);
-    }
-
-    public NSSize maximumAdvancement ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_maximumAdvancement);
-        return result;
-    }
+public CGFloat pointSize() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_pointSize);
+}
 
-    public static NSFont menuBarFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_menuBarFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static NSFont menuFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_menuFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static NSFont messageFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_messageFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSStringEncoding mostCompatibleStringEncoding ()
-    {
-        return cast(NSStringEncoding) OS.objc_msgSend(this.id_, OS.sel_mostCompatibleStringEncoding);
-    }
-
-    public NSUInteger numberOfGlyphs ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfGlyphs);
-    }
-
-    public static NSFont paletteFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_paletteFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public CGFloat pointSize ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_pointSize);
-    }
-
-    public NSPoint positionOfGlyph_forCharacter_struckOverRect_ (NSGlyph aGlyph, short aChar, NSRect aRect)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_positionOfGlyph_1forCharacter_1struckOverRect_1, aGlyph, aChar, aRect);
-        return result;
-    }
-
-    public NSPoint positionOfGlyph_precededByGlyph_isNominal_ (NSGlyph curGlyph, NSGlyph prevGlyph, bool* nominal)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_positionOfGlyph_1precededByGlyph_1isNominal_1, curGlyph, prevGlyph, nominal);
-        return result;
-    }
-
-    public NSPoint positionOfGlyph_struckOverGlyph_metricsExist_ (NSGlyph curGlyph, NSGlyph prevGlyph, bool* exist)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_positionOfGlyph_1struckOverGlyph_1metricsExist_1, curGlyph, prevGlyph, exist);
-        return result;
-    }
-
-    public NSPoint positionOfGlyph_struckOverRect_metricsExist_ (NSGlyph aGlyph, NSRect aRect, bool* exist)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_positionOfGlyph_1struckOverRect_1metricsExist_1, aGlyph, aRect, exist);
-        return result;
-    }
-
-    public NSPoint positionOfGlyph_withRelation_toBaseGlyph_totalAdvancement_metricsExist_ (NSGlyph thisGlyph, NSGlyphRelation rel,
-            NSGlyph baseGlyph, NSSizePointer adv, bool* exist)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_positionOfGlyph_1withRelation_1toBaseGlyph_1totalAdvancement_1metricsExist_1, thisGlyph, rel,
-                baseGlyph, adv, exist);
-        return result;
-    }
-
-    public NSInteger positionsForCompositeSequence (NSGlyph* someGlyphs, NSInteger numGlyphs, NSPointArray points)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_positionsForCompositeSequence_1numberOfGlyphs_1pointArray_1, someGlyphs, numGlyphs, points);
-    }
-
-    public static NSArray preferredFontNames ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_preferredFontNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSFont printerFont ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printerFont);
-        return result is this.id_ ? this : (result !is null ? new NSFont(result) : null);
-    }
-
-    public NSFontRenderingMode renderingMode ()
-    {
-        return cast(NSFontRenderingMode) OS.objc_msgSend(this.id_, OS.sel_renderingMode);
-    }
-
-    public NSFont screenFont ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_screenFont);
-        return result is this.id_ ? this : (result !is null ? new NSFont(result) : null);
-    }
+public static CGFloat smallSystemFontSize() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_smallSystemFontSize);
+}
 
-    public NSFont screenFontWithRenderingMode (NSFontRenderingMode renderingMode)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_screenFontWithRenderingMode_1, renderingMode);
-        return result is this.id_ ? this : (result !is null ? new NSFont(result) : null);
-    }
-
-    public void set ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_set);
-    }
-
-    public void setInContext (NSGraphicsContext graphicsContext)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInContext_1, graphicsContext !is null ? graphicsContext.id_ : null);
-    }
-
-    public static void setPreferredFontNames (NSArray fontNameArray)
-    {
-        OS.objc_msgSend(OS.class_NSFont, OS.sel_setPreferredFontNames_1, fontNameArray !is null ? fontNameArray.id_ : null);
-    }
-
-    public static void setUserFixedPitchFont (NSFont aFont)
-    {
-        OS.objc_msgSend(OS.class_NSFont, OS.sel_setUserFixedPitchFont_1, aFont !is null ? aFont.id_ : null);
-    }
-
-    public static void setUserFont (NSFont aFont)
-    {
-        OS.objc_msgSend(OS.class_NSFont, OS.sel_setUserFont_1, aFont !is null ? aFont.id_ : null);
-    }
-
-    public static CGFloat smallSystemFontSize ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_smallSystemFontSize);
-    }
-
-    public static NSFont systemFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_systemFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static CGFloat systemFontSize ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_systemFontSize);
-    }
-
-    public static CGFloat systemFontSizeForControlSize (NSControlSize controlSize)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_systemFontSizeForControlSize_1, controlSize);
-    }
+public static NSFont systemFontOfSize(CGFloat fontSize) {
+    objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_systemFontOfSize_, fontSize);
+    return result !is null ? new NSFont(result) : null;
+}
 
-    public NSAffineTransform textTransform ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textTransform);
-        return result !is null ? new NSAffineTransform(result) : null;
-    }
-
-    public static NSFont titleBarFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_titleBarFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static NSFont toolTipsFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_toolTipsFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public CGFloat underlinePosition ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_underlinePosition);
-    }
+public static CGFloat systemFontSize() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_systemFontSize);
+}
 
-    public CGFloat underlineThickness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_underlineThickness);
-    }
-
-    public static void useFont (NSString fontName)
-    {
-        OS.objc_msgSend(OS.class_NSFont, OS.sel_useFont_1, fontName !is null ? fontName.id_ : null);
-    }
-
-    public static NSFont userFixedPitchFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_userFixedPitchFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public static NSFont userFontOfSize (CGFloat fontSize)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFont, OS.sel_userFontOfSize_1, fontSize);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public CGFloat widthOfString (NSString string)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_widthOfString_1, string !is null ? string.id_ : null);
-    }
-
-    public CGFloat xHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_xHeight);
-    }
+public static CGFloat systemFontSizeForControlSize(NSControlSize controlSize) {
+    return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSFont, OS.sel_systemFontSizeForControlSize_, controlSize);
+}
 
 }
--- a/dwt/internal/cocoa/NSFontDescriptor.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSFontDescriptor;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAffineTransform;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSSet;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-alias uint NSFontSymbolicTraits; 
-
-public class NSFontDescriptor : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSDictionary fontAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontAttributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSFontDescriptor fontDescriptorByAddingAttributes (NSDictionary attributes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontDescriptorByAddingAttributes_1, attributes !is null ? attributes.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSFontDescriptor(result) : null);
-    }
-
-    public NSFontDescriptor fontDescriptorWithFace (NSString newFace)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontDescriptorWithFace_1, newFace !is null ? newFace.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSFontDescriptor(result) : null);
-    }
-
-    public NSFontDescriptor fontDescriptorWithFamily (NSString newFamily)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontDescriptorWithFamily_1, newFamily !is null ? newFamily.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSFontDescriptor(result) : null);
-    }
-
-    public static NSFontDescriptor fontDescriptorWithFontAttributes (NSDictionary attributes)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFontDescriptor, OS.sel_fontDescriptorWithFontAttributes_1,
-                attributes !is null ? attributes.id_ : null);
-        return result !is null ? new NSFontDescriptor(result) : null;
-    }
-
-    public NSFontDescriptor fontDescriptorWithMatrix (NSAffineTransform matrix)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontDescriptorWithMatrix_1, matrix !is null ? matrix.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSFontDescriptor(result) : null);
-    }
-
-    public static NSFontDescriptor static_fontDescriptorWithName_matrix_ (NSString fontName, NSAffineTransform matrix)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFontDescriptor, OS.sel_fontDescriptorWithName_1matrix_1, fontName !is null ? fontName.id_ : null,
-                matrix !is null ? matrix.id_ : null);
-        return result !is null ? new NSFontDescriptor(result) : null;
-    }
-
-    public static NSFontDescriptor static_fontDescriptorWithName_size_ (NSString fontName, CGFloat size)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFontDescriptor, OS.sel_fontDescriptorWithName_1size_1, fontName !is null ? fontName.id_ : null,
-                size);
-        return result !is null ? new NSFontDescriptor(result) : null;
-    }
-
-    public NSFontDescriptor fontDescriptorWithSize (CGFloat newPointSize)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontDescriptorWithSize_1, newPointSize);
-        return result is this.id_ ? this : (result !is null ? new NSFontDescriptor(result) : null);
-    }
-
-    public NSFontDescriptor fontDescriptorWithSymbolicTraits (NSFontSymbolicTraits symbolicTraits)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontDescriptorWithSymbolicTraits_1, symbolicTraits);
-        return result is this.id_ ? this : (result !is null ? new NSFontDescriptor(result) : null);
-    }
-
-    public id initWithFontAttributes (NSDictionary attributes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFontAttributes_1, attributes !is null ? attributes.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSFontDescriptor matchingFontDescriptorWithMandatoryKeys (NSSet mandatoryKeys)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_matchingFontDescriptorWithMandatoryKeys_1, mandatoryKeys !is null ? mandatoryKeys.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSFontDescriptor(result) : null);
-    }
-
-    public NSArray matchingFontDescriptorsWithMandatoryKeys (NSSet mandatoryKeys)
-    {
-        objc.id
-                result = OS.objc_msgSend(this.id_, OS.sel_matchingFontDescriptorsWithMandatoryKeys_1, mandatoryKeys !is null ? mandatoryKeys.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSAffineTransform matrix ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_matrix);
-        return result !is null ? new NSAffineTransform(result) : null;
-    }
-
-    public id objectForKey (NSString anAttribute)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectForKey_1, anAttribute !is null ? anAttribute.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public CGFloat pointSize ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_pointSize);
-    }
-
-    public NSString postscriptName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_postscriptName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSFontSymbolicTraits symbolicTraits ()
-    {
-        return cast(NSFontSymbolicTraits) OS.objc_msgSend(this.id_, OS.sel_symbolicTraits);
-    }
-
-}
--- a/dwt/internal/cocoa/NSFontManager.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSFontManager.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,341 +1,58 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSFontManager;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSFontDescriptor;
-import dwt.internal.cocoa.NSFontPanel;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-alias uint NSFontTraitMask;
+public class NSFontManager : NSObject {
+
+public this() {
+    super();
+}
 
-enum NSFontAction
-{
-    NSNoFontChangeAction = 0,
-    NSViaPanelFontAction = 1,
-    NSAddTraitFontAction = 2,
-    NSSizeUpFontAction = 3,
-    NSSizeDownFontAction = 4,
-    NSHeavierFontAction = 5,
-    NSLighterFontAction = 6,
-    NSRemoveTraitFontAction = 7
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
 }
 
-public class NSFontManager : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.SEL action ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action);
-    }
-
-    public bool addCollection (NSString collectionName, NSInteger collectionOptions)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_addCollection_1options_1, collectionName !is null ? collectionName.id_ : null, collectionOptions) !is null;
-    }
-
-    public void addFontDescriptors (NSArray descriptors, NSString collectionName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addFontDescriptors_1toCollection_1, descriptors !is null ? descriptors.id_ : null,
-                collectionName !is null ? collectionName.id_ : null);
-    }
-
-    public void addFontTrait (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addFontTrait_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSArray availableFontFamilies ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableFontFamilies);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray availableFontNamesMatchingFontDescriptor (NSFontDescriptor descriptor)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableFontNamesMatchingFontDescriptor_1, descriptor !is null ? descriptor.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray availableFontNamesWithTraits (NSFontTraitMask someTraits)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableFontNamesWithTraits_1, someTraits);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray availableFonts ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableFonts);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray availableMembersOfFontFamily (NSString fam)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableMembersOfFontFamily_1, fam !is null ? fam.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray collectionNames ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_collectionNames);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSArray availableFontFamilies() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_availableFontFamilies);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public NSDictionary convertAttributes (NSDictionary attributes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_convertAttributes_1, attributes !is null ? attributes.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSFont convertFont_ (NSFont fontObj)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_convertFont_1, fontObj !is null ? fontObj.id_ : null);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSFont convertFont_toFace_ (NSFont fontObj, NSString typeface)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_convertFont_1toFace_1, fontObj !is null ? fontObj.id_ : null,
-                typeface !is null ? typeface.id_ : null);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSFont convertFont_toFamily_ (NSFont fontObj, NSString family)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_convertFont_1toFamily_1, fontObj !is null ? fontObj.id_ : null,
-                family !is null ? family.id_ : null);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSFont convertFont_toHaveTrait_ (NSFont fontObj, NSFontTraitMask trait)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_convertFont_1toHaveTrait_1, fontObj !is null ? fontObj.id_ : null, trait);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSFont convertFont_toNotHaveTrait_ (NSFont fontObj, NSFontTraitMask trait)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_convertFont_1toNotHaveTrait_1, fontObj !is null ? fontObj.id_ : null, trait);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSFont convertFont_toSize_ (NSFont fontObj, CGFloat size)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_convertFont_1toSize_1, fontObj !is null ? fontObj.id_ : null, size);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSFontTraitMask convertFontTraits (NSFontTraitMask traits)
-    {
-        return cast(NSFontTraitMask) OS.objc_msgSend(this.id_, OS.sel_convertFontTraits_1, traits);
-    }
-
-    public NSFont convertWeight (bool upFlag, NSFont fontObj)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_convertWeight_1ofFont_1, upFlag, fontObj !is null ? fontObj.id_ : null);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSFontAction currentFontAction ()
-    {
-        return cast(NSFontAction) OS.objc_msgSend(this.id_, OS.sel_currentFontAction);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray fontDescriptorsInCollection (NSString collectionNames)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontDescriptorsInCollection_1, collectionNames !is null ? collectionNames.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSMenu fontMenu (bool create)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontMenu_1, create);
-        return result !is null ? new NSMenu(result) : null;
-    }
+public NSArray availableFonts() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_availableFonts);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public bool fontNamed (NSString fName, NSFontTraitMask someTraits)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fontNamed_1hasTraits_1, fName !is null ? fName.id_ : null, someTraits) !is null;
-    }
-
-    public NSFontPanel fontPanel (bool create)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontPanel_1, create);
-        return result !is null ? new NSFontPanel(result) : null;
-    }
-
-    public NSFont fontWithFamily (NSString family, NSFontTraitMask traits, NSInteger weight, CGFloat size)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fontWithFamily_1traits_1weight_1size_1, family !is null ? family.id_ : null, traits, weight,
-                size);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public bool isEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
-    }
-
-    public bool isMultiple ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMultiple) !is null;
-    }
-
-    public NSString localizedNameForFamily (NSString family, NSString faceKey)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedNameForFamily_1face_1, family !is null ? family.id_ : null,
-                faceKey !is null ? faceKey.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void modifyFont (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_modifyFont_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void modifyFontViaPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_modifyFontViaPanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFrontFontPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontFontPanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFrontStylesPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontStylesPanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool removeCollection (NSString collectionName)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_removeCollection_1, collectionName !is null ? collectionName.id_ : null) !is null;
-    }
-
-    public void removeFontDescriptor (NSFontDescriptor descriptor, NSString collection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFontDescriptor_1fromCollection_1, descriptor !is null ? descriptor.id_ : null,
-                collection !is null ? collection.id_ : null);
-    }
-
-    public void removeFontTrait (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFontTrait_1, sender !is null ? sender.id_ : null);
-    }
+public NSArray availableMembersOfFontFamily(NSString fam) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_availableMembersOfFontFamily_, fam !is null ? fam.id : null);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public NSFont selectedFont ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedFont);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public bool sendAction ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendAction) !is null;
-    }
-
-    public void setAction (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, flag);
-    }
-
-    public static void setFontManagerFactory (objc.Class factoryId)
-    {
-        OS.objc_msgSend(OS.class_NSFontManager, OS.sel_setFontManagerFactory_1, factoryId);
-    }
-
-    public void setFontMenu (NSMenu newMenu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFontMenu_1, newMenu !is null ? newMenu.id_ : null);
-    }
-
-    public static void setFontPanelFactory (objc.Class factoryId)
-    {
-        OS.objc_msgSend(OS.class_NSFontManager, OS.sel_setFontPanelFactory_1, factoryId);
-    }
-
-    public void setSelectedAttributes (NSDictionary attributes, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedAttributes_1isMultiple_1, attributes !is null ? attributes.id_ : null, flag);
-    }
-
-    public void setSelectedFont (NSFont fontObj, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedFont_1isMultiple_1, fontObj !is null ? fontObj.id_ : null, flag);
-    }
-
-    public void setTarget (id aTarget)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, aTarget !is null ? aTarget.id_ : null);
-    }
-
-    public static NSFontManager sharedFontManager ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFontManager, OS.sel_sharedFontManager);
-        return result !is null ? new NSFontManager(result) : null;
-    }
-
-    public id target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSFontTraitMask traitsOfFont (NSFont fontObj)
-    {
-        return cast(NSFontTraitMask) OS.objc_msgSend(this.id_, OS.sel_traitsOfFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public NSInteger weightOfFont (NSFont fontObj)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_weightOfFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
+public static NSFontManager sharedFontManager() {
+    objc.id result = OS.objc_msgSend(OS.class_NSFontManager, OS.sel_sharedFontManager);
+    return result !is null ? new NSFontManager(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSFontPanel.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSFontPanel.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,88 +1,51 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSFontPanel;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSPanel;
-import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSFontPanel : NSPanel
-{
+public class NSFontPanel : NSPanel {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool isEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
-    }
-
-    public NSFont panelConvertFont (NSFont fontObj)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_panelConvertFont_1, fontObj !is null ? fontObj.id_ : null);
-        return result !is null ? new NSFont(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void reloadDefaultFontFamilies ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadDefaultFontFamilies);
-    }
-
-    public void setAccessoryView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void setEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, flag);
-    }
+public NSFont panelConvertFont(NSFont fontObj) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_panelConvertFont_, fontObj !is null ? fontObj.id : null);
+    return result !is null ? new NSFont(result) : null;
+}
 
-    public void setPanelFont (NSFont fontObj, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPanelFont_1isMultiple_1, fontObj !is null ? fontObj.id_ : null, flag);
-    }
+public void setPanelFont(NSFont fontObj, bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setPanelFont_isMultiple_, fontObj !is null ? fontObj.id : null, flag);
+}
 
-    public static NSFontPanel sharedFontPanel ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSFontPanel, OS.sel_sharedFontPanel);
-        return result !is null ? new NSFontPanel(result) : null;
-    }
-
-    public static bool sharedFontPanelExists ()
-    {
-        return OS.objc_msgSend(OS.class_NSFontPanel, OS.sel_sharedFontPanelExists) !is null;
-    }
-
-    public bool worksWhenModal ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_worksWhenModal) !is null;
-    }
+public static NSFontPanel sharedFontPanel() {
+    objc.id result = OS.objc_msgSend(OS.class_NSFontPanel, OS.sel_sharedFontPanel);
+    return result !is null ? new NSFontPanel(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSForm.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSForm;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSFormCell;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMatrix;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSText : NSTextAlignment, NSWritingDirection;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSForm : NSMatrix
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSFormCell addEntry (NSString title)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addEntry_1, title !is null ? title.id_ : null);
-        return result !is null ? new NSFormCell(result) : null;
-    }
-
-    public id cellAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cellAtIndex_1, index);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void drawCellAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawCellAtIndex_1, index);
-    }
-
-    public NSInteger indexOfCellWithTag (NSInteger aTag)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfCellWithTag_1, aTag);
-    }
-
-    public NSInteger indexOfSelectedItem ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfSelectedItem);
-    }
-
-    public NSFormCell insertEntry (NSString title, int index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_insertEntry_1atIndex_1, title !is null ? title.id_ : null, index);
-        return result !is null ? new NSFormCell(result) : null;
-    }
-
-    public void removeEntryAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeEntryAtIndex_1, index);
-    }
-
-    public void selectTextAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectTextAtIndex_1, index);
-    }
-
-    public void setBezeled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag);
-    }
-
-    public void setBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag);
-    }
-
-    public void setEntryWidth (CGFloat width)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEntryWidth_1, width);
-    }
-
-    public void setFrameSize (NSSize newSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameSize_1, newSize);
-    }
-
-    public void setInterlineSpacing (CGFloat spacing)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInterlineSpacing_1, spacing);
-    }
-
-    public void setTextAlignment (NSInteger mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextAlignment_1, mode);
-    }
-
-    public void setTextBaseWritingDirection (NSWritingDirection writingDirection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextBaseWritingDirection_1, writingDirection);
-    }
-
-    public void setTextFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public void setTitleAlignment (NSTextAlignment mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleAlignment_1, mode);
-    }
-
-    public void setTitleBaseWritingDirection (NSWritingDirection writingDirection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleBaseWritingDirection_1, writingDirection);
-    }
-
-    public void setTitleFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSFormCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSFormCell;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSText : NSTextAlignment, NSWritingDirection;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSFormCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSAttributedString attributedTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedTitle);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public bool isOpaque ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOpaque) !is null;
-    }
-
-    public NSAttributedString placeholderAttributedString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderAttributedString);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSString placeholderString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderString);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setAttributedTitle (NSAttributedString obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedTitle_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setPlaceholderAttributedString (NSAttributedString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaceholderAttributedString_1, string !is null ? string.id_ : null);
-    }
-
-    public void setPlaceholderString (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaceholderString_1, string !is null ? string.id_ : null);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTitleAlignment (NSTextAlignment mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleAlignment_1, mode);
-    }
-
-    public void setTitleBaseWritingDirection (NSWritingDirection writingDirection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleBaseWritingDirection_1, writingDirection);
-    }
-
-    public void setTitleFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public void setTitleWidth (CGFloat width)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWidth_1, width);
-    }
-
-    public void setTitleWithMnemonic (NSString stringWithAmpersand)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, stringWithAmpersand !is null ? stringWithAmpersand.id_ : null);
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSTextAlignment titleAlignment ()
-    {
-        return cast(NSTextAlignment) OS.objc_msgSend(this.id_, OS.sel_titleAlignment);
-    }
-
-    public NSWritingDirection titleBaseWritingDirection ()
-    {
-        return cast(NSWritingDirection) OS.objc_msgSend(this.id_, OS.sel_titleBaseWritingDirection);
-    }
-
-    public NSFont titleFont ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleFont);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public CGFloat titleWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_titleWidth);
-    }
-
-    public CGFloat titleWidth_ (NSSize aSize)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_titleWidth_1, aSize);
-    }
-
-}
--- a/dwt/internal/cocoa/NSFormatter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSFormatter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,76 +1,42 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSFormatter;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSDictionary;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSFormatter : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSFormatter : NSObject {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSAttributedString attributedStringForObjectValue (id obj, NSDictionary attrs)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedStringForObjectValue_1withDefaultAttributes_1, obj !is null ? obj.id_ : null,
-                attrs !is null ? attrs.id_ : null);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSString editingStringForObjectValue (id obj)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_editingStringForObjectValue_1, obj !is null ? obj.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool getObjectValue (objc.id* obj, NSString str, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getObjectValue_1forString_1errorDescription_1, obj, str !is null ? str.id_ : null, error) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool isPartialStringValid_newEditingString_errorDescription_ (NSString partialString, objc.id** newString, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isPartialStringValid_1newEditingString_1errorDescription_1,
-                partialString !is null ? partialString.id_ : null, newString, error) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_ (objc.id** partialStringPtr,
-            NSRangePointer proposedSelRangePtr, NSString origString, NSRange origSelRange, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_,
-                OS.sel_isPartialStringValid_1proposedSelectedRange_1originalString_1originalSelectedRange_1errorDescription_1, partialStringPtr,
-                proposedSelRangePtr, origString !is null ? origString.id_ : null, origSelRange, error) !is null;
-    }
-
-    public NSString stringForObjectValue (id obj)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringForObjectValue_1, obj !is null ? obj.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSString stringForObjectValue(cocoa.id obj) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringForObjectValue_, obj !is null ? obj.id : null);
+    return result !is null ? new NSString(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSGarbageCollector.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSGarbageCollector;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSZone;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSGarbageCollector : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void collectExhaustively ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_collectExhaustively);
-    }
-
-    public void collectIfNeeded ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_collectIfNeeded);
-    }
-
-    public static id defaultCollector ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGarbageCollector, OS.sel_defaultCollector);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void disable ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_disable);
-    }
-
-    public void disableCollectorForPointer (void* ptr)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_disableCollectorForPointer_1, ptr);
-    }
-
-    public void enable ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enable);
-    }
-
-    public void enableCollectorForPointer (void* ptr)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enableCollectorForPointer_1, ptr);
-    }
-
-    public bool isCollecting ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isCollecting) !is null;
-    }
-
-    public bool isEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
-    }
-
-    public NSZone* zone ()
-    {
-        return cast(NSZone*) OS.objc_msgSend(this.id_, OS.sel_zone);
-    }
-
-}
--- a/dwt/internal/cocoa/NSGlyphGenerator.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSGlyphGenerator;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSGlyphGenerator : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void generateGlyphsForGlyphStorage (id glyphStorage, NSUInteger nChars, NSUInteger* glyphIndex, NSUInteger* charIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_generateGlyphsForGlyphStorage_1desiredNumberOfCharacters_1glyphIndex_1characterIndex_1,
-                glyphStorage !is null ? glyphStorage.id_ : null, nChars, glyphIndex, charIndex);
-    }
-
-    public static id sharedGlyphGenerator ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGlyphGenerator, OS.sel_sharedGlyphGenerator);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSGlyphInfo.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSGlyphInfo;
-
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSCharacterCollection
-{
-    NSIdentityMappingCharacterCollection = 0,
-    NSAdobeCNS1CharacterCollection = 1,
-    NSAdobeGB1CharacterCollection = 2,
-    NSAdobeJapan1CharacterCollection = 3,
-    NSAdobeJapan2CharacterCollection = 4,
-    NSAdobeKorea1CharacterCollection = 5,
-}
-
-public class NSGlyphInfo : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSCharacterCollection characterCollection ()
-    {
-        return cast(NSCharacterCollection) OS.objc_msgSend(this.id_, OS.sel_characterCollection);
-    }
-
-    public NSUInteger characterIdentifier ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_characterIdentifier);
-    }
-
-    public static NSGlyphInfo glyphInfoWithCharacterIdentifier (NSUInteger cid, NSCharacterCollection characterCollection, NSString theString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGlyphInfo, OS.sel_glyphInfoWithCharacterIdentifier_1collection_1baseString_1, cid,
-                characterCollection, theString !is null ? theString.id_ : null);
-        return result !is null ? new NSGlyphInfo(result) : null;
-    }
-
-    public static NSGlyphInfo glyphInfoWithGlyph (NSGlyph glyph, NSFont font, NSString theString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGlyphInfo, OS.sel_glyphInfoWithGlyph_1forFont_1baseString_1, glyph,
-                font !is null ? font.id_ : null, theString !is null ? theString.id_ : null);
-        return result !is null ? new NSGlyphInfo(result) : null;
-    }
-
-    public static NSGlyphInfo glyphInfoWithGlyphName (NSString glyphName, NSFont font, NSString theString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGlyphInfo, OS.sel_glyphInfoWithGlyphName_1forFont_1baseString_1,
-                glyphName !is null ? glyphName.id_ : null, font !is null ? font.id_ : null, theString !is null ? theString.id_ : null);
-        return result !is null ? new NSGlyphInfo(result) : null;
-    }
-
-    public NSString glyphName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_glyphName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSGradient.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSGradient.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,122 +1,60 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSGradient;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSBezierPath;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSColorSpace;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-alias NSUInteger NSGradientDrawingOptions;
-
-public class NSGradient : NSObject
+enum NSGradientDrawingOptions : NSUInteger
 {
-
-    public this ()
-    {
-        super();
-    }
+    NSGradientDrawsBeforeStartingLocation = (1 << 0),
+    NSGradientDrawsAfterEndingLocation = (1 << 1),
+}
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSColorSpace colorSpace ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorSpace);
-        return result !is null ? new NSColorSpace(result) : null;
-    }
+public class NSGradient : NSObject {
 
-    public void drawFromCenter (NSPoint startCenter, CGFloat startRadius, NSPoint endCenter, CGFloat endRadius, NSGradientDrawingOptions options)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawFromCenter_1radius_1toCenter_1radius_1options_1, startCenter, startRadius, endCenter, endRadius, options);
-    }
-
-    public void drawFromPoint (NSPoint startingPoint, NSPoint endingPoint, NSGradientDrawingOptions options)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawFromPoint_1toPoint_1options_1, startingPoint, endingPoint, options);
-    }
+public this() {
+    super();
+}
 
-    public void drawInBezierPath_angle_ (NSBezierPath path, CGFloat angle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawInBezierPath_1angle_1, path !is null ? path.id_ : null, angle);
-    }
-
-    public void drawInBezierPath_relativeCenterPosition_ (NSBezierPath path, NSPoint relativeCenterPosition)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawInBezierPath_1relativeCenterPosition_1, path !is null ? path.id_ : null, relativeCenterPosition);
-    }
-
-    public void drawInRect_angle_ (NSRect rect, CGFloat angle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawInRect_1angle_1, rect, angle);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void drawInRect_relativeCenterPosition_ (NSRect rect, NSPoint relativeCenterPosition)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawInRect_1relativeCenterPosition_1, rect, relativeCenterPosition);
-    }
-
-    public void getColor (objc.id** color, CGFloat* location, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getColor_1location_1atIndex_1, color, location, index);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSGradient initWithColors_ (NSArray colorArray)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithColors_1, colorArray !is null ? colorArray.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSGradient initWithColors_atLocations_colorSpace_ (NSArray colorArray, /*const*/CGFloat* locations, NSColorSpace colorSpace)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithColors_1atLocations_1colorSpace_1, colorArray !is null ? colorArray.id_ : null,
-                locations, colorSpace !is null ? colorSpace.id_ : null);
-        return result !is null ? this : null;
-    }
+public void drawFromPoint(NSPoint startingPoint, NSPoint endingPoint, NSGradientDrawingOptions options) {
+    OS.objc_msgSend(this.id, OS.sel_drawFromPoint_toPoint_options_, startingPoint, endingPoint, options);
+}
 
-    public NSGradient initWithColorsAndLocations (NSColor initWithColorsAndLocations)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithColorsAndLocations_1,
-                initWithColorsAndLocations !is null ? initWithColorsAndLocations.id_ : null);
-        return result !is null ? this : null;
-    }
+public void drawInRect(NSRect rect, CGFloat angle) {
+    OS.objc_msgSend(this.id, OS.sel_drawInRect_angle_, rect, angle);
+}
 
-    public NSGradient initWithStartingColor (NSColor startingColor, NSColor endingColor)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithStartingColor_1endingColor_1, startingColor !is null ? startingColor.id_ : null,
-                endingColor !is null ? endingColor.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSColor interpolatedColorAtLocation (CGFloat location)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_interpolatedColorAtLocation_1, location);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSInteger numberOfColorStops ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfColorStops);
-    }
+public NSGradient initWithStartingColor(NSColor startingColor, NSColor endingColor) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithStartingColor_endingColor_, startingColor !is null ? startingColor.id : null, endingColor !is null ? endingColor.id : null);
+    return result is this.id ? this : (result !is null ? new NSGradient(result) : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSGraphicsContext.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSGraphicsContext.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,230 +1,99 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSGraphicsContext;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSBitmapImageRep;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSImage : NSCompositingOperation;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-enum NSColorRenderingIntent : NSInteger
-{
-    NSColorRenderingIntentDefault,
-    NSColorRenderingIntentAbsoluteColorimetric,
-    NSColorRenderingIntentRelativeColorimetric,
-    NSColorRenderingIntentPerceptual,
-    NSColorRenderingIntentSaturation
-}
-
-alias NSColorRenderingIntent.NSColorRenderingIntentDefault NSColorRenderingIntentDefault;
-alias NSColorRenderingIntent.NSColorRenderingIntentAbsoluteColorimetric NSColorRenderingIntentAbsoluteColorimetric;
-alias NSColorRenderingIntent.NSColorRenderingIntentRelativeColorimetric NSColorRenderingIntentRelativeColorimetric;
-alias NSColorRenderingIntent.NSColorRenderingIntentPerceptual NSColorRenderingIntentPerceptual;
-alias NSColorRenderingIntent.NSColorRenderingIntentSaturation NSColorRenderingIntentSaturation;
-
-enum NSImageInterpolation : NSUInteger
+enum NSImageInterpolation
 {
     NSImageInterpolationDefault,
     NSImageInterpolationNone,
     NSImageInterpolationLow,
     NSImageInterpolationHigh
+} 
+
+public class NSGraphicsContext : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public static NSGraphicsContext currentContext() {
+    objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_currentContext);
+    return result !is null ? new NSGraphicsContext(result) : null;
+}
+
+public void flushGraphics() {
+    OS.objc_msgSend(this.id, OS.sel_flushGraphics);
+}
+
+public static NSGraphicsContext graphicsContextWithBitmapImageRep(NSBitmapImageRep bitmapRep) {
+    objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithBitmapImageRep_, bitmapRep !is null ? bitmapRep.id : null);
+    return result !is null ? new NSGraphicsContext(result) : null;
 }
 
-alias NSImageInterpolation.NSImageInterpolationDefault NSImageInterpolationDefault;
-alias NSImageInterpolation.NSImageInterpolationNone NSImageInterpolationNone;
-alias NSImageInterpolation.NSImageInterpolationLow NSImageInterpolationLow;
-alias NSImageInterpolation.NSImageInterpolationHigh NSImageInterpolationHigh;
-
-public class NSGraphicsContext : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    //public CIContext CIContext() {
-    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_CIContext);
-    //  return result !is null ? new CIContext(result) : null;
-    //}
-
-    public NSDictionary attributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSColorRenderingIntent colorRenderingIntent ()
-    {
-        return cast(NSColorRenderingIntent) OS.objc_msgSend(this.id_, OS.sel_colorRenderingIntent);
-    }
-
-    public NSCompositingOperation compositingOperation ()
-    {
-        return cast(NSCompositingOperation) OS.objc_msgSend(this.id_, OS.sel_compositingOperation);
-    }
+public static NSGraphicsContext graphicsContextWithWindow(NSWindow window) {
+    objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithWindow_, window !is null ? window.id : null);
+    return result !is null ? new NSGraphicsContext(result) : null;
+}
 
-    public static NSGraphicsContext currentContext ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_currentContext);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
-
-    public static bool currentContextDrawingToScreen ()
-    {
-        return OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_currentContextDrawingToScreen) !is null;
-    }
-
-    public void flushGraphics ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_flushGraphics);
-    }
-
-    public id focusStack ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_focusStack);
-        return result !is null ? new id(result) : null;
-    }
+public NSImageInterpolation imageInterpolation() {
+    return cast(NSImageInterpolation) OS.objc_msgSend(this.id, OS.sel_imageInterpolation);
+}
 
-    public static NSGraphicsContext graphicsContextWithAttributes (NSDictionary attributes)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithAttributes_1,
-                attributes !is null ? attributes.id_ : null);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
+public void restoreGraphicsState() {
+    OS.objc_msgSend(this.id, OS.sel_restoreGraphicsState);
+}
 
-    public static NSGraphicsContext graphicsContextWithBitmapImageRep (NSBitmapImageRep bitmapRep)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithBitmapImageRep_1,
-                bitmapRep !is null ? bitmapRep.id_ : null);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
-
-    public static NSGraphicsContext graphicsContextWithGraphicsPort (void* graphicsPort, bool initialFlippedState)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithGraphicsPort_1flipped_1, graphicsPort,
-                initialFlippedState);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
-
-    public static NSGraphicsContext graphicsContextWithWindow (NSWindow window)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithWindow_1, window !is null ? window.id_ : null);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
+public void saveGraphicsState() {
+    OS.objc_msgSend(this.id, OS.sel_saveGraphicsState);
+}
 
-    public void* graphicsPort ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_graphicsPort);
-    }
-
-    public NSImageInterpolation imageInterpolation ()
-    {
-        return cast(NSImageInterpolation) OS.objc_msgSend(this.id_, OS.sel_imageInterpolation);
-    }
-
-    public bool isDrawingToScreen ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDrawingToScreen) !is null;
-    }
-
-    public bool isFlipped ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFlipped) !is null;
-    }
+public void setCompositingOperation(NSCompositingOperation operation) {
+    OS.objc_msgSend(this.id, OS.sel_setCompositingOperation_, operation);
+}
 
-    public NSPoint patternPhase ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_patternPhase);
-        return result;
-    }
-
-    public void restoreGraphicsState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_restoreGraphicsState);
-    }
-
-    public static void static_restoreGraphicsState ()
-    {
-        OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_restoreGraphicsState);
-    }
-
-    public void saveGraphicsState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveGraphicsState);
-    }
+public static void setCurrentContext(NSGraphicsContext context) {
+    OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_setCurrentContext_, context !is null ? context.id : null);
+}
 
-    public static void static_saveGraphicsState ()
-    {
-        OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_saveGraphicsState);
-    }
-
-    public void setColorRenderingIntent (NSColorRenderingIntent renderingIntent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColorRenderingIntent_1, renderingIntent);
-    }
-
-    public void setCompositingOperation (NSCompositingOperation operation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCompositingOperation_1, operation);
-    }
-
-    public static void setCurrentContext (NSGraphicsContext context)
-    {
-        OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_setCurrentContext_1, context !is null ? context.id_ : null);
-    }
-
-    public void setFocusStack (id stack)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFocusStack_1, stack !is null ? stack.id_ : null);
-    }
+public void setImageInterpolation(NSImageInterpolation interpolation) {
+    OS.objc_msgSend(this.id, OS.sel_setImageInterpolation_, interpolation);
+}
 
-    public static void setGraphicsState (NSInteger gState)
-    {
-        OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_setGraphicsState_1, gState);
-    }
-
-    public void setImageInterpolation (NSImageInterpolation interpolation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageInterpolation_1, interpolation);
-    }
+public void setPatternPhase(NSPoint phase) {
+    OS.objc_msgSend(this.id, OS.sel_setPatternPhase_, phase);
+}
 
-    public void setPatternPhase (NSPoint phase)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPatternPhase_1, phase);
-    }
-
-    public void setShouldAntialias (bool antialias)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShouldAntialias_1, antialias);
-    }
-
-    public bool shouldAntialias ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldAntialias) !is null;
-    }
+public void setShouldAntialias(bool antialias) {
+    OS.objc_msgSend(this.id, OS.sel_setShouldAntialias_, antialias);
+}
 
 }
--- a/dwt/internal/cocoa/NSHTTPCookie.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSHTTPCookie.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,133 +1,40 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSHTTPCookie;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSHTTPCookie : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString comment ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_comment);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSURL commentURL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_commentURL);
-        return result !is null ? new NSURL(result) : null;
-    }
+public class NSHTTPCookie : NSObject {
 
-    public static id cookieWithProperties (NSDictionary properties)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHTTPCookie, OS.sel_cookieWithProperties_1, properties !is null ? properties.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSArray cookiesWithResponseHeaderFields (NSDictionary headerFields, NSURL URL)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHTTPCookie, OS.sel_cookiesWithResponseHeaderFields_1forURL_1,
-                headerFields !is null ? headerFields.id_ : null, URL !is null ? URL.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString domain ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_domain);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDate expiresDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_expiresDate);
-        return result !is null ? new NSDate(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public id initWithProperties (NSDictionary properties)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithProperties_1, properties !is null ? properties.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isSecure ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSecure) !is null;
-    }
-
-    public bool isSessionOnly ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSessionOnly) !is null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString path ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_path);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSArray portList ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portList);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSDictionary properties ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_properties);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static NSDictionary requestHeaderFieldsWithCookies (NSArray cookies)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHTTPCookie, OS.sel_requestHeaderFieldsWithCookies_1, cookies !is null ? cookies.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString value ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_value);
-        return result !is null ? new NSString(result) : null;
-    }
-
-//public NSUInteger version() {
-//  return OS.objc_msgSend(this.id_, OS.sel_version);
-//}
+public bool isSessionOnly() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isSessionOnly);
+}
 
 }
--- a/dwt/internal/cocoa/NSHTTPCookieStorage.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSHTTPCookieStorage.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,87 +1,52 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSHTTPCookieStorage;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSHTTPCookie;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSHTTPCookieAcceptPolicy
-{
-    NSHTTPCookieAcceptPolicyAlways,
-    NSHTTPCookieAcceptPolicyNever,
-    NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
+public class NSHTTPCookieStorage : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
 }
 
-public class NSHTTPCookieStorage : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSHTTPCookieAcceptPolicy cookieAcceptPolicy ()
-    {
-        return cast(NSHTTPCookieAcceptPolicy) OS.objc_msgSend(this.id_, OS.sel_cookieAcceptPolicy);
-    }
-
-    public NSArray cookies ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cookies);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSArray cookies() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_cookies);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public NSArray cookiesForURL (NSURL URL)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cookiesForURL_1, URL !is null ? URL.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void deleteCookie (NSHTTPCookie cookie)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteCookie_1, cookie !is null ? cookie.id_ : null);
-    }
-
-    public void setCookie (NSHTTPCookie cookie)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCookie_1, cookie !is null ? cookie.id_ : null);
-    }
+public void deleteCookie(NSHTTPCookie cookie) {
+    OS.objc_msgSend(this.id, OS.sel_deleteCookie_, cookie !is null ? cookie.id : null);
+}
 
-    public void setCookieAcceptPolicy (NSHTTPCookieAcceptPolicy cookieAcceptPolicy)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCookieAcceptPolicy_1, cookieAcceptPolicy);
-    }
-
-    public void setCookies (NSArray cookies, NSURL URL, NSURL mainDocumentURL)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCookies_1forURL_1mainDocumentURL_1, cookies !is null ? cookies.id_ : null, URL !is null ? URL.id_ : null,
-                mainDocumentURL !is null ? mainDocumentURL.id_ : null);
-    }
-
-    public static NSHTTPCookieStorage sharedHTTPCookieStorage ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHTTPCookieStorage, OS.sel_sharedHTTPCookieStorage);
-        return result !is null ? new NSHTTPCookieStorage(result) : null;
-    }
+public static NSHTTPCookieStorage sharedHTTPCookieStorage() {
+    objc.id result = OS.objc_msgSend(OS.class_NSHTTPCookieStorage, OS.sel_sharedHTTPCookieStorage);
+    return result !is null ? new NSHTTPCookieStorage(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSHTTPURLResponse.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSHTTPURLResponse;
-
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURLResponse;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSHTTPURLResponse : NSURLResponse
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSDictionary allHeaderFields ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allHeaderFields);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public static NSString localizedStringForStatusCode (NSInteger statusCode)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHTTPURLResponse, OS.sel_localizedStringForStatusCode_1, statusCode);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger statusCode ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_statusCode);
-    }
-
-}
--- a/dwt/internal/cocoa/NSHashEnumerator.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSHashEnumerator;
-
-public class NSHashEnumerator {
-//TODO
-}
--- a/dwt/internal/cocoa/NSHashTable.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSHashTable;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSEnumerator;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPointerFunctions;
-import dwt.internal.cocoa.NSSet;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSHashTable : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObject_1, object !is null ? object.id_ : null);
-    }
-
-    public NSArray allObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id anyObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_anyObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool containsObject (id anObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsObject_1, anObject !is null ? anObject.id_ : null) !is null;
-    }
-
-    public NSUInteger count ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
-    }
-
-    public static id hashTableWithOptions (NSPointerFunctionsOptions options)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHashTable, OS.sel_hashTableWithOptions_1, options);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id hashTableWithWeakObjects ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHashTable, OS.sel_hashTableWithWeakObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithOptions (NSPointerFunctionsOptions options, NSUInteger initialCapacity)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithOptions_1capacity_1, options, initialCapacity);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithPointerFunctions (NSPointerFunctions functions, NSUInteger initialCapacity)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPointerFunctions_1capacity_1, functions !is null ? functions.id_ : null,
-                initialCapacity);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void intersectHashTable (NSHashTable other)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_intersectHashTable_1, other !is null ? other.id_ : null);
-    }
-
-    public bool intersectsHashTable (NSHashTable other)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_intersectsHashTable_1, other !is null ? other.id_ : null) !is null;
-    }
-
-    public bool isEqualToHashTable (NSHashTable other)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToHashTable_1, other !is null ? other.id_ : null) !is null;
-    }
-
-    public bool isSubsetOfHashTable (NSHashTable other)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSubsetOfHashTable_1, other !is null ? other.id_ : null) !is null;
-    }
-
-    public id member (id object)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_member_1, object !is null ? object.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void minusHashTable (NSHashTable other)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_minusHashTable_1, other !is null ? other.id_ : null);
-    }
-
-    public NSEnumerator objectEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public NSPointerFunctions pointerFunctions ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pointerFunctions);
-        return result !is null ? new NSPointerFunctions(result) : null;
-    }
-
-    public void removeAllObjects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllObjects);
-    }
-
-    public void removeObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObject_1, object !is null ? object.id_ : null);
-    }
-
-    public NSSet setRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_setRepresentation);
-        return result !is null ? new NSSet(result) : null;
-    }
-
-    public void unionHashTable (NSHashTable other)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unionHashTable_1, other !is null ? other.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSHashTableCallBacks.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSHashTableCallBacks;
-
-import dwt.internal.cocoa.NSHashTable;
-import dwt.internal.cocoa.NSString;
-
-public struct NSHashTableCallBacks {
-    extern (C):
-        
-    uint function (NSHashTable table, /*const*/ void*) hash;
-    bool function (NSHashTable table, /*const*/ void*, /*const*/ void*) isEqual;
-    void function (NSHashTable table, /*const*/ void*) retain;
-    void function (NSHashTable table, void*) release;
-    NSString function (NSHashTable table, /*const*/ void*) describe;
-}
--- a/dwt/internal/cocoa/NSHelpManager.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSHelpManager;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSHelpManager : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSAttributedString contextHelpForObject (id object)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contextHelpForObject_1, object !is null ? object.id_ : null);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public void findString (NSString query, NSString book)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_findString_1inBook_1, query !is null ? query.id_ : null, book !is null ? book.id_ : null);
-    }
-
-    public static bool isContextHelpModeActive ()
-    {
-        return OS.objc_msgSend(OS.class_NSHelpManager, OS.sel_isContextHelpModeActive) !is null;
-    }
-
-    public void openHelpAnchor (NSString anchor, NSString book)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_openHelpAnchor_1inBook_1, anchor !is null ? anchor.id_ : null, book !is null ? book.id_ : null);
-    }
-
-    public void removeContextHelpForObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeContextHelpForObject_1, object !is null ? object.id_ : null);
-    }
-
-    public void setContextHelp (NSAttributedString attrString, id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContextHelp_1forObject_1, attrString !is null ? attrString.id_ : null, object !is null ? object.id_ : null);
-    }
-
-    public static void setContextHelpModeActive (bool active)
-    {
-        OS.objc_msgSend(OS.class_NSHelpManager, OS.sel_setContextHelpModeActive_1, active);
-    }
-
-    public static NSHelpManager sharedHelpManager ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHelpManager, OS.sel_sharedHelpManager);
-        return result !is null ? new NSHelpManager(result) : null;
-    }
-
-    public bool showContextHelpForObject (id object, NSPoint pt)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showContextHelpForObject_1locationHint_1, object !is null ? object.id_ : null, pt) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSHost.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSHost;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSHost : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString address ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_address);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray addresses ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addresses);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSHost currentHost ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHost, OS.sel_currentHost);
-        return result !is null ? new NSHost(result) : null;
-    }
-
-    public static void flushHostCache ()
-    {
-        OS.objc_msgSend(OS.class_NSHost, OS.sel_flushHostCache);
-    }
-
-    public static NSHost hostWithAddress (NSString address)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHost, OS.sel_hostWithAddress_1, address !is null ? address.id_ : null);
-        return result !is null ? new NSHost(result) : null;
-    }
-
-    public static NSHost hostWithName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSHost, OS.sel_hostWithName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSHost(result) : null;
-    }
-
-    public bool isEqualToHost (NSHost aHost)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToHost_1, aHost !is null ? aHost.id_ : null) !is null;
-    }
-
-    public static bool isHostCacheEnabled ()
-    {
-        return OS.objc_msgSend(OS.class_NSHost, OS.sel_isHostCacheEnabled) !is null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray names ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_names);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static void setHostCacheEnabled (bool flag)
-    {
-        OS.objc_msgSend(OS.class_NSHost, OS.sel_setHostCacheEnabled_1, flag);
-    }
-
-}
--- a/dwt/internal/cocoa/NSImage.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSImage.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,461 +1,104 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSImage;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.IconRef;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSBitmapImageRep : NSTIFFCompression;
-import dwt.internal.cocoa.NSColor;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSData;
 import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSImageRep;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPasteboard;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-enum NSCompositingOperation : NSUInteger
-{
-    NSCompositeClear = 0,
-    NSCompositeCopy = 1,
-    NSCompositeSourceOver = 2,
-    NSCompositeSourceIn = 3,
-    NSCompositeSourceOut = 4,
-    NSCompositeSourceAtop = 5,
-    NSCompositeDestinationOver = 6,
-    NSCompositeDestinationIn = 7,
-    NSCompositeDestinationOut = 8,
-    NSCompositeDestinationAtop = 9,
-    NSCompositeXOR = 10,
-    NSCompositePlusDarker = 11,
-    NSCompositeHighlight = 12,
-    NSCompositePlusLighter = 13
-}
-
-alias NSCompositingOperation.NSCompositeClear NSCompositeClear;
-alias NSCompositingOperation.NSCompositeCopy NSCompositeCopy;
-alias NSCompositingOperation.NSCompositeSourceOver NSCompositeSourceOver;
-alias NSCompositingOperation.NSCompositeSourceIn NSCompositeSourceIn;
-alias NSCompositingOperation.NSCompositeSourceOut NSCompositeSourceOut;
-alias NSCompositingOperation.NSCompositeSourceAtop NSCompositeSourceAtop;
-alias NSCompositingOperation.NSCompositeDestinationOver NSCompositeDestinationOver;
-alias NSCompositingOperation.NSCompositeDestinationIn NSCompositeDestinationIn;
-alias NSCompositingOperation.NSCompositeDestinationOut NSCompositeDestinationOut;
-alias NSCompositingOperation.NSCompositeDestinationAtop NSCompositeDestinationAtop;
-alias NSCompositingOperation.NSCompositeXOR NSCompositeXOR;
-alias NSCompositingOperation.NSCompositePlusDarker NSCompositePlusDarker;
-alias NSCompositingOperation.NSCompositeHighlight NSCompositeHighlight;
-alias NSCompositingOperation.NSCompositePlusLighter NSCompositePlusLighter;
-
-enum NSImageCacheMode : NSUInteger
+enum NSImageCacheMode
 {
     NSImageCacheDefault,
     NSImageCacheAlways,
     NSImageCacheBySize,
     NSImageCacheNever
+} 
+
+public class NSImage : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public NSData TIFFRepresentation() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_TIFFRepresentation);
+    return result !is null ? new NSData(result) : null;
+}
+
+public void addRepresentation(NSImageRep imageRep) {
+    OS.objc_msgSend(this.id, OS.sel_addRepresentation_, imageRep !is null ? imageRep.id : null);
+}
+
+public NSImageRep bestRepresentationForDevice(NSDictionary deviceDescription) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_bestRepresentationForDevice_, deviceDescription !is null ? deviceDescription.id : null);
+    return result !is null ? new NSImageRep(result) : null;
+}
+
+public void drawAtPoint(NSPoint point, NSRect fromRect, NSCompositingOperation op, CGFloat delta) {
+    OS.objc_msgSend(this.id, OS.sel_drawAtPoint_fromRect_operation_fraction_, point, fromRect, op, delta);
 }
 
-alias NSImageCacheMode.NSImageCacheDefault NSImageCacheDefault;
-alias NSImageCacheMode.NSImageCacheAlways NSImageCacheAlways;
-alias NSImageCacheMode.NSImageCacheBySize NSImageCacheBySize;
-alias NSImageCacheMode.NSImageCacheNever NSImageCacheNever;
-
-public class NSImage : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData TIFFRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_TIFFRepresentation);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData TIFFRepresentationUsingCompression (NSTIFFCompression comp, float aFloat)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_TIFFRepresentationUsingCompression_1factor_1, comp, aFloat);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void addRepresentation (NSImageRep imageRep)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addRepresentation_1, imageRep !is null ? imageRep.id_ : null);
-    }
-
-    public void addRepresentations (NSArray imageReps)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addRepresentations_1, imageReps !is null ? imageReps.id_ : null);
-    }
-
-    public NSRect alignmentRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_alignmentRect);
-        return result;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSImageRep bestRepresentationForDevice (NSDictionary deviceDescription)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_bestRepresentationForDevice_1, deviceDescription !is null ? deviceDescription.id_ : null);
-        return result !is null ? new NSImageRep(result) : null;
-    }
-
-    public bool cacheDepthMatchesImageDepth ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_cacheDepthMatchesImageDepth) !is null;
-    }
-
-    public NSImageCacheMode cacheMode ()
-    {
-        return cast(NSImageCacheMode) OS.objc_msgSend(this.id_, OS.sel_cacheMode);
-    }
-
-    public static bool canInitWithPasteboard (NSPasteboard pasteboard)
-    {
-        return OS.objc_msgSend(OS.class_NSImage, OS.sel_canInitWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null) !is null;
-    }
-
-    public void cancelIncrementalLoad ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelIncrementalLoad);
-    }
-
-    public void compositeToPoint_fromRect_operation_ (NSPoint point, NSRect rect, NSCompositingOperation op)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_compositeToPoint_1fromRect_1operation_1, point, rect, op);
-    }
-
-    public void compositeToPoint_fromRect_operation_fraction_ (NSPoint point, NSRect rect, NSCompositingOperation op, CGFloat delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_compositeToPoint_1fromRect_1operation_1fraction_1, point, rect, op, delta);
-    }
-
-    public void compositeToPoint_operation_ (NSPoint point, NSCompositingOperation op)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_compositeToPoint_1operation_1, point, op);
-    }
+public void drawInRect(NSRect rect, NSRect fromRect, NSCompositingOperation op, CGFloat delta) {
+    OS.objc_msgSend(this.id, OS.sel_drawInRect_fromRect_operation_fraction_, rect, fromRect, op, delta);
+}
 
-    public void compositeToPoint_operation_fraction_ (NSPoint point, NSCompositingOperation op, CGFloat delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_compositeToPoint_1operation_1fraction_1, point, op, delta);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void dissolveToPoint_fraction_ (NSPoint point, CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dissolveToPoint_1fraction_1, point, aFloat);
-    }
-
-    public void dissolveToPoint_fromRect_fraction_ (NSPoint point, NSRect rect, CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dissolveToPoint_1fromRect_1fraction_1, point, rect, aFloat);
-    }
-
-    public void drawAtPoint (NSPoint point, NSRect fromRect, NSCompositingOperation op, CGFloat delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawAtPoint_1fromRect_1operation_1fraction_1, point, fromRect, op, delta);
-    }
-
-    public void drawInRect (NSRect rect, NSRect fromRect, NSCompositingOperation op, CGFloat delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawInRect_1fromRect_1operation_1fraction_1, rect, fromRect, op, delta);
-    }
-
-    public bool drawRepresentation (NSImageRep imageRep, NSRect rect)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawRepresentation_1inRect_1, imageRep !is null ? imageRep.id_ : null, rect) !is null;
-    }
-
-    public static NSArray imageFileTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageFileTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static id imageNamed (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageNamed_1, name !is null ? name.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public NSImage initByReferencingFile(NSString fileName) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initByReferencingFile_, fileName !is null ? fileName.id : null);
+    return result is this.id ? this : (result !is null ? new NSImage(result) : null);
+}
 
-    public static NSArray imagePasteboardTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imagePasteboardTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageUnfilteredFileTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageUnfilteredFileTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageUnfilteredPasteboardTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageUnfilteredPasteboardTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageUnfilteredTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageUnfilteredTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSImage initByReferencingFile (NSString fileName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initByReferencingFile_1, fileName !is null ? fileName.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSImage initByReferencingURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initByReferencingURL_1, url !is null ? url.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSImage initWithContentsOfFile (NSString fileName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1, fileName !is null ? fileName.id_ : null);
-        return result !is null ? this : null;
-    }
+public cocoa.id initWithData(NSData data) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithData_, data !is null ? data.id : null);
+    return result !is null ? new id(result) : null;
+}
 
-    public NSImage initWithContentsOfURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSImage initWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSImage initWithIconRef (IconRef iconRef)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIconRef_1, iconRef);
-        return result !is null ? this : null;
-    }
-
-    public NSImage initWithPasteboard (NSPasteboard pasteboard)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSImage initWithSize (NSSize aSize)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSize_1, aSize);
-        return result !is null ? this : null;
-    }
-
-    public bool isCachedSeparately ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isCachedSeparately) !is null;
-    }
-
-    public bool isDataRetained ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDataRetained) !is null;
-    }
-
-    public bool isFlipped ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFlipped) !is null;
-    }
+public NSImage initWithSize(NSSize aSize) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithSize_, aSize);
+    return result is this.id ? this : (result !is null ? new NSImage(result) : null);
+}
 
-    public bool isTemplate ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isTemplate) !is null;
-    }
-
-    public bool isValid ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isValid) !is null;
-    }
-
-    public void lockFocus ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_lockFocus);
-    }
-
-    public void lockFocusOnRepresentation (NSImageRep imageRepresentation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_lockFocusOnRepresentation_1, imageRepresentation !is null ? imageRepresentation.id_ : null);
-    }
-
-    public bool matchesOnMultipleResolution ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_matchesOnMultipleResolution) !is null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool prefersColorMatch ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_prefersColorMatch) !is null;
-    }
-
-    public void recache ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_recache);
-    }
-
-    public void removeRepresentation (NSImageRep imageRep)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeRepresentation_1, imageRep !is null ? imageRep.id_ : null);
-    }
-
-    public NSArray representations ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representations);
-        return result !is null ? new NSArray(result) : null;
-    }
+public void setCacheMode(NSImageCacheMode mode) {
+    OS.objc_msgSend(this.id, OS.sel_setCacheMode_, mode);
+}
 
-    public bool scalesWhenResized ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scalesWhenResized) !is null;
-    }
-
-    public void setAlignmentRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlignmentRect_1, rect);
-    }
-
-    public void setBackgroundColor (NSColor aColor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, aColor !is null ? aColor.id_ : null);
-    }
-
-    public void setCacheDepthMatchesImageDepth (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCacheDepthMatchesImageDepth_1, flag);
-    }
-
-    public void setCacheMode (NSImageCacheMode mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCacheMode_1, mode);
-    }
-
-    public void setCachedSeparately (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCachedSeparately_1, flag);
-    }
-
-    public void setDataRetained (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDataRetained_1, flag);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setFlipped (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFlipped_1, flag);
-    }
+public void setSize(NSSize aSize) {
+    OS.objc_msgSend(this.id, OS.sel_setSize_, aSize);
+}
 
-    public void setMatchesOnMultipleResolution (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMatchesOnMultipleResolution_1, flag);
-    }
-
-    public bool setName (NSString string)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setName_1, string !is null ? string.id_ : null) !is null;
-    }
-
-    public void setPrefersColorMatch (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPrefersColorMatch_1, flag);
-    }
-
-    public void setScalesWhenResized (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScalesWhenResized_1, flag);
-    }
-
-    public void setSize (NSSize aSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSize_1, aSize);
-    }
-
-    public void setTemplate (bool isTemplate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTemplate_1, isTemplate);
-    }
-
-    public void setUsesEPSOnResolutionMismatch (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesEPSOnResolutionMismatch_1, flag);
-    }
-
-    public NSSize size ()
-    {
-        NSSize result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_size);
-        return result;
-    }
-
-    public void unlockFocus ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unlockFocus);
-    }
-
-    public bool usesEPSOnResolutionMismatch ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesEPSOnResolutionMismatch) !is null;
-    }
+public NSSize size() {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_size);
+    return result;
+}
 
 }
--- a/dwt/internal/cocoa/NSImageCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSImageCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,22 +1,12 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
+/**
+ * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Nov 28, 2008
+ * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
+ * 
+ */
 module dwt.internal.cocoa.NSImageCell;
 
-import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
 enum NSImageAlignment
 {
     NSImageAlignCenter = 0,
@@ -28,65 +18,4 @@
     NSImageAlignBottomLeft,
     NSImageAlignBottomRight,
     NSImageAlignRight
-}
-
-enum NSImageFrameStyle
-{
-    NSImageFrameNone = 0,
-    NSImageFramePhoto,
-    NSImageFrameGrayBezel,
-    NSImageFrameGroove,
-    NSImageFrameButton
-}
-
-enum NSImageScaling
-{
-    NSScaleProportionally = 0,
-    NSScaleToFit,
-    NSScaleNone
-}
-
-public class NSImageCell : NSCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSImageAlignment imageAlignment ()
-    {
-        return cast(NSImageAlignment) OS.objc_msgSend(this.id_, OS.sel_imageAlignment);
-    }
-
-    public NSImageFrameStyle imageFrameStyle ()
-    {
-        return cast(NSImageFrameStyle) OS.objc_msgSend(this.id_, OS.sel_imageFrameStyle);
-    }
-
-    public NSImageScaling imageScaling ()
-    {
-        return cast(NSImageScaling) OS.objc_msgSend(this.id_, OS.sel_imageScaling);
-    }
-
-    public void setImageAlignment (NSImageAlignment newAlign)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageAlignment_1, newAlign);
-    }
-
-    public void setImageFrameStyle (NSImageFrameStyle newStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageFrameStyle_1, newStyle);
-    }
-
-    public void setImageScaling (NSImageScaling newScaling)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageScaling_1, newScaling);
-    }
-
-}
+} 
\ No newline at end of file
--- a/dwt/internal/cocoa/NSImageRep.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSImageRep.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,249 +1,53 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSImageRep;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPasteboard;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSImageRep : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSInteger bitsPerSample ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_bitsPerSample);
-    }
-
-    public static bool canInitWithData (NSData data)
-    {
-        return OS.objc_msgSend(OS.class_NSImageRep, OS.sel_canInitWithData_1, data !is null ? data.id_ : null) !is null;
-    }
+public class NSImageRep : NSObject {
 
-    public static bool canInitWithPasteboard (NSPasteboard pasteboard)
-    {
-        return OS.objc_msgSend(OS.class_NSImageRep, OS.sel_canInitWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null) !is null;
-    }
-
-    public NSString colorSpaceName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorSpaceName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool draw ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_draw) !is null;
-    }
-
-    public bool drawAtPoint (NSPoint point)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawAtPoint_1, point) !is null;
-    }
-
-    public bool drawInRect (NSRect rect)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawInRect_1, rect) !is null;
-    }
+public this() {
+    super();
+}
 
-    public bool hasAlpha ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasAlpha) !is null;
-    }
-
-    public static NSArray imageFileTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageFileTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imagePasteboardTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imagePasteboardTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static objc.Class imageRepClassForData (NSData data)
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepClassForData_1, data !is null ? data.id_ : null);
-    }
-
-    public static objc.Class imageRepClassForFileType (NSString type)
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepClassForFileType_1, type !is null ? type.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static objc.Class imageRepClassForPasteboardType (NSString type)
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepClassForPasteboardType_1, type !is null ? type.id_ : null);
-    }
-
-    public static objc.Class imageRepClassForType (NSString type)
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepClassForType_1, type !is null ? type.id_ : null);
-    }
-
-    public static id imageRepWithContentsOfFile (NSString filename)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepWithContentsOfFile_1, filename !is null ? filename.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id imageRepWithContentsOfURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id imageRepWithPasteboard (NSPasteboard pasteboard)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static NSArray imageRepsWithContentsOfFile (NSString filename)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepsWithContentsOfFile_1, filename !is null ? filename.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageRepsWithContentsOfURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepsWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageRepsWithPasteboard (NSPasteboard pasteboard)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepsWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSInteger bitsPerSample() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_bitsPerSample);
+}
 
-    public static NSArray imageUnfilteredFileTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageUnfilteredFileTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageUnfilteredPasteboardTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageUnfilteredPasteboardTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray imageUnfilteredTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageUnfilteredTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool isOpaque ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOpaque) !is null;
-    }
-
-    public NSInteger pixelsHigh ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_pixelsHigh);
-    }
-
-    public NSInteger pixelsWide ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_pixelsWide);
-    }
+public bool hasAlpha() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_hasAlpha);
+}
 
-    public static void registerImageRepClass (objc.Class imageRepClass)
-    {
-        OS.objc_msgSend(OS.class_NSImageRep, OS.sel_registerImageRepClass_1, imageRepClass);
-    }
-
-    public static NSArray registeredImageRepClasses ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_registeredImageRepClasses);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setAlpha (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlpha_1, flag);
-    }
-
-    public void setBitsPerSample (NSInteger anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBitsPerSample_1, anInt);
-    }
-
-    public void setColorSpaceName (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColorSpaceName_1, string !is null ? string.id_ : null);
-    }
+public NSInteger pixelsHigh() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_pixelsHigh);
+}
 
-    public void setOpaque (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOpaque_1, flag);
-    }
-
-    public void setPixelsHigh (NSInteger anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPixelsHigh_1, anInt);
-    }
-
-    public void setPixelsWide (NSInteger anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPixelsWide_1, anInt);
-    }
-
-    public void setSize (NSSize aSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSize_1, aSize);
-    }
-
-    public NSSize size ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_size);
-        return result;
-    }
-
-    public static void unregisterImageRepClass (objc.Class imageRepClass)
-    {
-        OS.objc_msgSend(OS.class_NSImageRep, OS.sel_unregisterImageRepClass_1, imageRepClass);
-    }
+public NSInteger pixelsWide() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_pixelsWide);
+}
 
 }
--- a/dwt/internal/cocoa/NSImageView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSImageView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,106 +1,59 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSImageView;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSCell;
 import dwt.internal.cocoa.NSControl;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSImageCell : NSImageAlignment, NSImageFrameStyle, NSImageScaling;
+import dwt.internal.cocoa.NSImageCell;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSImageView : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSImageView : NSControl {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool allowsCutCopyPaste ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsCutCopyPaste) !is null;
-    }
+public this() {
+    super();
+}
 
-    public bool animates ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_animates) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSImageAlignment imageAlignment ()
-    {
-        return cast(NSImageAlignment) OS.objc_msgSend(this.id_, OS.sel_imageAlignment);
-    }
-
-    public NSImageFrameStyle imageFrameStyle ()
-    {
-        return cast(NSImageFrameStyle) OS.objc_msgSend(this.id_, OS.sel_imageFrameStyle);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSImageScaling imageScaling ()
-    {
-        return cast(NSImageScaling) OS.objc_msgSend(this.id_, OS.sel_imageScaling);
-    }
-
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
+public void setImage(NSImage newImage) {
+    OS.objc_msgSend(this.id, OS.sel_setImage_, newImage !is null ? newImage.id : null);
+}
 
-    public void setAllowsCutCopyPaste (bool allow)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsCutCopyPaste_1, allow);
-    }
-
-    public void setAnimates (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAnimates_1, flag);
-    }
+public void setImageAlignment(NSImageAlignment newAlign) {
+    OS.objc_msgSend(this.id, OS.sel_setImageAlignment_, newAlign);
+}
 
-    public void setEditable (bool yn)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, yn);
-    }
-
-    public void setImage (NSImage newImage)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, newImage !is null ? newImage.id_ : null);
-    }
+public void setImageScaling(NSImageScaling newScaling) {
+    OS.objc_msgSend(this.id, OS.sel_setImageScaling_, newScaling);
+}
 
-    public void setImageAlignment (NSImageAlignment newAlign)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageAlignment_1, newAlign);
-    }
+public static objc.Class cellClass() {
+    return OS.objc_msgSend(OS.class_NSImageView, OS.sel_cellClass);
+}
 
-    public void setImageFrameStyle (NSImageFrameStyle newStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageFrameStyle_1, newStyle);
-    }
-
-    public void setImageScaling (NSImageScaling newScaling)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageScaling_1, newScaling);
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSImageView, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSIndexPath.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSIndexPath;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSComparisonResult;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSIndexPath : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSComparisonResult compare (NSIndexPath otherObject)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1, otherObject !is null ? otherObject.id_ : null);
-    }
-
-    public void getIndexes (NSUInteger* indexes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getIndexes_1, indexes);
-    }
-
-    public NSUInteger indexAtPosition (NSUInteger position)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexAtPosition_1, position);
-    }
-
-    public NSIndexPath indexPathByAddingIndex (NSUInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_indexPathByAddingIndex_1, index);
-        return result is this.id_ ? this : (result !is null ? new NSIndexPath(result) : null);
-    }
-
-    public NSIndexPath indexPathByRemovingLastIndex ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_indexPathByRemovingLastIndex);
-        return result is this.id_ ? this : (result !is null ? new NSIndexPath(result) : null);
-    }
-
-    public static id indexPathWithIndex (NSUInteger index)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSIndexPath, OS.sel_indexPathWithIndex_1, index);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id indexPathWithIndexes (NSUInteger* indexes, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSIndexPath, OS.sel_indexPathWithIndexes_1length_1, indexes, length);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithIndex (NSUInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIndex_1, index);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithIndexes (NSUInteger* indexes, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIndexes_1length_1, indexes, length);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSUInteger length ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_length);
-    }
-
-}
--- a/dwt/internal/cocoa/NSIndexSet.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSIndexSet.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,142 +1,60 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSIndexSet;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSIndexSet : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSIndexSet : NSObject {
 
-    public bool containsIndex (NSUInteger value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsIndex_1, value) !is null;
-    }
-
-    public bool containsIndexes (NSIndexSet indexSet)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsIndexes_1, indexSet !is null ? indexSet.id_ : null) !is null;
-    }
-
-    public bool containsIndexesInRange (NSRange range)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsIndexesInRange_1, range) !is null;
-    }
+public this() {
+    super();
+}
 
-    public NSUInteger count ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
-    }
-
-    public NSUInteger countOfIndexesInRange (NSRange range)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_countOfIndexesInRange_1, range);
-    }
-
-    public NSUInteger firstIndex ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_firstIndex);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSUInteger getIndexes (NSUInteger* indexBuffer, NSUInteger bufferSize, NSRangePointer range)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_getIndexes_1maxCount_1inIndexRange_1, indexBuffer, bufferSize, range);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSUInteger indexGreaterThanIndex (NSUInteger value)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexGreaterThanIndex_1, value);
-    }
-
-    public NSUInteger indexGreaterThanOrEqualToIndex (NSUInteger value)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexGreaterThanOrEqualToIndex_1, value);
-    }
+public NSUInteger count() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_count);
+}
 
-    public NSUInteger indexLessThanIndex (NSUInteger value)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexLessThanIndex_1, value);
-    }
-
-    public NSUInteger indexLessThanOrEqualToIndex (NSUInteger value)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexLessThanOrEqualToIndex_1, value);
-    }
+public NSUInteger firstIndex() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_firstIndex);
+}
 
-    public static id indexSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSIndexSet, OS.sel_indexSet);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id indexSetWithIndex (NSUInteger value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSIndexSet, OS.sel_indexSetWithIndex_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id indexSetWithIndexesInRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSIndexSet, OS.sel_indexSetWithIndexesInRange_1, range);
-        return result !is null ? new id(result) : null;
-    }
+public NSUInteger getIndexes(NSUInteger* indexBuffer, NSUInteger bufferSize, NSRangePointer range) {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_getIndexes_maxCount_inIndexRange_, indexBuffer, bufferSize, range);
+}
 
-    public id initWithIndex (NSUInteger value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIndex_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithIndexSet (NSIndexSet indexSet)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIndexSet_1, indexSet !is null ? indexSet.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public cocoa.id initWithIndex(NSUInteger value) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIndex_, value);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
-    public id initWithIndexesInRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIndexesInRange_1, range);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool intersectsIndexesInRange (NSRange range)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_intersectsIndexesInRange_1, range) !is null;
-    }
-
-    public bool isEqualToIndexSet (NSIndexSet indexSet)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToIndexSet_1, indexSet !is null ? indexSet.id_ : null) !is null;
-    }
-
-    public NSUInteger lastIndex ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_lastIndex);
-    }
+public cocoa.id initWithIndexesInRange(NSRange range) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIndexesInRange_, range);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSIndexSpecifier.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSIndexSpecifier;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSIndexSpecifier : NSScriptObjectSpecifier
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSInteger index ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_index);
-    }
-
-    public id initWithContainerClassDescription (NSScriptClassDescription classDesc, NSScriptObjectSpecifier container, NSString property, NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContainerClassDescription_1containerSpecifier_1key_1index_1,
-                classDesc !is null ? classDesc.id_ : null, container !is null ? container.id_ : null, property !is null ? property.id_ : null, index);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIndex_1, index);
-    }
-
-}
--- a/dwt/internal/cocoa/NSInputManager.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSInputManager.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,116 +1,50 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSInputManager;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInputServer;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSInputManager : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSInputManager currentInputManager ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSInputManager, OS.sel_currentInputManager);
-        return result !is null ? new NSInputManager(result) : null;
-    }
+public class NSInputManager : NSObject {
 
-    public static void cycleToNextInputLanguage (id sender)
-    {
-        OS.objc_msgSend(OS.class_NSInputManager, OS.sel_cycleToNextInputLanguage_1, sender !is null ? sender.id_ : null);
-    }
-
-    public static void cycleToNextInputServerInLanguage (id sender)
-    {
-        OS.objc_msgSend(OS.class_NSInputManager, OS.sel_cycleToNextInputServerInLanguage_1, sender !is null ? sender.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public bool handleMouseEvent (NSEvent theMouseEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_handleMouseEvent_1, theMouseEvent !is null ? theMouseEvent.id_ : null) !is null;
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSInputManager initWithName (NSString inputServerName, NSString hostName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1host_1, inputServerName !is null ? inputServerName.id_ : null,
-                hostName !is null ? hostName.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSInputManager(result) : null);
-    }
-
-    public NSString language ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_language);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString localizedInputManagerName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedInputManagerName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void markedTextAbandoned (id cli)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_markedTextAbandoned_1, cli !is null ? cli.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void markedTextSelectionChanged (NSRange newSel, id cli)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_markedTextSelectionChanged_1client_1, newSel, cli !is null ? cli.id_ : null);
-    }
-
-    public NSInputServer server ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_server);
-        return result !is null ? new NSInputServer(result) : null;
-    }
+public static NSInputManager currentInputManager() {
+    objc.id result = OS.objc_msgSend(OS.class_NSInputManager, OS.sel_currentInputManager);
+    return result !is null ? new NSInputManager(result) : null;
+}
 
-    public bool wantsToDelayTextChangeNotifications ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_wantsToDelayTextChangeNotifications) !is null;
-    }
+public bool handleMouseEvent(NSEvent theMouseEvent) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_handleMouseEvent_, theMouseEvent !is null ? theMouseEvent.id : null);
+}
 
-    public bool wantsToHandleMouseEvents ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_wantsToHandleMouseEvents) !is null;
-    }
-
-    public bool wantsToInterpretAllKeystrokes ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_wantsToInterpretAllKeystrokes) !is null;
-    }
+public bool wantsToHandleMouseEvents() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_wantsToHandleMouseEvents);
+}
 
 }
--- a/dwt/internal/cocoa/NSInputServer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSInputServer;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSInputServer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initWithDelegate (id aDelegate, NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDelegate_1name_1, aDelegate !is null ? aDelegate.id_ : null,
-                name !is null ? name.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSInputStream.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSInputStream;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSStream;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSInputStream : NSStream
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool getBuffer (ubyte** buffer, NSUInteger* len)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getBuffer_1length_1, buffer, len) !is null;
-    }
-
-    public bool hasBytesAvailable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasBytesAvailable) !is null;
-    }
-
-    public id initWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithFileAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFileAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id inputStreamWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSInputStream, OS.sel_inputStreamWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id inputStreamWithFileAtPath (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSInputStream, OS.sel_inputStreamWithFileAtPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger read (ubyte* buffer, NSUInteger len)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_read_1maxLength_1, buffer, len);
-    }
-
-}
--- a/dwt/internal/cocoa/NSInteger.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.NSInteger;
-
-import tango.stdc.config;
-
-alias c_long NSInteger;
-alias c_ulong NSUInteger;
\ No newline at end of file
--- a/dwt/internal/cocoa/NSInvocation.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSInvocation;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMethodSignature;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSInvocation : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool argumentsRetained ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_argumentsRetained) !is null;
-    }
-
-    public void getArgument (void* argumentLocation, NSInteger idx)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getArgument_1atIndex_1, argumentLocation, idx);
-    }
-
-    public void getReturnValue (void* retLoc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getReturnValue_1, retLoc);
-    }
-
-    public static NSInvocation invocationWithMethodSignature (NSMethodSignature sig)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSInvocation, OS.sel_invocationWithMethodSignature_1, sig !is null ? sig.id_ : null);
-        return result !is null ? new NSInvocation(result) : null;
-    }
-
-    public void invoke ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invoke);
-    }
-
-    public void invokeWithTarget (id target)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invokeWithTarget_1, target !is null ? target.id_ : null);
-    }
-
-    public NSMethodSignature methodSignature ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_methodSignature);
-        return result !is null ? new NSMethodSignature(result) : null;
-    }
-
-    public void retainArguments ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_retainArguments);
-    }
-
-    public objc.SEL selector ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_selector);
-    }
-
-    public void setArgument (void* argumentLocation, NSInteger idx)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setArgument_1atIndex_1, argumentLocation, idx);
-    }
-
-    public void setReturnValue (void* retLoc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReturnValue_1, retLoc);
-    }
-
-    public void setSelector (objc.SEL selector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelector_1, selector);
-    }
-
-    public void setTarget (id target)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, target !is null ? target.id_ : null);
-    }
-
-    public id target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSInvocationOperation.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSInvocationOperation;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInvocation;
-import dwt.internal.cocoa.NSOperation;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSInvocationOperation : NSOperation
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initWithInvocation (NSInvocation inv)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithInvocation_1, inv !is null ? inv.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithTarget (id target, objc.SEL sel, id arg)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTarget_1selector_1object_1, target !is null ? target.id_ : null, sel,
-                arg !is null ? arg.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInvocation invocation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_invocation);
-        return result !is null ? new NSInvocation(result) : null;
-    }
-
-    public id result ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_result);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSKeyedArchiver.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSKeyedArchiver.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,150 +1,42 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSKeyedArchiver;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSCoder;
 import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMutableData;
-import dwt.internal.cocoa.NSPropertyListFormat;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSKeyedArchiver : NSCoder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static bool archiveRootObject (id rootObject, NSString path)
-    {
-        return OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archiveRootObject_1toFile_1, rootObject !is null ? rootObject.id_ : null,
-                path !is null ? path.id_ : null) !is null;
-    }
-
-    public static NSData archivedDataWithRootObject (id rootObject)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archivedDataWithRootObject_1, rootObject !is null ? rootObject.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
+public class NSKeyedArchiver : NSCoder {
 
-    public NSString classNameForClass_ (objc.Class cls)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_classNameForClass_1, cls);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString static_classNameForClass_ (objc.Class cls)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_classNameForClass_1, cls);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void encodeBool (bool boolv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeBool_1forKey_1, boolv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeBytes (/*const*/ubyte* bytesp, NSUInteger lenv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeBytes_1length_1forKey_1, bytesp, lenv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeConditionalObject (id objv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeConditionalObject_1forKey_1, objv !is null ? objv.id_ : null, key !is null ? key.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void encodeDouble (double realv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeDouble_1forKey_1, realv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeFloat (float realv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeFloat_1forKey_1, realv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeInt32 (int intv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeInt32_1forKey_1, intv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeInt64 (long intv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeInt64_1forKey_1, intv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeInt (int intv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeInt_1forKey_1, intv, key !is null ? key.id_ : null);
-    }
-
-    public void encodeObject (id objv, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeObject_1forKey_1, objv !is null ? objv.id_ : null, key !is null ? key.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void finishEncoding ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_finishEncoding);
-    }
-
-    public id initForWritingWithMutableData (NSMutableData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initForWritingWithMutableData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSPropertyListFormat outputFormat ()
-    {
-        return cast(NSPropertyListFormat) OS.objc_msgSend(this.id_, OS.sel_outputFormat);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static void static_setClassName_forClass_ (NSString codedName, objc.Class cls)
-    {
-        OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_setClassName_1forClass_1, codedName !is null ? codedName.id_ : null, cls);
-    }
-
-    public void setClassName_forClass_ (NSString codedName, objc.Class cls)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setClassName_1forClass_1, codedName !is null ? codedName.id_ : null, cls);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setOutputFormat (NSPropertyListFormat format)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOutputFormat_1, format);
-    }
+public static NSData archivedDataWithRootObject(cocoa.id rootObject) {
+    objc.id result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archivedDataWithRootObject_, rootObject !is null ? rootObject.id : null);
+    return result !is null ? new NSData(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSKeyedUnarchiver.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSKeyedUnarchiver.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,137 +1,42 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSKeyedUnarchiver;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSCoder;
 import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSKeyedUnarchiver : NSCoder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.Class classForClassName_ (NSString codedName)
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_classForClassName_1, codedName !is null ? codedName.id_ : null);
-    }
-
-    public static objc.Class static_classForClassName_ (NSString codedName)
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_classForClassName_1, codedName !is null ? codedName.id_ : null);
-    }
+public class NSKeyedUnarchiver : NSCoder {
 
-    public bool containsValueForKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsValueForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public bool decodeBoolForKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_decodeBoolForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public /*const*/ubyte* decodeBytesForKey (NSString key, NSUInteger* lengthp)
-    {
-        return cast(/*const*/ubyte*) OS.objc_msgSend(this.id_, OS.sel_decodeBytesForKey_1returnedLength_1, key !is null ? key.id_ : null, lengthp);
-    }
-
-    public double decodeDoubleForKey (NSString key)
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_decodeDoubleForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public float decodeFloatForKey (NSString key)
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_decodeFloatForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public int decodeInt32ForKey (NSString key)
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_decodeInt32ForKey_1, key !is null ? key.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public long decodeInt64ForKey (NSString key)
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_decodeInt64ForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public int decodeIntForKey (NSString key)
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_decodeIntForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public id decodeObjectForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decodeObjectForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void finishDecoding ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_finishDecoding);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public id initForReadingWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initForReadingWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setClass_forClassName_ (objc.Class cls, NSString codedName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setClass_1forClassName_1, cls, codedName !is null ? codedName.id_ : null);
-    }
-
-    public static void static_setClass_forClassName_ (objc.Class cls, NSString codedName)
-    {
-        OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_setClass_1forClassName_1, cls, codedName !is null ? codedName.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public static id unarchiveObjectWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_unarchiveObjectWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id unarchiveObjectWithFile (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_unarchiveObjectWithFile_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public static cocoa.id unarchiveObjectWithData(NSData data) {
+    objc.id result = OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_unarchiveObjectWithData_, data !is null ? data.id : null);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSLayoutManager.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSLayoutManager.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,864 +1,134 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSLayoutManager;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSDictionary;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSGlyphGenerator;
-import dwt.internal.cocoa.NSImageCell : NSImageScaling;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSParagraphStyle;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSRulerView;
-import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTextBlock;
 import dwt.internal.cocoa.NSTextContainer;
-import dwt.internal.cocoa.NSTextStorage;
-import dwt.internal.cocoa.NSTextView;
 import dwt.internal.cocoa.NSTypesetter;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
+public class NSLayoutManager : NSObject {
 
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
 
-enum NSGlyphInscription : NSUInteger
-{
-    NSGlyphInscribeBase = 0,
-    NSGlyphInscribeBelow = 1,
-    NSGlyphInscribeAbove = 2,
-    NSGlyphInscribeOverstrike = 3,
-    NSGlyphInscribeOverBelow = 4
+public this(cocoa.id id) {
+    super(id);
+}
+
+public void addTemporaryAttribute(NSString attrName, cocoa.id value, NSRange charRange) {
+    OS.objc_msgSend(this.id, OS.sel_addTemporaryAttribute_value_forCharacterRange_, attrName !is null ? attrName.id : null, value !is null ? value.id : null, charRange);
+}
+
+public void addTextContainer(NSTextContainer container) {
+    OS.objc_msgSend(this.id, OS.sel_addTextContainer_, container !is null ? container.id : null);
 }
 
-alias NSGlyphInscription.NSGlyphInscribeBase NSGlyphInscribeBase;
-alias NSGlyphInscription.NSGlyphInscribeBelow NSGlyphInscribeBelow;
-alias NSGlyphInscription.NSGlyphInscribeAbove NSGlyphInscribeAbove;
-alias NSGlyphInscription.NSGlyphInscribeOverstrike NSGlyphInscribeOverstrike;
-alias NSGlyphInscription.NSGlyphInscribeOverBelow NSGlyphInscribeOverBelow;
+public NSRect boundingRectForGlyphRange(NSRange glyphRange, NSTextContainer container) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_boundingRectForGlyphRange_inTextContainer_, glyphRange, container !is null ? container.id : null);
+    return result;
+}
 
-
+public NSUInteger characterIndexForGlyphAtIndex(NSUInteger glyphIndex) {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_characterIndexForGlyphAtIndex_, glyphIndex);
+}
 
-enum NSTypesetterBehavior : NSInteger
-{
-    NSTypesetterLatestBehavior = -1,
-    NSTypesetterOriginalBehavior = 0,
-    NSTypesetterBehavior_10_2_WithCompatibility = 1,
-    NSTypesetterBehavior_10_2 = 2,
-    NSTypesetterBehavior_10_3 = 3,
-    NSTypesetterBehavior_10_4 = 4
+public CGFloat defaultLineHeightForFont(NSFont theFont) {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_defaultLineHeightForFont_, theFont !is null ? theFont.id : null);
+}
+
+public void drawBackgroundForGlyphRange(NSRange glyphsToShow, NSPoint origin) {
+    OS.objc_msgSend(this.id, OS.sel_drawBackgroundForGlyphRange_atPoint_, glyphsToShow, origin);
+}
+
+public void drawGlyphsForGlyphRange(NSRange glyphsToShow, NSPoint origin) {
+    OS.objc_msgSend(this.id, OS.sel_drawGlyphsForGlyphRange_atPoint_, glyphsToShow, origin);
+}
+
+public NSUInteger getGlyphs(NSGlyph* glyphArray, NSRange glyphRange) {
+    return OS.objc_msgSend(this.id, OS.sel_getGlyphs_range_, glyphArray, glyphRange);
 }
 
-alias NSTypesetterBehavior.NSTypesetterLatestBehavior NSTypesetterLatestBehavior;
-alias NSTypesetterBehavior.NSTypesetterOriginalBehavior NSTypesetterOriginalBehavior;
-alias NSTypesetterBehavior.NSTypesetterBehavior_10_2_WithCompatibility NSTypesetterBehavior_10_2_WithCompatibility;
-alias NSTypesetterBehavior.NSTypesetterBehavior_10_2 NSTypesetterBehavior_10_2;
-alias NSTypesetterBehavior.NSTypesetterBehavior_10_3 NSTypesetterBehavior_10_3;
-alias NSTypesetterBehavior.NSTypesetterBehavior_10_4 NSTypesetterBehavior_10_4;
-
-
-
-public class NSLayoutManager : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addTemporaryAttribute (NSString attrName, id value, NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addTemporaryAttribute_1value_1forCharacterRange_1, attrName !is null ? attrName.id_ : null,
-                value !is null ? value.id_ : null, charRange);
-    }
-
-    public void addTemporaryAttributes (NSDictionary attrs, NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addTemporaryAttributes_1forCharacterRange_1, attrs !is null ? attrs.id_ : null, charRange);
-    }
-
-    public void addTextContainer (NSTextContainer container)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addTextContainer_1, container !is null ? container.id_ : null);
-    }
-
-    public bool allowsNonContiguousLayout ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsNonContiguousLayout) !is null;
-    }
-
-    public NSSize attachmentSizeForGlyphAtIndex (NSUInteger glyphIndex)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_attachmentSizeForGlyphAtIndex_1, glyphIndex);
-        return result;
-    }
-
-    public NSAttributedString attributedString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedString);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public bool backgroundLayoutEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_backgroundLayoutEnabled) !is null;
-    }
-
-    public NSRect boundingRectForGlyphRange (NSRange glyphRange, NSTextContainer container)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundingRectForGlyphRange_1inTextContainer_1, glyphRange,
-                container !is null ? container.id_ : null);
-        return result;
-    }
-
-    public NSRect boundsRectForTextBlock_atIndex_effectiveRange_ (NSTextBlock block, NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundsRectForTextBlock_1atIndex_1effectiveRange_1, block !is null ? block.id_ : null,
-                glyphIndex, effectiveGlyphRange);
-        return result;
-    }
-
-    public NSRect boundsRectForTextBlock_glyphRange_ (NSTextBlock block, NSRange glyphRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundsRectForTextBlock_1glyphRange_1, block !is null ? block.id_ : null, glyphRange);
-        return result;
-    }
-
-    public NSUInteger characterIndexForGlyphAtIndex (NSUInteger glyphIndex)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_characterIndexForGlyphAtIndex_1, glyphIndex);
-    }
-
-    public NSRange characterRangeForGlyphRange (NSRange glyphRange, NSRangePointer actualGlyphRange)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_characterRangeForGlyphRange_1actualGlyphRange_1, glyphRange, actualGlyphRange);
-        return result;
-    }
+public NSUInteger glyphIndexForCharacterAtIndex(NSUInteger charIndex) {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_glyphIndexForCharacterAtIndex_, charIndex);
+}
 
-    public NSImageScaling defaultAttachmentScaling ()
-    {
-        return cast(NSImageScaling) OS.objc_msgSend(this.id_, OS.sel_defaultAttachmentScaling);
-    }
-
-    public CGFloat defaultBaselineOffsetForFont (NSFont theFont)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_defaultBaselineOffsetForFont_1, theFont !is null ? theFont.id_ : null);
-    }
-
-    public CGFloat defaultLineHeightForFont (NSFont theFont)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_defaultLineHeightForFont_1, theFont !is null ? theFont.id_ : null);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void deleteGlyphsInRange (NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteGlyphsInRange_1, glyphRange);
-    }
-
-    public void drawBackgroundForGlyphRange (NSRange glyphsToShow, NSPoint origin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawBackgroundForGlyphRange_1atPoint_1, glyphsToShow, origin);
-    }
-
-    public void drawGlyphsForGlyphRange (NSRange glyphsToShow, NSPoint origin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawGlyphsForGlyphRange_1atPoint_1, glyphsToShow, origin);
-    }
-
-    public void drawStrikethroughForGlyphRange (NSRange glyphRange, NSInteger strikethroughVal, CGFloat baselineOffset, NSRect lineRect,
-            NSRange lineGlyphRange, NSPoint containerOrigin)
-    {
-        OS.objc_msgSend(
-                this.id_,
-                OS.sel_drawStrikethroughForGlyphRange_1strikethroughType_1baselineOffset_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1,
-                glyphRange, strikethroughVal, baselineOffset, lineRect, lineGlyphRange, containerOrigin);
-    }
-
-    public void drawUnderlineForGlyphRange (NSRange glyphRange, NSInteger underlineVal, CGFloat baselineOffset, NSRect lineRect,
-            NSRange lineGlyphRange, NSPoint containerOrigin)
-    {
-        OS.objc_msgSend(this.id_,
-                OS.sel_drawUnderlineForGlyphRange_1underlineType_1baselineOffset_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1,
-                glyphRange, underlineVal, baselineOffset, lineRect, lineGlyphRange, containerOrigin);
-    }
-
-    public bool drawsOutsideLineFragmentForGlyphAtIndex (NSUInteger glyphIndex)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsOutsideLineFragmentForGlyphAtIndex_1, glyphIndex) !is null;
-    }
-
-    public void ensureGlyphsForCharacterRange (NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ensureGlyphsForCharacterRange_1, charRange);
-    }
-
-    public void ensureGlyphsForGlyphRange (NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ensureGlyphsForGlyphRange_1, glyphRange);
-    }
-
-    public void ensureLayoutForBoundingRect (NSRect bounds, NSTextContainer container)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ensureLayoutForBoundingRect_1inTextContainer_1, bounds, container !is null ? container.id_ : null);
-    }
-
-    public void ensureLayoutForCharacterRange (NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ensureLayoutForCharacterRange_1, charRange);
-    }
-
-    public void ensureLayoutForGlyphRange (NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ensureLayoutForGlyphRange_1, glyphRange);
-    }
-
-    public void ensureLayoutForTextContainer (NSTextContainer container)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ensureLayoutForTextContainer_1, container !is null ? container.id_ : null);
-    }
-
-    public NSRect extraLineFragmentRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_extraLineFragmentRect);
-        return result;
-    }
-
-    public NSTextContainer extraLineFragmentTextContainer ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_extraLineFragmentTextContainer);
-        return result !is null ? new NSTextContainer(result) : null;
-    }
+public NSUInteger glyphIndexForPoint(NSPoint point, NSTextContainer container, CGFloat* partialFraction) {
+    return OS.objc_msgSend(this.id, OS.sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_, point, container !is null ? container.id : null, partialFraction);
+}
 
-    public NSRect extraLineFragmentUsedRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_extraLineFragmentUsedRect);
-        return result;
-    }
-
-    public NSTextView firstTextView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_firstTextView);
-        return result !is null ? new NSTextView(result) : null;
-    }
-
-    public NSUInteger firstUnlaidCharacterIndex ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_firstUnlaidCharacterIndex);
-    }
-
-    public NSUInteger firstUnlaidGlyphIndex ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_firstUnlaidGlyphIndex);
-    }
-
-    public CGFloat fractionOfDistanceThroughGlyphForPoint (NSPoint point, NSTextContainer container)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_fractionOfDistanceThroughGlyphForPoint_1inTextContainer_1, point,
-                container !is null ? container.id_ : null);
-    }
-
-    public void getFirstUnlaidCharacterIndex (NSUInteger* charIndex, NSUInteger* glyphIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getFirstUnlaidCharacterIndex_1glyphIndex_1, charIndex, glyphIndex);
-    }
-
-    public NSUInteger getGlyphs (NSGlyph* glyphArray, NSRange glyphRange)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_getGlyphs_1range_1, glyphArray, glyphRange);
-    }
-
-    public NSUInteger getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_ (NSRange glyphRange, NSGlyph* glyphBuffer,
-            NSUInteger* charIndexBuffer, NSGlyphInscription* inscribeBuffer, bool* elasticBuffer)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1, glyphRange, glyphBuffer,
-                charIndexBuffer, inscribeBuffer, elasticBuffer);
-    }
-
-    public NSUInteger getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_ (NSRange glyphRange, NSGlyph* glyphBuffer,
-            NSUInteger* charIndexBuffer, NSGlyphInscription* inscribeBuffer, bool* elasticBuffer, ubyte* bidiLevelBuffer)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1bidiLevels_1, glyphRange,
-                glyphBuffer, charIndexBuffer, inscribeBuffer, elasticBuffer, bidiLevelBuffer);
-    }
-
-    public NSUInteger getLineFragmentInsertionPointsForCharacterAtIndex (NSUInteger charIndex, bool aFlag, bool dFlag, CGFloat* positions,
-            NSUInteger* charIndexes)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_,
-                OS.sel_getLineFragmentInsertionPointsForCharacterAtIndex_1alternatePositions_1inDisplayOrder_1positions_1characterIndexes_1,
-                charIndex, aFlag, dFlag, positions, charIndexes);
-    }
-
-    public NSGlyph glyphAtIndex_ (NSUInteger glyphIndex)
-    {
-        return cast(NSGlyph) OS.objc_msgSend(this.id_, OS.sel_glyphAtIndex_1, glyphIndex);
-    }
-
-    public NSGlyph glyphAtIndex_isValidIndex_ (NSUInteger glyphIndex, bool* isValidIndex)
-    {
-        return cast(NSGlyph) OS.objc_msgSend(this.id_, OS.sel_glyphAtIndex_1isValidIndex_1, glyphIndex, isValidIndex);
-    }
-
-    public NSGlyphGenerator glyphGenerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_glyphGenerator);
-        return result !is null ? new NSGlyphGenerator(result) : null;
-    }
-
-    public NSUInteger glyphIndexForCharacterAtIndex (NSUInteger charIndex)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_glyphIndexForCharacterAtIndex_1, charIndex);
-    }
-
-    public NSUInteger glyphIndexForPoint_inTextContainer_ (NSPoint point, NSTextContainer container)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_glyphIndexForPoint_1inTextContainer_1, point, container !is null ? container.id_ : null);
-    }
-
-    public NSUInteger glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_ (NSPoint point, NSTextContainer container,
-            CGFloat* partialFraction)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_glyphIndexForPoint_1inTextContainer_1fractionOfDistanceThroughGlyph_1, point,
-                container !is null ? container.id_ : null, partialFraction);
-    }
+public NSRange glyphRangeForTextContainer(NSTextContainer container) {
+    NSRange result = NSRange();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_glyphRangeForTextContainer_, container !is null ? container.id : null);
+    return result;
+}
 
-    public NSRange glyphRangeForBoundingRect (NSRect bounds, NSTextContainer container)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_glyphRangeForBoundingRect_1inTextContainer_1, bounds, container !is null ? container.id_ : null);
-        return result;
-    }
-
-    public NSRange glyphRangeForBoundingRectWithoutAdditionalLayout (NSRect bounds, NSTextContainer container)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_glyphRangeForBoundingRectWithoutAdditionalLayout_1inTextContainer_1, bounds,
-                container !is null ? container.id_ : null);
-        return result;
-    }
-
-    public NSRange glyphRangeForCharacterRange (NSRange charRange, NSRangePointer actualCharRange)
-    {
-        NSRange result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_glyphRangeForCharacterRange_1actualCharacterRange_1, &charRange, actualCharRange);
-        return result;
-    }
-
-    public NSRange glyphRangeForTextContainer (NSTextContainer container)
-    {
-        NSRange result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_glyphRangeForTextContainer_1, container !is null ? container.id_ : null);
-        return result;
-    }
-
-    public bool hasNonContiguousLayout ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasNonContiguousLayout) !is null;
-    }
-
-    public float hyphenationFactor ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_hyphenationFactor);
-    }
-
-    public void insertGlyph (NSGlyph glyph, NSUInteger glyphIndex, NSUInteger charIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertGlyph_1atGlyphIndex_1characterIndex_1, glyph, glyphIndex, charIndex);
-    }
-
-    public void insertGlyphs (/*const*/NSGlyph* glyphs, NSUInteger length, NSUInteger glyphIndex, NSUInteger charIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertGlyphs_1length_1forStartingGlyphAtIndex_1characterIndex_1, glyphs, length, glyphIndex, charIndex);
-    }
+public NSRect lineFragmentUsedRectForGlyphAtIndex(NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_, glyphIndex, effectiveGlyphRange);
+    return result;
+}
 
-    public void insertTextContainer (NSTextContainer container, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertTextContainer_1atIndex_1, container !is null ? container.id_ : null, index);
-    }
-
-    public NSInteger intAttribute (NSInteger attributeTag, NSUInteger glyphIndex)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_intAttribute_1forGlyphAtIndex_1, attributeTag, glyphIndex);
-    }
-
-    public void invalidateDisplayForCharacterRange (NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateDisplayForCharacterRange_1, charRange);
-    }
-
-    public void invalidateDisplayForGlyphRange (NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateDisplayForGlyphRange_1, glyphRange);
-    }
-
-    public void invalidateGlyphsForCharacterRange (NSRange charRange, NSInteger delta, NSRangePointer actualCharRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateGlyphsForCharacterRange_1changeInLength_1actualCharacterRange_1, charRange, delta, actualCharRange);
-    }
-
-    public void invalidateGlyphsOnLayoutInvalidationForGlyphRange (NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateGlyphsOnLayoutInvalidationForGlyphRange_1, glyphRange);
-    }
-
-    public void invalidateLayoutForCharacterRange_actualCharacterRange_ (NSRange charRange, NSRangePointer actualCharRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateLayoutForCharacterRange_1actualCharacterRange_1, charRange, actualCharRange);
-    }
-
-    public void invalidateLayoutForCharacterRange_isSoft_actualCharacterRange_ (NSRange charRange, bool flag, NSRangePointer actualCharRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateLayoutForCharacterRange_1isSoft_1actualCharacterRange_1, charRange, flag, actualCharRange);
-    }
-
-    public bool isValidGlyphIndex (NSUInteger glyphIndex)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isValidGlyphIndex_1, glyphIndex) !is null;
-    }
-
-    public bool layoutManagerOwnsFirstResponderInWindow (NSWindow window)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_layoutManagerOwnsFirstResponderInWindow_1, window !is null ? window.id_ : null) !is null;
-    }
-
-    public NSUInteger layoutOptions ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_layoutOptions);
-    }
+public NSRect lineFragmentUsedRectForGlyphAtIndex(NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange, bool flag) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_, glyphIndex, effectiveGlyphRange, flag);
+    return result;
+}
 
-    public NSRect layoutRectForTextBlock_atIndex_effectiveRange_ (NSTextBlock block, NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_layoutRectForTextBlock_1atIndex_1effectiveRange_1, block !is null ? block.id_ : null,
-                glyphIndex, effectiveGlyphRange);
-        return result;
-    }
-
-    public NSRect layoutRectForTextBlock_glyphRange_ (NSTextBlock block, NSRange glyphRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_layoutRectForTextBlock_1glyphRange_1, block !is null ? block.id_ : null, glyphRange);
-        return result;
-    }
-
-    public NSRect lineFragmentRectForGlyphAtIndex_effectiveRange_ (NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
-        return result;
-    }
-
-    public NSRect lineFragmentRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_ (NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange,
-            bool flag)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
-                effectiveGlyphRange, flag);
-        return result;
-    }
-
-    public NSRect lineFragmentUsedRectForGlyphAtIndex_effectiveRange_ (NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
-        return result;
-    }
-
-    public NSRect lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_ (NSUInteger glyphIndex,
-            NSRangePointer effectiveGlyphRange, bool flag)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
-                effectiveGlyphRange, flag);
-        return result;
-    }
-
-    public NSPoint locationForGlyphAtIndex (NSUInteger glyphIndex)
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_locationForGlyphAtIndex_1, glyphIndex);
-        return result;
-    }
-
-    public bool notShownAttributeForGlyphAtIndex (NSUInteger glyphIndex)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_notShownAttributeForGlyphAtIndex_1, glyphIndex) !is null;
-    }
-
-    public NSUInteger numberOfGlyphs ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfGlyphs);
-    }
-
-    public NSRange rangeOfNominallySpacedGlyphsContainingIndex (NSUInteger glyphIndex)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfNominallySpacedGlyphsContainingIndex_1, glyphIndex);
-        return result;
-    }
-
-    public NSRectArray rectArrayForCharacterRange (NSRange charRange, NSRange selCharRange, NSTextContainer container, NSUInteger* rectCount)
-    {
-        return cast(NSRectArray) OS.objc_msgSend(this.id_, OS.sel_rectArrayForCharacterRange_1withinSelectedCharacterRange_1inTextContainer_1rectCount_1, charRange,
-                selCharRange, container !is null ? container.id_ : null, rectCount);
-    }
-
-    public NSRectArray rectArrayForGlyphRange (NSRange glyphRange, NSRange selGlyphRange, NSTextContainer container, NSUInteger* rectCount)
-    {
-        return cast(NSRectArray) OS.objc_msgSend(this.id_, OS.sel_rectArrayForGlyphRange_1withinSelectedGlyphRange_1inTextContainer_1rectCount_1, glyphRange,
-                selGlyphRange, container !is null ? container.id_ : null, rectCount);
-    }
-
-    public void removeTemporaryAttribute (NSString attrName, NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeTemporaryAttribute_1forCharacterRange_1, attrName !is null ? attrName.id_ : null, charRange);
-    }
-
-    public void removeTextContainerAtIndex (NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeTextContainerAtIndex_1, index);
-    }
+public NSPoint locationForGlyphAtIndex(NSUInteger glyphIndex) {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_locationForGlyphAtIndex_, glyphIndex);
+    return result;
+}
 
-    public void replaceGlyphAtIndex (NSUInteger glyphIndex, NSGlyph newGlyph)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceGlyphAtIndex_1withGlyph_1, glyphIndex, newGlyph);
-    }
-
-    public void replaceTextStorage (NSTextStorage newTextStorage)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceTextStorage_1, newTextStorage !is null ? newTextStorage.id_ : null);
-    }
-
-    public NSView rulerAccessoryViewForTextView (NSTextView view, NSParagraphStyle style, NSRulerView ruler, bool isEnabled)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rulerAccessoryViewForTextView_1paragraphStyle_1ruler_1enabled_1,
-                view !is null ? view.id_ : null, style !is null ? style.id_ : null, ruler !is null ? ruler.id_ : null, isEnabled);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public NSArray rulerMarkersForTextView (NSTextView view, NSParagraphStyle style, NSRulerView ruler)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rulerMarkersForTextView_1paragraphStyle_1ruler_1, view !is null ? view.id_ : null,
-                style !is null ? style.id_ : null, ruler !is null ? ruler.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setAllowsNonContiguousLayout (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsNonContiguousLayout_1, flag);
-    }
-
-    public void setAttachmentSize (NSSize attachmentSize, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttachmentSize_1forGlyphRange_1, attachmentSize, glyphRange);
-    }
-
-    public void setBackgroundLayoutEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundLayoutEnabled_1, flag);
-    }
-
-    public void setBoundsRect (NSRect rect, NSTextBlock block, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBoundsRect_1forTextBlock_1glyphRange_1, rect, block !is null ? block.id_ : null, glyphRange);
-    }
-
-    public void setCharacterIndex (NSUInteger charIndex, NSUInteger glyphIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCharacterIndex_1forGlyphAtIndex_1, charIndex, glyphIndex);
-    }
+public NSUInteger numberOfGlyphs() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_numberOfGlyphs);
+}
 
-    public void setDefaultAttachmentScaling (NSImageScaling scaling)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDefaultAttachmentScaling_1, scaling);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setDrawsOutsideLineFragment (bool flag, NSUInteger glyphIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsOutsideLineFragment_1forGlyphAtIndex_1, flag, glyphIndex);
-    }
-
-    public void setExtraLineFragmentRect (NSRect fragmentRect, NSRect usedRect, NSTextContainer container)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setExtraLineFragmentRect_1usedRect_1textContainer_1, fragmentRect, usedRect,
-                container !is null ? container.id_ : null);
-    }
-
-    public void setGlyphGenerator (NSGlyphGenerator glyphGenerator)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGlyphGenerator_1, glyphGenerator !is null ? glyphGenerator.id_ : null);
-    }
-
-    public void setHyphenationFactor (float factor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHyphenationFactor_1, factor);
-    }
-
-    public void setIntAttribute (NSInteger attributeTag, NSInteger val, NSUInteger glyphIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntAttribute_1value_1forGlyphAtIndex_1, attributeTag, val, glyphIndex);
-    }
-
-    public void setLayoutRect (NSRect rect, NSTextBlock block, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLayoutRect_1forTextBlock_1glyphRange_1, rect, block !is null ? block.id_ : null, glyphRange);
-    }
-
-    public void setLineFragmentRect (NSRect fragmentRect, NSRange glyphRange, NSRect usedRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineFragmentRect_1forGlyphRange_1usedRect_1, fragmentRect, glyphRange, usedRect);
-    }
-
-    public void setLocation (NSPoint location, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocation_1forStartOfGlyphRange_1, location, glyphRange);
-    }
+public void removeTemporaryAttribute(NSString attrName, NSRange charRange) {
+    OS.objc_msgSend(this.id, OS.sel_removeTemporaryAttribute_forCharacterRange_, attrName !is null ? attrName.id : null, charRange);
+}
 
-    public void setLocations (NSPointArray locations, NSUInteger* glyphIndexes, NSUInteger count, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocations_1startingGlyphIndexes_1count_1forGlyphRange_1, locations, glyphIndexes, count, glyphRange);
-    }
-
-    public void setNotShownAttribute (bool flag, NSUInteger glyphIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNotShownAttribute_1forGlyphAtIndex_1, flag, glyphIndex);
-    }
-
-    public void setShowsControlCharacters (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsControlCharacters_1, flag);
-    }
-
-    public void setShowsInvisibleCharacters (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsInvisibleCharacters_1, flag);
-    }
-
-    public void setTemporaryAttributes (NSDictionary attrs, NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTemporaryAttributes_1forCharacterRange_1, attrs !is null ? attrs.id_ : null, charRange);
-    }
-
-    public void setTextContainer (NSTextContainer container, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextContainer_1forGlyphRange_1, container !is null ? container.id_ : null, glyphRange);
-    }
-
-    public void setTextStorage (NSTextStorage textStorage)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextStorage_1, textStorage !is null ? textStorage.id_ : null);
-    }
-
-    public void setTypesetter (NSTypesetter typesetter)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTypesetter_1, typesetter !is null ? typesetter.id_ : null);
-    }
-
-    public void setTypesetterBehavior (NSTypesetterBehavior theBehavior)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTypesetterBehavior_1, theBehavior);
-    }
-
-    public void setUsesFontLeading (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesFontLeading_1, flag);
-    }
-
-    public void setUsesScreenFonts (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesScreenFonts_1, flag);
-    }
-
-    public void showAttachmentCell (NSCell cell, NSRect rect, NSUInteger attachmentIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showAttachmentCell_1inRect_1characterIndex_1, cell !is null ? cell.id_ : null, rect, attachmentIndex);
-    }
-
-    public void showPackedGlyphs (byte* glyphs, NSUInteger glyphLen, NSRange glyphRange, NSPoint point, NSFont font, NSColor color,
-            NSSize printingAdjustment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showPackedGlyphs_1length_1glyphRange_1atPoint_1font_1color_1printingAdjustment_1, glyphs, glyphLen,
-                glyphRange, point, font !is null ? font.id_ : null, color !is null ? color.id_ : null, printingAdjustment);
-    }
-
-    public bool showsControlCharacters ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsControlCharacters) !is null;
-    }
-
-    public bool showsInvisibleCharacters ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsInvisibleCharacters) !is null;
-    }
-
-    public void strikethroughGlyphRange (NSRange glyphRange, NSInteger strikethroughVal, NSRect lineRect, NSRange lineGlyphRange,
-            NSPoint containerOrigin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_strikethroughGlyphRange_1strikethroughType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1,
-                glyphRange, strikethroughVal, lineRect, lineGlyphRange, containerOrigin);
-    }
-
-    public NSFont substituteFontForFont (NSFont originalFont)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_substituteFontForFont_1, originalFont !is null ? originalFont.id_ : null);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public id temporaryAttribute_atCharacterIndex_effectiveRange_ (NSString attrName, NSUInteger location, NSRangePointer range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_temporaryAttribute_1atCharacterIndex_1effectiveRange_1,
-                attrName !is null ? attrName.id_ : null, location, range);
-        return result !is null ? new id(result) : null;
-    }
+public void setLineFragmentRect(NSRect fragmentRect, NSRange glyphRange, NSRect usedRect) {
+    OS.objc_msgSend(this.id, OS.sel_setLineFragmentRect_forGlyphRange_usedRect_, fragmentRect, glyphRange, usedRect);
+}
 
-    public id temporaryAttribute_atCharacterIndex_longestEffectiveRange_inRange_ (NSString attrName, NSUInteger location, NSRangePointer range,
-            NSRange rangeLimit)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_temporaryAttribute_1atCharacterIndex_1longestEffectiveRange_1inRange_1,
-                attrName !is null ? attrName.id_ : null, location, range, rangeLimit);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary temporaryAttributesAtCharacterIndex_effectiveRange_ (NSUInteger charIndex, NSRangePointer effectiveCharRange)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_temporaryAttributesAtCharacterIndex_1effectiveRange_1, charIndex, effectiveCharRange);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary temporaryAttributesAtCharacterIndex_longestEffectiveRange_inRange_ (NSUInteger location, NSRangePointer range,
-            NSRange rangeLimit)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_temporaryAttributesAtCharacterIndex_1longestEffectiveRange_1inRange_1, location, range,
-                rangeLimit);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void textContainerChangedGeometry (NSTextContainer container)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textContainerChangedGeometry_1, container !is null ? container.id_ : null);
-    }
-
-    public void textContainerChangedTextView (NSTextContainer container)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textContainerChangedTextView_1, container !is null ? container.id_ : null);
-    }
-
-    public NSTextContainer textContainerForGlyphAtIndex_effectiveRange_ (NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainerForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
-        return result !is null ? new NSTextContainer(result) : null;
-    }
-
-    public NSTextContainer textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_ (NSUInteger glyphIndex,
-            NSRangePointer effectiveGlyphRange, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainerForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
-                effectiveGlyphRange, flag);
-        return result !is null ? new NSTextContainer(result) : null;
-    }
-
-    public NSArray textContainers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainers);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSTypesetter typesetter() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_typesetter);
+    return result !is null ? new NSTypesetter(result) : null;
+}
 
-    public NSTextStorage textStorage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textStorage);
-        return result !is null ? new NSTextStorage(result) : null;
-    }
-
-    public void textStorage_edited_range_changeInLength_invalidatedRange_ (NSTextStorage str, NSUInteger editedMask, NSRange newCharRange,
-            NSInteger delta, NSRange invalidatedCharRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textStorage_1edited_1range_1changeInLength_1invalidatedRange_1, str !is null ? str.id_ : null, editedMask,
-                newCharRange, delta, invalidatedCharRange);
-    }
-
-    public NSTextView textViewForBeginningOfSelection ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textViewForBeginningOfSelection);
-        return result !is null ? new NSTextView(result) : null;
-    }
-
-    public NSTypesetter typesetter ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typesetter);
-        return result !is null ? new NSTypesetter(result) : null;
-    }
-
-    public NSTypesetterBehavior typesetterBehavior ()
-    {
-        return cast(NSTypesetterBehavior) OS.objc_msgSend(this.id_, OS.sel_typesetterBehavior);
-    }
-
-    public void underlineGlyphRange (NSRange glyphRange, NSInteger underlineVal, NSRect lineRect, NSRange lineGlyphRange, NSPoint containerOrigin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_underlineGlyphRange_1underlineType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1, glyphRange,
-                underlineVal, lineRect, lineGlyphRange, containerOrigin);
-    }
-
-    public NSRect usedRectForTextContainer (NSTextContainer container)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_usedRectForTextContainer_1, container !is null ? container.id_ : null);
-        return result;
-    }
-
-    public bool usesFontLeading ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesFontLeading) !is null;
-    }
-
-    public bool usesScreenFonts ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesScreenFonts) !is null;
-    }
+public NSRect usedRectForTextContainer(NSTextContainer container) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_usedRectForTextContainer_, container !is null ? container.id : null);
+    return result;
+}
 
 }
--- a/dwt/internal/cocoa/NSLevelIndicator.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSLevelIndicator;
-
-import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSliderCell : NSTickMarkPosition;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSLevelIndicator : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public double criticalValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_criticalValue);
-    }
-
-    public double maxValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
-    }
-
-    public double minValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
-    }
-
-    public NSInteger numberOfMajorTickMarks ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfMajorTickMarks);
-    }
-
-    public NSInteger numberOfTickMarks ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfTickMarks);
-    }
-
-    public NSRect rectOfTickMarkAtIndex (NSInteger index)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfTickMarkAtIndex_1, index);
-        return result;
-    }
-
-    public void setCriticalValue (double criticalValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCriticalValue_1, criticalValue);
-    }
-
-    public void setMaxValue (double maxValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, maxValue);
-    }
-
-    public void setMinValue (double minValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, minValue);
-    }
-
-    public void setNumberOfMajorTickMarks (NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfMajorTickMarks_1, count);
-    }
-
-    public void setNumberOfTickMarks (NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfTickMarks_1, count);
-    }
-
-    public void setTickMarkPosition (NSTickMarkPosition position)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTickMarkPosition_1, position);
-    }
-
-    public void setWarningValue (double warningValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWarningValue_1, warningValue);
-    }
-
-    public NSTickMarkPosition tickMarkPosition ()
-    {
-        return cast(NSTickMarkPosition) OS.objc_msgSend(this.id_, OS.sel_tickMarkPosition);
-    }
-
-    public double tickMarkValueAtIndex (NSInteger index)
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_tickMarkValueAtIndex_1, index);
-    }
-
-    public double warningValue ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_warningValue);
-    }
-
-}
--- a/dwt/internal/cocoa/NSLevelIndicatorCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSLevelIndicatorCell;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSliderCell : NSTickMarkPosition;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-alias NSUInteger NSLevelIndicatorStyle;;
-
-public class NSLevelIndicatorCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public double criticalValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_criticalValue);
-    }
-
-    public id initWithLevelIndicatorStyle (NSLevelIndicatorStyle levelIndicatorStyle)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLevelIndicatorStyle_1, levelIndicatorStyle);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSLevelIndicatorStyle levelIndicatorStyle ()
-    {
-        return cast(NSLevelIndicatorStyle) OS.objc_msgSend(this.id_, OS.sel_levelIndicatorStyle);
-    }
-
-    public double maxValue ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
-    }
-
-    public double minValue ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
-    }
-
-    public NSInteger numberOfMajorTickMarks ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfMajorTickMarks);
-    }
-
-    public NSInteger numberOfTickMarks ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfTickMarks);
-    }
-
-    public NSRect rectOfTickMarkAtIndex (NSInteger index)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfTickMarkAtIndex_1, index);
-        return result;
-    }
-
-    public void setCriticalValue (double criticalValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCriticalValue_1, criticalValue);
-    }
-
-    public void setImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setLevelIndicatorStyle (NSLevelIndicatorStyle levelIndicatorStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLevelIndicatorStyle_1, levelIndicatorStyle);
-    }
-
-    public void setMaxValue (double maxValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, maxValue);
-    }
-
-    public void setMinValue (double minValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, minValue);
-    }
-
-    public void setNumberOfMajorTickMarks (NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfMajorTickMarks_1, count);
-    }
-
-    public void setNumberOfTickMarks (NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfTickMarks_1, count);
-    }
-
-    public void setTickMarkPosition (NSTickMarkPosition position)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTickMarkPosition_1, position);
-    }
-
-    public void setWarningValue (double warningValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWarningValue_1, warningValue);
-    }
-
-    public NSTickMarkPosition tickMarkPosition ()
-    {
-        return cast(NSTickMarkPosition) OS.objc_msgSend(this.id_, OS.sel_tickMarkPosition);
-    }
-
-    public double tickMarkValueAtIndex (NSInteger index)
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_tickMarkValueAtIndex_1, index);
-    }
-
-    public double warningValue ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_warningValue);
-    }
-
-}
--- a/dwt/internal/cocoa/NSLocale.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSLocale;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSLocale : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSArray ISOCountryCodes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_ISOCountryCodes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray ISOCurrencyCodes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_ISOCurrencyCodes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray ISOLanguageCodes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_ISOLanguageCodes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static id autoupdatingCurrentLocale ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_autoupdatingCurrentLocale);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSArray availableLocaleIdentifiers ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_availableLocaleIdentifiers);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSString canonicalLocaleIdentifierFromString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_canonicalLocaleIdentifierFromString_1, string !is null ? string.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSArray commonISOCurrencyCodes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_commonISOCurrencyCodes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSDictionary componentsFromLocaleIdentifier (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_componentsFromLocaleIdentifier_1, string !is null ? string.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public static id currentLocale ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_currentLocale);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString displayNameForKey (id key, id value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayNameForKey_1value_1, key !is null ? key.id_ : null, value !is null ? value.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initWithLocaleIdentifier (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLocaleIdentifier_1, string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString localeIdentifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localeIdentifier);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString localeIdentifierFromComponents (NSDictionary dict)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_localeIdentifierFromComponents_1, dict !is null ? dict.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id objectForKey (id key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSArray preferredLanguages ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_preferredLanguages);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static id systemLocale ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSLocale, OS.sel_systemLocale);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSLock.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSLock;
-
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSLock : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool lockBeforeDate (NSDate limit)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_lockBeforeDate_1, limit !is null ? limit.id_ : null) !is null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setName (NSString n)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setName_1, n !is null ? n.id_ : null);
-    }
-
-    public bool tryLock ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tryLock) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSLogicalTest.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSLogicalTest;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSScriptWhoseTest;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSLogicalTest : NSScriptWhoseTest
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initAndTestWithTests (NSArray subTests)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initAndTestWithTests_1, subTests !is null ? subTests.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initNotTestWithTest (NSScriptWhoseTest subTest)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initNotTestWithTest_1, subTest !is null ? subTest.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initOrTestWithTests (NSArray subTests)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initOrTestWithTests_1, subTests !is null ? subTests.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMachBootstrapServer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMachBootstrapServer;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.NSPortNameServer;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMachBootstrapServer : NSPortNameServer
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSPort portForName_ (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public NSPort portForName_host_ (NSString name, NSString host)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1host_1, name !is null ? name.id_ : null, host !is null ? host.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public bool registerPort (NSPort port, NSString name)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_registerPort_1name_1, port !is null ? port.id_ : null, name !is null ? name.id_ : null) !is null;
-    }
-
-    public NSPort servicePortWithName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_servicePortWithName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public static id sharedInstance ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMachBootstrapServer, OS.sel_sharedInstance);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMachPort.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMachPort;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.NSRunLoop;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMachPort : NSPort
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initWithMachPort_ (uint machPort)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithMachPort_1, machPort);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithMachPort_options_ (uint machPort, NSUInteger f)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithMachPort_1options_1, machPort, f);
-        return result !is null ? new id(result) : null;
-    }
-
-    public uint machPort ()
-    {
-        return cast(uint) OS.objc_msgSend(this.id_, OS.sel_machPort);
-    }
-
-    public static NSPort static_portWithMachPort_ (uint machPort)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMachPort, OS.sel_portWithMachPort_1, machPort);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public static NSPort static_portWithMachPort_options_ (uint machPort, NSUInteger f)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMachPort, OS.sel_portWithMachPort_1options_1, machPort, f);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public void removeFromRunLoop (NSRunLoop runLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFromRunLoop_1forMode_1, runLoop !is null ? runLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void scheduleInRunLoop (NSRunLoop runLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scheduleInRunLoop_1forMode_1, runLoop !is null ? runLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSMapEnumerator.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMapEnumerator;
-
-import dwt.dwthelper.utils;
-
-public class NSMapEnumerator {
-//TODO
-}
--- a/dwt/internal/cocoa/NSMapTable.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMapTable;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSEnumerator;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPointerFunctions;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMapTable : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSUInteger count ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
-    }
-
-    public NSDictionary dictionaryRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dictionaryRepresentation);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public id initWithKeyOptions (NSPointerFunctionsOptions keyOptions, NSPointerFunctionsOptions valueOptions, NSUInteger initialCapacity)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithKeyOptions_1valueOptions_1capacity_1, keyOptions, valueOptions, initialCapacity);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithKeyPointerFunctions (NSPointerFunctions keyFunctions, NSPointerFunctions valueFunctions, NSUInteger initialCapacity)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithKeyPointerFunctions_1valuePointerFunctions_1capacity_1,
-                keyFunctions !is null ? keyFunctions.id_ : null, valueFunctions !is null ? valueFunctions.id_ : null, initialCapacity);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSEnumerator keyEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public NSPointerFunctions keyPointerFunctions ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyPointerFunctions);
-        return result !is null ? new NSPointerFunctions(result) : null;
-    }
-
-    public static id mapTableWithKeyOptions (NSPointerFunctionsOptions keyOptions, NSPointerFunctionsOptions valueOptions)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithKeyOptions_1valueOptions_1, keyOptions, valueOptions);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id mapTableWithStrongToStrongObjects ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithStrongToStrongObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id mapTableWithStrongToWeakObjects ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithStrongToWeakObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id mapTableWithWeakToStrongObjects ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithWeakToStrongObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id mapTableWithWeakToWeakObjects ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMapTable, OS.sel_mapTableWithWeakToWeakObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSEnumerator objectEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public id objectForKey (id aKey)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectForKey_1, aKey !is null ? aKey.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void removeAllObjects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllObjects);
-    }
-
-    public void removeObjectForKey (id aKey)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectForKey_1, aKey !is null ? aKey.id_ : null);
-    }
-
-    public void setObject (id anObject, id aKey)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObject_1forKey_1, anObject !is null ? anObject.id_ : null, aKey !is null ? aKey.id_ : null);
-    }
-
-    public NSPointerFunctions valuePointerFunctions ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valuePointerFunctions);
-        return result !is null ? new NSPointerFunctions(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMapTableKeyCallBacks.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMapTableKeyCallBacks;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMapTableKeyCallBacks : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-}
--- a/dwt/internal/cocoa/NSMapTableValueCallBacks.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMapTableValueCallBacks;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMapTableValueCallBacks : NSObject
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-}
--- a/dwt/internal/cocoa/NSMatrix.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,557 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMatrix;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSNotification;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSText;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSMatrixMode
-{
-    NSRadioModeMatrix = 0,
-    NSHighlightModeMatrix = 1,
-    NSListModeMatrix = 2,
-    NSTrackModeMatrix = 3
-}
-
-alias NSMatrixMode.NSRadioModeMatrix NSRadioModeMatrix;
-alias NSMatrixMode.NSHighlightModeMatrix NSHighlightModeMatrix;
-alias NSMatrixMode.NSListModeMatrix NSListModeMatrix;
-alias NSMatrixMode.NSTrackModeMatrix NSTrackModeMatrix;
-
-public class NSMatrix : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool acceptsFirstMouse (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstMouse_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public void addColumn ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addColumn);
-    }
-
-    public void addColumnWithCells (NSArray newCells)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addColumnWithCells_1, newCells !is null ? newCells.id_ : null);
-    }
-
-    public void addRow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addRow);
-    }
-
-    public void addRowWithCells (NSArray newCells)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addRowWithCells_1, newCells !is null ? newCells.id_ : null);
-    }
-
-    public bool allowsEmptySelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsEmptySelection) !is null;
-    }
-
-    public bool autosizesCells ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autosizesCells) !is null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public id cellAtRow (NSInteger row, NSInteger col)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cellAtRow_1column_1, row, col);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSColor cellBackgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cellBackgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    //public objc.Class cellClass() {
-    //  return OS.objc_msgSend(this.id_, OS.sel_cellClass);
-    //}
-
-    public NSRect cellFrameAtRow (NSInteger row, NSInteger col)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_cellFrameAtRow_1column_1, row, col);
-        return result;
-    }
-
-    public NSSize cellSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_cellSize);
-        return result;
-    }
-
-    public id cellWithTag (NSInteger anInt)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cellWithTag_1, anInt);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray cells ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cells);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void deselectAllCells ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deselectAllCells);
-    }
-
-    public void deselectSelectedCell ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deselectSelectedCell);
-    }
-
-    public objc.SEL doubleAction ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction);
-    }
-
-    public void drawCellAtRow (NSInteger row, NSInteger col)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawCellAtRow_1column_1, row, col);
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
-
-    public bool drawsCellBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsCellBackground) !is null;
-    }
-
-    public void getNumberOfRows (NSInteger* rowCount, NSInteger* colCount)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getNumberOfRows_1columns_1, rowCount, colCount);
-    }
-
-    public bool getRow_column_forPoint_ (NSInteger* row, NSInteger* col, NSPoint aPoint)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getRow_1column_1forPoint_1, row, col, aPoint) !is null;
-    }
-
-    public bool getRow_column_ofCell_ (NSInteger* row, NSInteger* col, NSCell aCell)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getRow_1column_1ofCell_1, row, col, aCell !is null ? aCell.id_ : null) !is null;
-    }
-
-    public void highlightCell (bool flag, NSInteger row, NSInteger col)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_highlightCell_1atRow_1column_1, flag, row, col);
-    }
-
-    public id initWithFrame_ (NSRect frameRect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1, frameRect);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithFrame_mode_cellClass_numberOfRows_numberOfColumns_ (NSRect frameRect, NSInteger aMode, objc.Class factoryId,
-            NSInteger rowsHigh, NSInteger colsWide)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1mode_1cellClass_1numberOfRows_1numberOfColumns_1, frameRect, aMode,
-                factoryId, rowsHigh, colsWide);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithFrame_mode_prototype_numberOfRows_numberOfColumns_ (NSRect frameRect, NSInteger aMode, NSCell aCell, NSInteger rowsHigh,
-            NSInteger colsWide)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1mode_1prototype_1numberOfRows_1numberOfColumns_1, frameRect, aMode,
-                aCell !is null ? aCell.id_ : null, rowsHigh, colsWide);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void insertColumn_ (NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertColumn_1, column);
-    }
-
-    public void insertColumn_withCells_ (NSInteger column, NSArray newCells)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertColumn_1withCells_1, column, newCells !is null ? newCells.id_ : null);
-    }
-
-    public void insertRow_ (NSInteger row)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertRow_1, row);
-    }
-
-    public void insertRow_withCells_ (NSInteger row, NSArray newCells)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertRow_1withCells_1, row, newCells !is null ? newCells.id_ : null);
-    }
-
-    public NSSize intercellSpacing ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_intercellSpacing);
-        return result;
-    }
-
-    public bool isAutoscroll ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAutoscroll) !is null;
-    }
-
-    public bool isSelectionByRect ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelectionByRect) !is null;
-    }
-
-    public id keyCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyCell);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSCell makeCellAtRow (NSInteger row, NSInteger col)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_makeCellAtRow_1column_1, row, col);
-        return result !is null ? new NSCell(result) : null;
-    }
-
-    public NSMatrixMode mode ()
-    {
-        return cast(NSMatrixMode) OS.objc_msgSend(this.id_, OS.sel_mode);
-    }
-
-    public void mouseDown (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseDown_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public NSInteger mouseDownFlags ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_mouseDownFlags);
-    }
-
-    public NSInteger numberOfColumns ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfColumns);
-    }
-
-    public NSInteger numberOfRows ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfRows);
-    }
-
-    public bool performKeyEquivalent (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_performKeyEquivalent_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public id prototype ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_prototype);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void putCell (NSCell newCell, NSInteger row, NSInteger col)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_putCell_1atRow_1column_1, newCell !is null ? newCell.id_ : null, row, col);
-    }
-
-    public void removeColumn (NSInteger col)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeColumn_1, col);
-    }
-
-    public void removeRow (NSInteger row)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeRow_1, row);
-    }
-
-    public void renewRows (NSInteger newRows, NSInteger newCols)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_renewRows_1columns_1, newRows, newCols);
-    }
-
-    public void resetCursorRects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resetCursorRects);
-    }
-
-    public void scrollCellToVisibleAtRow (NSInteger row, NSInteger col)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollCellToVisibleAtRow_1column_1, row, col);
-    }
-
-    public void selectAll (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectAll_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectCellAtRow (NSInteger row, NSInteger col)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectCellAtRow_1column_1, row, col);
-    }
-
-    public bool selectCellWithTag (NSInteger anInt)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_selectCellWithTag_1, anInt) !is null;
-    }
-
-    public void selectText (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectText_1, sender !is null ? sender.id_ : null);
-    }
-
-    public id selectTextAtRow (NSInteger row, NSInteger col)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectTextAtRow_1column_1, row, col);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id selectedCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedCell);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray selectedCells ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedCells);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSInteger selectedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedColumn);
-    }
-
-    public NSInteger selectedRow ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedRow);
-    }
-
-    public bool sendAction ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendAction) !is null;
-    }
-
-    public void sendAction_to_forAllCells_ (objc.SEL aSelector, id anObject, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1forAllCells_1, aSelector, anObject !is null ? anObject.id_ : null, flag);
-    }
-
-    public void sendDoubleAction ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sendDoubleAction);
-    }
-
-    public void setAllowsEmptySelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsEmptySelection_1, flag);
-    }
-
-    public void setAutoscroll (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutoscroll_1, flag);
-    }
-
-    public void setAutosizesCells (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutosizesCells_1, flag);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setCellBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCellBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    //public void setCellClass(objc.Class factoryId) {
-    //  OS.objc_msgSend(this.id_, OS.sel_setCellClass_1, factoryId);
-    //}
-
-    public void setCellSize (NSSize aSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCellSize_1, aSize);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDoubleAction (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, aSelector);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
-
-    public void setDrawsCellBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsCellBackground_1, flag);
-    }
-
-    public void setIntercellSpacing (NSSize aSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntercellSpacing_1, aSize);
-    }
-
-    public void setKeyCell (NSCell keyCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyCell_1, keyCell !is null ? keyCell.id_ : null);
-    }
-
-    public void setMode (NSMatrixMode aMode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMode_1, aMode);
-    }
-
-    public void setPrototype (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPrototype_1, aCell !is null ? aCell.id_ : null);
-    }
-
-    public void setScrollable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScrollable_1, flag);
-    }
-
-    public void setSelectionByRect (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectionByRect_1, flag);
-    }
-
-    public void setSelectionFrom (NSInteger startPos, NSInteger endPos, NSInteger anchorPos, bool lit)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectionFrom_1to_1anchor_1highlight_1, startPos, endPos, anchorPos, lit);
-    }
-
-    public void setState (NSInteger value, NSInteger row, NSInteger col)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setState_1atRow_1column_1, value, row, col);
-    }
-
-    public void setTabKeyTraversesCells (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTabKeyTraversesCells_1, flag);
-    }
-
-    public void setToolTip (NSString toolTipString, NSCell cell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setToolTip_1forCell_1, toolTipString !is null ? toolTipString.id_ : null, cell !is null ? cell.id_ : null);
-    }
-
-    public void setValidateSize (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValidateSize_1, flag);
-    }
-
-    public void sizeToCells ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToCells);
-    }
-
-    public void sortUsingFunction (int* function(objc.id, objc.id, void*) compare, void* context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sortUsingFunction_1context_1, compare, context);
-    }
-
-    public void sortUsingSelector (objc.SEL comparator)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sortUsingSelector_1, comparator);
-    }
-
-    public bool tabKeyTraversesCells ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tabKeyTraversesCells) !is null;
-    }
-
-    public void textDidBeginEditing (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidBeginEditing_1, notification !is null ? notification.id_ : null);
-    }
-
-    public void textDidChange (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidChange_1, notification !is null ? notification.id_ : null);
-    }
-
-    public void textDidEndEditing (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidEndEditing_1, notification !is null ? notification.id_ : null);
-    }
-
-    public bool textShouldBeginEditing (NSText textObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_textShouldBeginEditing_1, textObject !is null ? textObject.id_ : null) !is null;
-    }
-
-    public bool textShouldEndEditing (NSText textObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_textShouldEndEditing_1, textObject !is null ? textObject.id_ : null) !is null;
-    }
-
-    public NSString toolTipForCell (NSCell cell)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolTipForCell_1, cell !is null ? cell.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMenu.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMenu.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,350 +1,97 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMenu;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSMenuItem;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSZone;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMenu : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addItem (NSMenuItem newItem)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItem_1, newItem !is null ? newItem.id_ : null);
-    }
+public class NSMenu : NSObject {
 
-    public NSMenuItem addItemWithTitle (NSString aString, objc.SEL aSelector, NSString charCode)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addItemWithTitle_1action_1keyEquivalent_1, aString !is null ? aString.id_ : null, aSelector,
-                charCode !is null ? charCode.id_ : null);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSMenu attachedMenu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attachedMenu);
-        return result is this.id_ ? this : (result !is null ? new NSMenu(result) : null);
-    }
-
-    public bool autoenablesItems ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autoenablesItems) !is null;
-    }
+public this() {
+    super();
+}
 
-    public void cancelTracking ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelTracking);
-    }
-
-    public id contextMenuRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contextMenuRepresentation);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void helpRequested (NSEvent eventPtr)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_helpRequested_1, eventPtr !is null ? eventPtr.id_ : null);
-    }
-
-    public NSMenuItem highlightedItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_highlightedItem);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSInteger indexOfItem (NSMenuItem index)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItem_1, index !is null ? index.id_ : null);
-    }
-
-    public NSInteger indexOfItemWithRepresentedObject (id object)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithRepresentedObject_1, object !is null ? object.id_ : null);
-    }
-
-    public NSInteger indexOfItemWithSubmenu (NSMenu submenu)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithSubmenu_1, submenu !is null ? submenu.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSInteger indexOfItemWithTag (NSInteger aTag)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTag_1, aTag);
-    }
-
-    public NSInteger indexOfItemWithTarget (id target, objc.SEL actionSelector)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTarget_1andAction_1, target !is null ? target.id_ : null, actionSelector);
-    }
-
-    public NSInteger indexOfItemWithTitle (NSString aTitle)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTitle_1, aTitle !is null ? aTitle.id_ : null);
-    }
+public void addItem(NSMenuItem newItem) {
+    OS.objc_msgSend(this.id, OS.sel_addItem_, newItem !is null ? newItem.id : null);
+}
 
-    public NSMenu initWithTitle (NSString aTitle)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTitle_1, aTitle !is null ? aTitle.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public void insertItem (NSMenuItem newItem, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertItem_1atIndex_1, newItem !is null ? newItem.id_ : null, index);
-    }
-
-    public NSMenuItem insertItemWithTitle (NSString aString, objc.SEL aSelector, NSString charCode, NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_insertItemWithTitle_1action_1keyEquivalent_1atIndex_1, aString !is null ? aString.id_ : null,
-                aSelector, charCode !is null ? charCode.id_ : null, index);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public bool isAttached ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAttached) !is null;
-    }
+public void cancelTracking() {
+    OS.objc_msgSend(this.id, OS.sel_cancelTracking);
+}
 
-    public bool isTornOff ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isTornOff) !is null;
-    }
-
-    public NSArray itemArray ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemArray);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSMenuItem itemAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemAtIndex_1, index);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
+public NSMenu initWithTitle(NSString aTitle) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithTitle_, aTitle !is null ? aTitle.id : null);
+    return result is this.id ? this : (result !is null ? new NSMenu(result) : null);
+}
 
-    public void itemChanged (NSMenuItem item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_itemChanged_1, item !is null ? item.id_ : null);
-    }
-
-    public NSMenuItem itemWithTag (NSInteger tag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemWithTag_1, tag);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSMenuItem itemWithTitle (NSString aTitle)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemWithTitle_1, aTitle !is null ? aTitle.id_ : null);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSPoint locationForSubmenu (NSMenu aSubmenu)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_locationForSubmenu_1, aSubmenu !is null ? aSubmenu.id_ : null);
-        return result;
-    }
+public void insertItem(NSMenuItem newItem, NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_insertItem_atIndex_, newItem !is null ? newItem.id : null, index);
+}
 
-    public CGFloat menuBarHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_menuBarHeight);
-    }
-
-    public static bool menuBarVisible ()
-    {
-        return OS.objc_msgSend(OS.class_NSMenu, OS.sel_menuBarVisible) !is null;
-    }
-
-    public bool menuChangedMessagesEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_menuChangedMessagesEnabled) !is null;
-    }
-
-    public id menuRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuRepresentation);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSZone* menuZone ()
-    {
-        return cast(NSZone*) OS.objc_msgSend(OS.class_NSMenu, OS.sel_menuZone);
-    }
-
-    public NSInteger numberOfItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfItems);
-    }
-
-    public void performActionForItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performActionForItemAtIndex_1, index);
-    }
+public NSArray itemArray() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_itemArray);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public bool performKeyEquivalent (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_performKeyEquivalent_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public static void static_popUpContextMenu_withEvent_forView_ (NSMenu menu, NSEvent event, NSView view)
-    {
-        OS.objc_msgSend(OS.class_NSMenu, OS.sel_popUpContextMenu_1withEvent_1forView_1, menu !is null ? menu.id_ : null,
-                event !is null ? event.id_ : null, view !is null ? view.id_ : null);
-    }
-
-    public static void static_popUpContextMenu_withEvent_forView_withFont_ (NSMenu menu, NSEvent event, NSView view, NSFont font)
-    {
-        OS.objc_msgSend(OS.class_NSMenu, OS.sel_popUpContextMenu_1withEvent_1forView_1withFont_1, menu !is null ? menu.id_ : null,
-                event !is null ? event.id_ : null, view !is null ? view.id_ : null, font !is null ? font.id_ : null);
-    }
+public NSMenuItem itemAtIndex(NSInteger index) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_itemAtIndex_, index);
+    return result !is null ? new NSMenuItem(result) : null;
+}
 
-    public void removeItem (NSMenuItem item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItem_1, item !is null ? item.id_ : null);
-    }
-
-    public void removeItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemAtIndex_1, index);
-    }
+public NSInteger numberOfItems() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfItems);
+}
 
-    public void setAutoenablesItems (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutoenablesItems_1, flag);
-    }
-
-    public void setContextMenuRepresentation (id menuRep)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContextMenuRepresentation_1, menuRep !is null ? menuRep.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
+public static void popUpContextMenu(NSMenu menu, NSEvent event, NSView view) {
+    OS.objc_msgSend(OS.class_NSMenu, OS.sel_popUpContextMenu_withEvent_forView_, menu !is null ? menu.id : null, event !is null ? event.id : null, view !is null ? view.id : null);
+}
 
-    public static void setMenuBarVisible (bool visible)
-    {
-        OS.objc_msgSend(OS.class_NSMenu, OS.sel_setMenuBarVisible_1, visible);
-    }
-
-    public void setMenuChangedMessagesEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenuChangedMessagesEnabled_1, flag);
-    }
-
-    public void setMenuRepresentation (id menuRep)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenuRepresentation_1, menuRep !is null ? menuRep.id_ : null);
-    }
-
-    public static void setMenuZone (NSZone* aZone)
-    {
-        OS.objc_msgSend(OS.class_NSMenu, OS.sel_setMenuZone_1, aZone);
-    }
+public void removeItem(NSMenuItem item) {
+    OS.objc_msgSend(this.id, OS.sel_removeItem_, item !is null ? item.id : null);
+}
 
-    public void setShowsStateColumn (bool showsState)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsStateColumn_1, showsState);
-    }
-
-    public void setSubmenu (NSMenu aMenu, NSMenuItem anItem)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSubmenu_1forItem_1, aMenu !is null ? aMenu.id_ : null, anItem !is null ? anItem.id_ : null);
-    }
-
-    public void setSupermenu (NSMenu supermenu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSupermenu_1, supermenu !is null ? supermenu.id_ : null);
-    }
-
-    public void setTearOffMenuRepresentation (id menuRep)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTearOffMenuRepresentation_1, menuRep !is null ? menuRep.id_ : null);
-    }
+public void removeItemAtIndex(NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_removeItemAtIndex_, index);
+}
 
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public bool showsStateColumn ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsStateColumn) !is null;
-    }
-
-    public void sizeToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
-    }
-
-    public void submenuAction (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_submenuAction_1, sender !is null ? sender.id_ : null);
-    }
+public void setAutoenablesItems(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAutoenablesItems_, flag);
+}
 
-    public NSMenu supermenu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_supermenu);
-        return result is this.id_ ? this : (result !is null ? new NSMenu(result) : null);
-    }
+public void setDelegate(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setDelegate_, anObject !is null ? anObject.id : null);
+}
 
-    public id tearOffMenuRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tearOffMenuRepresentation);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void update ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_update);
-    }
+public void setTitle(NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_setTitle_, aString !is null ? aString.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSMenuItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMenuItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,334 +1,121 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMenuItem;
 
 import dwt.dwthelper.utils;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAttributedString;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMenuItem : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSMenuItem : NSObject {
 
-    public objc.SEL action ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action);
-    }
-
-    public NSAttributedString attributedTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedTitle);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public bool hasSubmenu ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasSubmenu) !is null;
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSInteger indentationLevel ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indentationLevel);
-    }
-
-    public NSMenuItem initWithTitle (NSString aString, objc.SEL aSelector, NSString charCode)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTitle_1action_1keyEquivalent_1, aString !is null ? aString.id_ : null, aSelector,
-                charCode !is null ? charCode.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public bool isAlternate ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAlternate) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool isEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
-    }
-
-    public bool isHidden ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHidden) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool isHiddenOrHasHiddenAncestor ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHiddenOrHasHiddenAncestor) !is null;
-    }
-
-    public bool isHighlighted ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHighlighted) !is null;
-    }
+public NSMenuItem initWithTitle(NSString aString, objc.SEL aSelector, NSString charCode) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithTitle_action_keyEquivalent_, aString !is null ? aString.id : null, aSelector, charCode !is null ? charCode.id : null);
+    return result is this.id ? this : (result !is null ? new NSMenuItem(result) : null);
+}
 
-    public bool isSeparatorItem ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSeparatorItem) !is null;
-    }
-
-    public NSString keyEquivalent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyEquivalent);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger keyEquivalentModifierMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_keyEquivalentModifierMask);
-    }
+public bool isHidden() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isHidden);
+}
 
-    public NSMenu menu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu);
-        return result !is null ? new NSMenu(result) : null;
-    }
+public NSString keyEquivalent() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_keyEquivalent);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSImage mixedStateImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mixedStateImage);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSString mnemonic ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mnemonic);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger mnemonicLocation ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_mnemonicLocation);
-    }
+public NSUInteger keyEquivalentModifierMask() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_keyEquivalentModifierMask);
+}
 
-    public NSImage offStateImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_offStateImage);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSImage onStateImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_onStateImage);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public id representedObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedObject);
-        return result !is null ? new id(result) : null;
-    }
+public static NSMenuItem separatorItem() {
+    objc.id result = OS.objc_msgSend(OS.class_NSMenuItem, OS.sel_separatorItem);
+    return result !is null ? new NSMenuItem(result) : null;
+}
 
-    public static NSMenuItem separatorItem ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMenuItem, OS.sel_separatorItem);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
+public void setAction(objc.SEL aSelector) {
+    OS.objc_msgSend(this.id, OS.sel_setAction_, aSelector);
+}
 
-    public void setAction (String aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector.ptr);
-    }
-
-    public void setAlternate (bool isAlternate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternate_1, isAlternate);
-    }
-
-    public void setAttributedTitle (NSAttributedString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedTitle_1, string !is null ? string.id_ : null);
-    }
+public void setEnabled(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setEnabled_, flag);
+}
 
-    public void setEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, flag);
-    }
-
-    public void setHidden (bool hidden)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHidden_1, hidden);
-    }
-
-    public void setImage (NSImage menuImage)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, menuImage !is null ? menuImage.id_ : null);
-    }
+public void setHidden(bool hidden) {
+    OS.objc_msgSend(this.id, OS.sel_setHidden_, hidden);
+}
 
-    public void setIndentationLevel (NSInteger indentationLevel)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIndentationLevel_1, indentationLevel);
-    }
-
-    public void setKeyEquivalent (NSString aKeyEquivalent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyEquivalent_1, aKeyEquivalent !is null ? aKeyEquivalent.id_ : null);
-    }
+public void setImage(NSImage menuImage) {
+    OS.objc_msgSend(this.id, OS.sel_setImage_, menuImage !is null ? menuImage.id : null);
+}
 
-    public void setKeyEquivalentModifierMask (NSUInteger mask)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyEquivalentModifierMask_1, mask);
-    }
-
-    public void setMenu (NSMenu menu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1, menu !is null ? menu.id_ : null);
-    }
+public void setKeyEquivalent(NSString aKeyEquivalent) {
+    OS.objc_msgSend(this.id, OS.sel_setKeyEquivalent_, aKeyEquivalent !is null ? aKeyEquivalent.id : null);
+}
 
-    public void setMixedStateImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMixedStateImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setMnemonicLocation (NSUInteger location)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMnemonicLocation_1, location);
-    }
-
-    public void setOffStateImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOffStateImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setOnStateImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOnStateImage_1, image !is null ? image.id_ : null);
-    }
+public void setKeyEquivalentModifierMask(NSUInteger mask) {
+    OS.objc_msgSend(this.id, OS.sel_setKeyEquivalentModifierMask_, mask);
+}
 
-    public void setRepresentedObject (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRepresentedObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setState (NSInteger state)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setState_1, state);
-    }
+public void setMenu(NSMenu menu) {
+    OS.objc_msgSend(this.id, OS.sel_setMenu_, menu !is null ? menu.id : null);
+}
 
-    public void setSubmenu (NSMenu submenu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSubmenu_1, submenu !is null ? submenu.id_ : null);
-    }
-
-    public void setTag (NSInteger anInt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTag_1, anInt);
-    }
+public void setState(NSInteger state) {
+    OS.objc_msgSend(this.id, OS.sel_setState_, state);
+}
 
-    public void setTarget (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTitleWithMnemonic (NSString stringWithAmpersand)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, stringWithAmpersand !is null ? stringWithAmpersand.id_ : null);
-    }
+public void setSubmenu(NSMenu submenu) {
+    OS.objc_msgSend(this.id, OS.sel_setSubmenu_, submenu !is null ? submenu.id : null);
+}
 
-    public void setToolTip (NSString toolTip)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setToolTip_1, toolTip !is null ? toolTip.id_ : null);
-    }
-
-    public static void setUsesUserKeyEquivalents (bool flag)
-    {
-        OS.objc_msgSend(OS.class_NSMenuItem, OS.sel_setUsesUserKeyEquivalents_1, flag);
-    }
+public void setTarget(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setTarget_, anObject !is null ? anObject.id : null);
+}
 
-    public void setView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null);
-    }
-
-    public NSInteger state ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_state);
-    }
+public void setTitle(NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_setTitle_, aString !is null ? aString.id : null);
+}
 
-    public NSMenu submenu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_submenu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSInteger tag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag);
-    }
-
-    public id target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSInteger state() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_state);
+}
 
-    public NSString toolTip ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolTip);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSMenu submenu() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_submenu);
+    return result !is null ? new NSMenu(result) : null;
+}
 
-    public NSString userKeyEquivalent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_userKeyEquivalent);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static bool usesUserKeyEquivalents ()
-    {
-        return OS.objc_msgSend(OS.class_NSMenuItem, OS.sel_usesUserKeyEquivalents) !is null;
-    }
-
-    public NSView view ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_view);
-        return result !is null ? new NSView(result) : null;
-    }
+public NSString title() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_title);
+    return result !is null ? new NSString(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSMenuItemCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMenuItemCell;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSButtonCell;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenuItem;
-import dwt.internal.cocoa.NSMenuView;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMenuItemCell : NSButtonCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void calcSize ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_calcSize);
-    }
-
-    public void drawBorderAndBackgroundWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawBorderAndBackgroundWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public void drawImageWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawImageWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public void drawKeyEquivalentWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawKeyEquivalentWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public void drawSeparatorItemWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawSeparatorItemWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public void drawStateImageWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawStateImageWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public void drawTitleWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawTitleWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public CGFloat imageWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_imageWidth);
-    }
-
-    public NSRect keyEquivalentRectForBounds (NSRect cellFrame)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_keyEquivalentRectForBounds_1, cellFrame);
-        return result;
-    }
-
-    public CGFloat keyEquivalentWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_keyEquivalentWidth);
-    }
-
-    public NSMenuItem menuItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuItem);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSMenuView menuView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuView);
-        return result !is null ? new NSMenuView(result) : null;
-    }
-
-    public bool needsDisplay ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_needsDisplay) !is null;
-    }
-
-    public bool needsSizing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_needsSizing) !is null;
-    }
-
-    public void setMenuItem (NSMenuItem item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenuItem_1, item !is null ? item.id_ : null);
-    }
-
-    public void setMenuView (NSMenuView menuView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenuView_1, menuView !is null ? menuView.id_ : null);
-    }
-
-    public void setNeedsDisplay (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNeedsDisplay_1, flag);
-    }
-
-    public void setNeedsSizing (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNeedsSizing_1, flag);
-    }
-
-    public NSRect stateImageRectForBounds (NSRect cellFrame)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_stateImageRectForBounds_1, cellFrame);
-        return result;
-    }
-
-    public CGFloat stateImageWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_stateImageWidth);
-    }
-
-    public NSInteger tag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag);
-    }
-
-    public NSRect titleRectForBounds (NSRect cellFrame)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_titleRectForBounds_1, cellFrame);
-        return result;
-    }
-
-    public CGFloat titleWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_titleWidth);
-    }
-
-}
--- a/dwt/internal/cocoa/NSMenuView.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMenuView;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
-import dwt.internal.cocoa.NSMenuItemCell;
-import dwt.internal.cocoa.NSNotification;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSScreen;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMenuView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void attachSubmenuForItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_attachSubmenuForItemAtIndex_1, index);
-    }
-
-    public NSMenu attachedMenu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attachedMenu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSMenuView attachedMenuView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attachedMenuView);
-        return result is this.id_ ? this : (result !is null ? new NSMenuView(result) : null);
-    }
-
-    public void detachSubmenu ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_detachSubmenu);
-    }
-
-    public NSFont font ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_font);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSInteger highlightedItemIndex ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_highlightedItemIndex);
-    }
-
-    public CGFloat horizontalEdgePadding ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_horizontalEdgePadding);
-    }
-
-    public CGFloat imageAndTitleOffset ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_imageAndTitleOffset);
-    }
-
-    public CGFloat imageAndTitleWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_imageAndTitleWidth);
-    }
-
-    public NSInteger indexOfItemAtPoint (NSPoint point)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemAtPoint_1, point);
-    }
-
-    public NSMenuView initAsTearOff ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initAsTearOff);
-        return result !is null ? this : null;
-    }
-
-    public NSRect innerRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_innerRect);
-        return result;
-    }
-
-    public bool isAttached ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAttached) !is null;
-    }
-
-    public bool isHorizontal ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHorizontal) !is null;
-    }
-
-    public bool isTornOff ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isTornOff) !is null;
-    }
-
-    public void itemAdded (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_itemAdded_1, notification !is null ? notification.id_ : null);
-    }
-
-    public void itemChanged (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_itemChanged_1, notification !is null ? notification.id_ : null);
-    }
-
-    public void itemRemoved (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_itemRemoved_1, notification !is null ? notification.id_ : null);
-    }
-
-    public CGFloat keyEquivalentOffset ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_keyEquivalentOffset);
-    }
-
-    public CGFloat keyEquivalentWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_keyEquivalentWidth);
-    }
-
-    public NSPoint locationForSubmenu (NSMenu aSubmenu)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_locationForSubmenu_1, aSubmenu !is null ? aSubmenu.id_ : null);
-        return result;
-    }
-
-    public NSMenu menu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public static CGFloat menuBarHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSMenuView, OS.sel_menuBarHeight);
-    }
-
-    public NSMenuItemCell menuItemCellForItemAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuItemCellForItemAtIndex_1, index);
-        return result !is null ? new NSMenuItemCell(result) : null;
-    }
-
-    public bool needsSizing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_needsSizing) !is null;
-    }
-
-    public void performActionWithHighlightingForItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performActionWithHighlightingForItemAtIndex_1, index);
-    }
-
-    public NSRect rectOfItemAtIndex (NSInteger index)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfItemAtIndex_1, index);
-        return result;
-    }
-
-    public void setFont (NSFont font)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1, font !is null ? font.id_ : null);
-    }
-
-    public void setHighlightedItemIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHighlightedItemIndex_1, index);
-    }
-
-    public void setHorizontal (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontal_1, flag);
-    }
-
-    public void setHorizontalEdgePadding (CGFloat pad)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontalEdgePadding_1, pad);
-    }
-
-    public void setMenu (NSMenu menu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1, menu !is null ? menu.id_ : null);
-    }
-
-    public void setMenuItemCell (NSMenuItemCell cell, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenuItemCell_1forItemAtIndex_1, cell !is null ? cell.id_ : null, index);
-    }
-
-    public void setNeedsDisplayForItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNeedsDisplayForItemAtIndex_1, index);
-    }
-
-    public void setNeedsSizing (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNeedsSizing_1, flag);
-    }
-
-    public void setWindowFrameForAttachingToRect (NSRect screenRect, NSScreen screen, NSRectEdge edge, NSInteger selectedItemIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWindowFrameForAttachingToRect_1onScreen_1preferredEdge_1popUpSelectedItem_1, screenRect,
-                screen !is null ? screen.id_ : null, edge, selectedItemIndex);
-    }
-
-    public void sizeToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
-    }
-
-    public CGFloat stateImageOffset ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_stateImageOffset);
-    }
-
-    public CGFloat stateImageWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_stateImageWidth);
-    }
-
-    public bool trackWithEvent (NSEvent event)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_trackWithEvent_1, event !is null ? event.id_ : null) !is null;
-    }
-
-    public void update ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_update);
-    }
-
-}
--- a/dwt/internal/cocoa/NSMessagePortNameServer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMessagePortNameServer;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.NSPortNameServer;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMessagePortNameServer : NSPortNameServer
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSPort portForName_ (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public NSPort portForName_host_ (NSString name, NSString host)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1host_1, name !is null ? name.id_ : null, host !is null ? host.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public static id sharedInstance ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMessagePortNameServer, OS.sel_sharedInstance);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMetadataItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMetadataItem;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMetadataItem : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray attributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id valueForAttribute (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForAttribute_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary valuesForAttributes (NSArray keys)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valuesForAttributes_1, keys !is null ? keys.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMetadataQuery.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMetadataQuery;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMetadataQuery : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void disableUpdates ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_disableUpdates);
-    }
-
-    public void enableUpdates ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enableUpdates);
-    }
-
-    public NSArray groupedResults ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_groupedResults);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray groupingAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_groupingAttributes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSUInteger indexOfResult (id result)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfResult_1, result !is null ? result.id_ : null);
-    }
-
-    public bool isGathering ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isGathering) !is null;
-    }
-
-    public bool isStarted ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isStarted) !is null;
-    }
-
-    public bool isStopped ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isStopped) !is null;
-    }
-
-    public NSTimeInterval notificationBatchingInterval ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_notificationBatchingInterval);
-    }
-
-    public NSPredicate predicate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_predicate);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public id resultAtIndex (NSUInteger idx)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resultAtIndex_1, idx);
-        return result !is null ? new id(result) : null;
-    }
-
-    public objc.id resultCount ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_resultCount);
-    }
-
-    public NSArray results ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_results);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray searchScopes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_searchScopes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setGroupingAttributes (NSArray attrs)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGroupingAttributes_1, attrs !is null ? attrs.id_ : null);
-    }
-
-    public void setNotificationBatchingInterval (NSTimeInterval ti)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNotificationBatchingInterval_1, ti);
-    }
-
-    public void setPredicate (NSPredicate predicate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPredicate_1, predicate !is null ? predicate.id_ : null);
-    }
-
-    public void setSearchScopes (NSArray scopes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSearchScopes_1, scopes !is null ? scopes.id_ : null);
-    }
-
-    public void setSortDescriptors (NSArray descriptors)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSortDescriptors_1, descriptors !is null ? descriptors.id_ : null);
-    }
-
-    public void setValueListAttributes (NSArray attrs)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValueListAttributes_1, attrs !is null ? attrs.id_ : null);
-    }
-
-    public NSArray sortDescriptors ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortDescriptors);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool startQuery ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_startQuery) !is null;
-    }
-
-    public void stopQuery ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopQuery);
-    }
-
-    public NSArray valueListAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueListAttributes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSDictionary valueLists ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueLists);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public id valueOfAttribute (NSString attrName, NSUInteger idx)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueOfAttribute_1forResultAtIndex_1, attrName !is null ? attrName.id_ : null, idx);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMetadataQueryAttributeValueTuple.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMetadataQueryAttributeValueTuple;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMetadataQueryAttributeValueTuple : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString attribute ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attribute);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger count ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
-    }
-
-    public id value ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_value);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMetadataQueryResultGroup.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMetadataQueryResultGroup;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMetadataQueryResultGroup : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString attribute ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attribute);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id resultAtIndex (NSUInteger idx)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resultAtIndex_1, idx);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSUInteger resultCount ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_resultCount);
-    }
-
-    public NSArray results ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_results);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray subgroups ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subgroups);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id value ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_value);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMethodSignature.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMethodSignature;
-
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMethodSignature : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSUInteger frameLength ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_frameLength);
-    }
-
-    public /*const*/char* getArgumentTypeAtIndex (NSUInteger idx)
-    {
-        return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_getArgumentTypeAtIndex_1, idx);
-    }
-
-    public bool isOneway ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOneway) !is null;
-    }
-
-    public NSUInteger methodReturnLength ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_methodReturnLength);
-    }
-
-    public /*const*/char* methodReturnType ()
-    {
-        return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_methodReturnType);
-    }
-
-    public NSUInteger numberOfArguments ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfArguments);
-    }
-
-    public static NSMethodSignature signatureWithObjCTypes (/*const*/char* types)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMethodSignature, OS.sel_signatureWithObjCTypes_1, types);
-        return result !is null ? new NSMethodSignature(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMoveCommand.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMoveCommand;
-
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMoveCommand : NSScriptCommand
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScriptObjectSpecifier keySpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keySpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public void setReceiversSpecifier (NSScriptObjectSpecifier receiversRef)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReceiversSpecifier_1, receiversRef !is null ? receiversRef.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSMovie.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMovie;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPasteboard;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMovie : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void* QTMovie ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_QTMovie);
-    }
-
-    public NSURL URL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public static bool canInitWithPasteboard (NSPasteboard pasteboard)
-    {
-        return OS.objc_msgSend(OS.class_NSMovie, OS.sel_canInitWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null) !is null;
-    }
-
-    public NSMovie initWithMovie (void* movie)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithMovie_1, movie);
-        return result !is null ? this : null;
-    }
-
-    public NSMovie initWithPasteboard (NSPasteboard pasteboard)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSMovie initWithURL (NSURL url, bool byRef)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithURL_1byReference_1, url !is null ? url.id_ : null, byRef);
-        return result !is null ? this : null;
-    }
-
-    public static NSArray movieUnfilteredFileTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMovie, OS.sel_movieUnfilteredFileTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray movieUnfilteredPasteboardTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMovie, OS.sel_movieUnfilteredPasteboardTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSMovieView.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMovieView;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMovie;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-alias NSUInteger NSQTMovieLoopMode;
-
-public class NSMovieView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void clear (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_clear_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void copy (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_copy_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void cut (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cut_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deletee (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_delete_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void gotoBeginning (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_gotoBeginning_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void gotoEnd (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_gotoEnd_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void gotoPosterFrame (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_gotoPosterFrame_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool isControllerVisible ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isControllerVisible) !is null;
-    }
-
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
-
-    public bool isMuted ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMuted) !is null;
-    }
-
-    public bool isPlaying ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isPlaying) !is null;
-    }
-
-    public NSQTMovieLoopMode loopMode ()
-    {
-        return cast(NSQTMovieLoopMode) OS.objc_msgSend(this.id_, OS.sel_loopMode);
-    }
-
-    public NSMovie movie ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_movie);
-        return result !is null ? new NSMovie(result) : null;
-    }
-
-    public void* movieController ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_movieController);
-    }
-
-    public NSRect movieRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_movieRect);
-        return result;
-    }
-
-    public void paste (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_paste_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool playsEveryFrame ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_playsEveryFrame) !is null;
-    }
-
-    public bool playsSelectionOnly ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_playsSelectionOnly) !is null;
-    }
-
-    public float rate ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_rate);
-    }
-
-    public void resizeWithMagnification (CGFloat magnification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resizeWithMagnification_1, magnification);
-    }
-
-    public void selectAll (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectAll_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void setEditable (bool editable)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, editable);
-    }
-
-    public void setLoopMode (NSQTMovieLoopMode mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLoopMode_1, mode);
-    }
-
-    public void setMovie (NSMovie movie)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMovie_1, movie !is null ? movie.id_ : null);
-    }
-
-    public void setMuted (bool mute)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMuted_1, mute);
-    }
-
-    public void setPlaysEveryFrame (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaysEveryFrame_1, flag);
-    }
-
-    public void setPlaysSelectionOnly (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaysSelectionOnly_1, flag);
-    }
-
-    public void setRate (float rate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRate_1, rate);
-    }
-
-    public void setVolume (float volume)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVolume_1, volume);
-    }
-
-    public void showController (bool show, bool adjustSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showController_1adjustingSize_1, show, adjustSize);
-    }
-
-    public NSSize sizeForMagnification (CGFloat magnification)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_sizeForMagnification_1, magnification);
-        return result;
-    }
-
-    public void start (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_start_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void stepBack (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stepBack_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void stepForward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stepForward_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void stop (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stop_1, sender !is null ? sender.id_ : null);
-    }
-
-    public float volume ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_volume);
-    }
-
-}
--- a/dwt/internal/cocoa/NSMutableArray.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMutableArray.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,177 +1,68 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMutableArray;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSIndexSet;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMutableArray : NSArray
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSMutableArray : NSArray {
 
-    public void addObject (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void addObjectsFromArray (NSArray otherArray)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObjectsFromArray_1, otherArray !is null ? otherArray.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public static id arrayWithCapacity (NSUInteger numItems)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_arrayWithCapacity_1, numItems);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void exchangeObjectAtIndex (NSUInteger idx1, NSUInteger idx2)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_exchangeObjectAtIndex_1withObjectAtIndex_1, idx1, idx2);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void filterUsingPredicate (NSPredicate predicate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_filterUsingPredicate_1, predicate !is null ? predicate.id_ : null);
-    }
-
-    public NSMutableArray initWithCapacity (NSUInteger numItems)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCapacity_1, numItems);
-        return result !is null ? this : null;
-    }
-
-    public void insertObject (id anObject, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertObject_1atIndex_1, anObject !is null ? anObject.id_ : null, index);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void insertObjects (NSArray objects, NSIndexSet indexes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertObjects_1atIndexes_1, objects !is null ? objects.id_ : null, indexes !is null ? indexes.id_ : null);
-    }
-
-    public void removeAllObjects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllObjects);
-    }
+public void addObject(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_addObject_, anObject !is null ? anObject.id : null);
+}
 
-    public void removeLastObject ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeLastObject);
-    }
-
-    public void removeObject_ (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObject_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void removeObject_inRange_ (id anObject, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObject_1inRange_1, anObject !is null ? anObject.id_ : null, range);
-    }
+public void addObjectsFromArray(NSArray otherArray) {
+    OS.objc_msgSend(this.id, OS.sel_addObjectsFromArray_, otherArray !is null ? otherArray.id : null);
+}
 
-    public void removeObjectAtIndex (NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectAtIndex_1, index);
-    }
-
-    public void removeObjectIdenticalTo_ (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectIdenticalTo_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void removeObjectIdenticalTo_inRange_ (id anObject, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectIdenticalTo_1inRange_1, anObject !is null ? anObject.id_ : null, range);
-    }
+public static NSMutableArray arrayWithCapacity(NSUInteger numItems) {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_arrayWithCapacity_, numItems);
+    return result !is null ? new NSMutableArray(result) : null;
+}
 
-    public void removeObjectsAtIndexes (NSIndexSet indexes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectsAtIndexes_1, indexes !is null ? indexes.id_ : null);
-    }
-
-    public void removeObjectsFromIndices (NSUInteger* indices, NSUInteger cnt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectsFromIndices_1numIndices_1, indices, cnt);
-    }
-
-    public void removeObjectsInArray (NSArray otherArray)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectsInArray_1, otherArray !is null ? otherArray.id_ : null);
-    }
-
-    public void removeObjectsInRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectsInRange_1, range);
-    }
+public void removeObject(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_removeObject_, anObject !is null ? anObject.id : null);
+}
 
-    public void replaceObjectAtIndex (NSUInteger index, id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceObjectAtIndex_1withObject_1, index, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void replaceObjectsAtIndexes (NSIndexSet indexes, NSArray objects)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceObjectsAtIndexes_1withObjects_1, indexes !is null ? indexes.id_ : null,
-                objects !is null ? objects.id_ : null);
-    }
-
-    public void replaceObjectsInRange_withObjectsFromArray_ (NSRange range, NSArray otherArray)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceObjectsInRange_1withObjectsFromArray_1, range, otherArray !is null ? otherArray.id_ : null);
-    }
+public void removeObjectAtIndex(NSUInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_removeObjectAtIndex_, index);
+}
 
-    public void replaceObjectsInRange_withObjectsFromArray_range_ (NSRange range, NSArray otherArray, NSRange otherRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceObjectsInRange_1withObjectsFromArray_1range_1, range, otherArray !is null ? otherArray.id_ : null,
-                otherRange);
-    }
-
-    public void setArray (NSArray otherArray)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setArray_1, otherArray !is null ? otherArray.id_ : null);
-    }
+public static NSArray array() {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_array);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public void sortUsingDescriptors (NSArray sortDescriptors)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sortUsingDescriptors_1, sortDescriptors !is null ? sortDescriptors.id_ : null);
-    }
-    
-    public void sortUsingFunction (int function (id, id, void*) compare, void* context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sortUsingFunction_1context_1, compare, context);
-    }
-
-    public void sortUsingSelector (objc.SEL comparator)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sortUsingSelector_1, comparator);
-    }
+public static NSArray arrayWithObject(cocoa.id anObject) {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_arrayWithObject_, anObject !is null ? anObject.id : null);
+    return result !is null ? new NSMutableArray(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSMutableAttributedString.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMutableAttributedString.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,105 +1,60 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMutableAttributedString;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSMutableString;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMutableAttributedString : NSAttributedString
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSMutableAttributedString : NSAttributedString {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addAttribute (/*java int*/ /*objc NSString* */ NSString name, id value, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addAttribute_1value_1range_1, name !is null ? name.id_ : null, value !is null ? value.id_ : null, range);
-    }
+public this() {
+    super();
+}
 
-    public void addAttributes (NSDictionary attrs, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addAttributes_1range_1, attrs !is null ? attrs.id_ : null, range);
-    }
-
-    public void appendAttributedString (NSAttributedString attrString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendAttributedString_1, attrString !is null ? attrString.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void beginEditing ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginEditing);
-    }
-
-    public void deleteCharactersInRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteCharactersInRange_1, range);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void endEditing ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endEditing);
-    }
+public NSMutableString mutableString() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_mutableString);
+    return result !is null ? new NSMutableString(result) : null;
+}
 
-    public void insertAttributedString (NSAttributedString attrString, NSUInteger loc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertAttributedString_1atIndex_1, attrString !is null ? attrString.id_ : null, loc);
-    }
-
-    public NSMutableString mutableString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableString);
-        return result !is null ? new NSMutableString(result) : null;
-    }
+public void replaceCharactersInRange(NSRange range, NSString str) {
+    OS.objc_msgSend(this.id, OS.sel_replaceCharactersInRange_withString_, range, str !is null ? str.id : null);
+}
 
-    public void removeAttribute (NSString name, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAttribute_1range_1, name !is null ? name.id_ : null, range);
-    }
-
-    public void replaceCharactersInRange_withAttributedString_ (NSRange range, NSAttributedString attrString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceCharactersInRange_1withAttributedString_1, range, attrString !is null ? attrString.id_ : null);
-    }
+public void addAttribute(NSString name, cocoa.id value, NSRange range) {
+    OS.objc_msgSend(this.id, OS.sel_addAttribute_value_range_, name !is null ? name.id : null, value !is null ? value.id : null, range);
+}
 
-    public void replaceCharactersInRange_withString_ (NSRange range, NSString str)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceCharactersInRange_1withString_1, range, str !is null ? str.id_ : null);
-    }
+public void beginEditing() {
+    OS.objc_msgSend(this.id, OS.sel_beginEditing);
+}
 
-    public void setAttributedString (NSAttributedString attrString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedString_1, attrString !is null ? attrString.id_ : null);
-    }
-
-    public void setAttributes (NSDictionary attrs, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributes_1range_1, attrs !is null ? attrs.id_ : null, range);
-    }
+public void endEditing() {
+    OS.objc_msgSend(this.id, OS.sel_endEditing);
+}
 
 }
--- a/dwt/internal/cocoa/NSMutableCharacterSet.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMutableCharacterSet;
-
-import dwt.internal.cocoa.NSCharacterSet;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMutableCharacterSet : NSCharacterSet
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addCharactersInRange (NSRange aRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addCharactersInRange_1, aRange);
-    }
-
-    public void addCharactersInString (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addCharactersInString_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void formIntersectionWithCharacterSet (NSCharacterSet otherSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_formIntersectionWithCharacterSet_1, otherSet !is null ? otherSet.id_ : null);
-    }
-
-    public void formUnionWithCharacterSet (NSCharacterSet otherSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_formUnionWithCharacterSet_1, otherSet !is null ? otherSet.id_ : null);
-    }
-
-    public void invert ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invert);
-    }
-
-    public void removeCharactersInRange (NSRange aRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeCharactersInRange_1, aRange);
-    }
-
-    public void removeCharactersInString (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeCharactersInString_1, aString !is null ? aString.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSMutableData.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSMutableData;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSMutableData : NSData
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void appendBytes (/*const*/void* bytes, NSUInteger length)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendBytes_1length_1, bytes, length);
-    }
-
-    public void appendData (NSData other)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendData_1, other !is null ? other.id_ : null);
-    }
-
-    public static id dataWithCapacity (NSUInteger aNumItems)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMutableData, OS.sel_dataWithCapacity_1, aNumItems);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id dataWithLength (NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMutableData, OS.sel_dataWithLength_1, length);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void increaseLengthBy (NSUInteger extraLength)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_increaseLengthBy_1, extraLength);
-    }
-
-    public NSMutableData initWithCapacity (NSUInteger capacity)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCapacity_1, capacity);
-        return result !is null ? this : null;
-    }
-
-    public NSMutableData initWithLength (NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLength_1, length);
-        return result !is null ? this : null;
-    }
-
-    public void* mutableBytes ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_mutableBytes);
-    }
-
-    public void replaceBytesInRange_withBytes_ (NSRange range, /*const*/void* bytes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceBytesInRange_1withBytes_1, range, bytes);
-    }
-
-    public void replaceBytesInRange_withBytes_length_ (NSRange range, /*const*/void* replacementBytes, NSUInteger replacementLength)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceBytesInRange_1withBytes_1length_1, range, replacementBytes, replacementLength);
-    }
-
-    public void resetBytesInRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resetBytesInRange_1, range);
-    }
-
-    public void setData (NSData data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setData_1, data !is null ? data.id_ : null);
-    }
-
-    public void setLength (NSUInteger length)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLength_1, length);
-    }
-
-}
--- a/dwt/internal/cocoa/NSMutableDictionary.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMutableDictionary.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,89 +1,56 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMutableDictionary;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMutableDictionary : NSDictionary
-{
+public class NSMutableDictionary : NSDictionary {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public void addEntriesFromDictionary (NSDictionary otherDictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addEntriesFromDictionary_1, otherDictionary !is null ? otherDictionary.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static NSMutableDictionary dictionaryWithCapacity (NSUInteger numItems)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithCapacity_1, numItems);
-        return result !is null ? new NSMutableDictionary(result) : null;
-    }
-
-    public NSMutableDictionary initWithCapacity (NSUInteger numItems)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCapacity_1, numItems);
-        return result !is null ? this : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void removeAllObjects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllObjects);
-    }
+public static NSMutableDictionary dictionaryWithCapacity(NSUInteger numItems) {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithCapacity_, numItems);
+    return result !is null ? new NSMutableDictionary(result) : null;
+}
 
-    public void removeObjectForKey (id aKey)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectForKey_1, aKey !is null ? aKey.id_ : null);
-    }
-
-    public void removeObjectsForKeys (NSArray keyArray)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectsForKeys_1, keyArray !is null ? keyArray.id_ : null);
-    }
+public void setObject(cocoa.id anObject, cocoa.id aKey) {
+    OS.objc_msgSend(this.id, OS.sel_setObject_forKey_, anObject !is null ? anObject.id : null, aKey !is null ? aKey.id : null);
+}
 
-    public void setDictionary (NSDictionary otherDictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDictionary_1, otherDictionary !is null ? otherDictionary.id_ : null);
-    }
-
-    public void setObject (id anObject, id aKey)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObject_1forKey_1, anObject !is null ? anObject.id_ : null, aKey !is null ? aKey.id_ : null);
-    }
+public void setValue(cocoa.id value, NSString key) {
+    OS.objc_msgSend(this.id, OS.sel_setValue_forKey_, value !is null ? value.id : null, key !is null ? key.id : null);
+}
 
-    public void setObject (id anObject, objc.id aKey)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObject_1forKey_1, anObject !is null ? anObject.id_ : null, aKey);
-    }
-
-    public void setValue (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
+public static NSDictionary dictionaryWithObject(cocoa.id object, cocoa.id key) {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableDictionary, OS.sel_dictionaryWithObject_forKey_, object !is null ? object.id : null, key !is null ? key.id : null);
+    return result !is null ? new NSMutableDictionary(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSMutableIndexSet.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMutableIndexSet.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,75 +1,41 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMutableIndexSet;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSIndexSet;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMutableIndexSet : NSIndexSet
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSMutableIndexSet : NSIndexSet {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addIndex (NSUInteger value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addIndex_1, value);
-    }
-
-    public void addIndexes (NSIndexSet indexSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addIndexes_1, indexSet !is null ? indexSet.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void addIndexesInRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addIndexesInRange_1, range);
-    }
-
-    public void removeAllIndexes ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllIndexes);
-    }
-
-    public void removeIndex (NSUInteger value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeIndex_1, value);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void removeIndexes (NSIndexSet indexSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeIndexes_1, indexSet !is null ? indexSet.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void removeIndexesInRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeIndexesInRange_1, range);
-    }
-
-    public void shiftIndexesStartingAtIndex (NSUInteger index, NSInteger delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_shiftIndexesStartingAtIndex_1by_1, index, delta);
-    }
+public void addIndex(NSUInteger value) {
+    OS.objc_msgSend(this.id, OS.sel_addIndex_, value);
+}
 
 }
--- a/dwt/internal/cocoa/NSMutableParagraphStyle.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMutableParagraphStyle.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,165 +1,68 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMutableParagraphStyle;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSParagraphStyle;
-import dwt.internal.cocoa.NSText : NSTextAlignment, NSWritingDirection;
+import dwt.internal.cocoa.NSText;
 import dwt.internal.cocoa.NSTextTab;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSLineBreakMode
-{
-    NSLineBreakByWordWrapping = 0,
-    NSLineBreakByCharWrapping,
-    NSLineBreakByClipping,
-    NSLineBreakByTruncatingHead,
-    NSLineBreakByTruncatingTail,
-    NSLineBreakByTruncatingMiddle
+public class NSMutableParagraphStyle : NSParagraphStyle {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public void addTabStop(NSTextTab anObject) {
+    OS.objc_msgSend(this.id, OS.sel_addTabStop_, anObject !is null ? anObject.id : null);
+}
+
+public void setAlignment(NSTextAlignment alignment) {
+    OS.objc_msgSend(this.id, OS.sel_setAlignment_, alignment);
 }
 
-alias NSLineBreakMode.NSLineBreakByWordWrapping NSLineBreakByWordWrapping;
-alias NSLineBreakMode.NSLineBreakByCharWrapping NSLineBreakByCharWrapping;
-alias NSLineBreakMode.NSLineBreakByClipping NSLineBreakByClipping;
-alias NSLineBreakMode.NSLineBreakByTruncatingHead NSLineBreakByTruncatingHead;
-alias NSLineBreakMode.NSLineBreakByTruncatingTail NSLineBreakByTruncatingTail;
-alias NSLineBreakMode.NSLineBreakByTruncatingMiddle NSLineBreakByTruncatingMiddle;
-
-public class NSMutableParagraphStyle : NSParagraphStyle
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addTabStop (NSTextTab anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addTabStop_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void removeTabStop (NSTextTab anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeTabStop_1, anObject !is null ? anObject.id_ : null);
-    }
+public void setDefaultTabInterval(CGFloat aFloat) {
+    OS.objc_msgSend(this.id, OS.sel_setDefaultTabInterval_, aFloat);
+}
 
-    public void setAlignment (NSTextAlignment alignment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlignment_1, alignment);
-    }
-
-    public void setBaseWritingDirection (NSWritingDirection writingDirection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBaseWritingDirection_1, writingDirection);
-    }
-
-    public void setDefaultTabInterval (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDefaultTabInterval_1, aFloat);
-    }
-
-    public void setFirstLineHeadIndent (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFirstLineHeadIndent_1, aFloat);
-    }
-
-    public void setHeadIndent (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHeadIndent_1, aFloat);
-    }
-
-    public void setHeaderLevel (NSInteger level)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHeaderLevel_1, level);
-    }
-
-    public void setHyphenationFactor (float aFactor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHyphenationFactor_1, aFactor);
-    }
+public void setFirstLineHeadIndent(CGFloat aFloat) {
+    OS.objc_msgSend(this.id, OS.sel_setFirstLineHeadIndent_, aFloat);
+}
 
-    public void setLineBreakMode (NSLineBreakMode mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineBreakMode_1, mode);
-    }
-
-    public void setLineHeightMultiple (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineHeightMultiple_1, aFloat);
-    }
-
-    public void setLineSpacing (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineSpacing_1, aFloat);
-    }
-
-    public void setMaximumLineHeight (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaximumLineHeight_1, aFloat);
-    }
-
-    public void setMinimumLineHeight (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinimumLineHeight_1, aFloat);
-    }
-
-    public void setParagraphSpacing (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setParagraphSpacing_1, aFloat);
-    }
+public void setLineBreakMode(NSLineBreakMode mode) {
+    OS.objc_msgSend(this.id, OS.sel_setLineBreakMode_, mode);
+}
 
-    public void setParagraphSpacingBefore (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setParagraphSpacingBefore_1, aFloat);
-    }
-
-    public void setParagraphStyle (NSParagraphStyle obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setParagraphStyle_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setTabStops (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTabStops_1, array !is null ? array.id_ : null);
-    }
+public void setLineSpacing(CGFloat aFloat) {
+    OS.objc_msgSend(this.id, OS.sel_setLineSpacing_, aFloat);
+}
 
-    public void setTailIndent (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTailIndent_1, aFloat);
-    }
-
-    public void setTextBlocks (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextBlocks_1, array !is null ? array.id_ : null);
-    }
-
-    public void setTextLists (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextLists_1, array !is null ? array.id_ : null);
-    }
-
-    public void setTighteningFactorForTruncation (float aFactor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTighteningFactorForTruncation_1, aFactor);
-    }
+public void setTabStops(NSArray array) {
+    OS.objc_msgSend(this.id, OS.sel_setTabStops_, array !is null ? array.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSMutableSet.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMutableSet.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,94 +1,46 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMutableSet;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSPredicate;
 import dwt.internal.cocoa.NSSet;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMutableSet : NSSet
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSMutableSet : NSSet {
 
-    public void addObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObject_1, object !is null ? object.id_ : null);
-    }
-
-    public void addObjectsFromArray (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObjectsFromArray_1, array !is null ? array.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void filterUsingPredicate (NSPredicate predicate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_filterUsingPredicate_1, predicate !is null ? predicate.id_ : null);
-    }
-
-    public NSMutableSet initWithCapacity (NSUInteger numItems)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCapacity_1, numItems);
-        return result !is null ? this : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void intersectSet (NSSet otherSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_intersectSet_1, otherSet !is null ? otherSet.id_ : null);
-    }
-
-    public void minusSet (NSSet otherSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_minusSet_1, otherSet !is null ? otherSet.id_ : null);
-    }
-
-    public void removeAllObjects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllObjects);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void removeObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObject_1, object !is null ? object.id_ : null);
-    }
-
-    public void setSet (NSSet otherSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSet_1, otherSet !is null ? otherSet.id_ : null);
-    }
+public void addObjectsFromArray(NSArray array) {
+    OS.objc_msgSend(this.id, OS.sel_addObjectsFromArray_, array !is null ? array.id : null);
+}
 
-    public static id setWithCapacity (NSUInteger numItems)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMutableSet, OS.sel_setWithCapacity_1, numItems);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void unionSet (NSSet otherSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unionSet_1, otherSet !is null ? otherSet.id_ : null);
-    }
+public static NSSet set() {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableSet, OS.sel_set);
+    return result !is null ? new NSMutableSet(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSMutableString.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMutableString.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,84 +1,51 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMutableString;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRange;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMutableString : NSString
-{
+public class NSMutableString : NSString {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public void appendFormat (NSString appendFormat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendFormat_1, appendFormat !is null ? appendFormat.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void appendString (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_appendString_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void deleteCharactersInRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteCharactersInRange_1, range);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSMutableString initWithCapacity (NSUInteger capacity)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCapacity_1, capacity);
-        return result !is null ? this : null;
-    }
-
-    public void insertString (NSString aString, NSUInteger loc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertString_1atIndex_1, aString !is null ? aString.id_ : null, loc);
-    }
-
-    public void replaceCharactersInRange (NSRange range, NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceCharactersInRange_1withString_1, range, aString !is null ? aString.id_ : null);
-    }
+public void appendString(NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_appendString_, aString !is null ? aString.id : null);
+}
 
-    public NSUInteger replaceOccurrencesOfString (NSString target, NSString replacement, NSStringCompareOptions options, NSRange searchRange)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_replaceOccurrencesOfString_1withString_1options_1range_1, target !is null ? target.id_ : null,
-                replacement !is null ? replacement.id_ : null, options, searchRange);
-    }
+public static NSString stringWithCharacters(/*const*/wchar* characters, NSUInteger length) {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_stringWithCharacters_length_, characters, length);
+    return result !is null ? new NSMutableString(result) : null;
+}
 
-    public void setString (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setString_1, aString !is null ? aString.id_ : null);
-    }
-
-    public static id stringWithCapacity (NSUInteger capacity)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_stringWithCapacity_1, capacity);
-        return result !is null ? new id(result) : null;
-    }
+public static NSString stringWithUTF8String(/*const*/char* nullTerminatedCString) {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_stringWithUTF8String_, nullTerminatedCString);
+    return result !is null ? new NSString(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSMutableURLRequest.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSMutableURLRequest.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,94 +1,46 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSMutableURLRequest;
 
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInputStream;
-import dwt.internal.cocoa.NSString;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.NSURLRequest;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSMutableURLRequest : NSURLRequest
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSMutableURLRequest : NSURLRequest {
 
-    public void addValue (NSString value, NSString field)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addValue_1forHTTPHeaderField_1, value !is null ? value.id_ : null, field !is null ? field.id_ : null);
-    }
-
-    public void setAllHTTPHeaderFields (NSDictionary headerFields)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllHTTPHeaderFields_1, headerFields !is null ? headerFields.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void setCachePolicy (NSURLRequestCachePolicy policy)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCachePolicy_1, policy);
-    }
-
-    public void setHTTPBody (NSData data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHTTPBody_1, data !is null ? data.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void setHTTPBodyStream (NSInputStream inputStream)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHTTPBodyStream_1, inputStream !is null ? inputStream.id_ : null);
-    }
-
-    public void setHTTPMethod (NSString method)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHTTPMethod_1, method !is null ? method.id_ : null);
-    }
-
-    public void setHTTPShouldHandleCookies (bool should)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHTTPShouldHandleCookies_1, should);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setMainDocumentURL (NSURL URL)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMainDocumentURL_1, URL !is null ? URL.id_ : null);
-    }
-
-    public void setTimeoutInterval (double seconds)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTimeoutInterval_1, seconds);
-    }
+public void setURL(NSURL URL) {
+    OS.objc_msgSend(this.id, OS.sel_setURL_, URL !is null ? URL.id : null);
+}
 
-    public void setURL (NSURL URL)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setURL_1, URL !is null ? URL.id_ : null);
-    }
-
-    public void setValue (NSString value, NSString field)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValue_1forHTTPHeaderField_1, value !is null ? value.id_ : null, field !is null ? field.id_ : null);
-    }
+public static NSURLRequest requestWithURL(NSURL URL) {
+    objc.id result = OS.objc_msgSend(OS.class_NSMutableURLRequest, OS.sel_requestWithURL_, URL !is null ? URL.id : null);
+    return result !is null ? new NSMutableURLRequest(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSNameSpecifier.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSNameSpecifier;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSNameSpecifier : NSScriptObjectSpecifier
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initWithContainerClassDescription (NSScriptClassDescription classDesc, NSScriptObjectSpecifier container, NSString property,
-            NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContainerClassDescription_1containerSpecifier_1key_1name_1,
-                classDesc !is null ? classDesc.id_ : null, container !is null ? container.id_ : null, property !is null ? property.id_ : null,
-                name !is null ? name.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setName (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setName_1, name !is null ? name.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSNetService.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSNetService;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRunLoop;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum
-{
-    NSNetServiceNoAutoRename = 1 << 0
-}
-
-alias NSUInteger NSNetServiceOptions;
-
-public class NSNetService : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData TXTRecordData ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_TXTRecordData);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSArray addresses ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_addresses);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSData dataFromTXTRecordDictionary (NSDictionary txtDictionary)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNetService, OS.sel_dataFromTXTRecordDictionary_1,
-                txtDictionary !is null ? txtDictionary.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSDictionary dictionaryFromTXTRecordData (NSData txtData)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNetService, OS.sel_dictionaryFromTXTRecordData_1, txtData !is null ? txtData.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString domain ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_domain);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool getInputStream (objc.id** inputStream, objc.id** outputStream)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getInputStream_1outputStream_1, inputStream, outputStream) !is null;
-    }
-
-    public NSString hostName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_hostName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initWithDomain_type_name_ (NSString domain, NSString type, NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDomain_1type_1name_1, domain !is null ? domain.id_ : null,
-                type !is null ? type.id_ : null, name !is null ? name.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithDomain_type_name_port_ (NSString domain, NSString type, NSString name, int port)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDomain_1type_1name_1port_1, domain !is null ? domain.id_ : null,
-                type !is null ? type.id_ : null, name !is null ? name.id_ : null, port);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger port ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_port);
-    }
-
-    public NSString protocolSpecificInformation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_protocolSpecificInformation);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void publish ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_publish);
-    }
-
-    public void publishWithOptions (NSNetServiceOptions options)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_publishWithOptions_1, options);
-    }
-
-    public void removeFromRunLoop (NSRunLoop aRunLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFromRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void resolve ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resolve);
-    }
-
-    public void resolveWithTimeout (NSTimeInterval timeout)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resolveWithTimeout_1, timeout);
-    }
-
-    public void scheduleInRunLoop (NSRunLoop aRunLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scheduleInRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setProtocolSpecificInformation (NSString specificInformation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setProtocolSpecificInformation_1, specificInformation !is null ? specificInformation.id_ : null);
-    }
-
-    public bool setTXTRecordData (NSData recordData)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setTXTRecordData_1, recordData !is null ? recordData.id_ : null) !is null;
-    }
-
-    public void startMonitoring ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_startMonitoring);
-    }
-
-    public void stop ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stop);
-    }
-
-    public void stopMonitoring ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopMonitoring);
-    }
-
-    public NSString type ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_type);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSNetServiceBrowser.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSNetServiceBrowser;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRunLoop;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSNetServiceBrowser : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void removeFromRunLoop (NSRunLoop aRunLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFromRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void scheduleInRunLoop (NSRunLoop aRunLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scheduleInRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void searchForAllDomains ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_searchForAllDomains);
-    }
-
-    public void searchForBrowsableDomains ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_searchForBrowsableDomains);
-    }
-
-    public void searchForRegistrationDomains ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_searchForRegistrationDomains);
-    }
-
-    public void searchForServicesOfType (NSString type, NSString domainString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_searchForServicesOfType_1inDomain_1, type !is null ? type.id_ : null,
-                domainString !is null ? domainString.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void stop ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stop);
-    }
-
-}
--- a/dwt/internal/cocoa/NSNib.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSNib;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSBundle;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSNib : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initWithContentsOfURL (NSURL nibFileURL)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, nibFileURL !is null ? nibFileURL.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithNibNamed (NSString nibName, NSBundle bundle)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithNibNamed_1bundle_1, nibName !is null ? nibName.id_ : null,
-                bundle !is null ? bundle.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool instantiateNibWithExternalNameTable (NSDictionary externalNameTable)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_instantiateNibWithExternalNameTable_1, externalNameTable !is null ? externalNameTable.id_ : null) !is null;
-    }
-
-    public bool instantiateNibWithOwner (id owner, objc.id** topLevelObjects)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_instantiateNibWithOwner_1topLevelObjects_1, owner !is null ? owner.id_ : null, topLevelObjects) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSNibConnector.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSNibConnector;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSNibConnector : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id destination ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_destination);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void establishConnection ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_establishConnection);
-    }
-
-    public NSString label ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_label);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void replaceObject (id oldObject, id newObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceObject_1withObject_1, oldObject !is null ? oldObject.id_ : null,
-                newObject !is null ? newObject.id_ : null);
-    }
-
-    public void setDestination (id destination)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDestination_1, destination !is null ? destination.id_ : null);
-    }
-
-    public void setLabel (NSString label)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLabel_1, label !is null ? label.id_ : null);
-    }
-
-    public void setSource (id source)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSource_1, source !is null ? source.id_ : null);
-    }
-
-    public id source ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_source);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSNibControlConnector.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSNibControlConnector;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSNibControlConnector : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void establishConnection ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_establishConnection);
-    }
-
-}
--- a/dwt/internal/cocoa/NSNibOutletConnector.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-module dwt.internal.cocoa.NSNibOutletConnector;
-
-import dwt.internal.cocoa.NSNibConnector;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSNibOutletConnector : NSNibConnector
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void establishConnection ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_establishConnection);
-    }
-
-}
--- a/dwt/internal/cocoa/NSNotification.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSNotification.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,68 +1,47 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSNotification;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSNotification : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSNotification : NSObject {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static id static_notificationWithName_object_ (NSString aName, id anObject)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNotification, OS.sel_notificationWithName_1object_1, aName !is null ? aName.id_ : null,
-                anObject !is null ? anObject.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static id static_notificationWithName_object_userInfo_ (NSString aName, id anObject, NSDictionary aUserInfo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNotification, OS.sel_notificationWithName_1object_1userInfo_1, aName !is null ? aName.id_ : null,
-                anObject !is null ? anObject.id_ : null, aUserInfo !is null ? aUserInfo.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public cocoa.id object() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_object);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
-    public id object ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_object);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary userInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_userInfo);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public NSDictionary userInfo() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_userInfo);
+    return result !is null ? new NSDictionary(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSNotificationCenter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSNotificationCenter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,76 +1,50 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSNotificationCenter;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDictionary;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSNotification;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSNotificationCenter : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSNotificationCenter : NSObject {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public void addObserver (id observer, objc.SEL aSelector, NSString aName, id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObserver_1selector_1name_1object_1, observer !is null ? observer.id_ : null, aSelector,
-                aName !is null ? aName.id_ : null, anObject !is null ? anObject.id_ : null);
-    }
-
-    public static NSNotificationCenter defaultCenter ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNotificationCenter, OS.sel_defaultCenter);
-        return result !is null ? new NSNotificationCenter(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void postNotification (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postNotification_1, notification !is null ? notification.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void postNotificationName_object_ (NSString aName, id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1, aName !is null ? aName.id_ : null, anObject !is null ? anObject.id_ : null);
-    }
+public void addObserver(cocoa.id observer, objc.SEL aSelector, NSString aName, cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_addObserver_selector_name_object_, observer !is null ? observer.id : null, aSelector, aName !is null ? aName.id : null, anObject !is null ? anObject.id : null);
+}
 
-    public void postNotificationName_object_userInfo_ (NSString aName, id anObject, NSDictionary aUserInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postNotificationName_1object_1userInfo_1, aName !is null ? aName.id_ : null,
-                anObject !is null ? anObject.id_ : null, aUserInfo !is null ? aUserInfo.id_ : null);
-    }
+public static NSNotificationCenter defaultCenter() {
+    objc.id result = OS.objc_msgSend(OS.class_NSNotificationCenter, OS.sel_defaultCenter);
+    return result !is null ? new NSNotificationCenter(result) : null;
+}
 
-    public void removeObserver_ (id observer)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObserver_1, observer !is null ? observer.id_ : null);
-    }
-
-    public void removeObserver_name_object_ (id observer, NSString aName, id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObserver_1name_1object_1, observer !is null ? observer.id_ : null, aName !is null ? aName.id_ : null,
-                anObject !is null ? anObject.id_ : null);
-    }
+public void removeObserver(cocoa.id observer) {
+    OS.objc_msgSend(this.id, OS.sel_removeObserver_, observer !is null ? observer.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSNotificationQueue.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSNotificationQueue;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSNotification;
-import dwt.internal.cocoa.NSNotificationCenter;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSPostingStyle
-{
-    NSPostWhenIdle = 1,
-    NSPostASAP = 2,
-    NSPostNow = 3
-}
-
-alias NSPostingStyle.NSPostWhenIdle NSPostWhenIdle;
-alias NSPostingStyle.NSPostASAP NSPostASAP;
-alias NSPostingStyle.NSPostNow NSPostNow;
-
-public class NSNotificationQueue : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static id defaultQueue ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNotificationQueue, OS.sel_defaultQueue);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void dequeueNotificationsMatching (NSNotification notification, NSUInteger coalesceMask)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dequeueNotificationsMatching_1coalesceMask_1, notification !is null ? notification.id_ : null, coalesceMask);
-    }
-
-    public void enqueueNotification_postingStyle_ (NSNotification notification, NSPostingStyle postingStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enqueueNotification_1postingStyle_1, notification !is null ? notification.id_ : null, postingStyle);
-    }
-
-    public void enqueueNotification_postingStyle_coalesceMask_forModes_ (NSNotification notification, NSPostingStyle postingStyle, NSUInteger coalesceMask,
-            NSArray modes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enqueueNotification_1postingStyle_1coalesceMask_1forModes_1, notification !is null ? notification.id_ : null,
-                postingStyle, coalesceMask, modes !is null ? modes.id_ : null);
-    }
-
-    public id initWithNotificationCenter (NSNotificationCenter notificationCenter)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithNotificationCenter_1, notificationCenter !is null ? notificationCenter.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSNull.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSNull;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSNull : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSNull null_ ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNull, OS.sel_null);
-        return result !is null ? new NSNull(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSNumber.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSNumber.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,321 +1,80 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSNumber;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSComparisonResult;
-import dwt.internal.cocoa.NSDecimal;
-import dwt.internal.cocoa.NSString;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRange;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSValue;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSNumber : NSValue
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool boolValue ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_boolValue) !is null;
-    }
-
-    public byte charValue ()
-    {
-        return cast(byte) OS.objc_msgSend(this.id_, OS.sel_charValue);
-    }
-
-    public NSComparisonResult compare (NSNumber otherNumber)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1, otherNumber !is null ? otherNumber.id_ : null);
-    }
+public class NSNumber : NSValue {
 
-    public NSDecimal decimalValue ()
-    {
-        NSDecimal result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_decimalValue);
-        return result;
-    }
-
-    public NSString descriptionWithLocale (id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public double doubleValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
-    }
+public this() {
+    super();
+}
 
-    public float floatValue ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue);
-    }
-
-    public id initWithBool (bool value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBool_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithChar (byte value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithChar_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithDouble (double value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDouble_1, value);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public id initWithFloat (float value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFloat_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithInt (int value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithInt_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithInteger (int value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithInteger_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithLong (int value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLong_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithLongLong (long value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLongLong_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithShort (short value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithShort_1, value);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public id initWithUnsignedChar (ubyte value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedChar_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithUnsignedInt (uint value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedInt_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithUnsignedInteger (uint value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedInteger_1, value);
-        return result !is null ? new id(result) : null;
-    }
+public int intValue() {
+    return cast(int)/*64*/OS.objc_msgSend(this.id, OS.sel_intValue);
+}
 
-    public id initWithUnsignedLong (uint value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedLong_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithUnsignedLongLong (ulong value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedLongLong_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithUnsignedShort (ushort value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUnsignedShort_1, value);
-        return result !is null ? new id(result) : null;
-    }
-
-    public int intValue ()
-    {
-        return cast(int)OS.objc_msgSend(this.id_, OS.sel_intValue);
-    }
+public static NSNumber numberWithBool(bool value) {
+    objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithBool_, value);
+    return result !is null ? new NSNumber(result) : null;
+}
 
-    public int integerValue ()
-    {
-        return cast(int)OS.objc_msgSend(this.id_, OS.sel_integerValue);
-    }
-
-    public bool isEqualToNumber (NSNumber number)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToNumber_1, number !is null ? number.id_ : null) !is null;
-    }
-
-    public long longLongValue ()
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_longLongValue);
-    }
-
-    public int longValue ()
-    {
-        return cast(int)OS.objc_msgSend(this.id_, OS.sel_longValue);
-    }
-
-    public static NSNumber numberWithBool (bool value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithBool_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithChar (byte value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithChar_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
+public static NSNumber numberWithInt(int value) {
+    objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithInt_, value);
+    return result !is null ? new NSNumber(result) : null;
+}
 
-    public static NSNumber numberWithDouble (double value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithDouble_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithFloat (float value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithFloat_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithInt (int value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithInt_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
+public static NSNumber numberWithInteger(NSInteger value) {
+    objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithInteger_, value);
+    return result !is null ? new NSNumber(result) : null;
+}
 
-    public static NSNumber numberWithInteger (int value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithInteger_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithLong (int value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithLong_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithLongLong (long value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithLongLong_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithShort (short value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithShort_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
+public static NSValue valueWithPoint(NSPoint point) {
+    objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithPoint_, point);
+    return result !is null ? new NSValue(result) : null;
+}
 
-    public static NSNumber numberWithUnsignedChar (ubyte value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithUnsignedChar_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithUnsignedInt (uint value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithUnsignedInt_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithUnsignedInteger (uint value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithUnsignedInteger_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithUnsignedLong (uint value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithUnsignedLong_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithUnsignedLongLong (ulong value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithUnsignedLongLong_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public static NSNumber numberWithUnsignedShort (ushort value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_numberWithUnsignedShort_1, value);
-        return result !is null ? new NSNumber(result) : null;
-    }
+public static NSValue valueWithRange(NSRange range) {
+    objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithRange_, range);
+    return result !is null ? new NSValue(result) : null;
+}
 
-    public short shortValue ()
-    {
-        return cast(short) OS.objc_msgSend(this.id_, OS.sel_shortValue);
-    }
-
-    public NSString stringValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public ubyte unsignedCharValue ()
-    {
-        return cast(ubyte) OS.objc_msgSend(this.id_, OS.sel_unsignedCharValue);
-    }
+public static NSValue valueWithRect(NSRect rect) {
+    objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithRect_, rect);
+    return result !is null ? new NSValue(result) : null;
+}
 
-    public uint unsignedIntValue ()
-    {
-        return cast(uint)OS.objc_msgSend(this.id_, OS.sel_unsignedIntValue);
-    }
-
-    public uint unsignedIntegerValue ()
-    {
-        return cast(uint)OS.objc_msgSend(this.id_, OS.sel_unsignedIntegerValue);
-    }
-
-    public ulong unsignedLongLongValue ()
-    {
-        return cast(ulong) OS.objc_msgSend(this.id_, OS.sel_unsignedLongLongValue);
-    }
-
-    public uint unsignedLongValue ()
-    {
-        return cast(uint)OS.objc_msgSend(this.id_, OS.sel_unsignedLongValue);
-    }
-
-    public ushort unsignedShortValue ()
-    {
-        return cast(ushort) OS.objc_msgSend(this.id_, OS.sel_unsignedShortValue);
-    }
+public static NSValue valueWithSize(NSSize size) {
+    objc.id result = OS.objc_msgSend(OS.class_NSNumber, OS.sel_valueWithSize_, size);
+    return result !is null ? new NSValue(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSNumberFormatter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSNumberFormatter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,76 +1,29 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSNumberFormatter;
 
-import dwt.internal.cocoa.CFNumberFormatter;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSDecimalNumberHandler;
-import dwt.internal.cocoa.NSDictionary;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSFormatter;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSLocale;
 import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-enum NSNumberFormatterBehavior : NSUInteger
-{
-    NSNumberFormatterBehaviorDefault = 0,
-    NSNumberFormatterBehavior10_0 = 1000,
-    NSNumberFormatterBehavior10_4 = 1040,
-}
-
-alias NSNumberFormatterBehavior.NSNumberFormatterBehaviorDefault NSNumberFormatterBehaviorDefault;
-alias NSNumberFormatterBehavior.NSNumberFormatterBehavior10_0 NSNumberFormatterBehavior10_0;
-alias NSNumberFormatterBehavior.NSNumberFormatterBehavior10_4 NSNumberFormatterBehavior10_4;
-
-enum NSNumberFormatterPadPosition : NSUInteger
-{
-    NSNumberFormatterPadBeforePrefix = kCFNumberFormatterPadBeforePrefix,
-    NSNumberFormatterPadAfterPrefix = kCFNumberFormatterPadAfterPrefix,
-    NSNumberFormatterPadBeforeSuffix = kCFNumberFormatterPadBeforeSuffix,
-    NSNumberFormatterPadAfterSuffix = 3//kCFNumberFormatterPadAfterSuffix
-}
-
-alias NSNumberFormatterPadPosition.NSNumberFormatterPadBeforePrefix NSNumberFormatterPadBeforePrefix;
-alias NSNumberFormatterPadPosition.NSNumberFormatterPadAfterPrefix NSNumberFormatterPadAfterPrefix;
-alias NSNumberFormatterPadPosition.NSNumberFormatterPadBeforeSuffix NSNumberFormatterPadBeforeSuffix;
-alias NSNumberFormatterPadPosition.NSNumberFormatterPadAfterSuffix NSNumberFormatterPadAfterSuffix;
-
-enum 
-{
-    NSNumberFormatterRoundCeiling = kCFNumberFormatterRoundCeiling,
-    NSNumberFormatterRoundFloor = kCFNumberFormatterRoundFloor,
-    NSNumberFormatterRoundDown = kCFNumberFormatterRoundDown,
-    NSNumberFormatterRoundUp = kCFNumberFormatterRoundUp,
-    NSNumberFormatterRoundHalfEven = kCFNumberFormatterRoundHalfEven,
-    NSNumberFormatterRoundHalfDown = kCFNumberFormatterRoundHalfDown,
-    NSNumberFormatterRoundHalfUp = kCFNumberFormatterRoundHalfUp
-}
-
-alias NSUInteger NSNumberFormatterRoundingMode;
-
-/*alias NSNumberFormatterRoundingMode.NSNumberFormatterRoundCeiling NSNumberFormatterRoundCeiling;
-alias NSNumberFormatterRoundingMode.NSNumberFormatterRoundFloor NSNumberFormatterRoundFloor;
-alias NSNumberFormatterRoundingMode.NSNumberFormatterRoundDown NSNumberFormatterRoundDown;
-alias NSNumberFormatterRoundingMode.NSNumberFormatterRoundUp NSNumberFormatterRoundUp;
-alias NSNumberFormatterRoundingMode.NSNumberFormatterRoundHalfEven NSNumberFormatterRoundHalfEven;
-alias NSNumberFormatterRoundingMode.NSNumberFormatterRoundHalfDown NSNumberFormatterRoundCeiling;
-alias NSNumberFormatterRoundingMode.NSNumberFormatterRoundHalfUp NSNumberFormatterRoundHalfUp;*/
-
-enum NSNumberFormatterStyle : NSUInteger
+enum NSNumberFormatterStyle
 {
     NSNumberFormatterNoStyle = kCFNumberFormatterNoStyle,
     NSNumberFormatterDecimalStyle = kCFNumberFormatterDecimalStyle,
@@ -80,733 +33,85 @@
     NSNumberFormatterSpellOutStyle = kCFNumberFormatterSpellOutStyle
 }
 
-alias NSNumberFormatterStyle.NSNumberFormatterNoStyle NSNumberFormatterNoStyle;
-alias NSNumberFormatterStyle.NSNumberFormatterDecimalStyle NSNumberFormatterDecimalStyle;
-alias NSNumberFormatterStyle.NSNumberFormatterCurrencyStyle NSNumberFormatterCurrencyStyle;
-alias NSNumberFormatterStyle.NSNumberFormatterPercentStyle NSNumberFormatterPercentStyle;
-alias NSNumberFormatterStyle.NSNumberFormatterScientificStyle NSNumberFormatterScientificStyle;
-alias NSNumberFormatterStyle.NSNumberFormatterSpellOutStyle NSNumberFormatterSpellOutStyle;
-
-public class NSNumberFormatter : NSFormatter
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool allowsFloats ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsFloats) !is null;
-    }
-
-    public bool alwaysShowsDecimalSeparator ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_alwaysShowsDecimalSeparator) !is null;
-    }
-
-    public NSAttributedString attributedStringForNil ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedStringForNil);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSAttributedString attributedStringForNotANumber ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedStringForNotANumber);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
+public class NSNumberFormatter : NSFormatter {
 
-    public NSAttributedString attributedStringForZero ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedStringForZero);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSString currencyCode ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currencyCode);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString currencyDecimalSeparator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currencyDecimalSeparator);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString currencyGroupingSeparator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currencyGroupingSeparator);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString currencySymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currencySymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString decimalSeparator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decimalSeparator);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSNumberFormatterBehavior defaultFormatterBehavior ()
-    {
-        return cast(NSNumberFormatterBehavior) OS.objc_msgSend(OS.class_NSNumberFormatter, OS.sel_defaultFormatterBehavior);
-    }
-
-    public NSString exponentSymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_exponentSymbol);
-        return result !is null ? new NSString(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSString format ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_format);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger formatWidth ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_formatWidth);
-    }
-
-    public NSNumberFormatterBehavior formatterBehavior ()
-    {
-        return cast(NSNumberFormatterBehavior) OS.objc_msgSend(this.id_, OS.sel_formatterBehavior);
-    }
-
-    public bool generatesDecimalNumbers ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_generatesDecimalNumbers) !is null;
-    }
-
-    public bool getObjectValue (/*out*/objc.id* obj, NSString str, /*inout NSRange* */objc.id* rangep, /*out NSError** */objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getObjectValue_1forString_1range_1error_1, obj, str !is null ? str.id_ : null, rangep, error) !is null;
-    }
-
-    public NSString groupingSeparator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_groupingSeparator);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger groupingSize ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_groupingSize);
-    }
-
-    public bool hasThousandSeparators ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasThousandSeparators) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSString internationalCurrencySymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_internationalCurrencySymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool isLenient ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLenient) !is null;
-    }
-
-    public bool isPartialStringValidationEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isPartialStringValidationEnabled) !is null;
-    }
-
-    public NSLocale locale ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_locale);
-        return result !is null ? new NSLocale(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool localizesFormat ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_localizesFormat) !is null;
-    }
-
-    public NSNumber maximum ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_maximum);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public NSUInteger maximumFractionDigits ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_maximumFractionDigits);
-    }
-
-    public NSUInteger maximumIntegerDigits ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_maximumIntegerDigits);
-    }
-
-    public NSUInteger maximumSignificantDigits ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_maximumSignificantDigits);
-    }
+public bool allowsFloats() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_allowsFloats);
+}
 
-    public NSNumber minimum ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_minimum);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public NSUInteger minimumFractionDigits ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_minimumFractionDigits);
-    }
-
-    public NSUInteger minimumIntegerDigits ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_minimumIntegerDigits);
-    }
-
-    public NSUInteger minimumSignificantDigits ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_minimumSignificantDigits);
-    }
-
-    public NSString minusSign ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_minusSign);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSNumber multiplier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_multiplier);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public NSString negativeFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_negativeFormat);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString negativeInfinitySymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_negativeInfinitySymbol);
-        return result !is null ? new NSString(result) : null;
-    }
+public bool alwaysShowsDecimalSeparator() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_alwaysShowsDecimalSeparator);
+}
 
-    public NSString negativePrefix ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_negativePrefix);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString negativeSuffix ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_negativeSuffix);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString nilSymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nilSymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString notANumberSymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_notANumberSymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSNumber numberFromString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_numberFromString_1, string !is null ? string.id_ : null);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public NSNumberFormatterStyle numberStyle ()
-    {
-        return cast(NSNumberFormatterStyle) OS.objc_msgSend(this.id_, OS.sel_numberStyle);
-    }
-
-    public NSString paddingCharacter ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_paddingCharacter);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSNumberFormatterPadPosition paddingPosition ()
-    {
-        return cast(NSNumberFormatterPadPosition) OS.objc_msgSend(this.id_, OS.sel_paddingPosition);
-    }
+public NSString decimalSeparator() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_decimalSeparator);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSString perMillSymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_perMillSymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString percentSymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_percentSymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString plusSign ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_plusSign);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString positiveFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_positiveFormat);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString positiveInfinitySymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_positiveInfinitySymbol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString positivePrefix ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_positivePrefix);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString positiveSuffix ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_positiveSuffix);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSNumber maximum() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_maximum);
+    return result !is null ? new NSNumber(result) : null;
+}
 
-    public NSDecimalNumberHandler roundingBehavior ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_roundingBehavior);
-        return result !is null ? new NSDecimalNumberHandler(result) : null;
-    }
-
-    public NSNumber roundingIncrement ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_roundingIncrement);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public NSNumberFormatterRoundingMode roundingMode ()
-    {
-        return cast(NSNumberFormatterRoundingMode) OS.objc_msgSend(this.id_, OS.sel_roundingMode);
-    }
-
-    public NSUInteger secondaryGroupingSize ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_secondaryGroupingSize);
-    }
+public NSUInteger maximumFractionDigits() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_maximumFractionDigits);
+}
 
-    public void setAllowsFloats (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsFloats_1, flag);
-    }
-
-    public void setAlwaysShowsDecimalSeparator (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlwaysShowsDecimalSeparator_1, b);
-    }
-
-    public void setAttributedStringForNil (NSAttributedString newAttributedString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedStringForNil_1, newAttributedString !is null ? newAttributedString.id_ : null);
-    }
-
-    public void setAttributedStringForNotANumber (NSAttributedString newAttributedString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedStringForNotANumber_1, newAttributedString !is null ? newAttributedString.id_ : null);
-    }
-
-    public void setAttributedStringForZero (NSAttributedString newAttributedString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedStringForZero_1, newAttributedString !is null ? newAttributedString.id_ : null);
-    }
-
-    public void setCurrencyCode (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrencyCode_1, string !is null ? string.id_ : null);
-    }
+public NSUInteger maximumIntegerDigits() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_maximumIntegerDigits);
+}
 
-    public void setCurrencyDecimalSeparator (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrencyDecimalSeparator_1, string !is null ? string.id_ : null);
-    }
-
-    public void setCurrencyGroupingSeparator (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrencyGroupingSeparator_1, string !is null ? string.id_ : null);
-    }
-
-    public void setCurrencySymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrencySymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setDecimalSeparator (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDecimalSeparator_1, string !is null ? string.id_ : null);
-    }
-
-    public static void setDefaultFormatterBehavior (NSNumberFormatterBehavior behavior)
-    {
-        OS.objc_msgSend(OS.class_NSNumberFormatter, OS.sel_setDefaultFormatterBehavior_1, behavior);
-    }
-
-    public void setExponentSymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setExponentSymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setFormat (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFormat_1, string !is null ? string.id_ : null);
-    }
-
-    public void setFormatWidth (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFormatWidth_1, number);
-    }
-
-    public void setFormatterBehavior (NSNumberFormatterBehavior behavior)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFormatterBehavior_1, behavior);
-    }
-
-    public void setGeneratesDecimalNumbers (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGeneratesDecimalNumbers_1, b);
-    }
-
-    public void setGroupingSeparator (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGroupingSeparator_1, string !is null ? string.id_ : null);
-    }
-
-    public void setGroupingSize (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGroupingSize_1, number);
-    }
-
-    public void setHasThousandSeparators (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasThousandSeparators_1, flag);
-    }
-
-    public void setInternationalCurrencySymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInternationalCurrencySymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setLenient (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLenient_1, b);
-    }
-
-    public void setLocale (NSLocale locale)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocale_1, locale !is null ? locale.id_ : null);
-    }
-
-    public void setLocalizesFormat (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocalizesFormat_1, flag);
-    }
-
-    public void setMaximum (NSNumber number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaximum_1, number !is null ? number.id_ : null);
-    }
+public NSNumber minimum() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_minimum);
+    return result !is null ? new NSNumber(result) : null;
+}
 
-    public void setMaximumFractionDigits (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaximumFractionDigits_1, number);
-    }
-
-    public void setMaximumIntegerDigits (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaximumIntegerDigits_1, number);
-    }
-
-    public void setMaximumSignificantDigits (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaximumSignificantDigits_1, number);
-    }
-
-    public void setMinimum (NSNumber number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinimum_1, number !is null ? number.id_ : null);
-    }
-
-    public void setMinimumFractionDigits (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinimumFractionDigits_1, number);
-    }
-
-    public void setMinimumIntegerDigits (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinimumIntegerDigits_1, number);
-    }
-
-    public void setMinimumSignificantDigits (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinimumSignificantDigits_1, number);
-    }
-
-    public void setMinusSign (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinusSign_1, string !is null ? string.id_ : null);
-    }
-
-    public void setMultiplier (NSNumber number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMultiplier_1, number !is null ? number.id_ : null);
-    }
+public void setAllowsFloats(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAllowsFloats_, flag);
+}
 
-    public void setNegativeFormat (NSString format)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNegativeFormat_1, format !is null ? format.id_ : null);
-    }
-
-    public void setNegativeInfinitySymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNegativeInfinitySymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setNegativePrefix (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNegativePrefix_1, string !is null ? string.id_ : null);
-    }
-
-    public void setNegativeSuffix (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNegativeSuffix_1, string !is null ? string.id_ : null);
-    }
+public void setMaximum(NSNumber number) {
+    OS.objc_msgSend(this.id, OS.sel_setMaximum_, number !is null ? number.id : null);
+}
 
-    public void setNilSymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNilSymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setNotANumberSymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNotANumberSymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setNumberStyle (NSNumberFormatterStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberStyle_1, style);
-    }
-
-    public void setPaddingCharacter (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPaddingCharacter_1, string !is null ? string.id_ : null);
-    }
-
-    public void setPaddingPosition (NSNumberFormatterPadPosition position)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPaddingPosition_1, position);
-    }
+public void setMaximumFractionDigits(NSUInteger number) {
+    OS.objc_msgSend(this.id, OS.sel_setMaximumFractionDigits_, number);
+}
 
-    public void setPartialStringValidationEnabled (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPartialStringValidationEnabled_1, b);
-    }
-
-    public void setPerMillSymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPerMillSymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setPercentSymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPercentSymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setPlusSign (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlusSign_1, string !is null ? string.id_ : null);
-    }
-
-    public void setPositiveFormat (NSString format)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPositiveFormat_1, format !is null ? format.id_ : null);
-    }
-
-    public void setPositiveInfinitySymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPositiveInfinitySymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public void setPositivePrefix (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPositivePrefix_1, string !is null ? string.id_ : null);
-    }
-
-    public void setPositiveSuffix (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPositiveSuffix_1, string !is null ? string.id_ : null);
-    }
-
-    public void setRoundingBehavior (NSDecimalNumberHandler newRoundingBehavior)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRoundingBehavior_1, newRoundingBehavior !is null ? newRoundingBehavior.id_ : null);
-    }
+public void setMaximumIntegerDigits(NSUInteger number) {
+    OS.objc_msgSend(this.id, OS.sel_setMaximumIntegerDigits_, number);
+}
 
-    public void setRoundingIncrement (NSNumber number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRoundingIncrement_1, number !is null ? number.id_ : null);
-    }
-
-    public void setRoundingMode (NSNumberFormatterRoundingMode mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRoundingMode_1, mode);
-    }
-
-    public void setSecondaryGroupingSize (NSUInteger number)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSecondaryGroupingSize_1, number);
-    }
-
-    public void setTextAttributesForNegativeInfinity (NSDictionary newAttributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextAttributesForNegativeInfinity_1, newAttributes !is null ? newAttributes.id_ : null);
-    }
+public void setMinimum(NSNumber number) {
+    OS.objc_msgSend(this.id, OS.sel_setMinimum_, number !is null ? number.id : null);
+}
 
-    public void setTextAttributesForNegativeValues (NSDictionary newAttributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextAttributesForNegativeValues_1, newAttributes !is null ? newAttributes.id_ : null);
-    }
-
-    public void setTextAttributesForNil (NSDictionary newAttributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextAttributesForNil_1, newAttributes !is null ? newAttributes.id_ : null);
-    }
-
-    public void setTextAttributesForNotANumber (NSDictionary newAttributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextAttributesForNotANumber_1, newAttributes !is null ? newAttributes.id_ : null);
-    }
-
-    public void setTextAttributesForPositiveInfinity (NSDictionary newAttributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextAttributesForPositiveInfinity_1, newAttributes !is null ? newAttributes.id_ : null);
-    }
-
-    public void setTextAttributesForPositiveValues (NSDictionary newAttributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextAttributesForPositiveValues_1, newAttributes !is null ? newAttributes.id_ : null);
-    }
+public void setMinimumFractionDigits(NSUInteger number) {
+    OS.objc_msgSend(this.id, OS.sel_setMinimumFractionDigits_, number);
+}
 
-    public void setTextAttributesForZero (NSDictionary newAttributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextAttributesForZero_1, newAttributes !is null ? newAttributes.id_ : null);
-    }
-
-    public void setThousandSeparator (NSString newSeparator)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setThousandSeparator_1, newSeparator !is null ? newSeparator.id_ : null);
-    }
-
-    public void setUsesGroupingSeparator (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesGroupingSeparator_1, b);
-    }
-
-    public void setUsesSignificantDigits (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesSignificantDigits_1, b);
-    }
-
-    public void setZeroSymbol (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setZeroSymbol_1, string !is null ? string.id_ : null);
-    }
-
-    public NSString stringFromNumber (NSNumber number)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringFromNumber_1, number !is null ? number.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary textAttributesForNegativeInfinity ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textAttributesForNegativeInfinity);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary textAttributesForNegativeValues ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textAttributesForNegativeValues);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public void setMinimumIntegerDigits(NSUInteger number) {
+    OS.objc_msgSend(this.id, OS.sel_setMinimumIntegerDigits_, number);
+}
 
-    public NSDictionary textAttributesForNil ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textAttributesForNil);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary textAttributesForNotANumber ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textAttributesForNotANumber);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary textAttributesForPositiveInfinity ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textAttributesForPositiveInfinity);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary textAttributesForPositiveValues ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textAttributesForPositiveValues);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public void setNumberStyle(NSNumberFormatterStyle style) {
+    OS.objc_msgSend(this.id, OS.sel_setNumberStyle_, style);
+}
 
-    public NSDictionary textAttributesForZero ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textAttributesForZero);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString thousandSeparator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_thousandSeparator);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool usesGroupingSeparator ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesGroupingSeparator) !is null;
-    }
-
-    public bool usesSignificantDigits ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesSignificantDigits) !is null;
-    }
-
-    public NSString zeroSymbol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_zeroSymbol);
-        return result !is null ? new NSString(result) : null;
-    }
+public void setPartialStringValidationEnabled(bool b) {
+    OS.objc_msgSend(this.id, OS.sel_setPartialStringValidationEnabled_, b);
+}
 
 }
--- a/dwt/internal/cocoa/NSObject.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSObject.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,1625 +1,214 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSObject;
 
 import dwt.dwthelper.utils;
-import dwt.internal.c.carboncore.MacTypes : FourCharCode;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArchiver;
+import dwt.internal.cocoa.DOMEvent;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCachedURLResponse;
-import dwt.internal.cocoa.NSClassDescription;
-import dwt.internal.cocoa.NSCoder;
-import dwt.internal.cocoa.NSConnection;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSDecimal;
-import dwt.internal.cocoa.NSDecimalNumber;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSDistantObjectRequest;
-import dwt.internal.cocoa.NSEnumerator : NSFastEnumerationState;
-import dwt.internal.cocoa.NSError;
-import dwt.internal.cocoa.NSFileManager;
-import dwt.internal.cocoa.NSIndexSet;
+import dwt.internal.cocoa.NSImage;
 import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSInvocation;
-import dwt.internal.cocoa.NSKeyedArchiver;
-import dwt.internal.cocoa.NSKeyedUnarchiver;
-import dwt.internal.cocoa.NSKeyValueObserving;
-import dwt.internal.cocoa.NSMetadataItem;
-import dwt.internal.cocoa.NSMetadataQuery;
-import dwt.internal.cocoa.NSMethodSignature;
-import dwt.internal.cocoa.NSMutableArray;
-import dwt.internal.cocoa.NSMutableSet;
-import dwt.internal.cocoa.NSNetService;
-import dwt.internal.cocoa.NSNetServiceBrowser;
-import dwt.internal.cocoa.NSPortCoder;
-import dwt.internal.cocoa.NSPortMessage;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSSet;
-import dwt.internal.cocoa.NSSpellServer;
-import dwt.internal.cocoa.NSStream;
+import dwt.internal.cocoa.NSNotification;
+import dwt.internal.cocoa.NSOutlineView;
+import dwt.internal.cocoa.NSPasteboard;
+import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSThread;
+import dwt.internal.cocoa.NSTableColumn;
+import dwt.internal.cocoa.NSTableView;
 import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSURLAuthenticationChallenge;
-import dwt.internal.cocoa.NSURLCache : NSURLCacheStoragePolicy;
-import dwt.internal.cocoa.NSURLConnection;
-import dwt.internal.cocoa.NSURLCredential;
-import dwt.internal.cocoa.NSURLDownload;
-import dwt.internal.cocoa.NSURLHandle;
-import dwt.internal.cocoa.NSURLProtocol;
-import dwt.internal.cocoa.NSURLRequest;
-import dwt.internal.cocoa.NSURLResponse;
-import dwt.internal.cocoa.NSXMLParser;
-import dwt.internal.cocoa.NSZone;
+import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.Protocol;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSObject : id
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void URL_resourceDataDidBecomeAvailable_ (NSURL sender, NSData newBytes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URL_1resourceDataDidBecomeAvailable_1, sender !is null ? sender.id_ : null,
-                newBytes !is null ? newBytes.id_ : null);
-    }
-
-    public void URL_resourceDidFailLoadingWithReason_ (NSURL sender, NSString reason)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URL_1resourceDidFailLoadingWithReason_1, sender !is null ? sender.id_ : null,
-                reason !is null ? reason.id_ : null);
-    }
-
-    public void URLHandle_resourceDataDidBecomeAvailable_ (NSURLHandle sender, NSData newBytes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLHandle_1resourceDataDidBecomeAvailable_1, sender !is null ? sender.id_ : null,
-                newBytes !is null ? newBytes.id_ : null);
-    }
-
-    public void URLHandle_resourceDidFailLoadingWithReason_ (NSURLHandle sender, NSString reason)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLHandle_1resourceDidFailLoadingWithReason_1, sender !is null ? sender.id_ : null,
-                reason !is null ? reason.id_ : null);
-    }
-
-    public void URLHandleResourceDidBeginLoading (NSURLHandle sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLHandleResourceDidBeginLoading_1, sender !is null ? sender.id_ : null);
-    }
+public class NSObject : cocoa.id {
 
-    public void URLHandleResourceDidCancelLoading (NSURLHandle sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLHandleResourceDidCancelLoading_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void URLHandleResourceDidFinishLoading (NSURLHandle sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLHandleResourceDidFinishLoading_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void URLProtocol_cachedResponseIsValid_ (NSURLProtocol protocol, NSCachedURLResponse cachedResponse)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLProtocol_1cachedResponseIsValid_1, protocol !is null ? protocol.id_ : null,
-                cachedResponse !is null ? cachedResponse.id_ : null);
-    }
-
-    public void URLProtocol_didCancelAuthenticationChallenge_ (NSURLProtocol protocol, NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLProtocol_1didCancelAuthenticationChallenge_1, protocol !is null ? protocol.id_ : null,
-                challenge !is null ? challenge.id_ : null);
-    }
-
-    public void URLProtocol_didFailWithError_ (NSURLProtocol protocol, NSError error)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLProtocol_1didFailWithError_1, protocol !is null ? protocol.id_ : null, error !is null ? error.id_ : null);
-    }
-
-    public void URLProtocol_didLoadData_ (NSURLProtocol protocol, NSData data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLProtocol_1didLoadData_1, protocol !is null ? protocol.id_ : null, data !is null ? data.id_ : null);
-    }
-
-    public void URLProtocol_didReceiveAuthenticationChallenge_ (NSURLProtocol protocol, NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLProtocol_1didReceiveAuthenticationChallenge_1, protocol !is null ? protocol.id_ : null,
-                challenge !is null ? challenge.id_ : null);
-    }
-
-    public void URLProtocol_didReceiveResponse_cacheStoragePolicy_ (NSURLProtocol protocol, NSURLResponse response, NSURLCacheStoragePolicy policy)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLProtocol_1didReceiveResponse_1cacheStoragePolicy_1, protocol !is null ? protocol.id_ : null,
-                response !is null ? response.id_ : null, policy);
-    }
-
-    public void URLProtocol_wasRedirectedToRequest_redirectResponse_ (NSURLProtocol protocol, NSURLRequest request, NSURLResponse redirectResponse)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLProtocol_1wasRedirectedToRequest_1redirectResponse_1, protocol !is null ? protocol.id_ : null,
-                request !is null ? request.id_ : null, redirectResponse !is null ? redirectResponse.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void URLProtocolDidFinishLoading (NSURLProtocol protocol)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLProtocolDidFinishLoading_1, protocol !is null ? protocol.id_ : null);
-    }
-
-    public void URLResourceDidCancelLoading (NSURL sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLResourceDidCancelLoading_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void URLResourceDidFinishLoading (NSURL sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_URLResourceDidFinishLoading_1, sender !is null ? sender.id_ : null);
-    }
-
-    public static bool accessInstanceVariablesDirectly ()
-    {
-        return OS.objc_msgSend(OS.class_NSObject, OS.sel_accessInstanceVariablesDirectly) !is null;
-    }
-
-    public void addObserver (NSObject observer, NSString keyPath, NSKeyValueObservingOptions options, void* context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObserver_1forKeyPath_1options_1context_1, observer !is null ? observer.id_ : null,
-                keyPath !is null ? keyPath.id_ : null, options, context);
-    }
-
-    public NSObject alloc ()
-    {
-        objc.id result = OS.objc_msgSend(cast(objc.id)get_class(), OS.sel_alloc);
-        this.id_ = result;
-        return result !is null ? this : null;
-    }
-
-    public objc.Class get_class ()
-    {
-        String name = this.classinfo.name;
-        int index = name.lastIndexOf('.');
-        if (index != -1)
-            name = name.substring(index + 1);
-        return cast(objc.Class)OS.objc_getClass(name);
-    }
-
-    public static id allocWithZone (NSZone* zone)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSObject, OS.sel_allocWithZone_1, zone);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void archiver_didEncodeObject_ (NSKeyedArchiver archiver, id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_archiver_1didEncodeObject_1, archiver !is null ? archiver.id_ : null, object !is null ? object.id_ : null);
-    }
-
-    public id archiver_willEncodeObject_ (NSKeyedArchiver archiver, id object)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_archiver_1willEncodeObject_1, archiver !is null ? archiver.id_ : null,
-                object !is null ? object.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void archiver_willReplaceObject_withObject_ (NSKeyedArchiver archiver, id object, id newObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_archiver_1willReplaceObject_1withObject_1, archiver !is null ? archiver.id_ : null,
-                object !is null ? object.id_ : null, newObject !is null ? newObject.id_ : null);
-    }
-
-    public void archiverDidFinish (NSKeyedArchiver archiver)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_archiverDidFinish_1, archiver !is null ? archiver.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void archiverWillFinish (NSKeyedArchiver archiver)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_archiverWillFinish_1, archiver !is null ? archiver.id_ : null);
-    }
-
-    public bool attemptRecoveryFromError_optionIndex_ (NSError error, NSUInteger recoveryOptionIndex)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_attemptRecoveryFromError_1optionIndex_1, error !is null ? error.id_ : null, recoveryOptionIndex) !is null;
-    }
-
-    public void attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_ (NSError error, NSUInteger recoveryOptionIndex, id delegatee,
-            objc.SEL didRecoverSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_attemptRecoveryFromError_1optionIndex_1delegate_1didRecoverSelector_1contextInfo_1,
-                error !is null ? error.id_ : null, recoveryOptionIndex, delegatee !is null ? delegatee.id_ : null, didRecoverSelector, contextInfo);
-    }
-
-    public NSArray attributeKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool authenticateComponents (NSArray components, NSData signature)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_authenticateComponents_1withData_1, components !is null ? components.id_ : null,
-                signature !is null ? signature.id_ : null) !is null;
-    }
+public NSObject alloc() {
+    this.id = OS.objc_msgSend(objc_getClass(), OS.sel_alloc);
+    return this;
+}
 
-    public NSData authenticationDataForComponents (NSArray components)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_authenticationDataForComponents_1, components !is null ? components.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public static bool automaticallyNotifiesObserversForKey (NSString key)
-    {
-        return OS.objc_msgSend(OS.class_NSObject, OS.sel_automaticallyNotifiesObserversForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public id autorelease ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_autorelease);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id awakeAfterUsingCoder (NSCoder aDecoder)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_awakeAfterUsingCoder_1, aDecoder !is null ? aDecoder.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void cancelAuthenticationChallenge (NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelAuthenticationChallenge_1, challenge !is null ? challenge.id_ : null);
-    }
-
-    public static void static_cancelPreviousPerformRequestsWithTarget_ (id aTarget)
-    {
-        OS.objc_msgSend(OS.class_NSObject, OS.sel_cancelPreviousPerformRequestsWithTarget_1, aTarget !is null ? aTarget.id_ : null);
-    }
-
-    public static void static_cancelPreviousPerformRequestsWithTarget_selector_object_ (id aTarget, objc.SEL aSelector, id anArgument)
-    {
-        OS.objc_msgSend(OS.class_NSObject, OS.sel_cancelPreviousPerformRequestsWithTarget_1selector_1object_1, aTarget !is null ? aTarget.id_ : null,
-                aSelector, anArgument !is null ? anArgument.id_ : null);
-    }
-
-    public static objc.Class static_class ()
-    {
-        return cast(objc.Class)OS.objc_msgSend(OS.class_NSObject, OS.sel_class);
-    }
-
-    //public objc.Class class() {
-    //  return OS.objc_msgSend(this.id_, OS.sel_class);
-    //}
+public void applicationWillResignActive(NSNotification notification) {
+    OS.objc_msgSend(this.id, OS.sel_applicationWillResignActive_, notification !is null ? notification.id : null);
+}
 
-    public FourCharCode classCode ()
-    {
-        return cast(FourCharCode) OS.objc_msgSend(this.id_, OS.sel_classCode);
-    }
-
-    public NSClassDescription classDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_classDescription);
-        return result !is null ? new NSClassDescription(result) : null;
-    }
-
-    public static NSArray classFallbacksForKeyedArchiver ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSObject, OS.sel_classFallbacksForKeyedArchiver);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public objc.Class classForArchiver ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_classForArchiver);
-    }
-
-    public objc.Class classForCoder ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_classForCoder);
-    }
-
-    public objc.Class classForKeyedArchiver ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_classForKeyedArchiver);
-    }
-
-    public static objc.Class classForKeyedUnarchiver ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSObject, OS.sel_classForKeyedUnarchiver);
-    }
-
-    public objc.Class  classForPortCoder ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_classForPortCoder);
-    }
-
-    public NSString className ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_className);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSImage draggedImage() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_draggedImage);
+    return result !is null ? new NSImage(result) : null;
+}
 
-    public id coerceValue (id value, NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_coerceValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    //public bool conformsToProtocol_(Protocol aProtocol) {
-    //  return OS.objc_msgSend(this.id_, OS.sel_conformsToProtocol_1, aProtocol !is null ? aProtocol.id_ : null) !is null;
-    //}
-    //
-    //public static bool static_conformsToProtocol_(Protocol protocol) {
-    //  return OS.objc_msgSend(OS.class_NSObject, OS.sel_conformsToProtocol_1, protocol !is null ? protocol.id_ : null) !is null;
-    //}
-
-    public void connection_didCancelAuthenticationChallenge_ (NSURLConnection connection, NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_connection_1didCancelAuthenticationChallenge_1, connection !is null ? connection.id_ : null,
-                challenge !is null ? challenge.id_ : null);
-    }
-
-    public void connection_didFailWithError_ (NSURLConnection connection, NSError error)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_connection_1didFailWithError_1, connection !is null ? connection.id_ : null, error !is null ? error.id_ : null);
-    }
-
-    public void connection_didReceiveAuthenticationChallenge_ (NSURLConnection connection, NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_connection_1didReceiveAuthenticationChallenge_1, connection !is null ? connection.id_ : null,
-                challenge !is null ? challenge.id_ : null);
-    }
-
-    public void connection_didReceiveData_ (NSURLConnection connection, NSData data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_connection_1didReceiveData_1, connection !is null ? connection.id_ : null, data !is null ? data.id_ : null);
-    }
-
-    public void connection_didReceiveResponse_ (NSURLConnection connection, NSURLResponse response)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_connection_1didReceiveResponse_1, connection !is null ? connection.id_ : null,
-                response !is null ? response.id_ : null);
-    }
-
-    public bool connection_handleRequest_ (NSConnection connection, NSDistantObjectRequest doreq)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_connection_1handleRequest_1, connection !is null ? connection.id_ : null,
-                doreq !is null ? doreq.id_ : null) !is null;
-    }
+public NSPoint draggedImageLocation() {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_draggedImageLocation);
+    return result;
+}
 
-    public bool connection_shouldMakeNewConnection_ (NSConnection ancestor, NSConnection conn)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_connection_1shouldMakeNewConnection_1, ancestor !is null ? ancestor.id_ : null,
-                conn !is null ? conn.id_ : null) !is null;
-    }
-
-    public NSCachedURLResponse connection_willCacheResponse_ (NSURLConnection connection, NSCachedURLResponse cachedResponse)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_connection_1willCacheResponse_1, connection !is null ? connection.id_ : null,
-                cachedResponse !is null ? cachedResponse.id_ : null);
-        return result !is null ? new NSCachedURLResponse(result) : null;
-    }
-
-    public NSURLRequest connection_willSendRequest_redirectResponse_ (NSURLConnection connection, NSURLRequest request, NSURLResponse response)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_connection_1willSendRequest_1redirectResponse_1, connection !is null ? connection.id_ : null,
-                request !is null ? request.id_ : null, response !is null ? response.id_ : null);
-        return result !is null ? new NSURLRequest(result) : null;
-    }
+public NSWindow draggingDestinationWindow() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_draggingDestinationWindow);
+    return result !is null ? new NSWindow(result) : null;
+}
 
-    public void connectionDidFinishLoading (NSURLConnection connection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_connectionDidFinishLoading_1, connection !is null ? connection.id_ : null);
-    }
-
-    public void continueWithoutCredentialForAuthenticationChallenge (NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_continueWithoutCredentialForAuthenticationChallenge_1, challenge !is null ? challenge.id_ : null);
-    }
-
-    public id copy ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_copy);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id copyScriptingValue (id value, NSString key, NSDictionary properties)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_copyScriptingValue_1forKey_1withProperties_1, value !is null ? value.id_ : null,
-                key !is null ? key.id_ : null, properties !is null ? properties.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id copyWithZone_ (NSZone* zone)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_copyWithZone_1, zone);
-        return result !is null ? new id(result) : null;
-    }
+public void draggingEnded(cocoa.id  sender) {
+    OS.objc_msgSend(this.id, OS.sel_draggingEnded_, sender !is null ? sender.id : null);
+}
 
-    public static id static_copyWithZone_ (NSZone* zone)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSObject, OS.sel_copyWithZone_1, zone);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSUInteger countByEnumeratingWithState (NSFastEnumerationState* state, objc.id* stackbuf, NSUInteger len)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_countByEnumeratingWithState_1objects_1count_1, state, stackbuf, len);
-    }
-
-    public id createConversationForConnection (NSConnection conn)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_createConversationForConnection_1, conn !is null ? conn.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void dealloc ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dealloc);
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString static_description ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSObject, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary dictionaryWithValuesForKeys (NSArray keys)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dictionaryWithValuesForKeys_1, keys !is null ? keys.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void didChange (NSKeyValueChange changeKind, NSIndexSet indexes, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_didChange_1valuesAtIndexes_1forKey_1, changeKind, indexes !is null ? indexes.id_ : null,
-                key !is null ? key.id_ : null);
-    }
+public NSDragOperation draggingEntered(cocoa.id  sender) {
+    return OS.objc_msgSend(this.id, OS.sel_draggingEntered_, sender !is null ? sender.id : null);
+}
 
-    public void didChangeValueForKey_ (NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_didChangeValueForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public void didChangeValueForKey_withSetMutation_usingObjects_ (NSString key, NSKeyValueSetMutationKind mutationKind, NSSet objects)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_didChangeValueForKey_1withSetMutation_1usingObjects_1, key !is null ? key.id_ : null, mutationKind,
-                objects !is null ? objects.id_ : null);
-    }
-
-    public bool doesContain (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_doesContain_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public void doesNotRecognizeSelector (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_doesNotRecognizeSelector_1, aSelector);
-    }
-
-    public void download_decideDestinationWithSuggestedFilename_ (NSURLDownload download, NSString filename)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_download_1decideDestinationWithSuggestedFilename_1, download !is null ? download.id_ : null,
-                filename !is null ? filename.id_ : null);
-    }
-
-    public void download_didCancelAuthenticationChallenge_ (NSURLDownload download, NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_download_1didCancelAuthenticationChallenge_1, download !is null ? download.id_ : null,
-                challenge !is null ? challenge.id_ : null);
-    }
-
-    public void download_didCreateDestination_ (NSURLDownload download, NSString path)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_download_1didCreateDestination_1, download !is null ? download.id_ : null, path !is null ? path.id_ : null);
-    }
-
-    public void download_didFailWithError_ (NSURLDownload download, NSError error)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_download_1didFailWithError_1, download !is null ? download.id_ : null, error !is null ? error.id_ : null);
-    }
-
-    public void download_didReceiveAuthenticationChallenge_ (NSURLDownload download, NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_download_1didReceiveAuthenticationChallenge_1, download !is null ? download.id_ : null,
-                challenge !is null ? challenge.id_ : null);
-    }
+public void draggingExited(dwt.internal.cocoa.id.id  sender) {
+    OS.objc_msgSend(this.id, OS.sel_draggingExited_, sender !is null ? sender.id : null);
+}
 
-    public void download_didReceiveDataOfLength_ (NSURLDownload download, NSUInteger length)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_download_1didReceiveDataOfLength_1, download !is null ? download.id_ : null, length);
-    }
-
-    public void download_didReceiveResponse_ (NSURLDownload download, NSURLResponse response)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_download_1didReceiveResponse_1, download !is null ? download.id_ : null,
-                response !is null ? response.id_ : null);
-    }
-
-    public bool download_shouldDecodeSourceDataOfMIMEType_ (NSURLDownload download, NSString encodingType)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_download_1shouldDecodeSourceDataOfMIMEType_1, download !is null ? download.id_ : null,
-                encodingType !is null ? encodingType.id_ : null) !is null;
-    }
-
-    public void download_willResumeWithResponse_fromByte_ (NSURLDownload download, NSURLResponse response, long startingByte)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_download_1willResumeWithResponse_1fromByte_1, download !is null ? download.id_ : null,
-                response !is null ? response.id_ : null, startingByte);
-    }
-
-    public NSURLRequest download_willSendRequest_redirectResponse_ (NSURLDownload download, NSURLRequest request, NSURLResponse redirectResponse)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_download_1willSendRequest_1redirectResponse_1, download !is null ? download.id_ : null,
-                request !is null ? request.id_ : null, redirectResponse !is null ? redirectResponse.id_ : null);
-        return result !is null ? new NSURLRequest(result) : null;
-    }
-
-    public void downloadDidBegin (NSURLDownload download)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_downloadDidBegin_1, download !is null ? download.id_ : null);
-    }
-
-    public void downloadDidFinish (NSURLDownload download)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_downloadDidFinish_1, download !is null ? download.id_ : null);
-    }
-
-    public void encodeWithCoder (NSCoder aCoder)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodeWithCoder_1, aCoder !is null ? aCoder.id_ : null);
-    }
+public NSPoint draggingLocation() {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_draggingLocation);
+    return result;
+}
 
-    public NSDecimalNumber exceptionDuringOperation (objc.SEL operation, NSCalculationError error, NSDecimalNumber leftOperand, NSDecimalNumber rightOperand)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_exceptionDuringOperation_1error_1leftOperand_1rightOperand_1, operation, error,
-                leftOperand !is null ? leftOperand.id_ : null, rightOperand !is null ? rightOperand.id_ : null);
-        return result !is null ? new NSDecimalNumber(result) : null;
-    }
-
-    public bool fileManager_shouldCopyItemAtPath_toPath_ (NSFileManager fileManager, NSString srcPath, NSString dstPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldCopyItemAtPath_1toPath_1, fileManager !is null ? fileManager.id_ : null,
-                srcPath !is null ? srcPath.id_ : null, dstPath !is null ? dstPath.id_ : null) !is null;
-    }
-
-    public bool fileManager_shouldLinkItemAtPath_toPath_ (NSFileManager fileManager, NSString srcPath, NSString dstPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldLinkItemAtPath_1toPath_1, fileManager !is null ? fileManager.id_ : null,
-                srcPath !is null ? srcPath.id_ : null, dstPath !is null ? dstPath.id_ : null) !is null;
-    }
-
-    public bool fileManager_shouldMoveItemAtPath_toPath_ (NSFileManager fileManager, NSString srcPath, NSString dstPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldMoveItemAtPath_1toPath_1, fileManager !is null ? fileManager.id_ : null,
-                srcPath !is null ? srcPath.id_ : null, dstPath !is null ? dstPath.id_ : null) !is null;
-    }
-
-    public bool fileManager_shouldProceedAfterError_ (NSFileManager fm, NSDictionary errorInfo)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldProceedAfterError_1, fm !is null ? fm.id_ : null,
-                errorInfo !is null ? errorInfo.id_ : null) !is null;
-    }
-
-    public bool fileManager_shouldProceedAfterError_copyingItemAtPath_toPath_ (NSFileManager fileManager, NSError error, NSString srcPath,
-            NSString dstPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldProceedAfterError_1copyingItemAtPath_1toPath_1,
-                fileManager !is null ? fileManager.id_ : null, error !is null ? error.id_ : null, srcPath !is null ? srcPath.id_ : null,
-                dstPath !is null ? dstPath.id_ : null) !is null;
-    }
-
-    public bool fileManager_shouldProceedAfterError_linkingItemAtPath_toPath_ (NSFileManager fileManager, NSError error, NSString srcPath,
-            NSString dstPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldProceedAfterError_1linkingItemAtPath_1toPath_1,
-                fileManager !is null ? fileManager.id_ : null, error !is null ? error.id_ : null, srcPath !is null ? srcPath.id_ : null,
-                dstPath !is null ? dstPath.id_ : null) !is null;
-    }
-
-    public bool fileManager_shouldProceedAfterError_movingItemAtPath_toPath_ (NSFileManager fileManager, NSError error, NSString srcPath,
-            NSString dstPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldProceedAfterError_1movingItemAtPath_1toPath_1,
-                fileManager !is null ? fileManager.id_ : null, error !is null ? error.id_ : null, srcPath !is null ? srcPath.id_ : null,
-                dstPath !is null ? dstPath.id_ : null) !is null;
-    }
+public NSPasteboard draggingPasteboard() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_draggingPasteboard);
+    return result !is null ? new NSPasteboard(result) : null;
+}
 
-    public bool fileManager_shouldProceedAfterError_removingItemAtPath_ (NSFileManager fileManager, NSError error, NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldProceedAfterError_1removingItemAtPath_1,
-                fileManager !is null ? fileManager.id_ : null, error !is null ? error.id_ : null, path !is null ? path.id_ : null) !is null;
-    }
-
-    public bool fileManager_shouldRemoveItemAtPath_ (NSFileManager fileManager, NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileManager_1shouldRemoveItemAtPath_1, fileManager !is null ? fileManager.id_ : null,
-                path !is null ? path.id_ : null) !is null;
-    }
-
-    public void fileManager_willProcessPath_ (NSFileManager fm, NSString path)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_fileManager_1willProcessPath_1, fm !is null ? fm.id_ : null, path !is null ? path.id_ : null);
-    }
-
-    public void finalizeXX ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_finalize);
-    }
-
-    public void forwardInvocation (NSInvocation anInvocation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_forwardInvocation_1, anInvocation !is null ? anInvocation.id_ : null);
-    }
-
-    public void handleMachMessage (void* msg)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_handleMachMessage_1, msg);
-    }
-
-    public void handlePortMessage (NSPortMessage message)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_handlePortMessage_1, message !is null ? message.id_ : null);
-    }
-
-    public id handleQueryWithUnboundKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_handleQueryWithUnboundKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public NSInteger draggingSequenceNumber() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_draggingSequenceNumber);
+}
 
-    public void handleTakeValue (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_handleTakeValue_1forUnboundKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public NSUInteger hash ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_hash);
-    }
-
-    public NSArray indicesOfObjectsByEvaluatingObjectSpecifier (NSScriptObjectSpecifier specifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_indicesOfObjectsByEvaluatingObjectSpecifier_1, specifier !is null ? specifier.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSObject init ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_init);
-        return result !is null ? this : null;
-    }
+public cocoa.id draggingSource() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_draggingSource);
+    return result !is null ? new id(result) : null;
+}
 
-    public NSObject initWithCoder (NSCoder aDecoder)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCoder_1, aDecoder !is null ? aDecoder.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public static void initialize ()
-    {
-        OS.objc_msgSend(OS.class_NSObject, OS.sel_initialize);
-    }
-
-    public void insertValue_atIndex_inPropertyWithKey_ (id value, NSUInteger index, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertValue_1atIndex_1inPropertyWithKey_1, value !is null ? value.id_ : null, index,
-                key !is null ? key.id_ : null);
-    }
-
-    public void insertValue_inPropertyWithKey_ (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertValue_1inPropertyWithKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public static objc.IMP instanceMethodForSelector (objc.SEL aSelector)
-    {
-        return cast(objc.IMP) OS.objc_msgSend(OS.class_NSObject, OS.sel_instanceMethodForSelector_1, aSelector);
-    }
+public NSDragOperation draggingSourceOperationMask() {
+    return cast(NSDragOperation) OS.objc_msgSend(this.id, OS.sel_draggingSourceOperationMask);
+}
 
-    public static NSMethodSignature instanceMethodSignatureForSelector (objc.SEL aSelector)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSObject, OS.sel_instanceMethodSignatureForSelector_1, aSelector);
-        return result !is null ? new NSMethodSignature(result) : null;
-    }
-
-    public static bool instancesRespondToSelector (objc.SEL aSelector)
-    {
-        return OS.objc_msgSend(OS.class_NSObject, OS.sel_instancesRespondToSelector_1, aSelector) !is null;
-    }
-
-    public NSString inverseForRelationshipKey (NSString relationshipKey)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_inverseForRelationshipKey_1, relationshipKey !is null ? relationshipKey.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool isCaseInsensitiveLike (NSString object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isCaseInsensitiveLike_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool isEqual (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqual_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool isEqualTo (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualTo_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool isGreaterThan (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isGreaterThan_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool isGreaterThanOrEqualTo (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isGreaterThanOrEqualTo_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool isKindOfClass (objc.Class aClass)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isKindOfClass_1, aClass) !is null;
-    }
+public NSArray namesOfPromisedFilesDroppedAtDestination(NSURL dropDestination) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_namesOfPromisedFilesDroppedAtDestination_, dropDestination !is null ? dropDestination.id : null);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public bool isLessThan (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLessThan_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool isLessThanOrEqualTo (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLessThanOrEqualTo_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool isLike (NSString object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLike_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool isMemberOfClass (objc.Class aClass)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMemberOfClass_1, aClass) !is null;
-    }
-
-    public bool isNotEqualTo (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isNotEqualTo_1, object !is null ? object.id_ : null) !is null;
-    }
+public void outlineView(NSOutlineView outlineView, NSTableColumn tableColumn) {
+    OS.objc_msgSend(this.id, OS.sel_outlineView_didClickTableColumn_, outlineView !is null ? outlineView.id : null, tableColumn !is null ? tableColumn.id : null);
+}
 
-    public bool isProxy ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isProxy) !is null;
-    }
-
-    public static bool isSubclassOfClass (objc.Class aClass)
-    {
-        return OS.objc_msgSend(OS.class_NSObject, OS.sel_isSubclassOfClass_1, aClass) !is null;
-    }
-
-    public static NSSet keyPathsForValuesAffectingValueForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSObject, OS.sel_keyPathsForValuesAffectingValueForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new NSSet(result) : null;
-    }
-
-    public static void load ()
-    {
-        OS.objc_msgSend(OS.class_NSObject, OS.sel_load);
-    }
-
-    public void lock ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_lock);
-    }
-
-    public bool makeNewConnection (NSConnection conn, NSConnection ancestor)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_makeNewConnection_1sender_1, conn !is null ? conn.id_ : null, ancestor !is null ? ancestor.id_ : null) !is null;
-    }
+public void outlineViewColumnDidMove(NSNotification notification) {
+    OS.objc_msgSend(this.id, OS.sel_outlineViewColumnDidMove_, notification !is null ? notification.id : null);
+}
 
-    public id metadataQuery_replacementObjectForResultObject_ (NSMetadataQuery query, NSMetadataItem result)
-    {
-        objc.id r = OS.objc_msgSend(this.id_, OS.sel_metadataQuery_1replacementObjectForResultObject_1, query !is null ? query.id_ : null,
-                result !is null ? result.id_ : null);
-        return r !is null ? new id(r) : null;
-    }
-
-    public id metadataQuery_replacementValueForAttribute_value_ (NSMetadataQuery query, NSString attrName, id attrValue)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_metadataQuery_1replacementValueForAttribute_1value_1, query !is null ? query.id_ : null,
-                attrName !is null ? attrName.id_ : null, attrValue !is null ? attrValue.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public objc.IMP methodForSelector (objc.SEL aSelector)
-    {
-        return cast(objc.IMP) OS.objc_msgSend(this.id_, OS.sel_methodForSelector_1, aSelector);
-    }
-
-    public NSMethodSignature methodSignatureForSelector (objc.SEL aSelector)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_methodSignatureForSelector_1, aSelector);
-        return result !is null ? new NSMethodSignature(result) : null;
-    }
-
-    public NSMutableArray mutableArrayValueForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableArrayValueForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new NSMutableArray(result) : null;
-    }
-
-    public NSMutableArray mutableArrayValueForKeyPath (NSString keyPath)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableArrayValueForKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-        return result !is null ? new NSMutableArray(result) : null;
-    }
-
-    public id mutableCopy ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableCopy);
-        return result !is null ? new id(result) : null;
-    }
+public void outlineViewColumnDidResize(NSNotification notification) {
+    OS.objc_msgSend(this.id, OS.sel_outlineViewColumnDidResize_, notification !is null ? notification.id : null);
+}
 
-    public id mutableCopyWithZone_ (NSZone* zone)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableCopyWithZone_1, zone);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_mutableCopyWithZone_ (NSZone* zone)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSObject, OS.sel_mutableCopyWithZone_1, zone);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSMutableSet mutableSetValueForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableSetValueForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new NSMutableSet(result) : null;
-    }
-
-    public NSMutableSet mutableSetValueForKeyPath (NSString keyPath)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableSetValueForKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-        return result !is null ? new NSMutableSet(result) : null;
-    }
-
-    public void netService_didNotPublish_ (NSNetService sender, NSDictionary errorDict)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netService_1didNotPublish_1, sender !is null ? sender.id_ : null, errorDict !is null ? errorDict.id_ : null);
-    }
-
-    public void netService_didNotResolve_ (NSNetService sender, NSDictionary errorDict)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netService_1didNotResolve_1, sender !is null ? sender.id_ : null, errorDict !is null ? errorDict.id_ : null);
-    }
-
-    public void netService_didUpdateTXTRecordData_ (NSNetService sender, NSData data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netService_1didUpdateTXTRecordData_1, sender !is null ? sender.id_ : null, data !is null ? data.id_ : null);
-    }
-
-    public void netServiceBrowser_didFindDomain_moreComing_ (NSNetServiceBrowser aNetServiceBrowser, NSString domainString, bool moreComing)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceBrowser_1didFindDomain_1moreComing_1, aNetServiceBrowser !is null ? aNetServiceBrowser.id_ : null,
-                domainString !is null ? domainString.id_ : null, moreComing);
-    }
+public void tableView(NSTableView tableView, NSTableColumn tableColumn) {
+    OS.objc_msgSend(this.id, OS.sel_tableView_didClickTableColumn_, tableView !is null ? tableView.id : null, tableColumn !is null ? tableColumn.id : null);
+}
 
-    public void netServiceBrowser_didFindService_moreComing_ (NSNetServiceBrowser aNetServiceBrowser, NSNetService aNetService, bool moreComing)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceBrowser_1didFindService_1moreComing_1, aNetServiceBrowser !is null ? aNetServiceBrowser.id_ : null,
-                aNetService !is null ? aNetService.id_ : null, moreComing);
-    }
-
-    public void netServiceBrowser_didNotSearch_ (NSNetServiceBrowser aNetServiceBrowser, NSDictionary errorDict)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceBrowser_1didNotSearch_1, aNetServiceBrowser !is null ? aNetServiceBrowser.id_ : null,
-                errorDict !is null ? errorDict.id_ : null);
-    }
-
-    public void netServiceBrowser_didRemoveDomain_moreComing_ (NSNetServiceBrowser aNetServiceBrowser, NSString domainString, bool moreComing)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceBrowser_1didRemoveDomain_1moreComing_1, aNetServiceBrowser !is null ? aNetServiceBrowser.id_ : null,
-                domainString !is null ? domainString.id_ : null, moreComing);
-    }
-
-    public void netServiceBrowser_didRemoveService_moreComing_ (NSNetServiceBrowser aNetServiceBrowser, NSNetService aNetService, bool moreComing)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceBrowser_1didRemoveService_1moreComing_1,
-                aNetServiceBrowser !is null ? aNetServiceBrowser.id_ : null, aNetService !is null ? aNetService.id_ : null, moreComing);
-    }
-
-    public void netServiceBrowserDidStopSearch (NSNetServiceBrowser aNetServiceBrowser)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceBrowserDidStopSearch_1, aNetServiceBrowser !is null ? aNetServiceBrowser.id_ : null);
-    }
-
-    public void netServiceBrowserWillSearch (NSNetServiceBrowser aNetServiceBrowser)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceBrowserWillSearch_1, aNetServiceBrowser !is null ? aNetServiceBrowser.id_ : null);
-    }
-
-    public void netServiceDidPublish (NSNetService sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceDidPublish_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void netServiceDidResolveAddress (NSNetService sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceDidResolveAddress_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void netServiceDidStop (NSNetService sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceDidStop_1, sender !is null ? sender.id_ : null);
-    }
+public void tableViewColumnDidMove(NSNotification notification) {
+    OS.objc_msgSend(this.id, OS.sel_tableViewColumnDidMove_, notification !is null ? notification.id : null);
+}
 
-    public void netServiceWillPublish (NSNetService sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceWillPublish_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void netServiceWillResolve (NSNetService sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_netServiceWillResolve_1, sender !is null ? sender.id_ : null);
-    }
-
-    //public static id new() {
-    //  objc.id result = OS.objc_msgSend(OS.class_NSObject, OS.sel_new);
-    //  return result !is null ? new id(result) : null;
-    //}
-
-    public id newScriptingObjectOfClass (objc.Class objectClass, NSString key, id contentsValue, NSDictionary properties)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_newScriptingObjectOfClass_1forValueForKey_1withContentsValue_1properties_1, objectClass,
-                key !is null ? key.id_ : null, contentsValue !is null ? contentsValue.id_ : null, properties !is null ? properties.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public void tableViewColumnDidResize(NSNotification notification) {
+    OS.objc_msgSend(this.id, OS.sel_tableViewColumnDidResize_, notification !is null ? notification.id : null);
+}
 
-    public NSScriptObjectSpecifier objectSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectSpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public void* observationInfo ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_observationInfo);
-    }
-
-    public void observeValueForKeyPath (NSString keyPath, id object, NSDictionary change, void* context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_observeValueForKeyPath_1ofObject_1change_1context_1, keyPath !is null ? keyPath.id_ : null,
-                object !is null ? object.id_ : null, change !is null ? change.id_ : null, context);
-    }
-
-    public void parser_didEndElement_namespaceURI_qualifiedName_ (NSXMLParser parser, NSString elementName, NSString namespaceURI, NSString qName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1didEndElement_1namespaceURI_1qualifiedName_1, parser !is null ? parser.id_ : null,
-                elementName !is null ? elementName.id_ : null, namespaceURI !is null ? namespaceURI.id_ : null, qName !is null ? qName.id_ : null);
-    }
-
-    public void parser_didEndMappingPrefix_ (NSXMLParser parser, NSString prefix)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1didEndMappingPrefix_1, parser !is null ? parser.id_ : null, prefix !is null ? prefix.id_ : null);
-    }
+public NSObject autorelease() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_autorelease);
+    return result is this.id ? this : (result !is null ? new NSObject(result) : null);
+}
 
-    public void parser_didStartElement_namespaceURI_qualifiedName_attributes_ (NSXMLParser parser, NSString elementName, NSString namespaceURI,
-            NSString qName, NSDictionary attributeDict)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1didStartElement_1namespaceURI_1qualifiedName_1attributes_1, parser !is null ? parser.id_ : null,
-                elementName !is null ? elementName.id_ : null, namespaceURI !is null ? namespaceURI.id_ : null, qName !is null ? qName.id_ : null,
-                attributeDict !is null ? attributeDict.id_ : null);
-    }
-
-    public void parser_didStartMappingPrefix_toURI_ (NSXMLParser parser, NSString prefix, NSString namespaceURI)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1didStartMappingPrefix_1toURI_1, parser !is null ? parser.id_ : null,
-                prefix !is null ? prefix.id_ : null, namespaceURI !is null ? namespaceURI.id_ : null);
-    }
-
-    public void parser_foundAttributeDeclarationWithName_forElement_type_defaultValue_ (NSXMLParser parser, NSString attributeName,
-            NSString elementName, NSString type, NSString defaultValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundAttributeDeclarationWithName_1forElement_1type_1defaultValue_1,
-                parser !is null ? parser.id_ : null, attributeName !is null ? attributeName.id_ : null, elementName !is null ? elementName.id_ : null,
-                type !is null ? type.id_ : null, defaultValue !is null ? defaultValue.id_ : null);
-    }
-
-    public void parser_foundCDATA_ (NSXMLParser parser, NSData CDATABlock)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundCDATA_1, parser !is null ? parser.id_ : null, CDATABlock !is null ? CDATABlock.id_ : null);
-    }
-
-    public void parser_foundCharacters_ (NSXMLParser parser, NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundCharacters_1, parser !is null ? parser.id_ : null, string !is null ? string.id_ : null);
-    }
-
-    public void parser_foundComment_ (NSXMLParser parser, NSString comment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundComment_1, parser !is null ? parser.id_ : null, comment !is null ? comment.id_ : null);
-    }
-
-    public void parser_foundElementDeclarationWithName_model_ (NSXMLParser parser, NSString elementName, NSString model)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundElementDeclarationWithName_1model_1, parser !is null ? parser.id_ : null,
-                elementName !is null ? elementName.id_ : null, model !is null ? model.id_ : null);
-    }
+public NSString className() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_className);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public void parser_foundExternalEntityDeclarationWithName_publicID_systemID_ (NSXMLParser parser, NSString name, NSString publicID,
-            NSString systemID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundExternalEntityDeclarationWithName_1publicID_1systemID_1, parser !is null ? parser.id_ : null,
-                name !is null ? name.id_ : null, publicID !is null ? publicID.id_ : null, systemID !is null ? systemID.id_ : null);
-    }
-
-    public void parser_foundIgnorableWhitespace_ (NSXMLParser parser, NSString whitespaceString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundIgnorableWhitespace_1, parser !is null ? parser.id_ : null,
-                whitespaceString !is null ? whitespaceString.id_ : null);
-    }
-
-    public void parser_foundInternalEntityDeclarationWithName_value_ (NSXMLParser parser, NSString name, NSString value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundInternalEntityDeclarationWithName_1value_1, parser !is null ? parser.id_ : null,
-                name !is null ? name.id_ : null, value !is null ? value.id_ : null);
-    }
-
-    public void parser_foundNotationDeclarationWithName_publicID_systemID_ (NSXMLParser parser, NSString name, NSString publicID, NSString systemID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundNotationDeclarationWithName_1publicID_1systemID_1, parser !is null ? parser.id_ : null,
-                name !is null ? name.id_ : null, publicID !is null ? publicID.id_ : null, systemID !is null ? systemID.id_ : null);
-    }
-
-    public void parser_foundProcessingInstructionWithTarget_data_ (NSXMLParser parser, NSString target, NSString data)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundProcessingInstructionWithTarget_1data_1, parser !is null ? parser.id_ : null,
-                target !is null ? target.id_ : null, data !is null ? data.id_ : null);
-    }
-
-    public void parser_foundUnparsedEntityDeclarationWithName_publicID_systemID_notationName_ (NSXMLParser parser, NSString name, NSString publicID,
-            NSString systemID, NSString notationName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1foundUnparsedEntityDeclarationWithName_1publicID_1systemID_1notationName_1,
-                parser !is null ? parser.id_ : null, name !is null ? name.id_ : null, publicID !is null ? publicID.id_ : null,
-                systemID !is null ? systemID.id_ : null, notationName !is null ? notationName.id_ : null);
-    }
-
-    public void parser_parseErrorOccurred_ (NSXMLParser parser, NSError parseError)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1parseErrorOccurred_1, parser !is null ? parser.id_ : null, parseError !is null ? parseError.id_ : null);
-    }
-
-    public NSData parser_resolveExternalEntityName_systemID_ (NSXMLParser parser, NSString name, NSString systemID)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_parser_1resolveExternalEntityName_1systemID_1, parser !is null ? parser.id_ : null,
-                name !is null ? name.id_ : null, systemID !is null ? systemID.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
+public bool conformsToProtocol(Protocol aProtocol) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_conformsToProtocol_, aProtocol !is null ? aProtocol.id : null);
+}
 
-    public void parser_validationErrorOccurred_ (NSXMLParser parser, NSError validationError)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parser_1validationErrorOccurred_1, parser !is null ? parser.id_ : null,
-                validationError !is null ? validationError.id_ : null);
-    }
-
-    public void parserDidEndDocument (NSXMLParser parser)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parserDidEndDocument_1, parser !is null ? parser.id_ : null);
-    }
-
-    public void parserDidStartDocument (NSXMLParser parser)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_parserDidStartDocument_1, parser !is null ? parser.id_ : null);
-    }
-
-    public id performSelector_ (objc.SEL aSelector)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_performSelector_1, aSelector);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void performSelector_onThread_withObject_waitUntilDone_ (objc.SEL aSelector, NSThread thr, id arg, bool wait)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performSelector_1onThread_1withObject_1waitUntilDone_1, aSelector, thr !is null ? thr.id_ : null,
-                arg !is null ? arg.id_ : null, wait);
-    }
-
-    public void performSelector_onThread_withObject_waitUntilDone_modes_ (objc.SEL aSelector, NSThread thr, id arg, bool wait, NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performSelector_1onThread_1withObject_1waitUntilDone_1modes_1, aSelector, thr !is null ? thr.id_ : null,
-                arg !is null ? arg.id_ : null, wait, array !is null ? array.id_ : null);
-    }
-
-    public id performSelector_withObject_ (objc.SEL aSelector, id object)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_performSelector_1withObject_1, aSelector, object !is null ? object.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void performSelector_withObject_afterDelay_ (objc.SEL aSelector, id anArgument, NSTimeInterval delay)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performSelector_1withObject_1afterDelay_1, aSelector, anArgument !is null ? anArgument.id_ : null, delay);
-    }
-
-    public void performSelector_withObject_afterDelay_inModes_ (objc.SEL aSelector, id anArgument, NSTimeInterval delay, NSArray modes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performSelector_1withObject_1afterDelay_1inModes_1, aSelector, anArgument !is null ? anArgument.id_ : null,
-                delay, modes !is null ? modes.id_ : null);
-    }
+public cocoa.id copy() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_copy);
+    return result !is null ? new id(result) : null;
+}
 
-    public id performSelector_withObject_withObject_ (objc.SEL aSelector, id object1, id object2)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_performSelector_1withObject_1withObject_1, aSelector, object1 !is null ? object1.id_ : null,
-                object2 !is null ? object2.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void performSelectorInBackground (objc.SEL aSelector, id arg)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performSelectorInBackground_1withObject_1, aSelector, arg !is null ? arg.id_ : null);
-    }
-
-    public void performSelectorOnMainThread_withObject_waitUntilDone_ (String aSelector, id arg, bool wait)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performSelectorOnMainThread_1withObject_1waitUntilDone_1, aSelector.ptr, arg !is null ? arg.id_ : null, wait);
-    }
-
-    public void performSelectorOnMainThread_withObject_waitUntilDone_modes_ (objc.SEL aSelector, id arg, bool wait, NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performSelectorOnMainThread_1withObject_1waitUntilDone_1modes_1, aSelector, arg !is null ? arg.id_ : null,
-                wait, array !is null ? array.id_ : null);
-    }
+public NSString description() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_description);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public static void poseAsClass (objc.Class aClass)
-    {
-        OS.objc_msgSend(OS.class_NSObject, OS.sel_poseAsClass_1, aClass);
-    }
-
-    public void release ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_release);
-    }
-
-    public void removeObserver (NSObject observer, NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObserver_1forKeyPath_1, observer !is null ? observer.id_ : null, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void removeObserver (NSObject observer)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObserver_1, observer !is null ? observer.id_ : null);
-    }
-
-    public void removeValueAtIndex (NSUInteger index, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeValueAtIndex_1fromPropertyWithKey_1, index, key !is null ? key.id_ : null);
-    }
-
-    public void replaceValueAtIndex (NSUInteger index, NSString key, id value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceValueAtIndex_1inPropertyWithKey_1withValue_1, index, key !is null ? key.id_ : null,
-                value !is null ? value.id_ : null);
-    }
+public NSObject init() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_init);
+    return result is this.id ? this : (result !is null ? new NSObject(result) : null);
+}
 
-    public id replacementObjectForArchiver (NSArchiver archiver)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_replacementObjectForArchiver_1, archiver !is null ? archiver.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id replacementObjectForCoder (NSCoder aCoder)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_replacementObjectForCoder_1, aCoder !is null ? aCoder.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id replacementObjectForKeyedArchiver (NSKeyedArchiver archiver)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_replacementObjectForKeyedArchiver_1, archiver !is null ? archiver.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id replacementObjectForPortCoder (NSPortCoder coder)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_replacementObjectForPortCoder_1, coder !is null ? coder.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static bool resolveClassMethod (objc.SEL sel)
-    {
-        return OS.objc_msgSend(OS.class_NSObject, OS.sel_resolveClassMethod_1, sel) !is null;
-    }
-
-    public static bool resolveInstanceMethod (objc.SEL sel)
-    {
-        return OS.objc_msgSend(OS.class_NSObject, OS.sel_resolveInstanceMethod_1, sel) !is null;
-    }
-
-    public bool respondsToSelector (String aSelector)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_respondsToSelector_1, aSelector.ptr) !is null;
-    }
-
-    public id retain ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_retain);
-        return result !is null ? new id(result) : null;
-    }
+public bool isEqual(cocoa.id object) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isEqual_, object !is null ? object.id : null);
+}
 
-    public NSUInteger retainCount ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_retainCount);
-    }
-
-    public NSRoundingMode roundingMode ()
-    {
-        return cast(NSRoundingMode) OS.objc_msgSend(this.id_, OS.sel_roundingMode);
-    }
-
-    public short scale ()
-    {
-        return cast(short) OS.objc_msgSend(this.id_, OS.sel_scale);
-    }
-
-    public bool scriptingBeginsWith (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scriptingBeginsWith_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool scriptingContains (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scriptingContains_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool scriptingEndsWith (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scriptingEndsWith_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool scriptingIsEqualTo (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scriptingIsEqualTo_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool scriptingIsGreaterThan (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scriptingIsGreaterThan_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool scriptingIsGreaterThanOrEqualTo (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scriptingIsGreaterThanOrEqualTo_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool scriptingIsLessThan (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scriptingIsLessThan_1, object !is null ? object.id_ : null) !is null;
-    }
+public bool isEqualTo(cocoa.id object) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isEqualTo_, object !is null ? object.id : null);
+}
 
-    public bool scriptingIsLessThanOrEqualTo (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scriptingIsLessThanOrEqualTo_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public NSDictionary scriptingProperties ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_scriptingProperties);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public id scriptingValueForSpecifier (NSScriptObjectSpecifier objectSpecifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_scriptingValueForSpecifier_1, objectSpecifier !is null ? objectSpecifier.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id self ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_self);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static void setKeys (NSArray keys, NSString dependentKey)
-    {
-        OS.objc_msgSend(OS.class_NSObject, OS.sel_setKeys_1triggerChangeNotificationsForDependentKey_1, keys !is null ? keys.id_ : null,
-                dependentKey !is null ? dependentKey.id_ : null);
-    }
-
-    public void setNilValueForKey (NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNilValueForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public void setObservationInfo (void* observationInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObservationInfo_1, observationInfo);
-    }
-
-    public void setScriptingProperties (NSDictionary properties)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScriptingProperties_1, properties !is null ? properties.id_ : null);
-    }
-
-    public void setValue_forKey_ (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
+public bool isKindOfClass(objc.Class aClass) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isKindOfClass_, aClass);
+}
 
-    public void setValue_forKeyPath_ (id value, NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValue_1forKeyPath_1, value !is null ? value.id_ : null, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void setValue_forUndefinedKey_ (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValue_1forUndefinedKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public void setValuesForKeysWithDictionary (NSDictionary keyedValues)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValuesForKeysWithDictionary_1, keyedValues !is null ? keyedValues.id_ : null);
-    }
-
-    public static void setVersion (NSInteger aVersion)
-    {
-        OS.objc_msgSend(OS.class_NSObject, OS.sel_setVersion_1, aVersion);
-    }
+public void performSelectorOnMainThread(objc.SEL aSelector, cocoa.id arg, bool wait) {
+    OS.objc_msgSend(this.id, OS.sel_performSelectorOnMainThread_withObject_waitUntilDone_, aSelector, arg !is null ? arg.id : null, wait);
+}
 
-    public NSRange spellServer_checkGrammarInString_language_details_ (NSSpellServer sender, NSString stringToCheck, NSString language, objc.id** details)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_spellServer_1checkGrammarInString_1language_1details_1, sender !is null ? sender.id_ : null,
-                stringToCheck !is null ? stringToCheck.id_ : null, language !is null ? language.id_ : null, details);
-        return result;
-    }
-
-    public void spellServer_didForgetWord_inLanguage_ (NSSpellServer sender, NSString word, NSString language)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_spellServer_1didForgetWord_1inLanguage_1, sender !is null ? sender.id_ : null, word !is null ? word.id_ : null,
-                language !is null ? language.id_ : null);
-    }
-
-    public void spellServer_didLearnWord_inLanguage_ (NSSpellServer sender, NSString word, NSString language)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_spellServer_1didLearnWord_1inLanguage_1, sender !is null ? sender.id_ : null, word !is null ? word.id_ : null,
-                language !is null ? language.id_ : null);
-    }
-
-    public NSRange spellServer_findMisspelledWordInString_language_wordCount_countOnly_ (NSSpellServer sender, NSString stringToCheck,
-            NSString language, int* wordCount, bool countOnly)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_spellServer_1findMisspelledWordInString_1language_1wordCount_1countOnly_1,
-                sender !is null ? sender.id_ : null, stringToCheck !is null ? stringToCheck.id_ : null, language !is null ? language.id_ : null,
-                wordCount, countOnly);
-        return result;
-    }
+public void release() {
+    OS.objc_msgSend(this.id, OS.sel_release);
+}
 
-    public NSArray spellServer_suggestCompletionsForPartialWordRange_inString_language_ (NSSpellServer sender, NSRange range, NSString string,
-            NSString language)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_spellServer_1suggestCompletionsForPartialWordRange_1inString_1language_1,
-                sender !is null ? sender.id_ : null, range, string !is null ? string.id_ : null, language !is null ? language.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray spellServer_suggestGuessesForWord_inLanguage_ (NSSpellServer sender, NSString word, NSString language)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_spellServer_1suggestGuessesForWord_1inLanguage_1, sender !is null ? sender.id_ : null,
-                word !is null ? word.id_ : null, language !is null ? language.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id storedValueForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_storedValueForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void stream (NSStream aStream, NSStreamEvent eventCode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stream_1handleEvent_1, aStream !is null ? aStream.id_ : null, eventCode);
-    }
-
-    public static objc.Class static_superclass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSObject, OS.sel_superclass);
-    }
-
-    public objc.Class superclass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_superclass);
-    }
-
-    public void takeStoredValue (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeStoredValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public void takeValue_forKey_ (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
+public bool respondsToSelector(objc.SEL aSelector) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_respondsToSelector_, aSelector);
+}
 
-    public void takeValue_forKeyPath_ (id value, NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeValue_1forKeyPath_1, value !is null ? value.id_ : null, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void takeValuesFromDictionary (NSDictionary properties)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeValuesFromDictionary_1, properties !is null ? properties.id_ : null);
-    }
-
-    public NSArray toManyRelationshipKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toManyRelationshipKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray toOneRelationshipKeys ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toOneRelationshipKeys);
-        return result !is null ? new NSArray(result) : null;
-    }
+public cocoa.id retain() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_retain);
+    return result !is null ? new id(result) : null;
+}
 
-    public void unableToSetNilForKey (NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unableToSetNilForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public objc.Class unarchiver_cannotDecodeObjectOfClassName_originalClasses_ (NSKeyedUnarchiver unarchiver, NSString name, NSArray classNames)
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_unarchiver_1cannotDecodeObjectOfClassName_1originalClasses_1,
-                unarchiver !is null ? unarchiver.id_ : null, name !is null ? name.id_ : null, classNames !is null ? classNames.id_ : null);
-    }
-
-    public id unarchiver_didDecodeObject_ (NSKeyedUnarchiver unarchiver, id object)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_unarchiver_1didDecodeObject_1, unarchiver !is null ? unarchiver.id_ : null,
-                object !is null ? object.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void unarchiver_willReplaceObject_withObject_ (NSKeyedUnarchiver unarchiver, id object, id newObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unarchiver_1willReplaceObject_1withObject_1, unarchiver !is null ? unarchiver.id_ : null,
-                object !is null ? object.id_ : null, newObject !is null ? newObject.id_ : null);
-    }
-
-    public void unarchiverDidFinish (NSKeyedUnarchiver unarchiver)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unarchiverDidFinish_1, unarchiver !is null ? unarchiver.id_ : null);
-    }
+public NSUInteger retainCount() {
+    return OS.objc_msgSend(this.id, OS.sel_retainCount);
+}
 
-    public void unarchiverWillFinish (NSKeyedUnarchiver unarchiver)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unarchiverWillFinish_1, unarchiver !is null ? unarchiver.id_ : null);
-    }
-
-    public void unlock ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unlock);
-    }
-
-    public void useCredential (NSURLCredential credential, NSURLAuthenticationChallenge challenge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_useCredential_1forAuthenticationChallenge_1, credential !is null ? credential.id_ : null,
-                challenge !is null ? challenge.id_ : null);
-    }
-
-    public static bool useStoredAccessor ()
-    {
-        return OS.objc_msgSend(OS.class_NSObject, OS.sel_useStoredAccessor) !is null;
-    }
-
-    public bool validateValue_forKey_error_ (objc.id* ioValue, NSString inKey, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_validateValue_1forKey_1error_1, ioValue, inKey !is null ? inKey.id_ : null, outError) !is null;
-    }
-
-    public bool validateValue_forKeyPath_error_ (objc.id* ioValue, NSString inKeyPath, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_validateValue_1forKeyPath_1error_1, ioValue, inKeyPath !is null ? inKeyPath.id_ : null, outError) !is null;
-    }
-
-    public id valueAtIndex (NSUInteger index, NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueAtIndex_1inPropertyWithKey_1, index, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id valueForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id valueForKeyPath (NSString keyPath)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public objc.Class superclass() {
+    return cast(objc.Class) OS.objc_msgSend(this.id, OS.sel_superclass);
+}
 
-    public id valueForUndefinedKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForUndefinedKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id valueWithName (NSString name, NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueWithName_1inPropertyWithKey_1, name !is null ? name.id_ : null,
-                key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id valueWithUniqueID (id uniqueID, NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueWithUniqueID_1inPropertyWithKey_1, uniqueID !is null ? uniqueID.id_ : null,
-                key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary valuesForKeys (NSArray keys)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valuesForKeys_1, keys !is null ? keys.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public void addEventListener(NSString type, cocoa.id  listener, bool useCapture) {
+    OS.objc_msgSend(this.id, OS.sel_addEventListener_listener_useCapture_, type !is null ? type.id : null, listener !is null ? listener.id : null, useCapture);
+}
 
-    public static NSInteger versionn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(OS.class_NSObject, OS.sel_version);
-    }
-
-    public void willChange (NSKeyValueChange changeKind, NSIndexSet indexes, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_willChange_1valuesAtIndexes_1forKey_1, changeKind, indexes !is null ? indexes.id_ : null,
-                key !is null ? key.id_ : null);
-    }
+public void handleEvent(DOMEvent evt) {
+    OS.objc_msgSend(this.id, OS.sel_handleEvent_, evt !is null ? evt.id : null);
+}
 
-    public void willChangeValueForKey_ (NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_willChangeValueForKey_1, key !is null ? key.id_ : null);
-    }
-
-    public void willChangeValueForKey_withSetMutation_usingObjects_ (NSString key, NSKeyValueSetMutationKind mutationKind, NSSet objects)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_willChangeValueForKey_1withSetMutation_1usingObjects_1, key !is null ? key.id_ : null, mutationKind,
-                objects !is null ? objects.id_ : null);
-    }
-
-    public NSZone* zone ()
-    {
-        return cast(NSZone*) OS.objc_msgSend(this.id_, OS.sel_zone);
-    }
-
-}
\ No newline at end of file
+}
--- a/dwt/internal/cocoa/NSObjectController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSObjectController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSController;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSObjectController : NSController
-{
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void add (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_add_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void addObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObject_1, object !is null ? object.id_ : null);
-    }
-
-    public bool automaticallyPreparesContent ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_automaticallyPreparesContent) !is null;
-    }
-
-    public bool canAdd ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canAdd) !is null;
-    }
-
-    public bool canRemove ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canRemove) !is null;
-    }
-
-    public id content ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_content);
-        return result !is null ? new id(result) : null;
-    }
-
-    //public NSFetchRequest defaultFetchRequest() {
-    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaultFetchRequest);
-    //  return result !is null ? new NSFetchRequest(result) : null;
-    //}
-    
-    public NSString entityName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_entityName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void fetch (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_fetch_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSPredicate fetchPredicate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fetchPredicate);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    //
-    //public bool fetchWithRequest(NSFetchRequest fetchRequest, bool merge, objc.id** error) {
-    //  return OS.objc_msgSend(this.id_, OS.sel_fetchWithRequest_1merge_1error_1, fetchRequest !is null ? fetchRequest.id_ : null, merge, error) !is null;
-    //}
-
-    public NSObjectController initWithContent (id content)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContent_1, content !is null ? content.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
-
-    //public NSManagedObjectContext managedObjectContext() {
-    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_managedObjectContext);
-    //  return result !is null ? new NSManagedObjectContext(result) : null;
-    //}
-
-    public id newObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_newObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public objc.Class objectClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_objectClass);
-    }
-
-    public void prepareContent ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_prepareContent);
-    }
-
-    public void remove (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_remove_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void removeObject (id object)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObject_1, object !is null ? object.id_ : null);
-    }
-
-    public NSArray selectedObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id selection ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selection);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setAutomaticallyPreparesContent (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutomaticallyPreparesContent_1, flag);
-    }
-
-    public void setContent (id content)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContent_1, content !is null ? content.id_ : null);
-    }
-
-    public void setEditable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, flag);
-    }
-
-    public void setEntityName (NSString entityName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEntityName_1, entityName !is null ? entityName.id_ : null);
-    }
-
-    public void setFetchPredicate (NSPredicate predicate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFetchPredicate_1, predicate !is null ? predicate.id_ : null);
-    }
-
-    //public void setManagedObjectContext(NSManagedObjectContext managedObjectContext) {
-    //  OS.objc_msgSend(this.id_, OS.sel_setManagedObjectContext_1, managedObjectContext !is null ? managedObjectContext.id_ : null);
-    //}
-
-    public void setObjectClass (objc.Class objectClass)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectClass_1, objectClass);
-    }
-
-    public void setUsesLazyFetching (bool enabled)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesLazyFetching_1, enabled);
-    }
-
-    public bool usesLazyFetching ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesLazyFetching) !is null;
-    }
-
-    public bool validateUserInterfaceItem (id item)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_validateUserInterfaceItem_1, item !is null ? item.id_ : null) !is null;
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/NSOpenGL.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,47 @@
+/**
+ * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Nov 28, 2008
+ * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
+ * 
+ */
+module dwt.internal.cocoa.NSOpenGL;
+
+enum NSOpenGLPixelFormatAttribute : uint
+{
+    NSOpenGLPFAAllRenderers = 1,
+    NSOpenGLPFADoubleBuffer = 5,
+    NSOpenGLPFAStereo = 6,
+    NSOpenGLPFAAuxBuffers = 7,
+    NSOpenGLPFAColorSize = 8,
+    NSOpenGLPFAAlphaSize = 11,
+    NSOpenGLPFADepthSize = 12,
+    NSOpenGLPFAStencilSize = 13,
+    NSOpenGLPFAAccumSize = 14,
+    NSOpenGLPFAMinimumPolicy = 51,
+    NSOpenGLPFAMaximumPolicy = 52,
+    NSOpenGLPFAOffScreen = 53,
+    NSOpenGLPFAFullScreen = 54,
+    NSOpenGLPFASampleBuffers = 55,
+    NSOpenGLPFASamples = 56,
+    NSOpenGLPFAAuxDepthStencil = 57,
+    NSOpenGLPFAColorFloat = 58,
+    NSOpenGLPFAMultisample = 59,
+    NSOpenGLPFASupersample = 60,
+    NSOpenGLPFASampleAlpha = 61,
+    NSOpenGLPFARendererID = 70,
+    NSOpenGLPFASingleRenderer = 71,
+    NSOpenGLPFANoRecovery = 72,
+    NSOpenGLPFAAccelerated = 73,
+    NSOpenGLPFAClosestPolicy = 74,
+    NSOpenGLPFARobust = 75,
+    NSOpenGLPFABackingStore = 76,
+    NSOpenGLPFAMPSafe = 78,
+    NSOpenGLPFAWindow = 80,
+    NSOpenGLPFAMultiScreen = 81,
+    NSOpenGLPFACompliant = 83,
+    NSOpenGLPFAScreenMask = 84,
+    NSOpenGLPFAPixelBuffer = 90,
+    NSOpenGLPFAAllowOfflineRenderers = 96,
+    NSOpenGLPFAVirtualScreenCount = 128
+}
\ No newline at end of file
--- a/dwt/internal/cocoa/NSOpenGLContext.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSOpenGLContext.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,177 +1,53 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSOpenGLContext;
 
-import dwt.internal.cocoa.gl;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSOpenGLPixelBuffer;
-import dwt.internal.cocoa.NSOpenGLPixelFormat;
-import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSOpenGLContextParameter
-{
-    NSOpenGLCPSwapRectangle = 200,
-    NSOpenGLCPSwapRectangleEnable = 201,
-    NSOpenGLCPRasterizationEnable = 221,
-    NSOpenGLCPSwapInterval = 222,
-    NSOpenGLCPSurfaceOrder = 235,
-    NSOpenGLCPSurfaceOpacity = 236,
-    NSOpenGLCPStateValidation = 301
+public class NSOpenGLContext : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
 }
 
-alias NSOpenGLContextParameter.NSOpenGLCPSwapRectangle NSOpenGLCPSwapRectangle;
-alias NSOpenGLContextParameter.NSOpenGLCPSwapRectangleEnable NSOpenGLCPSwapRectangleEnable;
-alias NSOpenGLContextParameter.NSOpenGLCPRasterizationEnable NSOpenGLCPRasterizationEnable;
-alias NSOpenGLContextParameter.NSOpenGLCPSwapInterval NSOpenGLCPSwapInterval;
-alias NSOpenGLContextParameter.NSOpenGLCPSurfaceOrder NSOpenGLCPSurfaceOrder;
-alias NSOpenGLContextParameter.NSOpenGLCPSurfaceOpacity NSOpenGLCPSurfaceOpacity;
-alias NSOpenGLContextParameter.NSOpenGLCPStateValidation NSOpenGLCPStateValidation;
-
-public class NSOpenGLContext : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void* CGLContextObj ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_CGLContextObj);
-    }
-
-    public static void clearCurrentContext ()
-    {
-        OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_clearCurrentContext);
-    }
-
-    public void clearDrawable ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_clearDrawable);
-    }
-
-    public void copyAttributesFromContext (NSOpenGLContext context, GLbitfield mask)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_copyAttributesFromContext_1withMask_1, context !is null ? context.id_ : null, mask);
-    }
-
-    public void createTexture (GLenum target, NSView view, GLenum format)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_createTexture_1fromView_1internalFormat_1, target, view !is null ? view.id_ : null, format);
-    }
-
-    public static NSOpenGLContext currentContext ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_currentContext);
-        return result !is null ? new NSOpenGLContext(result) : null;
-    }
-
-    public GLint currentVirtualScreen ()
-    {
-        return cast(GLint) OS.objc_msgSend(this.id_, OS.sel_currentVirtualScreen);
-    }
-
-    public void flushBuffer ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_flushBuffer);
-    }
-
-    public void getValues (GLint* vals, NSOpenGLContextParameter param)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getValues_1forParameter_1, vals, param);
-    }
+public static void clearCurrentContext() {
+    OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_clearCurrentContext);
+}
 
-    public NSOpenGLContext initWithFormat (NSOpenGLPixelFormat format, NSOpenGLContext share)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1shareContext_1, format !is null ? format.id_ : null,
-                share !is null ? share.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public void makeCurrentContext ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeCurrentContext);
-    }
-
-    public NSOpenGLPixelBuffer pixelBuffer ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pixelBuffer);
-        return result !is null ? new NSOpenGLPixelBuffer(result) : null;
-    }
-
-    public GLenum pixelBufferCubeMapFace ()
-    {
-        return cast(GLenum) OS.objc_msgSend(this.id_, OS.sel_pixelBufferCubeMapFace);
-    }
-
-    public GLint pixelBufferMipMapLevel ()
-    {
-        return cast(GLint) OS.objc_msgSend(this.id_, OS.sel_pixelBufferMipMapLevel);
-    }
-
-    public void setCurrentVirtualScreen (GLint screen)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrentVirtualScreen_1, screen);
-    }
+public static NSOpenGLContext currentContext() {
+    objc.id result = OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_currentContext);
+    return result !is null ? new NSOpenGLContext(result) : null;
+}
 
-    public void setFullScreen ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFullScreen);
-    }
-
-    public void setOffScreen (void* baseaddr, GLsizei width, GLsizei height, GLint rowbytes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOffScreen_1width_1height_1rowbytes_1, baseaddr, width, height, rowbytes);
-    }
-
-    public void setPixelBuffer (NSOpenGLPixelBuffer pixelBuffer, GLenum face, GLint level, GLint screen)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPixelBuffer_1cubeMapFace_1mipMapLevel_1currentVirtualScreen_1,
-                pixelBuffer !is null ? pixelBuffer.id_ : null, face, level, screen);
-    }
-
-    public void setTextureImageToPixelBuffer (NSOpenGLPixelBuffer pixelBuffer, GLenum source)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextureImageToPixelBuffer_1colorBuffer_1, pixelBuffer !is null ? pixelBuffer.id_ : null, source);
-    }
+public void flushBuffer() {
+    OS.objc_msgSend(this.id, OS.sel_flushBuffer);
+}
 
-    public void setValues (/*const*/GLint* vals, NSOpenGLContextParameter param)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValues_1forParameter_1, vals, param);
-    }
-
-    public void setView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null);
-    }
-
-    public void update ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_update);
-    }
-
-    public NSView view ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_view);
-        return result !is null ? new NSView(result) : null;
-    }
+public void makeCurrentContext() {
+    OS.objc_msgSend(this.id, OS.sel_makeCurrentContext);
+}
 
 }
--- a/dwt/internal/cocoa/NSOpenGLPixelBuffer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSOpenGLPixelBuffer;
-
-import dwt.internal.cocoa.gl;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSOpenGLPixelBuffer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSOpenGLPixelBuffer initWithTextureTarget (GLenum target, GLenum format, GLint maxLevel, GLsizei pixelsWide, GLsizei pixelsHigh)
-    {
-        objc.id result = OS.objc_msgSend(this.id_,
-                OS.sel_initWithTextureTarget_1textureInternalFormat_1textureMaxMipMapLevel_1pixelsWide_1pixelsHigh_1, target, format, maxLevel,
-                pixelsWide, pixelsHigh);
-        return result !is null ? this : null;
-    }
-
-    public GLsizei pixelsHigh ()
-    {
-        return cast(GLsizei) OS.objc_msgSend(this.id_, OS.sel_pixelsHigh);
-    }
-
-    public GLsizei pixelsWide ()
-    {
-        return cast(GLsizei) OS.objc_msgSend(this.id_, OS.sel_pixelsWide);
-    }
-
-    public GLenum textureInternalFormat ()
-    {
-        return cast(GLenum) OS.objc_msgSend(this.id_, OS.sel_textureInternalFormat);
-    }
-
-    public GLint textureMaxMipMapLevel ()
-    {
-        return cast(GLint) OS.objc_msgSend(this.id_, OS.sel_textureMaxMipMapLevel);
-    }
-
-    public GLenum textureTarget ()
-    {
-        return cast(GLenum) OS.objc_msgSend(this.id_, OS.sel_textureTarget);
-    }
-
-}
--- a/dwt/internal/cocoa/NSOpenGLPixelFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSOpenGLPixelFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,138 +1,42 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSOpenGLPixelFormat;
 
-import dwt.internal.cocoa.gl;
-import dwt.internal.cocoa.NSData;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSOpenGL;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSOpenGLPixelFormatAttribute
-{
-    NSOpenGLPFAAllRenderers = 1,
-    NSOpenGLPFADoubleBuffer = 5,
-    NSOpenGLPFAStereo = 6,
-    NSOpenGLPFAAuxBuffers = 7,
-    NSOpenGLPFAColorSize = 8,
-    NSOpenGLPFAAlphaSize = 11,
-    NSOpenGLPFADepthSize = 12,
-    NSOpenGLPFAStencilSize = 13,
-    NSOpenGLPFAAccumSize = 14,
-    NSOpenGLPFAMinimumPolicy = 51,
-    NSOpenGLPFAMaximumPolicy = 52,
-    NSOpenGLPFAOffScreen = 53,
-    NSOpenGLPFAFullScreen = 54,
-    NSOpenGLPFASampleBuffers = 55,
-    NSOpenGLPFASamples = 56,
-    NSOpenGLPFAAuxDepthStencil = 57,
-    NSOpenGLPFARendererID = 70,
-    NSOpenGLPFASingleRenderer = 71,
-    NSOpenGLPFANoRecovery = 72,
-    NSOpenGLPFAAccelerated = 73,
-    NSOpenGLPFAClosestPolicy = 74,
-    NSOpenGLPFARobust = 75,
-    NSOpenGLPFABackingStore = 76,
-    NSOpenGLPFAMPSafe = 78,
-    NSOpenGLPFAWindow = 80,
-    NSOpenGLPFAMultiScreen = 81,
-    NSOpenGLPFACompliant = 83,
-    NSOpenGLPFAScreenMask = 84,
-    NSOpenGLPFAPixelBuffer = 90,
-    NSOpenGLPFAVirtualScreenCount = 128
+public class NSOpenGLPixelFormat : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
 }
 
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAAllRenderers NSOpenGLPFAAllRenderers;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFADoubleBuffer NSOpenGLPFADoubleBuffer;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAStereo NSOpenGLPFAStereo;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAAuxBuffers NSOpenGLPFAAuxBuffers;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAColorSize NSOpenGLPFAColorSize;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAAlphaSize NSOpenGLPFAAlphaSize;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFADepthSize NSOpenGLPFADepthSize;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAStencilSize NSOpenGLPFAStencilSize;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAAccumSize NSOpenGLPFAAccumSize;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAMinimumPolicy NSOpenGLPFAMinimumPolicy;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAMaximumPolicy NSOpenGLPFAMaximumPolicy;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAOffScreen NSOpenGLPFAOffScreen;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAFullScreen NSOpenGLPFAFullScreen;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFASampleBuffers NSOpenGLPFASampleBuffers;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFASamples NSOpenGLPFASamples;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAAuxDepthStencil NSOpenGLPFAAuxDepthStencil;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFARendererID NSOpenGLPFARendererID;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFASingleRenderer NSOpenGLPFASingleRenderer;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFANoRecovery NSOpenGLPFANoRecovery;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAAccelerated NSOpenGLPFAAccelerated;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAClosestPolicy NSOpenGLPFAClosestPolicy;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFARobust NSOpenGLPFARobust;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFABackingStore NSOpenGLPFABackingStore;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAMPSafe NSOpenGLPFAMPSafe;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAWindow NSOpenGLPFAWindow;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAMultiScreen NSOpenGLPFAMultiScreen;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFACompliant NSOpenGLPFACompliant;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAScreenMask NSOpenGLPFAScreenMask;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAPixelBuffer NSOpenGLPFAPixelBuffer;
-alias NSOpenGLPixelFormatAttribute.NSOpenGLPFAVirtualScreenCount NSOpenGLPFAVirtualScreenCount;
-
-public class NSOpenGLPixelFormat : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void* CGLPixelFormatObj ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_CGLPixelFormatObj);
-    }
-
-    public NSData attributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributes);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void getValues (GLint* vals, NSOpenGLPixelFormatAttribute attrib, GLint screen)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getValues_1forAttribute_1forVirtualScreen_1, vals, attrib, screen);
-    }
-
-    public NSOpenGLPixelFormat initWithAttributes (/*const*/NSOpenGLPixelFormatAttribute* attribs)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithAttributes_1, attribs);
-        return result !is null ? this : null;
-    }
-
-    public NSOpenGLPixelFormat initWithData (NSData attribs)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, attribs !is null ? attribs.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public GLint numberOfVirtualScreens ()
-    {
-        return cast(GLint) OS.objc_msgSend(this.id_, OS.sel_numberOfVirtualScreens);
-    }
-
-    public void setAttributes (NSData attribs)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributes_1, attribs !is null ? attribs.id_ : null);
-    }
+public cocoa.id initWithAttributes(/*const*/NSOpenGLPixelFormatAttribute* attribs) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithAttributes_, attribs);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSOpenGLView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSOpenGLView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,18 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSOpenGLView;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSOpenGLContext;
 import dwt.internal.cocoa.NSOpenGLPixelFormat;
 import dwt.internal.cocoa.NSRect;
@@ -20,71 +22,36 @@
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSOpenGLView : NSView
-{
+public class NSOpenGLView : NSView {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public void clearGLContext ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_clearGLContext);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static NSOpenGLPixelFormat defaultPixelFormat ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSOpenGLView, OS.sel_defaultPixelFormat);
-        return result !is null ? new NSOpenGLPixelFormat(result) : null;
-    }
-
-    public NSOpenGLView initWithFrame (NSRect frameRect, NSOpenGLPixelFormat format)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1pixelFormat_1, frameRect, format !is null ? format.id_ : null);
-        return result !is null ? this : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSOpenGLContext openGLContext ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_openGLContext);
-        return result !is null ? new NSOpenGLContext(result) : null;
-    }
+public void clearGLContext() {
+    OS.objc_msgSend(this.id, OS.sel_clearGLContext);
+}
 
-    public NSOpenGLPixelFormat pixelFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pixelFormat);
-        return result !is null ? new NSOpenGLPixelFormat(result) : null;
-    }
-
-    public void prepareOpenGL ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_prepareOpenGL);
-    }
+public cocoa.id initWithFrame(NSRect frameRect, NSOpenGLPixelFormat format) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_pixelFormat_, frameRect, format !is null ? format.id : null);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
-    public void reshape ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reshape);
-    }
-
-    public void setOpenGLContext (NSOpenGLContext context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOpenGLContext_1, context !is null ? context.id_ : null);
-    }
+public NSOpenGLContext openGLContext() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_openGLContext);
+    return result !is null ? new NSOpenGLContext(result) : null;
+}
 
-    public void setPixelFormat (NSOpenGLPixelFormat pixelFormat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPixelFormat_1, pixelFormat !is null ? pixelFormat.id_ : null);
-    }
-
-    public void update ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_update);
-    }
+public void setPixelFormat(NSOpenGLPixelFormat pixelFormat) {
+    OS.objc_msgSend(this.id, OS.sel_setPixelFormat_, pixelFormat !is null ? pixelFormat.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSOpenPanel.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSOpenPanel.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,122 +1,64 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSOpenPanel;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSSavePanel;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSOpenPanel : NSSavePanel
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSOpenPanel : NSSavePanel {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray URLs ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URLs);
-        return result !is null ? new NSArray(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public bool allowsMultipleSelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsMultipleSelection) !is null;
-    }
-
-    public void beginForDirectory (NSString path, NSString name, NSArray fileTypes, id delegatee, objc.SEL didEndSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginForDirectory_1file_1types_1modelessDelegate_1didEndSelector_1contextInfo_1,
-                path !is null ? path.id_ : null, name !is null ? name.id_ : null, fileTypes !is null ? fileTypes.id_ : null,
-                delegatee !is null ? delegatee.id_ : null, didEndSelector, contextInfo);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void beginSheetForDirectory (NSString path, NSString name, NSArray fileTypes, NSWindow docWindow, id delegatee, objc.SEL didEndSelector,
-            void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginSheetForDirectory_1file_1types_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1,
-                path !is null ? path.id_ : null, name !is null ? name.id_ : null, fileTypes !is null ? fileTypes.id_ : null,
-                docWindow !is null ? docWindow.id_ : null, delegatee !is null ? delegatee.id_ : null, didEndSelector, contextInfo);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool canChooseDirectories ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canChooseDirectories) !is null;
-    }
+public NSArray filenames() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_filenames);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public bool canChooseFiles ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canChooseFiles) !is null;
-    }
-
-    public NSArray filenames ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_filenames);
-        return result !is null ? new NSArray(result) : null;
-    }
+public static NSOpenPanel openPanel() {
+    objc.id result = OS.objc_msgSend(OS.class_NSOpenPanel, OS.sel_openPanel);
+    return result !is null ? new NSOpenPanel(result) : null;
+}
 
-    public static NSOpenPanel openPanel ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSOpenPanel, OS.sel_openPanel);
-        return result !is null ? new NSOpenPanel(result) : null;
-    }
-
-    public bool resolvesAliases ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_resolvesAliases) !is null;
-    }
+public void setAllowsMultipleSelection(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAllowsMultipleSelection_, flag);
+}
 
-    public NSInteger runModalForDirectory (NSString path, NSString name, NSArray fileTypes)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModalForDirectory_1file_1types_1, path !is null ? path.id_ : null, name !is null ? name.id_ : null,
-                fileTypes !is null ? fileTypes.id_ : null);
-    }
-
-    public NSInteger runModalForTypes (NSArray fileTypes)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModalForTypes_1, fileTypes !is null ? fileTypes.id_ : null);
-    }
+public void setCanChooseDirectories(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setCanChooseDirectories_, flag);
+}
 
-    public void setAllowsMultipleSelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsMultipleSelection_1, flag);
-    }
-
-    public void setCanChooseDirectories (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanChooseDirectories_1, flag);
-    }
+public void setCanChooseFiles(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setCanChooseFiles_, flag);
+}
 
-    public void setCanChooseFiles (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanChooseFiles_1, flag);
-    }
-
-    public void setResolvesAliases (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setResolvesAliases_1, flag);
-    }
+public static NSSavePanel savePanel() {
+    objc.id result = OS.objc_msgSend(OS.class_NSOpenPanel, OS.sel_savePanel);
+    return result !is null ? new NSSavePanel(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSOperation.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSOperation;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-alias NSInteger NSOperationQueuePriority;
-
-enum
-{
-    NSOperationQueuePriorityVeryLow = -8,
-    NSOperationQueuePriorityLow = -4,
-    NSOperationQueuePriorityNormal = 0,
-    NSOperationQueuePriorityHigh = 4,
-    NSOperationQueuePriorityVeryHigh = 8
-}
-
-public class NSOperation : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addDependency (NSOperation op)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addDependency_1, op !is null ? op.id_ : null);
-    }
-
-    public void cancel ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancel);
-    }
-
-    public NSArray dependencies ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dependencies);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool isCancelled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isCancelled) !is null;
-    }
-
-    public bool isConcurrent ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isConcurrent) !is null;
-    }
-
-    public bool isExecuting ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isExecuting) !is null;
-    }
-
-    public bool isFinished ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFinished) !is null;
-    }
-
-    public bool isReady ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isReady) !is null;
-    }
-
-    public void main ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_main);
-    }
-
-    public NSOperationQueuePriority queuePriority ()
-    {
-        return cast(NSOperationQueuePriority) OS.objc_msgSend(this.id_, OS.sel_queuePriority);
-    }
-
-    public void removeDependency (NSOperation op)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeDependency_1, op !is null ? op.id_ : null);
-    }
-
-    public void setQueuePriority (NSOperationQueuePriority p)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setQueuePriority_1, p);
-    }
-
-    public void start ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_start);
-    }
-
-}
--- a/dwt/internal/cocoa/NSOperationQueue.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSOperationQueue;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSOperation;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSOperationQueue : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addOperation (NSOperation op)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addOperation_1, op !is null ? op.id_ : null);
-    }
-
-    public void cancelAllOperations ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelAllOperations);
-    }
-
-    public bool isSuspended ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSuspended) !is null;
-    }
-
-    public NSInteger maxConcurrentOperationCount ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_maxConcurrentOperationCount);
-    }
-
-    public NSArray operations ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_operations);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setMaxConcurrentOperationCount (NSInteger cnt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxConcurrentOperationCount_1, cnt);
-    }
-
-    public void setSuspended (bool b)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSuspended_1, b);
-    }
-
-    public void waitUntilAllOperationsAreFinished ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_waitUntilAllOperationsAreFinished);
-    }
-
-}
--- a/dwt/internal/cocoa/NSOutlineView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSOutlineView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,174 +1,101 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSOutlineView;
 
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRect;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSTableColumn;
 import dwt.internal.cocoa.NSTableView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSOutlineView : NSTableView
-{
+public class NSOutlineView : NSTableView {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public bool autoresizesOutlineColumn ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autoresizesOutlineColumn) !is null;
-    }
-
-    public bool autosaveExpandedItems ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autosaveExpandedItems) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void collapseItem_ (id item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_collapseItem_1, item !is null ? item.id_ : null);
-    }
-
-    public void collapseItem_collapseChildren_ (id item, bool collapseChildren)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_collapseItem_1collapseChildren_1, item !is null ? item.id_ : null, collapseChildren);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void expandItem_ (id item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_expandItem_1, item !is null ? item.id_ : null);
-    }
+public void collapseItem(cocoa.id item) {
+    OS.objc_msgSend(this.id, OS.sel_collapseItem_, item !is null ? item.id : null);
+}
 
-    public void expandItem_expandChildren_ (id item, bool expandChildren)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_expandItem_1expandChildren_1, item !is null ? item.id_ : null, expandChildren);
-    }
-
-    public NSRect frameOfOutlineCellAtRow (NSInteger row)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_frameOfOutlineCellAtRow_1, row);
-        return result;
-    }
+public void expandItem(cocoa.id item) {
+    OS.objc_msgSend(this.id, OS.sel_expandItem_, item !is null ? item.id : null);
+}
 
-    public bool indentationMarkerFollowsCell ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_indentationMarkerFollowsCell) !is null;
-    }
-
-    public CGFloat indentationPerLevel ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_indentationPerLevel);
-    }
+public CGFloat indentationPerLevel() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_indentationPerLevel);
+}
 
-    public bool isExpandable (id item)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isExpandable_1, item !is null ? item.id_ : null) !is null;
-    }
+public cocoa.id itemAtRow(NSInteger row) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_itemAtRow_, row);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
-    public bool isItemExpanded (id item)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isItemExpanded_1, item !is null ? item.id_ : null) !is null;
-    }
+public NSInteger levelForItem(cocoa.id item) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_levelForItem_, item !is null ? item.id : null);
+}
 
-    public id itemAtRow (NSInteger row)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemAtRow_1, row);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger levelForItem (id item)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_levelForItem_1, item !is null ? item.id_ : null);
-    }
-
-    public NSInteger levelForRow (NSInteger row)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_levelForRow_1, row);
-    }
+public NSTableColumn outlineTableColumn() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_outlineTableColumn);
+    return result !is null ? new NSTableColumn(result) : null;
+}
 
-    public NSTableColumn outlineTableColumn ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_outlineTableColumn);
-        return result !is null ? new NSTableColumn(result) : null;
-    }
+public void reloadItem(cocoa.id item) {
+    OS.objc_msgSend(this.id, OS.sel_reloadItem_, item !is null ? item.id : null);
+}
 
-    public id parentForItem (id item)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_parentForItem_1, item !is null ? item.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public void reloadItem(cocoa.id item, bool reloadChildren) {
+    OS.objc_msgSend(this.id, OS.sel_reloadItem_reloadChildren_, item !is null ? item.id : null, reloadChildren);
+}
 
-    public void reloadItem_ (id item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadItem_1, item !is null ? item.id_ : null);
-    }
-
-    public void reloadItem_reloadChildren_ (id item, bool reloadChildren)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadItem_1reloadChildren_1, item !is null ? item.id_ : null, reloadChildren);
-    }
+public NSInteger rowForItem(cocoa.id item) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_rowForItem_, item !is null ? item.id : null);
+}
 
-    public NSInteger rowForItem (id item)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_rowForItem_1, item !is null ? item.id_ : null);
-    }
-
-    public void setAutoresizesOutlineColumn (bool resize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutoresizesOutlineColumn_1, resize);
-    }
+public void setAutoresizesOutlineColumn(bool resize) {
+    OS.objc_msgSend(this.id, OS.sel_setAutoresizesOutlineColumn_, resize);
+}
 
-    public void setAutosaveExpandedItems (bool save)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutosaveExpandedItems_1, save);
-    }
+public void setAutosaveExpandedItems(bool save) {
+    OS.objc_msgSend(this.id, OS.sel_setAutosaveExpandedItems_, save);
+}
 
-    public void setDropItem (id item, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDropItem_1dropChildIndex_1, item !is null ? item.id_ : null, index);
-    }
+public void setIndentationPerLevel(CGFloat indentationPerLevel) {
+    OS.objc_msgSend(this.id, OS.sel_setIndentationPerLevel_, indentationPerLevel);
+}
 
-    public void setIndentationMarkerFollowsCell (bool drawInCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIndentationMarkerFollowsCell_1, drawInCell);
-    }
-
-    public void setIndentationPerLevel (CGFloat indentationPerLevel)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIndentationPerLevel_1, indentationPerLevel);
-    }
+public void setOutlineTableColumn(NSTableColumn outlineTableColumn) {
+    OS.objc_msgSend(this.id, OS.sel_setOutlineTableColumn_, outlineTableColumn !is null ? outlineTableColumn.id : null);
+}
 
-    public void setOutlineTableColumn (NSTableColumn outlineTableColumn)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOutlineTableColumn_1, outlineTableColumn !is null ? outlineTableColumn.id_ : null);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSOutlineView, OS.sel_cellClass);
+}
 
-    public bool shouldCollapseAutoExpandedItemsForDeposited (bool deposited)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldCollapseAutoExpandedItemsForDeposited_1, deposited) !is null;
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSOutlineView, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSOutputStream.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSOutputStream;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSStream;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSOutputStream : NSStream
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool hasSpaceAvailable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasSpaceAvailable) !is null;
-    }
-
-    public NSOutputStream initToBuffer (ubyte* buffer, NSUInteger capacity)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initToBuffer_1capacity_1, buffer, capacity);
-        return result !is null ? this : null;
-    }
-
-    public NSOutputStream initToFileAtPath (NSString path, bool shouldAppend)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initToFileAtPath_1append_1, path !is null ? path.id_ : null, shouldAppend);
-        return result !is null ? this : null;
-    }
-
-    public NSOutputStream initToMemory ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initToMemory);
-        return result !is null ? this : null;
-    }
-
-    public static id outputStreamToBuffer (ubyte* buffer, NSUInteger capacity)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSOutputStream, OS.sel_outputStreamToBuffer_1capacity_1, buffer, capacity);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id outputStreamToFileAtPath (NSString path, bool shouldAppend)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSOutputStream, OS.sel_outputStreamToFileAtPath_1append_1, path !is null ? path.id_ : null,
-                shouldAppend);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id outputStreamToMemory ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSOutputStream, OS.sel_outputStreamToMemory);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger write (/*const*/ubyte* buffer, NSUInteger len)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_write_1maxLength_1, buffer, len);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPDFImageRep.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPDFImageRep;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSImageRep;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPDFImageRep : NSImageRep
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData PDFRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_PDFRepresentation);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSRect bounds ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_bounds);
-        return result;
-    }
-
-    public NSInteger currentPage ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_currentPage);
-    }
-
-    public static id imageRepWithData (NSData pdfData)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPDFImageRep, OS.sel_imageRepWithData_1, pdfData !is null ? pdfData.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSPDFImageRep initWithData (NSData pdfData)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, pdfData !is null ? pdfData.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSInteger pageCount ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_pageCount);
-    }
-
-    public void setCurrentPage (NSInteger page)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrentPage_1, page);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPICTImageRep.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPICTImageRep;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSImageRep;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPICTImageRep : NSImageRep
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData PICTRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_PICTRepresentation);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSRect boundingBox ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundingBox);
-        return result;
-    }
-
-    public static id imageRepWithData (NSData pictData)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPICTImageRep, OS.sel_imageRepWithData_1, pictData !is null ? pictData.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSPICTImageRep initWithData (NSData pictData)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, pictData !is null ? pictData.id_ : null);
-        return result !is null ? this : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSPageLayout.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPageLayout;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPageLayout;
-import dwt.internal.cocoa.NSPrintInfo;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSViewController;
-import dwt.internal.cocoa.NSWindow;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPageLayout : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray accessoryControllers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryControllers);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public void addAccessoryController (NSViewController accessoryController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addAccessoryController_1, accessoryController !is null ? accessoryController.id_ : null);
-    }
-
-    public void beginSheetWithPrintInfo (NSPrintInfo printInfo, NSWindow docWindow, id delegatee, objc.SEL didEndSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginSheetWithPrintInfo_1modalForWindow_1delegate_1didEndSelector_1contextInfo_1,
-                printInfo !is null ? printInfo.id_ : null, docWindow !is null ? docWindow.id_ : null, delegatee !is null ? delegatee.id_ : null,
-                didEndSelector, contextInfo);
-    }
-
-    public static NSPageLayout pageLayout ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPageLayout, OS.sel_pageLayout);
-        return result !is null ? new NSPageLayout(result) : null;
-    }
-
-    public NSPrintInfo printInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printInfo);
-        return result !is null ? new NSPrintInfo(result) : null;
-    }
-
-    public void readPrintInfo ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_readPrintInfo);
-    }
-
-    public void removeAccessoryController (NSViewController accessoryController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAccessoryController_1, accessoryController !is null ? accessoryController.id_ : null);
-    }
-
-    public NSInteger runModal ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModal);
-    }
-
-    public NSInteger runModalWithPrintInfo (NSPrintInfo printInfo)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModalWithPrintInfo_1, printInfo !is null ? printInfo.id_ : null);
-    }
-
-    public void setAccessoryView (NSView accessoryView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, accessoryView !is null ? accessoryView.id_ : null);
-    }
-
-    public void writePrintInfo ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_writePrintInfo);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPanel.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSPanel.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,63 +1,44 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSPanel;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSPanel : NSWindow
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSPanel : NSWindow {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public bool becomesKeyOnlyIfNeeded ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_becomesKeyOnlyIfNeeded) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool isFloatingPanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFloatingPanel) !is null;
-    }
-
-    public void setBecomesKeyOnlyIfNeeded (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBecomesKeyOnlyIfNeeded_1, flag);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setFloatingPanel (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFloatingPanel_1, flag);
-    }
+public void setWorksWhenModal(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setWorksWhenModal_, flag);
+}
 
-    public void setWorksWhenModal (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWorksWhenModal_1, flag);
-    }
-
-    public bool worksWhenModal ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_worksWhenModal) !is null;
-    }
+public bool worksWhenModal() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_worksWhenModal);
+}
 
 }
--- a/dwt/internal/cocoa/NSParagraphStyle.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSParagraphStyle.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,28 +1,27 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSParagraphStyle;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSText : NSTextAlignment, NSWritingDirection;
+import dwt.internal.cocoa.NSText;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSLineBreakMode : NSUInteger
+enum NSLineBreakMode 
 {
     NSLineBreakByWordWrapping = 0,
     NSLineBreakByCharWrapping,
@@ -32,134 +31,35 @@
     NSLineBreakByTruncatingMiddle
 }
 
-alias NSLineBreakMode.NSLineBreakByWordWrapping NSLineBreakByWordWrapping;
-alias NSLineBreakMode.NSLineBreakByCharWrapping NSLineBreakByCharWrapping;
-alias NSLineBreakMode.NSLineBreakByClipping NSLineBreakByClipping;
-alias NSLineBreakMode.NSLineBreakByTruncatingHead NSLineBreakByTruncatingHead;
-alias NSLineBreakMode.NSLineBreakByTruncatingTail NSLineBreakByTruncatingTail;
-alias NSLineBreakMode.NSLineBreakByTruncatingMiddle NSLineBreakByTruncatingMiddle;
-
-public class NSParagraphStyle : NSObject
+enum NSTextTabType
 {
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSTextAlignment alignment ()
-    {
-        return cast(NSTextAlignment) OS.objc_msgSend(this.id_, OS.sel_alignment);
-    }
-
-    public NSWritingDirection baseWritingDirection ()
-    {
-        return cast(NSWritingDirection) OS.objc_msgSend(this.id_, OS.sel_baseWritingDirection);
-    }
+    NSLeftTabStopType = 0,
+    NSRightTabStopType,
+    NSCenterTabStopType,
+    NSDecimalTabStopType
+}
 
-    public static NSParagraphStyle defaultParagraphStyle ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSParagraphStyle, OS.sel_defaultParagraphStyle);
-        return result !is null ? new NSParagraphStyle(result) : null;
-    }
-
-    public CGFloat defaultTabInterval ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_defaultTabInterval);
-    }
+public class NSParagraphStyle : NSObject {
 
-    public static NSWritingDirection defaultWritingDirectionForLanguage (NSString languageName)
-    {
-        return cast(NSWritingDirection) OS.objc_msgSend(OS.class_NSParagraphStyle, OS.sel_defaultWritingDirectionForLanguage_1,
-                languageName !is null ? languageName.id_ : null);
-    }
-
-    public CGFloat firstLineHeadIndent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_firstLineHeadIndent);
-    }
-
-    public CGFloat headIndent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_headIndent);
-    }
-
-    public NSInteger headerLevel ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_headerLevel);
-    }
+public this() {
+    super();
+}
 
-    public float hyphenationFactor ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_hyphenationFactor);
-    }
-
-    public NSLineBreakMode lineBreakMode ()
-    {
-        return cast(NSLineBreakMode) OS.objc_msgSend(this.id_, OS.sel_lineBreakMode);
-    }
-
-    public CGFloat lineHeightMultiple ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineHeightMultiple);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public CGFloat lineSpacing ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineSpacing);
-    }
-
-    public CGFloat maximumLineHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_maximumLineHeight);
-    }
-
-    public CGFloat minimumLineHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_minimumLineHeight);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public CGFloat paragraphSpacing ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_paragraphSpacing);
-    }
-
-    public CGFloat paragraphSpacingBefore ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_paragraphSpacingBefore);
-    }
-
-    public NSArray tabStops ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabStops);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSTextAlignment alignment() {
+    return cast(NSTextAlignment) OS.objc_msgSend(this.id, OS.sel_alignment);
+}
 
-    public CGFloat tailIndent ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_tailIndent);
-    }
-
-    public NSArray textBlocks ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textBlocks);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray textLists ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textLists);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public float tighteningFactorForTruncation ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_tighteningFactorForTruncation);
-    }
+public NSArray tabStops() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_tabStops);
+    return result !is null ? new NSArray(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSPasteboard.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSPasteboard.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,176 +1,95 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSPasteboard;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSFileWrapper;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSPasteboard : NSObject
-{
+public class NSPasteboard : NSObject {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public NSInteger addTypes (NSArray newTypes, id newOwner)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_addTypes_1owner_1, newTypes !is null ? newTypes.id_ : null, newOwner !is null ? newOwner.id_ : null);
-    }
-
-    public NSString availableTypeFromArray (NSArray types)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableTypeFromArray_1, types !is null ? types.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSInteger changeCount ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_changeCount);
-    }
-
-    public NSData dataForType (NSString dataType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataForType_1, dataType !is null ? dataType.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSInteger declareTypes (NSArray newTypes, id newOwner)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_declareTypes_1owner_1, newTypes !is null ? newTypes.id_ : null, newOwner !is null ? newOwner.id_ : null);
-    }
+public NSInteger addTypes(NSArray newTypes, cocoa.id newOwner) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_addTypes_owner_, newTypes !is null ? newTypes.id : null, newOwner !is null ? newOwner.id : null);
+}
 
-    public static NSPasteboard generalPasteboard ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_generalPasteboard);
-        return result !is null ? new NSPasteboard(result) : null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSString availableTypeFromArray(NSArray types) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_availableTypeFromArray_, types !is null ? types.id : null);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public static NSPasteboard pasteboardByFilteringData (NSData data, NSString type)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_pasteboardByFilteringData_1ofType_1, data !is null ? data.id_ : null,
-                type !is null ? type.id_ : null);
-        return result !is null ? new NSPasteboard(result) : null;
-    }
+public NSData dataForType(NSString dataType) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_dataForType_, dataType !is null ? dataType.id : null);
+    return result !is null ? new NSData(result) : null;
+}
 
-    public static NSPasteboard pasteboardByFilteringFile (NSString filename)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_pasteboardByFilteringFile_1, filename !is null ? filename.id_ : null);
-        return result !is null ? new NSPasteboard(result) : null;
-    }
-
-    public static NSPasteboard pasteboardByFilteringTypesInPasteboard (NSPasteboard pboard)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_pasteboardByFilteringTypesInPasteboard_1, pboard !is null ? pboard.id_ : null);
-        return result !is null ? new NSPasteboard(result) : null;
-    }
+public NSInteger declareTypes(NSArray newTypes, cocoa.id newOwner) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_declareTypes_owner_, newTypes !is null ? newTypes.id : null, newOwner !is null ? newOwner.id : null);
+}
 
-    public static NSPasteboard pasteboardWithName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_pasteboardWithName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSPasteboard(result) : null;
-    }
-
-    public static NSPasteboard pasteboardWithUniqueName ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_pasteboardWithUniqueName);
-        return result !is null ? new NSPasteboard(result) : null;
-    }
-
-    public id propertyListForType (NSString dataType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyListForType_1, dataType !is null ? dataType.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public static NSPasteboard generalPasteboard() {
+    objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_generalPasteboard);
+    return result !is null ? new NSPasteboard(result) : null;
+}
 
-    public NSString readFileContentsType (NSString type, NSString filename)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_readFileContentsType_1toFile_1, type !is null ? type.id_ : null,
-                filename !is null ? filename.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public static NSPasteboard pasteboardWithName(NSString name) {
+    objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_pasteboardWithName_, name !is null ? name.id : null);
+    return result !is null ? new NSPasteboard(result) : null;
+}
 
-    public NSFileWrapper readFileWrapper ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_readFileWrapper);
-        return result !is null ? new NSFileWrapper(result) : null;
-    }
-
-    public void releaseGlobally ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_releaseGlobally);
-    }
+public cocoa.id propertyListForType(NSString dataType) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_propertyListForType_, dataType !is null ? dataType.id : null);
+    return result !is null ? new id(result) : null;
+}
 
-    public bool setData (NSData data, NSString dataType)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setData_1forType_1, data !is null ? data.id_ : null, dataType !is null ? dataType.id_ : null) !is null;
-    }
-
-    public bool setPropertyList (id plist, NSString dataType)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setPropertyList_1forType_1, plist !is null ? plist.id_ : null, dataType !is null ? dataType.id_ : null) !is null;
-    }
+public bool setData(NSData data, NSString dataType) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_setData_forType_, data !is null ? data.id : null, dataType !is null ? dataType.id : null);
+}
 
-    public bool setString (NSString string, NSString dataType)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setString_1forType_1, string !is null ? string.id_ : null, dataType !is null ? dataType.id_ : null) !is null;
-    }
-
-    public NSString stringForType (NSString dataType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringForType_1, dataType !is null ? dataType.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public bool setPropertyList(cocoa.id plist, NSString dataType) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_setPropertyList_forType_, plist !is null ? plist.id : null, dataType !is null ? dataType.id : null);
+}
 
-    public NSArray types ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_types);
-        return result !is null ? new NSArray(result) : null;
-    }
+public bool setString(NSString string, NSString dataType) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_setString_forType_, string !is null ? string.id : null, dataType !is null ? dataType.id : null);
+}
 
-    public static NSArray typesFilterableTo (NSString type)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPasteboard, OS.sel_typesFilterableTo_1, type !is null ? type.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSString stringForType(NSString dataType) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringForType_, dataType !is null ? dataType.id : null);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public bool writeFileContents (NSString filename)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeFileContents_1, filename !is null ? filename.id_ : null) !is null;
-    }
-
-    public bool writeFileWrapper (NSFileWrapper wrapper)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeFileWrapper_1, wrapper !is null ? wrapper.id_ : null) !is null;
-    }
+public NSArray types() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_types);
+    return result !is null ? new NSArray(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSPathCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPathCell;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSCell : NSControlSize;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSPathComponentCell;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum
-{
-    NSPathStyleStandard,
-    NSPathStyleNavigationBar,
-    NSPathStylePopUp,
-}
-
-alias NSInteger NSPathStyle;
-
-public class NSPathCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSURL URL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public NSArray allowedTypes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allowedTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSPathComponentCell clickedPathComponentCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_clickedPathComponentCell);
-        return result !is null ? new NSPathComponentCell(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public objc.SEL doubleAction ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction);
-    }
-
-    public void mouseEntered (NSEvent event, NSRect frame, NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseEntered_1withFrame_1inView_1, event !is null ? event.id_ : null, frame, view !is null ? view.id_ : null);
-    }
-
-    public void mouseExited (NSEvent event, NSRect frame, NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseExited_1withFrame_1inView_1, event !is null ? event.id_ : null, frame, view !is null ? view.id_ : null);
-    }
-
-    public NSPathComponentCell pathComponentCellAtPoint (NSPoint point, NSRect frame, NSView view)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathComponentCellAtPoint_1withFrame_1inView_1, point, frame, view !is null ? view.id_ : null);
-        return result !is null ? new NSPathComponentCell(result) : null;
-    }
-
-    public static objc.Class pathComponentCellClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSPathCell, OS.sel_pathComponentCellClass);
-    }
-
-    public NSArray pathComponentCells ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathComponentCells);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSPathStyle pathStyle ()
-    {
-        return cast(NSPathStyle) OS.objc_msgSend(this.id_, OS.sel_pathStyle);
-    }
-
-    public NSAttributedString placeholderAttributedString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderAttributedString);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSString placeholderString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderString);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSRect rectOfPathComponentCell (NSPathComponentCell cell, NSRect frame, NSView view)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfPathComponentCell_1withFrame_1inView_1, cell !is null ? cell.id_ : null, frame,
-                view !is null ? view.id_ : null);
-        return result;
-    }
-
-    public void setAllowedTypes (NSArray allowedTypes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowedTypes_1, allowedTypes !is null ? allowedTypes.id_ : null);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setControlSize (NSControlSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, size);
-    }
-
-    public void setDelegate (id value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, value !is null ? value.id_ : null);
-    }
-
-    public void setDoubleAction (objc.SEL action)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, action);
-    }
-
-    public void setObjectValue (id obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setPathComponentCells (NSArray cells)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPathComponentCells_1, cells !is null ? cells.id_ : null);
-    }
-
-    public void setPathStyle (NSPathStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPathStyle_1, style);
-    }
-
-    public void setPlaceholderAttributedString (NSAttributedString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaceholderAttributedString_1, string !is null ? string.id_ : null);
-    }
-
-    public void setPlaceholderString (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaceholderString_1, string !is null ? string.id_ : null);
-    }
-
-    public void setURL (NSURL url)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setURL_1, url !is null ? url.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPathComponentCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPathComponentCell;
-
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSTextFieldCell;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPathComponentCell : NSTextFieldCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSURL URL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public void setImage (NSImage value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, value !is null ? value.id_ : null);
-    }
-
-    public void setURL (NSURL url)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setURL_1, url !is null ? url.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPathControl.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPathControl;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSDragOperation;
-import dwt.internal.cocoa.NSPathCell : NSPathStyle;
-import dwt.internal.cocoa.NSPathComponentCell;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPathControl : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSURL URL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSPathComponentCell clickedPathComponentCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_clickedPathComponentCell);
-        return result !is null ? new NSPathComponentCell(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public objc.SEL doubleAction ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction);
-    }
-
-    public NSArray pathComponentCells ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathComponentCells);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSPathStyle pathStyle ()
-    {
-        return cast(NSPathStyle) OS.objc_msgSend(this.id_, OS.sel_pathStyle);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setDoubleAction (objc.SEL action)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, action);
-    }
-
-    public void setDraggingSourceOperationMask (NSDragOperation mask, bool isLocal)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDraggingSourceOperationMask_1forLocal_1, mask, isLocal);
-    }
-
-    public void setPathComponentCells (NSArray cells)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPathComponentCells_1, cells !is null ? cells.id_ : null);
-    }
-
-    public void setPathStyle (NSPathStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPathStyle_1, style);
-    }
-
-    public void setURL (NSURL url)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setURL_1, url !is null ? url.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPersistentDocument.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPersistentDocument;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSDocument;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPersistentDocument : NSDocument
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool configurePersistentStoreCoordinatorForURL_ofType_error_ (NSURL url, NSString fileType, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_configurePersistentStoreCoordinatorForURL_1ofType_1error_1, url !is null ? url.id_ : null,
-                fileType !is null ? fileType.id_ : null, error) !is null;
-    }
-
-    public bool configurePersistentStoreCoordinatorForURL_ofType_modelConfiguration_storeOptions_error_ (NSURL url, NSString fileType,
-            NSString configuration, NSDictionary storeOptions, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_configurePersistentStoreCoordinatorForURL_1ofType_1modelConfiguration_1storeOptions_1error_1,
-                url !is null ? url.id_ : null, fileType !is null ? fileType.id_ : null, configuration !is null ? configuration.id_ : null,
-                storeOptions !is null ? storeOptions.id_ : null, error) !is null;
-    }
-
-    //public NSManagedObjectContext managedObjectContext() {
-    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_managedObjectContext);
-    //  return result !is null ? new NSManagedObjectContext(result) : null;
-    //}
-
-    public id managedObjectModel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_managedObjectModel);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString persistentStoreTypeForFileType (NSString fileType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_persistentStoreTypeForFileType_1, fileType !is null ? fileType.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool readFromURL (NSURL absoluteURL, NSString typeName, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readFromURL_1ofType_1error_1, absoluteURL !is null ? absoluteURL.id_ : null,
-                typeName !is null ? typeName.id_ : null, error) !is null;
-    }
-
-    public bool revertToContentsOfURL (NSURL inAbsoluteURL, NSString inTypeName, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_revertToContentsOfURL_1ofType_1error_1, inAbsoluteURL !is null ? inAbsoluteURL.id_ : null,
-                inTypeName !is null ? inTypeName.id_ : null, outError) !is null;
-    }
-
-    //public void setManagedObjectContext(NSManagedObjectContext managedObjectContext) {
-    //  OS.objc_msgSend(this.id_, OS.sel_setManagedObjectContext_1, managedObjectContext !is null ? managedObjectContext.id_ : null);
-    //}
-
-    public bool writeToURL (NSURL absoluteURL, NSString typeName, NSSaveOperationType saveOperation, NSURL absoluteOriginalContentsURL, objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1ofType_1forSaveOperation_1originalContentsURL_1error_1,
-                absoluteURL !is null ? absoluteURL.id_ : null, typeName !is null ? typeName.id_ : null, saveOperation,
-                absoluteOriginalContentsURL !is null ? absoluteOriginalContentsURL.id_ : null, error) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSPipe.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPipe;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSFileHandle;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPipe : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSFileHandle fileHandleForReading ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileHandleForReading);
-        return result !is null ? new NSFileHandle(result) : null;
-    }
-
-    public NSFileHandle fileHandleForWriting ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileHandleForWriting);
-        return result !is null ? new NSFileHandle(result) : null;
-    }
-
-    public static id pipe ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPipe, OS.sel_pipe);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSPoint.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSPoint.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,18 +9,16 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSPoint;
 
-import dwt.internal.cocoa.CGFloat;
-
-extern (C):
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
 
 alias NSPoint* NSPointArray;
-alias NSPoint* NSPointPointer;
 
 public struct NSPoint {
-    public CGFloat x = 0;
-    public CGFloat y = 0;
+    public CGFloat x;
+    public CGFloat y;
 }
--- a/dwt/internal/cocoa/NSPointerArray.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPointerArray;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPointerFunctions;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPointerArray : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addPointer (void* pointer)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addPointer_1, pointer);
-    }
-
-    public NSArray allObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void compact ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_compact);
-    }
-
-    public NSUInteger count ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
-    }
-
-    public NSPointerArray initWithOptions (NSPointerFunctionsOptions options)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithOptions_1, options);
-        return result !is null ? this : null;
-    }
-
-    public id initWithPointerFunctions (NSPointerFunctions functions)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPointerFunctions_1, functions !is null ? functions.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void insertPointer (void* item, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertPointer_1atIndex_1, item, index);
-    }
-
-    public static id pointerArrayWithOptions (NSPointerFunctionsOptions options)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPointerArray, OS.sel_pointerArrayWithOptions_1, options);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id pointerArrayWithPointerFunctions (NSPointerFunctions functions)
-    {
-        objc.id
-                result = OS.objc_msgSend(OS.class_NSPointerArray, OS.sel_pointerArrayWithPointerFunctions_1, functions !is null ? functions.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id pointerArrayWithStrongObjects ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPointerArray, OS.sel_pointerArrayWithStrongObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id pointerArrayWithWeakObjects ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPointerArray, OS.sel_pointerArrayWithWeakObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void* pointerAtIndex (NSUInteger index)
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_pointerAtIndex_1, index);
-    }
-
-    public NSPointerFunctions pointerFunctions ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pointerFunctions);
-        return result !is null ? new NSPointerFunctions(result) : null;
-    }
-
-    public void removePointerAtIndex (NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removePointerAtIndex_1, index);
-    }
-
-    public void replacePointerAtIndex (NSUInteger index, void* item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replacePointerAtIndex_1withPointer_1, index, item);
-    }
-
-    public void setCount (NSUInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCount_1, count);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPointerFunctions.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPointerFunctions;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-/*alias NSUInteger NSPointerFunctionsOptions;*/
-
-enum NSPointerFunctionsOptions : NSUInteger {
-    NSPointerFunctionsStrongMemory = (0 << 0),
-    NSPointerFunctionsZeroingWeakMemory = (1 << 0),
-    NSPointerFunctionsOpaqueMemory = (2 << 0),
-    NSPointerFunctionsMallocMemory = (3 << 0),
-    NSPointerFunctionsMachVirtualMemory = (4 << 0),
-    NSPointerFunctionsObjectPersonality = (0 << 8),
-    NSPointerFunctionsOpaquePersonality = (1 << 8),
-    NSPointerFunctionsObjectPointerPersonality = (2 << 8),
-    NSPointerFunctionsCStringPersonality = (3 << 8),
-    NSPointerFunctionsStructPersonality = (4 << 8),
-    NSPointerFunctionsIntegerPersonality = (5 << 8),
-    NSPointerFunctionsCopyIn = (1 << 16),
-}
-
-alias NSPointerFunctionsOptions.NSPointerFunctionsStrongMemory NSPointerFunctionsStrongMemory;
-alias NSPointerFunctionsOptions.NSPointerFunctionsZeroingWeakMemory NSPointerFunctionsZeroingWeakMemory;
-alias NSPointerFunctionsOptions.NSPointerFunctionsOpaqueMemory NSPointerFunctionsOpaqueMemory;
-alias NSPointerFunctionsOptions.NSPointerFunctionsMallocMemory NSPointerFunctionsMallocMemory;
-alias NSPointerFunctionsOptions.NSPointerFunctionsMachVirtualMemory NSPointerFunctionsMachVirtualMemory;
-alias NSPointerFunctionsOptions.NSPointerFunctionsObjectPersonality NSPointerFunctionsObjectPersonality;
-alias NSPointerFunctionsOptions.NSPointerFunctionsOpaquePersonality NSPointerFunctionsOpaquePersonality;
-alias NSPointerFunctionsOptions.NSPointerFunctionsObjectPointerPersonality NSPointerFunctionsObjectPointerPersonality;
-alias NSPointerFunctionsOptions.NSPointerFunctionsCStringPersonality NSPointerFunctionsCStringPersonality;
-alias NSPointerFunctionsOptions.NSPointerFunctionsStructPersonality NSPointerFunctionsStructPersonality;
-alias NSPointerFunctionsOptions.NSPointerFunctionsIntegerPersonality NSPointerFunctionsIntegerPersonality;
-alias NSPointerFunctionsOptions.NSPointerFunctionsCopyIn NSPointerFunctionsCopyIn;
-
-public class NSPointerFunctions : NSObject {
-
-    public this () {
-        super();
-    }
-
-    public this (objc.id id) {
-        super(id);
-    }
-
-    public NSPointerFunctions initWithOptions (NSPointerFunctionsOptions options) {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithOptions_1, options);
-        return result !is null ? this : null;
-    }
-
-    public static id pointerFunctionsWithOptions (NSPointerFunctionsOptions options) {
-        objc.id result = OS.objc_msgSend(OS.class_NSPointerFunctions, OS.sel_pointerFunctionsWithOptions_1, options);
-        return result !is null ? new id(result) : null;
-    }
-
-    //public void setUsesStrongWriteBarrier(bool ) {
-    //  OS.objc_msgSend(this.id_, OS.sel_setUsesStrongWriteBarrier_1, );
-    //}
-    //
-    //public void setUsesWeakReadAndWriteBarriers(bool ) {
-    //  OS.objc_msgSend(this.id_, OS.sel_setUsesWeakReadAndWriteBarriers_1, );
-    //}
-
-    public bool usesStrongWriteBarrier () {
-        return OS.objc_msgSend(this.id_, OS.sel_usesStrongWriteBarrier) !is null;
-    }
-
-    public bool usesWeakReadAndWriteBarriers () {
-        return OS.objc_msgSend(this.id_, OS.sel_usesWeakReadAndWriteBarriers) !is null;
-    }
-
-}
\ No newline at end of file
--- a/dwt/internal/cocoa/NSPopUpButton.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSPopUpButton.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,230 +1,106 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSPopUpButton;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSButton;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSMenuItem;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSPopUpButton : NSButton
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSPopUpButton : NSButton {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addItemWithTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItemWithTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void addItemsWithTitles (NSArray itemTitles)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItemsWithTitles_1, itemTitles !is null ? itemTitles.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public bool autoenablesItems ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autoenablesItems) !is null;
-    }
-
-    public NSInteger indexOfItem (NSMenuItem item)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItem_1, item !is null ? item.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSInteger indexOfItemWithRepresentedObject (id obj)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithRepresentedObject_1, obj !is null ? obj.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSInteger indexOfItemWithTag (NSInteger tag)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTag_1, tag);
-    }
-
-    public NSInteger indexOfItemWithTarget (id target, objc.SEL actionSelector)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTarget_1andAction_1, target !is null ? target.id_ : null, actionSelector);
-    }
+public NSInteger indexOfSelectedItem() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_indexOfSelectedItem);
+}
 
-    public NSInteger indexOfItemWithTitle (NSString title)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public NSInteger indexOfSelectedItem ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfSelectedItem);
-    }
+public NSPopUpButton initWithFrame(NSRect buttonFrame, bool flag) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_pullsDown_, buttonFrame, flag);
+    return result is this.id ? this : (result !is null ? new NSPopUpButton(result) : null);
+}
 
-    public NSPopUpButton initWithFrame (NSRect buttonFrame, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1pullsDown_1, buttonFrame, flag);
-        return result !is null ? this : null;
-    }
-
-    public void insertItemWithTitle (NSString title, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertItemWithTitle_1atIndex_1, title !is null ? title.id_ : null, index);
-    }
+public NSMenuItem itemAtIndex(NSInteger index) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_itemAtIndex_, index);
+    return result !is null ? new NSMenuItem(result) : null;
+}
 
-    public NSArray itemArray ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemArray);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSMenuItem itemAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemAtIndex_1, index);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
+public NSString itemTitleAtIndex(NSInteger index) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_itemTitleAtIndex_, index);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSString itemTitleAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemTitleAtIndex_1, index);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray itemTitles ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemTitles);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSMenuItem itemWithTitle (NSString title)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemWithTitle_1, title !is null ? title.id_ : null);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
+public NSMenu menu() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_menu);
+    return result !is null ? new NSMenu(result) : null;
+}
 
-    public NSMenuItem lastItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_lastItem);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
+public NSInteger numberOfItems() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_numberOfItems);
+}
 
-    public NSMenu menu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSInteger numberOfItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfItems);
-    }
-
-    public NSRectEdge preferredEdge ()
-    {
-        return cast(NSRectEdge) OS.objc_msgSend(this.id_, OS.sel_preferredEdge);
-    }
+public void removeAllItems() {
+    OS.objc_msgSend(this.id, OS.sel_removeAllItems);
+}
 
-    public bool pullsDown ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_pullsDown) !is null;
-    }
-
-    public void removeAllItems ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllItems);
-    }
-
-    public void removeItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemAtIndex_1, index);
-    }
+public void removeItemAtIndex(NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_removeItemAtIndex_, index);
+}
 
-    public void removeItemWithTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemWithTitle_1, title !is null ? title.id_ : null);
-    }
+public void selectItem(NSMenuItem item) {
+    OS.objc_msgSend(this.id, OS.sel_selectItem_, item !is null ? item.id : null);
+}
 
-    public void selectItem (NSMenuItem item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItem_1, item !is null ? item.id_ : null);
-    }
-
-    public void selectItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItemAtIndex_1, index);
-    }
+public void selectItemAtIndex(NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_selectItemAtIndex_, index);
+}
 
-    public bool selectItemWithTag (NSInteger tag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_selectItemWithTag_1, tag) !is null;
-    }
-
-    public void selectItemWithTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItemWithTitle_1, title !is null ? title.id_ : null);
-    }
+public void setAutoenablesItems(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAutoenablesItems_, flag);
+}
 
-    public NSMenuItem selectedItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedItem);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public void setAutoenablesItems (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutoenablesItems_1, flag);
-    }
-
-    public void setMenu (NSMenu menu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1, menu !is null ? menu.id_ : null);
-    }
+public void setPullsDown(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setPullsDown_, flag);
+}
 
-    public void setPreferredEdge (NSRectEdge edge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPreferredEdge_1, edge);
-    }
-
-    public void setPullsDown (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPullsDown_1, flag);
-    }
+public NSString titleOfSelectedItem() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_titleOfSelectedItem);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Calss) OS.objc_msgSend(OS.class_NSPopUpButton, OS.sel_cellClass);
+}
 
-    public void synchronizeTitleAndSelectedItem ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_synchronizeTitleAndSelectedItem);
-    }
-
-    public NSString titleOfSelectedItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleOfSelectedItem);
-        return result !is null ? new NSString(result) : null;
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSPopUpButton, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSPopUpButtonCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,298 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPopUpButtonCell;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
-import dwt.internal.cocoa.NSMenuItem;
-import dwt.internal.cocoa.NSMenuItemCell;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSPopUpArrowPosition
-{
-    NSPopUpNoArrow = 0,
-    NSPopUpArrowAtCenter = 1,
-    NSPopUpArrowAtBottom = 2
-}
-
-alias NSPopUpArrowPosition.NSPopUpNoArrow NSPopUpNoArrow;
-alias NSPopUpArrowPosition.NSPopUpArrowAtCenter NSPopUpArrowAtCenter;
-alias NSPopUpArrowPosition.NSPopUpArrowAtBottom NSPopUpArrowAtBottom;
-
-public class NSPopUpButtonCell : NSMenuItemCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addItemWithTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItemWithTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void addItemsWithTitles (NSArray itemTitles)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addItemsWithTitles_1, itemTitles !is null ? itemTitles.id_ : null);
-    }
-
-    public bool altersStateOfSelectedItem ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_altersStateOfSelectedItem) !is null;
-    }
-
-    public NSPopUpArrowPosition arrowPosition ()
-    {
-        return cast(NSPopUpArrowPosition) OS.objc_msgSend(this.id_, OS.sel_arrowPosition);
-    }
-
-    public void attachPopUpWithFrame (NSRect cellFrame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_attachPopUpWithFrame_1inView_1, cellFrame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public bool autoenablesItems ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autoenablesItems) !is null;
-    }
-
-    public void dismissPopUp ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dismissPopUp);
-    }
-
-    public NSInteger indexOfItem (NSMenuItem item)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItem_1, item !is null ? item.id_ : null);
-    }
-
-    public NSInteger indexOfItemWithRepresentedObject (id obj)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithRepresentedObject_1, obj !is null ? obj.id_ : null);
-    }
-
-    public NSInteger indexOfItemWithTag (NSInteger tag)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTag_1, tag);
-    }
-
-    public NSInteger indexOfItemWithTarget (id target, objc.SEL actionSelector)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTarget_1andAction_1, target !is null ? target.id_ : null, actionSelector);
-    }
-
-    public NSInteger indexOfItemWithTitle (NSString title)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfItemWithTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public NSInteger indexOfSelectedItem ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfSelectedItem);
-    }
-
-    public NSPopUpButtonCell initTextCell (NSString stringValue, bool pullDown)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initTextCell_1pullsDown_1, stringValue !is null ? stringValue.id_ : null, pullDown);
-        return result !is null ? this : null;
-    }
-
-    public void insertItemWithTitle (NSString title, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertItemWithTitle_1atIndex_1, title !is null ? title.id_ : null, index);
-    }
-
-    public NSArray itemArray ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemArray);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSMenuItem itemAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemAtIndex_1, index);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSString itemTitleAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemTitleAtIndex_1, index);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray itemTitles ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemTitles);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSMenuItem itemWithTitle (NSString title)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemWithTitle_1, title !is null ? title.id_ : null);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSMenuItem lastItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_lastItem);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSMenu menu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSInteger numberOfItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfItems);
-    }
-
-    public id objectValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValue);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void performClickWithFrame (NSRect frame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performClickWithFrame_1inView_1, frame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public NSRectEdge preferredEdge ()
-    {
-        return cast(NSRectEdge) OS.objc_msgSend(this.id_, OS.sel_preferredEdge);
-    }
-
-    public bool pullsDown ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_pullsDown) !is null;
-    }
-
-    public void removeAllItems ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllItems);
-    }
-
-    public void removeItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemAtIndex_1, index);
-    }
-
-    public void removeItemWithTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemWithTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void selectItem (NSMenuItem item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItem_1, item !is null ? item.id_ : null);
-    }
-
-    public void selectItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItemAtIndex_1, index);
-    }
-
-    public bool selectItemWithTag (NSInteger tag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_selectItemWithTag_1, tag) !is null;
-    }
-
-    public void selectItemWithTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectItemWithTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public NSMenuItem selectedItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedItem);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public void setAltersStateOfSelectedItem (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAltersStateOfSelectedItem_1, flag);
-    }
-
-    public void setArrowPosition (NSPopUpArrowPosition position)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setArrowPosition_1, position);
-    }
-
-    public void setAutoenablesItems (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutoenablesItems_1, flag);
-    }
-
-    public void setMenu (NSMenu menu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1, menu !is null ? menu.id_ : null);
-    }
-
-    public void setObjectValue (id obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setPreferredEdge (NSRectEdge edge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPreferredEdge_1, edge);
-    }
-
-    public void setPullsDown (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPullsDown_1, flag);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setUsesItemFromMenu (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesItemFromMenu_1, flag);
-    }
-
-    public void synchronizeTitleAndSelectedItem ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_synchronizeTitleAndSelectedItem);
-    }
-
-    public NSString titleOfSelectedItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleOfSelectedItem);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool usesItemFromMenu ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesItemFromMenu) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSPort.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPort;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSConnection;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMutableArray;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRunLoop;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSZone;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-alias int NSSocketNativeHandle;
-
-public class NSPort : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addConnection (NSConnection conn, NSRunLoop runLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addConnection_1toRunLoop_1forMode_1, conn !is null ? conn.id_ : null, runLoop !is null ? runLoop.id_ : null,
-                mode !is null ? mode.id_ : null);
-    }
-
-    public static id allocWithZone (NSZone* zone)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPort, OS.sel_allocWithZone_1, zone);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void invalidate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidate);
-    }
-
-    public bool isValid ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isValid) !is null;
-    }
-
-    public static NSPort port ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPort, OS.sel_port);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public void removeConnection (NSConnection conn, NSRunLoop runLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeConnection_1fromRunLoop_1forMode_1, conn !is null ? conn.id_ : null,
-                runLoop !is null ? runLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void removeFromRunLoop (NSRunLoop runLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFromRunLoop_1forMode_1, runLoop !is null ? runLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public NSUInteger reservedSpaceLength ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_reservedSpaceLength);
-    }
-
-    public void scheduleInRunLoop (NSRunLoop runLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scheduleInRunLoop_1forMode_1, runLoop !is null ? runLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public bool sendBeforeDate_components_from_reserved_ (NSDate limitDate, NSMutableArray components, NSPort receivePort, NSUInteger headerSpaceReserved)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendBeforeDate_1components_1from_1reserved_1, limitDate !is null ? limitDate.id_ : null,
-                components !is null ? components.id_ : null, receivePort !is null ? receivePort.id_ : null, headerSpaceReserved) !is null;
-    }
-
-    public bool sendBeforeDate_msgid_components_from_reserved_ (NSDate limitDate, NSUInteger msgID, NSMutableArray components, NSPort receivePort,
-                                                                NSUInteger headerSpaceReserved)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendBeforeDate_1msgid_1components_1from_1reserved_1, limitDate !is null ? limitDate.id_ : null, msgID,
-                components !is null ? components.id_ : null, receivePort !is null ? receivePort.id_ : null, headerSpaceReserved) !is null;
-    }
-
-    public void setDelegate (id anId)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anId !is null ? anId.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPortCoder.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPortCoder;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCoder;
-import dwt.internal.cocoa.NSConnection;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPortCoder : NSCoder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSConnection connection ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_connection);
-        return result !is null ? new NSConnection(result) : null;
-    }
-
-    public NSPort decodePortObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decodePortObject);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public void dispatch ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dispatch);
-    }
-
-    public void encodePortObject (NSPort aport)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_encodePortObject_1, aport !is null ? aport.id_ : null);
-    }
-
-    public NSPortCoder initWithReceivePort (NSPort rcvPort, NSPort sndPort, NSArray comps)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithReceivePort_1sendPort_1components_1, rcvPort !is null ? rcvPort.id_ : null,
-                sndPort !is null ? sndPort.id_ : null, comps !is null ? comps.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public bool isBycopy ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBycopy) !is null;
-    }
-
-    public bool isByref ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isByref) !is null;
-    }
-
-    public static id portCoderWithReceivePort (NSPort rcvPort, NSPort sndPort, NSArray comps)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPortCoder, OS.sel_portCoderWithReceivePort_1sendPort_1components_1,
-                rcvPort !is null ? rcvPort.id_ : null, sndPort !is null ? sndPort.id_ : null, comps !is null ? comps.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSPortMessage.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPortMessage;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPortMessage : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray components ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_components);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSPortMessage initWithSendPort (NSPort sendPort, NSPort replyPort, NSArray components)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSendPort_1receivePort_1components_1, sendPort !is null ? sendPort.id_ : null,
-                replyPort !is null ? replyPort.id_ : null, components !is null ? components.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public uint msgid ()
-    {
-        return cast(uint) OS.objc_msgSend(this.id_, OS.sel_msgid);
-    }
-
-    public NSPort receivePort ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_receivePort);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public bool sendBeforeDate (NSDate date)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendBeforeDate_1, date !is null ? date.id_ : null) !is null;
-    }
-
-    public NSPort sendPort ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sendPort);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public void setMsgid (uint msgid)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMsgid_1, msgid);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPortNameServer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPortNameServer;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.NSPortNameServer;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPortNameServer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSPort portForName_ (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public NSPort portForName_host_ (NSString name, NSString host)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1host_1, name !is null ? name.id_ : null, host !is null ? host.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public bool registerPort (NSPort port, NSString name)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_registerPort_1name_1, port !is null ? port.id_ : null, name !is null ? name.id_ : null) !is null;
-    }
-
-    public bool removePortForName (NSString name)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_removePortForName_1, name !is null ? name.id_ : null) !is null;
-    }
-
-    public static NSPortNameServer systemDefaultPortNameServer ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPortNameServer, OS.sel_systemDefaultPortNameServer);
-        return result !is null ? new NSPortNameServer(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSPositionalSpecifier.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPositionalSpecifier;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSInsertionPosition
-{
-    NSPositionAfter,
-    NSPositionBefore,
-    NSPositionBeginning,
-    NSPositionEnd,
-    NSPositionReplace
-}
-
-alias NSInsertionPosition.NSPositionAfter NSPositionAfter;
-alias NSInsertionPosition.NSPositionBefore NSPositionBefore;
-alias NSInsertionPosition.NSPositionBeginning NSPositionBeginning;
-alias NSInsertionPosition.NSPositionEnd NSPositionEnd;
-alias NSInsertionPosition.NSPositionReplace NSPositionReplace;
-
-public class NSPositionalSpecifier : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void evaluate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_evaluate);
-    }
-
-    public NSPositionalSpecifier initWithPosition (NSInsertionPosition position, NSScriptObjectSpecifier specifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPosition_1objectSpecifier_1, position, specifier !is null ? specifier.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public id insertionContainer ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_insertionContainer);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger insertionIndex ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_insertionIndex);
-    }
-
-    public NSString insertionKey ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_insertionKey);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool insertionReplaces ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_insertionReplaces) !is null;
-    }
-
-    public NSScriptObjectSpecifier objectSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectSpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public NSInsertionPosition position ()
-    {
-        return cast(NSInsertionPosition) OS.objc_msgSend(this.id_, OS.sel_position);
-    }
-
-    public void setInsertionClassDescription (NSScriptClassDescription classDescription)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInsertionClassDescription_1, classDescription !is null ? classDescription.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPredicate.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPredicate;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPredicate : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool evaluateWithObject_ (id object)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_evaluateWithObject_1, object !is null ? object.id_ : null) !is null;
-    }
-
-    public bool evaluateWithObject_substitutionVariables_ (id object, NSDictionary bindings)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_evaluateWithObject_1substitutionVariables_1, object !is null ? object.id_ : null,
-                bindings !is null ? bindings.id_ : null) !is null;
-    }
-
-    public NSString predicateFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_predicateFormat);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSPredicate static_predicateWithFormat_ (NSString predicateWithFormat)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPredicate, OS.sel_predicateWithFormat_1,
-                predicateWithFormat !is null ? predicateWithFormat.id_ : null);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public static NSPredicate static_predicateWithFormat_argumentArray_ (NSString predicateFormat, NSArray arguments)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPredicate, OS.sel_predicateWithFormat_1argumentArray_1,
-                predicateFormat !is null ? predicateFormat.id_ : null, arguments !is null ? arguments.id_ : null);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public static NSPredicate static_predicateWithFormat_arguments_ (NSString predicateFormat, ...)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPredicate, OS.sel_predicateWithFormat_1arguments_1,
-                predicateFormat !is null ? predicateFormat.id_ : null, _argptr);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public NSPredicate predicateWithSubstitutionVariables (NSDictionary variables)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_predicateWithSubstitutionVariables_1, variables !is null ? variables.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSPredicate(result) : null);
-    }
-
-    public static NSPredicate predicateWithValue (bool value)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPredicate, OS.sel_predicateWithValue_1, value);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSPredicateEditor.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPredicateEditor;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSRuleEditor;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPredicateEditor : NSRuleEditor
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray rowTemplates ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rowTemplates);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setRowTemplates (NSArray rowTemplates)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRowTemplates_1, rowTemplates !is null ? rowTemplates.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSPredicateEditorRowTemplate.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPredicateEditorRowTemplate;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSAttributeType;
-import dwt.internal.cocoa.NSComparisonPredicate : NSComparisonPredicateModifier;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSPredicateEditorRowTemplate : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray compoundTypes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_compoundTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray displayableSubpredicatesOfPredicate (NSPredicate predicate)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayableSubpredicatesOfPredicate_1, predicate !is null ? predicate.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id initWithCompoundTypes (NSArray compoundTypes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCompoundTypes_1, compoundTypes !is null ? compoundTypes.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options_ (NSArray leftExpressions,
-            NSAttributeType attributeType, NSComparisonPredicateModifier modifier, NSArray operators, NSUInteger options)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLeftExpressions_1rightExpressionAttributeType_1modifier_1operators_1options_1,
-                leftExpressions !is null ? leftExpressions.id_ : null, attributeType, modifier, operators !is null ? operators.id_ : null, options);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithLeftExpressions_rightExpressions_modifier_operators_options_ (NSArray leftExpressions, NSArray rightExpressions, NSComparisonPredicateModifier modifier,
-            NSArray operators, NSUInteger options)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithLeftExpressions_1rightExpressions_1modifier_1operators_1options_1,
-                leftExpressions !is null ? leftExpressions.id_ : null, rightExpressions !is null ? rightExpressions.id_ : null, modifier,
-                operators !is null ? operators.id_ : null, options);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray leftExpressions ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_leftExpressions);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public double matchForPredicate (NSPredicate predicate)
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_matchForPredicate_1, predicate !is null ? predicate.id_ : null);
-    }
-
-    public NSComparisonPredicateModifier modifier ()
-    {
-        return cast(NSComparisonPredicateModifier) OS.objc_msgSend(this.id_, OS.sel_modifier);
-    }
-
-    public NSArray operators ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_operators);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSUInteger options ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_options);
-    }
-
-    public NSPredicate predicateWithSubpredicates (NSArray subpredicates)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_predicateWithSubpredicates_1, subpredicates !is null ? subpredicates.id_ : null);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public NSAttributeType rightExpressionAttributeType ()
-    {
-        return cast(NSAttributeType) OS.objc_msgSend(this.id_, OS.sel_rightExpressionAttributeType);
-    }
-
-    public NSArray rightExpressions ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rightExpressions);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setPredicate (NSPredicate predicate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPredicate_1, predicate !is null ? predicate.id_ : null);
-    }
-
-    public NSArray templateViews ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_templateViews);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-//public static NSArray templatesWithAttributeKeyPaths(NSArray keyPaths, NSEntityDescription entityDescription) {
-//  objc.id result = OS.objc_msgSend(OS.class_NSPredicateEditorRowTemplate, OS.sel_templatesWithAttributeKeyPaths_1inEntityDescription_1, keyPaths !is null ? keyPaths.id_ : null, entityDescription !is null ? entityDescription.id_ : null);
-//  return result !is null ? new NSArray(result) : null;
-//}
-
-}
--- a/dwt/internal/cocoa/NSPrintInfo.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSPrintInfo.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,20 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSPrintInfo;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSMutableDictionary;
 import dwt.internal.cocoa.NSObject;
@@ -25,262 +25,72 @@
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSPrintingPaginationMode
-{
-    NSAutoPagination = 0,
-    NSFitPagination = 1,
-    NSClipPagination = 2
+public class NSPrintInfo : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
 }
 
-alias NSPrintingPaginationMode.NSAutoPagination NSAutoPagination;
-alias NSPrintingPaginationMode.NSFitPagination NSFitPagination;
-alias NSPrintingPaginationMode.NSClipPagination NSClipPagination;
+public static NSPrinter defaultPrinter() {
+    objc.id result = OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_defaultPrinter);
+    return result !is null ? new NSPrinter(result) : null;
+}
+
+public NSMutableDictionary dictionary() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_dictionary);
+    return result !is null ? new NSMutableDictionary(result) : null;
+}
 
-enum NSPrintingOrientation
-{
-    NSPortraitOrientation = 0,
-    NSLandscapeOrientation = 1
+public NSRect imageablePageBounds() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_imageablePageBounds);
+    return result;
+}
+
+public NSPrintInfo initWithDictionary(NSDictionary attributes) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithDictionary_, attributes !is null ? attributes.id : null);
+    return result is this.id ? this : (result !is null ? new NSPrintInfo(result) : null);
 }
 
-alias NSPrintingOrientation.NSPortraitOrientation NSPortraitOrientation;
-alias NSPrintingOrientation.NSLandscapeOrientation NSLandscapeOrientation;
-
-public class NSPrintInfo : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void* PMPageFormat ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_PMPageFormat);
-    }
-
-    public void* PMPrintSession ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_PMPrintSession);
-    }
-
-    public void* PMPrintSettings ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_PMPrintSettings);
-    }
-
-    public CGFloat bottomMargin ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_bottomMargin);
-    }
-
-    public static NSPrinter defaultPrinter ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_defaultPrinter);
-        return result !is null ? new NSPrinter(result) : null;
-    }
-
-    public NSMutableDictionary dictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dictionary);
-        return result !is null ? new NSMutableDictionary(result) : null;
-    }
-
-    public NSPrintingPaginationMode horizontalPagination ()
-    {
-        return cast(NSPrintingPaginationMode) OS.objc_msgSend(this.id_, OS.sel_horizontalPagination);
-    }
+public NSString jobDisposition() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_jobDisposition);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSRect imageablePageBounds ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_imageablePageBounds);
-        return result;
-    }
-
-    public id initWithDictionary (NSDictionary attributes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDictionary_1, attributes !is null ? attributes.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isHorizontallyCentered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHorizontallyCentered) !is null;
-    }
-
-    public bool isVerticallyCentered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isVerticallyCentered) !is null;
-    }
-
-    public NSString jobDisposition ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_jobDisposition);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSSize paperSize() {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_paperSize);
+    return result;
+}
 
-    public CGFloat leftMargin ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_leftMargin);
-    }
-
-    public NSString localizedPaperName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedPaperName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSPrintingOrientation orientation ()
-    {
-        return cast(NSPrintingOrientation) OS.objc_msgSend(this.id_, OS.sel_orientation);
-    }
-
-    public NSString paperName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_paperName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSSize paperSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_paperSize);
-        return result;
-    }
-
-    public NSMutableDictionary printSettings ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printSettings);
-        return result !is null ? new NSMutableDictionary(result) : null;
-    }
+public NSPrinter printer() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_printer);
+    return result !is null ? new NSPrinter(result) : null;
+}
 
-    public NSPrinter printer ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printer);
-        return result !is null ? new NSPrinter(result) : null;
-    }
-
-    public CGFloat rightMargin ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_rightMargin);
-    }
-
-    public void setBottomMargin (CGFloat margin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBottomMargin_1, margin);
-    }
-
-    public static void setDefaultPrinter (NSPrinter printer)
-    {
-        OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_setDefaultPrinter_1, printer !is null ? printer.id_ : null);
-    }
-
-    public void setHorizontalPagination (NSPrintingPaginationMode mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontalPagination_1, mode);
-    }
+public void setJobDisposition(NSString disposition) {
+    OS.objc_msgSend(this.id, OS.sel_setJobDisposition_, disposition !is null ? disposition.id : null);
+}
 
-    public void setHorizontallyCentered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontallyCentered_1, flag);
-    }
-
-    public void setJobDisposition (NSString disposition)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setJobDisposition_1, disposition !is null ? disposition.id_ : null);
-    }
-
-    public void setLeftMargin (CGFloat margin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLeftMargin_1, margin);
-    }
-
-    public void setOrientation (NSPrintingOrientation orientation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOrientation_1, orientation);
-    }
-
-    public void setPaperName (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPaperName_1, name !is null ? name.id_ : null);
-    }
-
-    public void setPaperSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPaperSize_1, size);
-    }
-
-    public void setPrinter (NSPrinter printer)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPrinter_1, printer !is null ? printer.id_ : null);
-    }
+public void setPrinter(NSPrinter printer) {
+    OS.objc_msgSend(this.id, OS.sel_setPrinter_, printer !is null ? printer.id : null);
+}
 
-    public void setRightMargin (CGFloat margin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRightMargin_1, margin);
-    }
-
-    public static void setSharedPrintInfo (NSPrintInfo printInfo)
-    {
-        OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_setSharedPrintInfo_1, printInfo !is null ? printInfo.id_ : null);
-    }
-
-    public void setTopMargin (CGFloat margin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTopMargin_1, margin);
-    }
-
-    public void setUpPrintOperationDefaultValues ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUpPrintOperationDefaultValues);
-    }
-
-    public void setVerticalPagination (NSPrintingPaginationMode mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticalPagination_1, mode);
-    }
-
-    public void setVerticallyCentered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticallyCentered_1, flag);
-    }
+public void setUpPrintOperationDefaultValues() {
+    OS.objc_msgSend(this.id, OS.sel_setUpPrintOperationDefaultValues);
+}
 
-    public static NSPrintInfo sharedPrintInfo ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_sharedPrintInfo);
-        return result !is null ? new NSPrintInfo(result) : null;
-    }
-
-    public static NSSize sizeForPaperName (NSString name)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, OS.class_NSPrintInfo, OS.sel_sizeForPaperName_1, name !is null ? name.id_ : null);
-        return result;
-    }
-
-    public CGFloat topMargin ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_topMargin);
-    }
-
-    public void updateFromPMPageFormat ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateFromPMPageFormat);
-    }
-
-    public void updateFromPMPrintSettings ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateFromPMPrintSettings);
-    }
-
-    public NSPrintingPaginationMode verticalPagination ()
-    {
-        return cast(NSPrintingPaginationMode) OS.objc_msgSend(this.id_, OS.sel_verticalPagination);
-    }
+public static NSPrintInfo sharedPrintInfo() {
+    objc.id result = OS.objc_msgSend(OS.class_NSPrintInfo, OS.sel_sharedPrintInfo);
+    return result !is null ? new NSPrintInfo(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSPrintOperation.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSPrintOperation.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,293 +1,87 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSPrintOperation;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSGraphicsContext;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMutableData;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPrintInfo;
-import dwt.internal.cocoa.NSPrintPanel;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSPrintingPageOrder
-{
-    NSDescendingPageOrder = (-1),
-    NSSpecialPageOrder = 0,
-    NSAscendingPageOrder = 1,
-    NSUnknownPageOrder = 2
+public class NSPrintOperation : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public void cleanUpOperation() {
+    OS.objc_msgSend(this.id, OS.sel_cleanUpOperation);
+}
+
+public NSGraphicsContext context() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_context);
+    return result !is null ? new NSGraphicsContext(result) : null;
+}
+
+public NSGraphicsContext createContext() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_createContext);
+    return result !is null ? new NSGraphicsContext(result) : null;
 }
 
-alias NSPrintingPageOrder.NSDescendingPageOrder NSDescendingPageOrder;
-alias NSPrintingPageOrder.NSSpecialPageOrder NSSpecialPageOrder;
-alias NSPrintingPageOrder.NSAscendingPageOrder NSAscendingPageOrder;
-alias NSPrintingPageOrder.NSUnknownPageOrder NSUnknownPageOrder;
-
-public class NSPrintOperation : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSPrintOperation static_EPSOperationWithView_insideRect_toData_ (NSView view, NSRect rect, NSMutableData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_EPSOperationWithView_1insideRect_1toData_1,
-                view !is null ? view.id_ : null, rect, data !is null ? data.id_ : null);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
-
-    public static NSPrintOperation static_EPSOperationWithView_insideRect_toData_printInfo_ (NSView view, NSRect rect, NSMutableData data,
-            NSPrintInfo printInfo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_EPSOperationWithView_1insideRect_1toData_1printInfo_1,
-                view !is null ? view.id_ : null, rect, data !is null ? data.id_ : null, printInfo !is null ? printInfo.id_ : null);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
-
-    public static NSPrintOperation static_EPSOperationWithView_insideRect_toPath_printInfo_ (NSView view, NSRect rect, NSString path,
-            NSPrintInfo printInfo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_EPSOperationWithView_1insideRect_1toPath_1printInfo_1,
-                view !is null ? view.id_ : null, rect, path !is null ? path.id_ : null, printInfo !is null ? printInfo.id_ : null);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
-
-    public static NSPrintOperation static_PDFOperationWithView_insideRect_toData_ (NSView view, NSRect rect, NSMutableData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_PDFOperationWithView_1insideRect_1toData_1,
-                view !is null ? view.id_ : null, rect, data !is null ? data.id_ : null);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
-
-    public static NSPrintOperation static_PDFOperationWithView_insideRect_toData_printInfo_ (NSView view, NSRect rect, NSMutableData data,
-            NSPrintInfo printInfo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_PDFOperationWithView_1insideRect_1toData_1printInfo_1,
-                view !is null ? view.id_ : null, rect, data !is null ? data.id_ : null, printInfo !is null ? printInfo.id_ : null);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
+public bool deliverResult() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_deliverResult);
+}
 
-    public static NSPrintOperation static_PDFOperationWithView_insideRect_toPath_printInfo_ (NSView view, NSRect rect, NSString path,
-            NSPrintInfo printInfo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_PDFOperationWithView_1insideRect_1toPath_1printInfo_1,
-                view !is null ? view.id_ : null, rect, path !is null ? path.id_ : null, printInfo !is null ? printInfo.id_ : null);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
-
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public bool canSpawnSeparateThread ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canSpawnSeparateThread) !is null;
-    }
-
-    public void cleanUpOperation ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cleanUpOperation);
-    }
-
-    public NSGraphicsContext context ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_context);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
+public void destroyContext() {
+    OS.objc_msgSend(this.id, OS.sel_destroyContext);
+}
 
-    public NSGraphicsContext createContext ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_createContext);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
-
-    public static NSPrintOperation currentOperation ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_currentOperation);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
-
-    public NSInteger currentPage ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_currentPage);
-    }
-
-    public bool deliverResult ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_deliverResult) !is null;
-    }
-
-    public void destroyContext ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_destroyContext);
-    }
-
-    public bool isCopyingOperation ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isCopyingOperation) !is null;
-    }
-
-    public NSString jobStyleHint ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_jobStyleHint);
-        return result !is null ? new NSString(result) : null;
-    }
+public static NSPrintOperation printOperationWithView(NSView view, NSPrintInfo printInfo) {
+    objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_printOperationWithView_printInfo_, view !is null ? view.id : null, printInfo !is null ? printInfo.id : null);
+    return result !is null ? new NSPrintOperation(result) : null;
+}
 
-    public NSString jobTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_jobTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSPrintingPageOrder pageOrder ()
-    {
-        return cast(NSPrintingPageOrder) OS.objc_msgSend(this.id_, OS.sel_pageOrder);
-    }
-
-    public NSRange pageRange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_pageRange);
-        return result;
-    }
-
-    public NSPrintInfo printInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printInfo);
-        return result !is null ? new NSPrintInfo(result) : null;
-    }
-
-    public static NSPrintOperation static_printOperationWithView_ (NSView view)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_printOperationWithView_1, view !is null ? view.id_ : null);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
+public bool runOperation() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_runOperation);
+}
 
-    public static NSPrintOperation static_printOperationWithView_printInfo_ (NSView view, NSPrintInfo printInfo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_printOperationWithView_1printInfo_1, view !is null ? view.id_ : null,
-                printInfo !is null ? printInfo.id_ : null);
-        return result !is null ? new NSPrintOperation(result) : null;
-    }
-
-    public NSPrintPanel printPanel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printPanel);
-        return result !is null ? new NSPrintPanel(result) : null;
-    }
-
-    public bool runOperation ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_runOperation) !is null;
-    }
-
-    public void runOperationModalForWindow (NSWindow docWindow, id delegatee, objc.SEL didRunSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runOperationModalForWindow_1delegate_1didRunSelector_1contextInfo_1,
-                docWindow !is null ? docWindow.id_ : null, delegatee !is null ? delegatee.id_ : null, didRunSelector, contextInfo);
-    }
-
-    public void setAccessoryView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, view !is null ? view.id_ : null);
-    }
-
-    public void setCanSpawnSeparateThread (bool canSpawnSeparateThread)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanSpawnSeparateThread_1, canSpawnSeparateThread);
-    }
+public static void setCurrentOperation(NSPrintOperation operation) {
+    OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_setCurrentOperation_, operation !is null ? operation.id : null);
+}
 
-    public static void setCurrentOperation (NSPrintOperation operation)
-    {
-        OS.objc_msgSend(OS.class_NSPrintOperation, OS.sel_setCurrentOperation_1, operation !is null ? operation.id_ : null);
-    }
-
-    public void setJobStyleHint (NSString hint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setJobStyleHint_1, hint !is null ? hint.id_ : null);
-    }
-
-    public void setJobTitle (NSString jobTitle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setJobTitle_1, jobTitle !is null ? jobTitle.id_ : null);
-    }
-
-    public void setPageOrder (NSPrintingPageOrder pageOrder)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPageOrder_1, pageOrder);
-    }
-
-    public void setPrintInfo (NSPrintInfo printInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPrintInfo_1, printInfo !is null ? printInfo.id_ : null);
-    }
-
-    public void setPrintPanel (NSPrintPanel panel)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPrintPanel_1, panel !is null ? panel.id_ : null);
-    }
+public void setJobTitle(NSString jobTitle) {
+    OS.objc_msgSend(this.id, OS.sel_setJobTitle_, jobTitle !is null ? jobTitle.id : null);
+}
 
-    public void setShowPanels (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowPanels_1, flag);
-    }
-
-    public void setShowsPrintPanel (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsPrintPanel_1, flag);
-    }
-
-    public void setShowsProgressPanel (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsProgressPanel_1, flag);
-    }
+public void setShowsPrintPanel(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setShowsPrintPanel_, flag);
+}
 
-    public bool showPanels ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showPanels) !is null;
-    }
-
-    public bool showsPrintPanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsPrintPanel) !is null;
-    }
-
-    public bool showsProgressPanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsProgressPanel) !is null;
-    }
-
-    public NSView view ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_view);
-        return result !is null ? new NSView(result) : null;
-    }
+public void setShowsProgressPanel(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setShowsProgressPanel_, flag);
+}
 
 }
--- a/dwt/internal/cocoa/NSPrintPanel.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSPrintPanel.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,28 +1,24 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSPrintPanel;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPrintInfo;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSViewController;
-import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 enum NSPrintPanelOptions : NSInteger
@@ -36,134 +32,35 @@
     NSPrintPanelShowsPreview = 0x20000
 }
 
-alias NSPrintPanelOptions.NSPrintPanelShowsCopies NSPrintPanelShowsCopies;
-alias NSPrintPanelOptions.NSPrintPanelShowsPageRange NSPrintPanelShowsPageRange;
-alias NSPrintPanelOptions.NSPrintPanelShowsPaperSize NSPrintPanelShowsPaperSize;
-alias NSPrintPanelOptions.NSPrintPanelShowsOrientation NSPrintPanelShowsOrientation;
-alias NSPrintPanelOptions.NSPrintPanelShowsScaling NSPrintPanelShowsScaling;
-alias NSPrintPanelOptions.NSPrintPanelShowsPageSetupAccessory NSPrintPanelShowsPageSetupAccessory;
-alias NSPrintPanelOptions.NSPrintPanelShowsPreview NSPrintPanelShowsPreview;
-
-public class NSPrintPanel : NSObject
-{
+public class NSPrintPanel : NSObject {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray accessoryControllers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryControllers);
-        return result !is null ? new NSArray(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public void addAccessoryController (NSViewController accessoryController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addAccessoryController_1, accessoryController !is null ? accessoryController.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void beginSheetWithPrintInfo (NSPrintInfo printInfo, NSWindow docWindow, id delegatee, objc.SEL didEndSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginSheetWithPrintInfo_1modalForWindow_1delegate_1didEndSelector_1contextInfo_1,
-                printInfo !is null ? printInfo.id_ : null, docWindow !is null ? docWindow.id_ : null, delegatee !is null ? delegatee.id_ : null,
-                didEndSelector, contextInfo);
-    }
-
-    public NSString defaultButtonTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaultButtonTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void finalWritePrintInfo ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_finalWritePrintInfo);
-    }
-
-    public NSString helpAnchor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_helpAnchor);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSString jobStyleHint ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_jobStyleHint);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSPrintPanelOptions options ()
-    {
-        return cast(NSPrintPanelOptions) OS.objc_msgSend(this.id_, OS.sel_options);
-    }
-
-    public NSPrintInfo printInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printInfo);
-        return result !is null ? new NSPrintInfo(result) : null;
-    }
-
-    public static NSPrintPanel printPanel ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrintPanel, OS.sel_printPanel);
-        return result !is null ? new NSPrintPanel(result) : null;
-    }
-
-    public void removeAccessoryController (NSViewController accessoryController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAccessoryController_1, accessoryController !is null ? accessoryController.id_ : null);
-    }
-
-    public NSInteger runModal ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModal);
-    }
+public NSPrintPanelOptions options() {
+    return cast(NSPrintPanelOptions) OS.objc_msgSend(this.id, OS.sel_options);
+}
 
-    public NSInteger runModalWithPrintInfo (NSPrintInfo printInfo)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModalWithPrintInfo_1, printInfo !is null ? printInfo.id_ : null);
-    }
-
-    public void setAccessoryView (NSView accessoryView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, accessoryView !is null ? accessoryView.id_ : null);
-    }
-
-    public void setDefaultButtonTitle (NSString defaultButtonTitle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDefaultButtonTitle_1, defaultButtonTitle !is null ? defaultButtonTitle.id_ : null);
-    }
+public static NSPrintPanel printPanel() {
+    objc.id result = OS.objc_msgSend(OS.class_NSPrintPanel, OS.sel_printPanel);
+    return result !is null ? new NSPrintPanel(result) : null;
+}
 
-    public void setHelpAnchor (NSString helpAnchor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHelpAnchor_1, helpAnchor !is null ? helpAnchor.id_ : null);
-    }
-
-    public void setJobStyleHint (NSString hint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setJobStyleHint_1, hint !is null ? hint.id_ : null);
-    }
+public NSInteger runModalWithPrintInfo(NSPrintInfo printInfo) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_runModalWithPrintInfo_, printInfo !is null ? printInfo.id : null);
+}
 
-    public void setOptions (NSPrintPanelOptions options)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOptions_1, options);
-    }
-
-    public void updateFromPrintInfo ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateFromPrintInfo);
-    }
+public void setOptions(NSPrintPanelOptions options) {
+    OS.objc_msgSend(this.id, OS.sel_setOptions_, options);
+}
 
 }
--- a/dwt/internal/cocoa/NSPrinter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSPrinter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,208 +1,53 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSPrinter;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSPrinterTableStatus
-{
-    NSPrinterTableOK = 0,
-    NSPrinterTableNotFound = 1,
-    NSPrinterTableError = 2
+public class NSPrinter : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
 }
 
-alias NSPrinterTableStatus.NSPrinterTableOK NSPrinterTableOK;
-alias NSPrinterTableStatus.NSPrinterTableNotFound NSPrinterTableNotFound;
-alias NSPrinterTableStatus.NSPrinterTableError NSPrinterTableError;
-
-public class NSPrinter : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool acceptsBinary ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsBinary) !is null;
-    }
-
-    public bool booleanForKey (NSString key, NSString table)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_booleanForKey_1inTable_1, key !is null ? key.id_ : null, table !is null ? table.id_ : null) !is null;
-    }
-
-    public NSDictionary deviceDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_deviceDescription);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString domain ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_domain);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public float floatForKey (NSString key, NSString table)
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatForKey_1inTable_1, key !is null ? key.id_ : null,
-                table !is null ? table.id_ : null);
-    }
-
-    public NSString host ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_host);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSRect imageRectForPaper (NSString paperName)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_imageRectForPaper_1, paperName !is null ? paperName.id_ : null);
-        return result;
-    }
-
-    public int intForKey (NSString key, NSString table)
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_intForKey_1inTable_1, key !is null ? key.id_ : null, table !is null ? table.id_ : null);
-    }
-
-    public bool isColor ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isColor) !is null;
-    }
-
-    public bool isFontAvailable (NSString faceName)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFontAvailable_1, faceName !is null ? faceName.id_ : null) !is null;
-    }
-
-    public bool isKey (NSString key, NSString table)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isKey_1inTable_1, key !is null ? key.id_ : null, table !is null ? table.id_ : null) !is null;
-    }
-
-    public bool isOutputStackInReverseOrder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOutputStackInReverseOrder) !is null;
-    }
+public NSString name() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_name);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSInteger languageLevel ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_languageLevel);
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString note ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_note);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSSize pageSizeForPaper (NSString paperName)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_pageSizeForPaper_1, paperName !is null ? paperName.id_ : null);
-        return result;
-    }
-
-    public static NSArray printerNames ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray printerTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSPrinter static_printerWithName_ (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerWithName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSPrinter(result) : null;
-    }
+public static NSArray printerNames() {
+    objc.id result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerNames);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public static NSPrinter static_printerWithName_domain_includeUnavailable_ (NSString name, NSString domain, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerWithName_1domain_1includeUnavailable_1, name !is null ? name.id_ : null,
-                domain !is null ? domain.id_ : null, flag);
-        return result !is null ? new NSPrinter(result) : null;
-    }
-
-    public static NSPrinter printerWithType (NSString type)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerWithType_1, type !is null ? type.id_ : null);
-        return result !is null ? new NSPrinter(result) : null;
-    }
-
-    public NSRect rectForKey (NSString key, NSString table)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectForKey_1inTable_1, key !is null ? key.id_ : null, table !is null ? table.id_ : null);
-        return result;
-    }
-
-    public NSSize sizeForKey (NSString key, NSString table)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_sizeForKey_1inTable_1, key !is null ? key.id_ : null, table !is null ? table.id_ : null);
-        return result;
-    }
-
-    public NSPrinterTableStatus statusForTable (NSString tableName)
-    {
-        return cast(NSPrinterTableStatus) OS.objc_msgSend(this.id_, OS.sel_statusForTable_1, tableName !is null ? tableName.id_ : null);
-    }
-
-    public NSString stringForKey (NSString key, NSString table)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringForKey_1inTable_1, key !is null ? key.id_ : null, table !is null ? table.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray stringListForKey (NSString key, NSString table)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringListForKey_1inTable_1, key !is null ? key.id_ : null, table !is null ? table.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString type ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_type);
-        return result !is null ? new NSString(result) : null;
-    }
+public static NSPrinter printerWithName(NSString name) {
+    objc.id result = OS.objc_msgSend(OS.class_NSPrinter, OS.sel_printerWithName_, name !is null ? name.id : null);
+    return result !is null ? new NSPrinter(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSProcessInfo.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSProcessInfo;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSProcessInfo : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSUInteger activeProcessorCount ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_activeProcessorCount);
-    }
-
-    public NSArray arguments ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arguments);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSDictionary environment ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_environment);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString globallyUniqueString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_globallyUniqueString);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString hostName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_hostName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public uint operatingSystem ()
-    {
-        return  cast(uint) OS.objc_msgSend(this.id_, OS.sel_operatingSystem);
-    }
-
-    public NSString operatingSystemName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_operatingSystemName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString operatingSystemVersionString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_operatingSystemVersionString);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public ulong physicalMemory ()
-    {
-        return cast(ulong) OS.objc_msgSend(this.id_, OS.sel_physicalMemory);
-    }
-
-    public int processIdentifier ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_processIdentifier);
-    }
-
-    public static NSProcessInfo processInfo ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSProcessInfo, OS.sel_processInfo);
-        return result !is null ? new NSProcessInfo(result) : null;
-    }
-
-    public NSString processName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_processName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger processorCount ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_processorCount);
-    }
-
-    public void setProcessName (NSString newName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setProcessName_1, newName !is null ? newName.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSProgressIndicator.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSProgressIndicator.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,180 +1,76 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSProgressIndicator;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSCell : NSControlTint, NSControlSize;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSProgressIndicatorStyle
-{
-    NSProgressIndicatorBarStyle = 0,
-    NSProgressIndicatorSpinningStyle = 1
+public class NSProgressIndicator : NSView {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public double doubleValue() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue);
+}
+
+public double maxValue() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_maxValue);
+}
+
+public double minValue() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_minValue);
 }
 
-alias NSProgressIndicatorStyle.NSProgressIndicatorBarStyle NSProgressIndicatorBarStyle;
-alias NSProgressIndicatorStyle.NSProgressIndicatorSpinningStyle NSProgressIndicatorSpinningStyle;
-
-public class NSProgressIndicator : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void animate (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_animate_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSTimeInterval animationDelay ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_animationDelay);
-    }
-
-    public NSControlSize controlSize ()
-    {
-        return cast(NSControlSize) OS.objc_msgSend(this.id_, OS.sel_controlSize);
-    }
+public void setDoubleValue(double doubleValue) {
+    OS.objc_msgSend(this.id, OS.sel_setDoubleValue_, doubleValue);
+}
 
-    public NSControlTint controlTint ()
-    {
-        return cast(NSControlTint) OS.objc_msgSend(this.id_, OS.sel_controlTint);
-    }
-
-    public double doubleValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
-    }
-
-    public void incrementBy (double delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_incrementBy_1, delta);
-    }
-
-    public bool isBezeled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBezeled) !is null;
-    }
+public void setIndeterminate(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setIndeterminate_, flag);
+}
 
-    public bool isDisplayedWhenStopped ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDisplayedWhenStopped) !is null;
-    }
-
-    public bool isIndeterminate ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isIndeterminate) !is null;
-    }
-
-    public double maxValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
-    }
-
-    public double minValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
-    }
+public void setMaxValue(double newMaximum) {
+    OS.objc_msgSend(this.id, OS.sel_setMaxValue_, newMaximum);
+}
 
-    public void setAnimationDelay (NSTimeInterval delay)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAnimationDelay_1, delay);
-    }
-
-    public void setBezeled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag);
-    }
-
-    public void setControlSize (NSControlSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, size);
-    }
-
-    public void setControlTint (NSControlSize tint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlTint_1, tint);
-    }
+public void setMinValue(double newMinimum) {
+    OS.objc_msgSend(this.id, OS.sel_setMinValue_, newMinimum);
+}
 
-    public void setDisplayedWhenStopped (bool isDisplayed)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDisplayedWhenStopped_1, isDisplayed);
-    }
-
-    public void setDoubleValue (double doubleValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleValue_1, doubleValue);
-    }
-
-    public void setIndeterminate (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIndeterminate_1, flag);
-    }
-
-    public void setMaxValue (double newMaximum)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, newMaximum);
-    }
+public void setUsesThreadedAnimation(bool threadedAnimation) {
+    OS.objc_msgSend(this.id, OS.sel_setUsesThreadedAnimation_, threadedAnimation);
+}
 
-    public void setMinValue (double newMinimum)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, newMinimum);
-    }
-
-    public void setStyle (NSProgressIndicatorStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStyle_1, style);
-    }
-
-    public void setUsesThreadedAnimation (bool threadedAnimation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesThreadedAnimation_1, threadedAnimation);
-    }
-
-    public void sizeToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
-    }
+public void sizeToFit() {
+    OS.objc_msgSend(this.id, OS.sel_sizeToFit);
+}
 
-    public void startAnimation (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_startAnimation_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void stopAnimation (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopAnimation_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSProgressIndicatorStyle style ()
-    {
-        return cast(NSProgressIndicatorStyle) OS.objc_msgSend(this.id_, OS.sel_style);
-    }
-
-    public bool usesThreadedAnimation ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesThreadedAnimation) !is null;
-    }
+public void startAnimation(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_startAnimation_, sender !is null ? sender.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSPropertyListSerialization.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSPropertyListSerialization;
-
-import dwt.internal.cocoa.CFPropertyList;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSPropertyListFormat
-{
-    NSPropertyListOpenStepFormat = kCFPropertyListOpenStepFormat,
-    NSPropertyListXMLFormat_v1_0 = kCFPropertyListXMLFormat_v1_0,
-    NSPropertyListBinaryFormat_v1_0 = kCFPropertyListBinaryFormat_v1_0
-}
-
-alias NSPropertyListFormat.NSPropertyListOpenStepFormat NSPropertyListOpenStepFormat;
-alias NSPropertyListFormat.NSPropertyListXMLFormat_v1_0 NSPropertyListXMLFormat_v1_0;
-alias NSPropertyListFormat.NSPropertyListBinaryFormat_v1_0 NSPropertyListBinaryFormat_v1_0;
-
-enum NSPropertyListMutabilityOptions
-{
-    NSPropertyListImmutable = kCFPropertyListImmutable,
-    NSPropertyListMutableContainers = kCFPropertyListMutableContainers,
-    NSPropertyListMutableContainersAndLeaves = kCFPropertyListMutableContainersAndLeaves
-}
-
-alias NSPropertyListMutabilityOptions.NSPropertyListImmutable NSPropertyListImmutable;
-alias NSPropertyListMutabilityOptions.NSPropertyListMutableContainers NSPropertyListMutableContainers;
-alias NSPropertyListMutabilityOptions.NSPropertyListMutableContainersAndLeaves NSPropertyListMutableContainersAndLeaves;
-
-public class NSPropertyListSerialization : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSData dataFromPropertyList (id plist, NSPropertyListFormat format, objc.id** errorString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPropertyListSerialization, OS.sel_dataFromPropertyList_1format_1errorDescription_1,
-                plist !is null ? plist.id_ : null, format, errorString);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public static bool propertyList (id plist, NSPropertyListFormat format)
-    {
-        return OS.objc_msgSend(OS.class_NSPropertyListSerialization, OS.sel_propertyList_1isValidForFormat_1, plist !is null ? plist.id_ : null,
-                format) !is null;
-    }
-
-    public static id propertyListFromData (NSData data, NSPropertyListMutabilityOptions opt, NSPropertyListFormat* format, objc.id** errorString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSPropertyListSerialization,
-                OS.sel_propertyListFromData_1mutabilityOption_1format_1errorDescription_1, data !is null ? data.id_ : null, opt, format, errorString);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSProtocolChecker.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSProtocolChecker;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSProxy;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSProtocolChecker : NSProxy
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    //public id initWithTarget(NSObject anObject, Protocol aProtocol) {
-    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTarget_1protocol_1, anObject !is null ? anObject.id_ : null, aProtocol !is null ? aProtocol.id_ : null);
-    //  return result !is null ? new id(result) : null;
-    //}
-    //
-    //public Protocol protocol() {
-    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_protocol);
-    //  return result !is null ? new Protocol(result) : null;
-    //}
-    //
-    //public static id protocolCheckerWithTarget(NSObject anObject, Protocol aProtocol) {
-    //  objc.id result = OS.objc_msgSend(OS.class_NSProtocolChecker, OS.sel_protocolCheckerWithTarget_1protocol_1, anObject !is null ? anObject.id_ : null, aProtocol !is null ? aProtocol.id_ : null);
-    //  return result !is null ? new id(result) : null;
-    //}
-
-    public NSObject target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new NSObject(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSProxy.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSProxy;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInvocation;
-import dwt.internal.cocoa.NSMethodSignature;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSZone;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSProxy : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    //public static id alloc() {
-    //  objc.id result = OS.objc_msgSend(OS.class_NSProxy, OS.sel_alloc);
-    //  return result !is null ? new id(result) : null;
-    //}
-
-    public static id allocWithZone (NSZone* zone)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSProxy, OS.sel_allocWithZone_1, zone);
-        return result !is null ? new id(result) : null;
-    }
-
-    //public static int class() {
-    //  return OS.objc_msgSend(OS.class_NSProxy, OS.sel_class);
-    //}
-
-    public void dealloc ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dealloc);
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void finalize ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_finalize);
-    }
-
-    public void forwardInvocation (NSInvocation invocation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_forwardInvocation_1, invocation !is null ? invocation.id_ : null);
-    }
-
-    public NSMethodSignature methodSignatureForSelector (objc.SEL sel)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_methodSignatureForSelector_1, sel);
-        return result !is null ? new NSMethodSignature(result) : null;
-    }
-
-//public static bool respondsToSelector(int aSelector) {
-//  return OS.objc_msgSend(OS.class_NSProxy, OS.sel_respondsToSelector_1, aSelector) !is null;
-//}
-
-}
--- a/dwt/internal/cocoa/NSQuickDrawView.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSQuickDrawView;
-
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSQuickDrawView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void* qdPort ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_qdPort);
-    }
-
-}
--- a/dwt/internal/cocoa/NSQuitCommand.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSQuitCommand;
-
-import dwt.internal.cocoa.NSCloseCommand : NSSaveOptions;
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSQuitCommand : NSScriptCommand
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSSaveOptions saveOptions ()
-    {
-        return cast(NSSaveOptions) OS.objc_msgSend(this.id_, OS.sel_saveOptions);
-    }
-
-}
--- a/dwt/internal/cocoa/NSRange.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSRange.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,17 +9,16 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSRange;
 
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSInteger;
 
-extern (C):
-
 alias NSRange* NSRangePointer;
-
-struct NSRange {
-    NSUInteger location;
-    NSUInteger length;
+ 
+public struct NSRange {
+    public NSUInteger location;
+    public NSUInteger length;
 }
--- a/dwt/internal/cocoa/NSRangeSpecifier.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSRangeSpecifier;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSRangeSpecifier : NSScriptObjectSpecifier
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScriptObjectSpecifier endSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_endSpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public id initWithContainerClassDescription (NSScriptClassDescription classDesc, NSScriptObjectSpecifier container, NSString property,
-            NSScriptObjectSpecifier startSpec, NSScriptObjectSpecifier endSpec)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContainerClassDescription_1containerSpecifier_1key_1startSpecifier_1endSpecifier_1,
-                classDesc !is null ? classDesc.id_ : null, container !is null ? container.id_ : null, property !is null ? property.id_ : null,
-                startSpec !is null ? startSpec.id_ : null, endSpec !is null ? endSpec.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setEndSpecifier (NSScriptObjectSpecifier endSpec)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEndSpecifier_1, endSpec !is null ? endSpec.id_ : null);
-    }
-
-    public void setStartSpecifier (NSScriptObjectSpecifier startSpec)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStartSpecifier_1, startSpec !is null ? startSpec.id_ : null);
-    }
-
-    public NSScriptObjectSpecifier startSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_startSpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSRect.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSRect.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,82 +9,25 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSRect;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSSize;
 
-extern (C):
 
-alias NSRect* NSRectArray;
-alias NSRect* NSRectPointer;
-
-enum NSRectEdge : NSUInteger
-{
-    NSMinXEdge = 0,
-    NSMinYEdge = 1,
-    NSMaxXEdge = 2,
-    NSMaxYEdge = 3
-}
-
-alias NSRectEdge.NSMinXEdge NSMinXEdge;
-alias NSRectEdge.NSMinYEdge NSMinYEdge;
-alias NSRectEdge.NSMaxXEdge NSMaxXEdge;
-alias NSRectEdge.NSMaxYEdge NSMaxYEdge;
-
-struct NSRect
-{
+public struct NSRect {
+    /** @field accessor=origin.x */
+    public alias origin.x x;
+    /** @field accessor=origin.y */
+    public alias origin.y y;
+    /** @field accessor=size.width */
+    public alias size.width width;
+    /** @field accessor=size.height */
+    public alias size.height height;
+    
     NSPoint origin;
     NSSize size;
-    
-    // for dwt compatibility
-    
-    CGFloat x ()
-    {
-        return origin.x;
-    }
-    
-    CGFloat x (CGFloat x)
-    {
-        return origin.x = x;
-    }
-    
-    CGFloat y ()
-    {
-        return origin.y;
-    }
-    
-    CGFloat y (CGFloat y)
-    {
-        return origin.y = y;
-    }
-    
-    CGFloat width ()
-    {
-        return size.width;
-    }
-    
-    CGFloat width (CGFloat width)
-    {
-        return size.width = width;
-    }
-    
-    CGFloat height ()
-    {
-        return size.height;
-    }
-    
-    CGFloat height (CGFloat height)
-    {
-        return size.height = height;
-    }
-    
-    /*alias origin.x x;
-    alias origin.y y;
-    alias size.width width;
-    alias size.height height;*/
-}
\ No newline at end of file
+}
--- a/dwt/internal/cocoa/NSRecursiveLock.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSRecursiveLock;
-
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSRecursiveLock : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool lockBeforeDate (NSDate limit)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_lockBeforeDate_1, limit !is null ? limit.id_ : null) !is null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setName (NSString n)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setName_1, n !is null ? n.id_ : null);
-    }
-
-    public bool tryLock ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tryLock) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSRelativeSpecifier.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSRelativeSpecifier;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSRelativePosition
-{
-    NSRelativeAfter = 0,
-    NSRelativeBefore
-}
-
-alias NSRelativePosition.NSRelativeAfter NSRelativeAfter;
-alias NSRelativePosition.NSRelativeBefore NSRelativeBefore;
-
-public class NSRelativeSpecifier : NSScriptObjectSpecifier
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScriptObjectSpecifier baseSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_baseSpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public id initWithContainerClassDescription (NSScriptClassDescription classDesc, NSScriptObjectSpecifier container, NSString property,
-            NSRelativePosition relPos, NSScriptObjectSpecifier baseSpecifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_,
-                OS.sel_initWithContainerClassDescription_1containerSpecifier_1key_1relativePosition_1baseSpecifier_1,
-                classDesc !is null ? classDesc.id_ : null, container !is null ? container.id_ : null, property !is null ? property.id_ : null, relPos,
-                baseSpecifier !is null ? baseSpecifier.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSRelativePosition relativePosition ()
-    {
-        return cast(NSRelativePosition) OS.objc_msgSend(this.id_, OS.sel_relativePosition);
-    }
-
-    public void setBaseSpecifier (NSScriptObjectSpecifier baseSpecifier)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBaseSpecifier_1, baseSpecifier !is null ? baseSpecifier.id_ : null);
-    }
-
-    public void setRelativePosition (NSRelativePosition relPos)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRelativePosition_1, relPos);
-    }
-
-}
--- a/dwt/internal/cocoa/NSResponder.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSResponder.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,610 +1,150 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSResponder;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSError;
 import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSInterfaceStyle;
-import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSUndoManager;
-import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSResponder : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSResponder : NSObject {
 
-    public bool acceptsFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstResponder) !is null;
-    }
-
-    public bool becomeFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_becomeFirstResponder) !is null;
-    }
-
-    public void cancelOperation (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelOperation_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void capitalizeWord (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_capitalizeWord_1, sender !is null ? sender.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void centerSelectionInVisibleArea (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_centerSelectionInVisibleArea_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void changeCaseOfLetter (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_changeCaseOfLetter_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void complete (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_complete_1, sender !is null ? sender.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void cursorUpdate (NSEvent event)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cursorUpdate_1, event !is null ? event.id_ : null);
-    }
-
-    public void deleteBackward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteBackward_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deleteBackwardByDecomposingPreviousCharacter (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteBackwardByDecomposingPreviousCharacter_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deleteForward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteForward_1, sender !is null ? sender.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void deleteToBeginningOfLine (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteToBeginningOfLine_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deleteToBeginningOfParagraph (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteToBeginningOfParagraph_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deleteToEndOfLine (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteToEndOfLine_1, sender !is null ? sender.id_ : null);
-    }
+public bool acceptsFirstResponder() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_acceptsFirstResponder);
+}
 
-    public void deleteToEndOfParagraph (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteToEndOfParagraph_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deleteToMark (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteToMark_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deleteWordBackward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteWordBackward_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deleteWordForward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteWordForward_1, sender !is null ? sender.id_ : null);
-    }
+public bool becomeFirstResponder() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_becomeFirstResponder);
+}
 
-    public void doCommandBySelector (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_doCommandBySelector_1, aSelector);
-    }
-
-    public void flagsChanged (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_flagsChanged_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void flushBufferedKeyEvents ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_flushBufferedKeyEvents);
-    }
-
-    public void helpRequested (NSEvent eventPtr)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_helpRequested_1, eventPtr !is null ? eventPtr.id_ : null);
-    }
+public void doCommandBySelector(objc.SEL aSelector) {
+    OS.objc_msgSend(this.id, OS.sel_doCommandBySelector_, aSelector);
+}
 
-    public void indent (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_indent_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertBacktab (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertBacktab_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertContainerBreak (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertContainerBreak_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertLineBreak (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertLineBreak_1, sender !is null ? sender.id_ : null);
-    }
+public void flagsChanged(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_flagsChanged_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void insertNewline (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertNewline_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertNewlineIgnoringFieldEditor (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertNewlineIgnoringFieldEditor_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertParagraphSeparator (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertParagraphSeparator_1, sender !is null ? sender.id_ : null);
-    }
+public void helpRequested(NSEvent eventPtr) {
+    OS.objc_msgSend(this.id, OS.sel_helpRequested_, eventPtr !is null ? eventPtr.id : null);
+}
 
-    public void insertTab (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertTab_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertTabIgnoringFieldEditor (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertTabIgnoringFieldEditor_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertText (id insertString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertText_1, insertString !is null ? insertString.id_ : null);
-    }
-
-    public NSInterfaceStyle interfaceStyle ()
-    {
-        return cast(NSInterfaceStyle) OS.objc_msgSend(this.id_, OS.sel_interfaceStyle);
-    }
+public void insertText(cocoa.id insertString) {
+    OS.objc_msgSend(this.id, OS.sel_insertText_, insertString !is null ? insertString.id : null);
+}
 
-    public void interpretKeyEvents (NSArray eventArray)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_interpretKeyEvents_1, eventArray !is null ? eventArray.id_ : null);
-    }
-
-    public void keyDown (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_keyDown_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void keyUp (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_keyUp_1, theEvent !is null ? theEvent.id_ : null);
-    }
+public void interpretKeyEvents(NSArray eventArray) {
+    OS.objc_msgSend(this.id, OS.sel_interpretKeyEvents_, eventArray !is null ? eventArray.id : null);
+}
 
-    public void lowercaseWord (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_lowercaseWord_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSMenu menu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public void mouseDown (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseDown_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void mouseDragged (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseDragged_1, theEvent !is null ? theEvent.id_ : null);
-    }
+public void keyDown(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_keyDown_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void mouseEntered (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseEntered_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void mouseExited (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseExited_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void mouseMoved (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseMoved_1, theEvent !is null ? theEvent.id_ : null);
-    }
+public void keyUp(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_keyUp_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void mouseUp (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_mouseUp_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void moveBackward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveBackward_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveBackwardAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveBackwardAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveDown (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveDown_1, sender !is null ? sender.id_ : null);
-    }
+public void mouseDown(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_mouseDown_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void moveDownAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveDownAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveForward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveForward_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveForwardAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveForwardAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveLeft (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveLeft_1, sender !is null ? sender.id_ : null);
-    }
+public void mouseDragged(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_mouseDragged_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void moveLeftAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveLeftAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveRight (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveRight_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveRightAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveRightAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveToBeginningOfDocument (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveToBeginningOfDocument_1, sender !is null ? sender.id_ : null);
-    }
+public void mouseEntered(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_mouseEntered_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void moveToBeginningOfLine (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveToBeginningOfLine_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveToBeginningOfParagraph (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveToBeginningOfParagraph_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveToEndOfDocument (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveToEndOfDocument_1, sender !is null ? sender.id_ : null);
-    }
+public void mouseExited(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_mouseExited_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void moveToEndOfLine (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveToEndOfLine_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveToEndOfParagraph (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveToEndOfParagraph_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveUp (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveUp_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveUpAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveUpAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
+public void mouseMoved(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_mouseMoved_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void moveWordBackward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveWordBackward_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveWordBackwardAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveWordBackwardAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveWordForward (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveWordForward_1, sender !is null ? sender.id_ : null);
-    }
+public void mouseUp(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_mouseUp_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void moveWordForwardAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveWordForwardAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveWordLeft (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveWordLeft_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveWordLeftAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveWordLeftAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void moveWordRight (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveWordRight_1, sender !is null ? sender.id_ : null);
-    }
+public void moveToBeginningOfParagraph(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_moveToBeginningOfParagraph_, sender !is null ? sender.id : null);
+}
 
-    public void moveWordRightAndModifySelection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveWordRightAndModifySelection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSResponder nextResponder ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextResponder);
-        return result is this.id_ ? this : (result !is null ? new NSResponder(result) : null);
-    }
-
-    public void noResponderFor (objc.SEL eventSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noResponderFor_1, eventSelector);
-    }
+public void moveToEndOfParagraph(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_moveToEndOfParagraph_, sender !is null ? sender.id : null);
+}
 
-    public void otherMouseDown (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_otherMouseDown_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void otherMouseDragged (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_otherMouseDragged_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void otherMouseUp (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_otherMouseUp_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void pageDown (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_pageDown_1, sender !is null ? sender.id_ : null);
-    }
+public void moveUp(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_moveUp_, sender !is null ? sender.id : null);
+}
 
-    public void pageUp (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_pageUp_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool performKeyEquivalent (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_performKeyEquivalent_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public bool performMnemonic (NSString theString)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_performMnemonic_1, theString !is null ? theString.id_ : null) !is null;
-    }
+public void otherMouseDown(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_otherMouseDown_, theEvent !is null ? theEvent.id : null);
+}
 
-    public bool presentError_ (NSError error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_presentError_1, error !is null ? error.id_ : null) !is null;
-    }
-
-    public void presentError_modalForWindow_delegate_didPresentSelector_contextInfo_ (NSError error, NSWindow window, id delegatee,
-            objc.SEL didPresentSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_presentError_1modalForWindow_1delegate_1didPresentSelector_1contextInfo_1, error !is null ? error.id_ : null,
-                window !is null ? window.id_ : null, delegatee !is null ? delegatee.id_ : null, didPresentSelector, contextInfo);
-    }
-
-    public bool resignFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_resignFirstResponder) !is null;
-    }
-
-    public void rightMouseDown (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rightMouseDown_1, theEvent !is null ? theEvent.id_ : null);
-    }
+public void otherMouseDragged(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_otherMouseDragged_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void rightMouseDragged (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rightMouseDragged_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void rightMouseUp (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rightMouseUp_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void scrollLineDown (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollLineDown_1, sender !is null ? sender.id_ : null);
-    }
+public void otherMouseUp(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_otherMouseUp_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void scrollLineUp (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollLineUp_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void scrollPageDown (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollPageDown_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void scrollPageUp (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollPageUp_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void scrollWheel (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollWheel_1, theEvent !is null ? theEvent.id_ : null);
-    }
+public void pageDown(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_pageDown_, sender !is null ? sender.id : null);
+}
 
-    public void selectAll (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectAll_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectLine (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectLine_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectParagraph (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectParagraph_1, sender !is null ? sender.id_ : null);
-    }
+public void pageUp(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_pageUp_, sender !is null ? sender.id : null);
+}
 
-    public void selectToMark (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectToMark_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectWord (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectWord_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void setInterfaceStyle (NSInterfaceStyle interfaceStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInterfaceStyle_1, interfaceStyle);
-    }
-
-    public void setMark (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMark_1, sender !is null ? sender.id_ : null);
-    }
+public bool resignFirstResponder() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_resignFirstResponder);
+}
 
-    public void setMenu (NSMenu menu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1, menu !is null ? menu.id_ : null);
-    }
-
-    public void setNextResponder (NSResponder aResponder)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNextResponder_1, aResponder !is null ? aResponder.id_ : null);
-    }
-
-    public bool shouldBeTreatedAsInkEvent (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldBeTreatedAsInkEvent_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
+public void rightMouseDown(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_rightMouseDown_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void showContextHelp (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showContextHelp_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void swapWithMark (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_swapWithMark_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void tabletPoint (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_tabletPoint_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void tabletProximity (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_tabletProximity_1, theEvent !is null ? theEvent.id_ : null);
-    }
+public void rightMouseDragged(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_rightMouseDragged_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void transpose (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_transpose_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void transposeWords (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_transposeWords_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool tryToPerform (objc.SEL anAction, id anObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id_ : null) !is null;
-    }
-
-    public NSUndoManager undoManager ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_undoManager);
-        return result !is null ? new NSUndoManager(result) : null;
-    }
+public void rightMouseUp(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_rightMouseUp_, theEvent !is null ? theEvent.id : null);
+}
 
-    public void uppercaseWord (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_uppercaseWord_1, sender !is null ? sender.id_ : null);
-    }
-
-    public id validRequestorForSendType (NSString sendType, NSString returnType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id_ : null,
-                returnType !is null ? returnType.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSError willPresentError (NSError error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_willPresentError_1, error !is null ? error.id_ : null);
-        return result !is null ? new NSError(result) : null;
-    }
-
-    public void yank (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_yank_1, sender !is null ? sender.id_ : null);
-    }
+public void scrollWheel(NSEvent theEvent) {
+    OS.objc_msgSend(this.id, OS.sel_scrollWheel_, theEvent !is null ? theEvent.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSRuleEditor.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSRuleEditor;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSIndexSet;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSRuleEditorRowType : NSUInteger
-{
-    NSRuleEditorRowTypeSimple,
-    NSRuleEditorRowTypeCompound
-}
-
-alias NSRuleEditorRowType.NSRuleEditorRowTypeSimple NSRuleEditorRowTypeSimple;
-alias NSRuleEditorRowType.NSRuleEditorRowTypeCompound NSRuleEditorRowTypeCompound;
-
-enum NSRuleEditorNestingMode : NSUInteger
-{
-    NSRuleEditorNestingModeSingle,
-    NSRuleEditorNestingModeList,
-    NSRuleEditorNestingModeCompound,
-    NSRuleEditorNestingModeSimple
-}
-
-alias NSRuleEditorNestingMode.NSRuleEditorNestingModeSingle NSRuleEditorNestingModeSingle;
-alias NSRuleEditorNestingMode.NSRuleEditorNestingModeList NSRuleEditorNestingModeList;
-alias NSRuleEditorNestingMode.NSRuleEditorNestingModeCompound NSRuleEditorNestingModeCompound;
-alias NSRuleEditorNestingMode.NSRuleEditorNestingModeSimple NSRuleEditorNestingModeSimple;
-
-public class NSRuleEditor : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addRow (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addRow_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool canRemoveAllRows ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canRemoveAllRows) !is null;
-    }
-
-    public NSArray criteriaForRow (NSInteger row)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_criteriaForRow_1, row);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString criteriaKeyPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_criteriaKeyPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray displayValuesForRow (NSInteger row)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayValuesForRow_1, row);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString displayValuesKeyPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayValuesKeyPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary formattingDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_formattingDictionary);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString formattingStringsFilename ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_formattingStringsFilename);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void insertRowAtIndex (NSInteger rowIndex, NSRuleEditorRowType rowType, NSInteger parentRow, bool shouldAnimate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertRowAtIndex_1withType_1asSubrowOfRow_1animate_1, rowIndex, rowType, parentRow, shouldAnimate);
-    }
-
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
-
-    public NSRuleEditorNestingMode nestingMode ()
-    {
-        return cast(NSRuleEditorNestingMode) OS.objc_msgSend(this.id_, OS.sel_nestingMode);
-    }
-
-    public NSInteger numberOfRows ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfRows);
-    }
-
-    public NSInteger parentRowForRow (NSInteger rowIndex)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_parentRowForRow_1, rowIndex);
-    }
-
-    public NSPredicate predicate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_predicate);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public NSPredicate predicateForRow (NSInteger row)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_predicateForRow_1, row);
-        return result !is null ? new NSPredicate(result) : null;
-    }
-
-    public void reloadCriteria ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadCriteria);
-    }
-
-    public void reloadPredicate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadPredicate);
-    }
-
-    public void removeRowAtIndex (NSInteger rowIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeRowAtIndex_1, rowIndex);
-    }
-
-    public void removeRowsAtIndexes (NSIndexSet rowIndexes, bool includeSubrows)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeRowsAtIndexes_1includeSubrows_1, rowIndexes !is null ? rowIndexes.id_ : null, includeSubrows);
-    }
-
-    public objc.Class rowClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(this.id_, OS.sel_rowClass);
-    }
-
-    public NSInteger rowForDisplayValue (id displayValue)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_rowForDisplayValue_1, displayValue !is null ? displayValue.id_ : null);
-    }
-
-    public CGFloat rowHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_rowHeight);
-    }
-
-    public NSRuleEditorRowType rowTypeForRow (NSInteger rowIndex)
-    {
-        return cast(NSRuleEditorRowType) OS.objc_msgSend(this.id_, OS.sel_rowTypeForRow_1, rowIndex);
-    }
-
-    public NSString rowTypeKeyPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rowTypeKeyPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void selectRowIndexes (NSIndexSet indexes, bool extend)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectRowIndexes_1byExtendingSelection_1, indexes !is null ? indexes.id_ : null, extend);
-    }
-
-    public NSIndexSet selectedRowIndexes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedRowIndexes);
-        return result !is null ? new NSIndexSet(result) : null;
-    }
-
-    public void setCanRemoveAllRows (bool val)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanRemoveAllRows_1, val);
-    }
-
-    public void setCriteria (NSArray criteria, NSArray values, NSInteger rowIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCriteria_1andDisplayValues_1forRowAtIndex_1, criteria !is null ? criteria.id_ : null,
-                values !is null ? values.id_ : null, rowIndex);
-    }
-
-    public void setCriteriaKeyPath (NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCriteriaKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setDisplayValuesKeyPath (NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDisplayValuesKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void setEditable (bool editable)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, editable);
-    }
-
-    public void setFormattingDictionary (NSDictionary dictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFormattingDictionary_1, dictionary !is null ? dictionary.id_ : null);
-    }
-
-    public void setFormattingStringsFilename (NSString stringsFilename)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFormattingStringsFilename_1, stringsFilename !is null ? stringsFilename.id_ : null);
-    }
-
-    public void setNestingMode (NSRuleEditorNestingMode mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNestingMode_1, mode);
-    }
-
-    public void setRowClass (objc.Class rowClass)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRowClass_1, rowClass);
-    }
-
-    public void setRowHeight (CGFloat height)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRowHeight_1, height);
-    }
-
-    public void setRowTypeKeyPath (NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRowTypeKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void setSubrowsKeyPath (NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSubrowsKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public NSIndexSet subrowIndexesForRow (NSInteger rowIndex)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subrowIndexesForRow_1, rowIndex);
-        return result !is null ? new NSIndexSet(result) : null;
-    }
-
-    public NSString subrowsKeyPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subrowsKeyPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSRulerMarker.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSRulerMarker;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSRulerView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSRulerMarker : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void drawRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawRect_1, rect);
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSPoint imageOrigin ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_imageOrigin);
-        return result;
-    }
-
-    public NSRect imageRectInRuler ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_imageRectInRuler);
-        return result;
-    }
-
-    public id initWithRulerView (NSRulerView ruler, CGFloat location, NSImage image, NSPoint imageOrigin)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRulerView_1markerLocation_1image_1imageOrigin_1, ruler !is null ? ruler.id_ : null,
-                location, image !is null ? image.id_ : null, imageOrigin);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isDragging ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDragging) !is null;
-    }
-
-    public bool isMovable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMovable) !is null;
-    }
-
-    public bool isRemovable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRemovable) !is null;
-    }
-
-    public CGFloat markerLocation ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_markerLocation);
-    }
-
-    public id representedObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSRulerView ruler ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_ruler);
-        return result !is null ? new NSRulerView(result) : null;
-    }
-
-    public void setImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setImageOrigin (NSPoint imageOrigin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageOrigin_1, imageOrigin);
-    }
-
-    public void setMarkerLocation (CGFloat location)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMarkerLocation_1, location);
-    }
-
-    public void setMovable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMovable_1, flag);
-    }
-
-    public void setRemovable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRemovable_1, flag);
-    }
-
-    public void setRepresentedObject (id representedObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRepresentedObject_1, representedObject !is null ? representedObject.id_ : null);
-    }
-
-    public CGFloat thicknessRequiredInRuler ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_thicknessRequiredInRuler);
-    }
-
-    public bool trackMouse (NSEvent mouseDownEvent, bool isAdding)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_trackMouse_1adding_1, mouseDownEvent !is null ? mouseDownEvent.id_ : null, isAdding) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSRulerView.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSRulerView;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSRulerMarker;
-import dwt.internal.cocoa.NSScrollView;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSRulerOrientation
-{
-    NSHorizontalRuler,
-    NSVerticalRuler
-}
-
-alias NSRulerOrientation.NSHorizontalRuler NSHorizontalRuler;
-alias NSRulerOrientation.NSVerticalRuler NSVerticalRuler;
-
-public class NSRulerView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public void addMarker (NSRulerMarker marker)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addMarker_1, marker !is null ? marker.id_ : null);
-    }
-
-    public CGFloat baselineLocation ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_baselineLocation);
-    }
-
-    public NSView clientView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_clientView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public void drawHashMarksAndLabelsInRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawHashMarksAndLabelsInRect_1, rect);
-    }
-
-    public void drawMarkersInRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawMarkersInRect_1, rect);
-    }
-
-    public NSRulerView initWithScrollView (NSScrollView scrollView, NSRulerOrientation orientation)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithScrollView_1orientation_1, scrollView !is null ? scrollView.id_ : null, orientation);
-        return result !is null ? this : null;
-    }
-
-    public void invalidateHashMarks ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateHashMarks);
-    }
-
-    public bool isFlipped ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFlipped) !is null;
-    }
-
-    public NSArray markers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_markers);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString measurementUnits ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_measurementUnits);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void moveRulerlineFromLocation (CGFloat oldLocation, CGFloat newLocation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveRulerlineFromLocation_1toLocation_1, oldLocation, newLocation);
-    }
-
-    public NSRulerOrientation orientation ()
-    {
-        return cast(NSRulerOrientation) OS.objc_msgSend(this.id_, OS.sel_orientation);
-    }
-
-    public CGFloat originOffset ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_originOffset);
-    }
-
-    public static void registerUnitWithName (NSString unitName, NSString abbreviation, CGFloat conversionFactor, NSArray stepUpCycle,
-            NSArray stepDownCycle)
-    {
-        OS.objc_msgSend(OS.class_NSRulerView, OS.sel_registerUnitWithName_1abbreviation_1unitToPointsConversionFactor_1stepUpCycle_1stepDownCycle_1,
-                unitName !is null ? unitName.id_ : null, abbreviation !is null ? abbreviation.id_ : null, conversionFactor,
-                stepUpCycle !is null ? stepUpCycle.id_ : null, stepDownCycle !is null ? stepDownCycle.id_ : null);
-    }
-
-    public void removeMarker (NSRulerMarker marker)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeMarker_1, marker !is null ? marker.id_ : null);
-    }
-
-    public CGFloat requiredThickness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_requiredThickness);
-    }
-
-    public CGFloat reservedThicknessForAccessoryView ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_reservedThicknessForAccessoryView);
-    }
-
-    public CGFloat reservedThicknessForMarkers ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_reservedThicknessForMarkers);
-    }
-
-    public CGFloat ruleThickness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_ruleThickness);
-    }
-
-    public NSScrollView scrollView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_scrollView);
-        return result !is null ? new NSScrollView(result) : null;
-    }
-
-    public void setAccessoryView (NSView accessory)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, accessory !is null ? accessory.id_ : null);
-    }
-
-    public void setClientView (NSView client)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setClientView_1, client !is null ? client.id_ : null);
-    }
-
-    public void setMarkers (NSArray markers)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMarkers_1, markers !is null ? markers.id_ : null);
-    }
-
-    public void setMeasurementUnits (NSString unitName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMeasurementUnits_1, unitName !is null ? unitName.id_ : null);
-    }
-
-    public void setOrientation (NSRulerOrientation orientation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOrientation_1, orientation);
-    }
-
-    public void setOriginOffset (CGFloat offset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOriginOffset_1, offset);
-    }
-
-    public void setReservedThicknessForAccessoryView (CGFloat thickness)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReservedThicknessForAccessoryView_1, thickness);
-    }
-
-    public void setReservedThicknessForMarkers (CGFloat thickness)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReservedThicknessForMarkers_1, thickness);
-    }
-
-    public void setRuleThickness (CGFloat thickness)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRuleThickness_1, thickness);
-    }
-
-    public void setScrollView (NSScrollView scrollView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScrollView_1, scrollView !is null ? scrollView.id_ : null);
-    }
-
-    public bool trackMarker (NSRulerMarker marker, NSEvent event)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_trackMarker_1withMouseEvent_1, marker !is null ? marker.id_ : null, event !is null ? event.id_ : null) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSRunLoop.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSRunLoop.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,127 +1,52 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSRunLoop;
 
-import dwt.internal.cocoa.CFRunLoopRef;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPort;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTimer;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSRunLoop : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSRunLoop : NSObject {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void acceptInputForMode (NSString mode, NSDate limitDate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_acceptInputForMode_1beforeDate_1, mode !is null ? mode.id_ : null, limitDate !is null ? limitDate.id_ : null);
-    }
+public this() {
+    super();
+}
 
-    public void addPort (NSPort aPort, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addPort_1forMode_1, aPort !is null ? aPort.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void addTimer (NSTimer timer, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addTimer_1forMode_1, timer !is null ? timer.id_ : null, mode !is null ? mode.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void cancelPerformSelector (objc.SEL aSelector, id target, id arg)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelPerformSelector_1target_1argument_1, aSelector, target !is null ? target.id_ : null,
-                arg !is null ? arg.id_ : null);
-    }
-
-    public void cancelPerformSelectorsWithTarget (id target)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelPerformSelectorsWithTarget_1, target !is null ? target.id_ : null);
-    }
-
-    public void configureAsServer ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_configureAsServer);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSString currentMode ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentMode);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSRunLoop currentRunLoop ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSRunLoop, OS.sel_currentRunLoop);
-        return result !is null ? new NSRunLoop(result) : null;
-    }
-
-    public CFRunLoopRef getCFRunLoop ()
-    {
-        return cast(CFRunLoopRef) OS.objc_msgSend(this.id_, OS.sel_getCFRunLoop);
-    }
-
-    public NSDate limitDateForMode (NSString mode)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_limitDateForMode_1, mode !is null ? mode.id_ : null);
-        return result !is null ? new NSDate(result) : null;
-    }
+public static NSRunLoop currentRunLoop() {
+    objc.id result = OS.objc_msgSend(OS.class_NSRunLoop, OS.sel_currentRunLoop);
+    return result !is null ? new NSRunLoop(result) : null;
+}
 
-    public static NSRunLoop mainRunLoop ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSRunLoop, OS.sel_mainRunLoop);
-        return result !is null ? new NSRunLoop(result) : null;
-    }
-
-    public void performSelector (objc.SEL aSelector, id target, id arg, NSUInteger order, NSArray modes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performSelector_1target_1argument_1order_1modes_1, aSelector, target !is null ? target.id_ : null,
-                arg !is null ? arg.id_ : null, order, modes !is null ? modes.id_ : null);
-    }
+public static NSRunLoop mainRunLoop() {
+    objc.id result = OS.objc_msgSend(OS.class_NSRunLoop, OS.sel_mainRunLoop);
+    return result !is null ? new NSRunLoop(result) : null;
+}
 
-    public void removePort (NSPort aPort, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removePort_1forMode_1, aPort !is null ? aPort.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void run ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_run);
-    }
-
-    public bool runMode (NSString mode, NSDate limitDate)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_runMode_1beforeDate_1, mode !is null ? mode.id_ : null, limitDate !is null ? limitDate.id_ : null) !is null;
-    }
-
-    public void runUntilDate (NSDate limitDate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runUntilDate_1, limitDate !is null ? limitDate.id_ : null);
-    }
+public bool runMode(NSString mode, NSDate limitDate) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_runMode_beforeDate_, mode !is null ? mode.id : null, limitDate !is null ? limitDate.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSSavePanel.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSSavePanel.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,249 +1,60 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSSavePanel;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSPanel;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSSavePanel : NSPanel
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSURL URL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
+public class NSSavePanel : NSPanel {
 
-    public NSArray allowedFileTypes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allowedFileTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool allowsOtherFileTypes ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsOtherFileTypes) !is null;
-    }
-
-    public void beginSheetForDirectory (NSString path, NSString name, NSWindow docWindow, id delegatee, objc.SEL didEndSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginSheetForDirectory_1file_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1,
-                path !is null ? path.id_ : null, name !is null ? name.id_ : null, docWindow !is null ? docWindow.id_ : null,
-                delegatee !is null ? delegatee.id_ : null, didEndSelector, contextInfo);
-    }
-
-    public bool canCreateDirectories ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canCreateDirectories) !is null;
-    }
-
-    public bool canSelectHiddenExtension ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canSelectHiddenExtension) !is null;
-    }
+public this() {
+    super();
+}
 
-    public void cancel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString directory ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_directory);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString filename ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_filename);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool isExpanded ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isExpanded) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool isExtensionHidden ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isExtensionHidden) !is null;
-    }
-
-    public NSString message ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_message);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString nameFieldLabel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nameFieldLabel);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void ok (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ok_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSString prompt ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_prompt);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSString requiredFileType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_requiredFileType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSInteger runModal ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModal);
-    }
-
-    public NSInteger runModalForDirectory (NSString path, NSString name)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_runModalForDirectory_1file_1, path !is null ? path.id_ : null, name !is null ? name.id_ : null);
-    }
-
-    public static NSSavePanel savePanel ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSavePanel, OS.sel_savePanel);
-        return result !is null ? new NSSavePanel(result) : null;
-    }
+public NSString filename() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_filename);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public void selectText (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectText_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void setAccessoryView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, view !is null ? view.id_ : null);
-    }
-
-    public void setAllowedFileTypes (NSArray types)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowedFileTypes_1, types !is null ? types.id_ : null);
-    }
-
-    public void setAllowsOtherFileTypes (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsOtherFileTypes_1, flag);
-    }
-
-    public void setCanCreateDirectories (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanCreateDirectories_1, flag);
-    }
-
-    public void setCanSelectHiddenExtension (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanSelectHiddenExtension_1, flag);
-    }
+public NSInteger runModal() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_runModal);
+}
 
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setDirectory (NSString path)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDirectory_1, path !is null ? path.id_ : null);
-    }
-
-    public void setExtensionHidden (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setExtensionHidden_1, flag);
-    }
-
-    public void setMessage (NSString message)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMessage_1, message !is null ? message.id_ : null);
-    }
-
-    public void setNameFieldLabel (NSString label)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNameFieldLabel_1, label !is null ? label.id_ : null);
-    }
-
-    public void setPrompt (NSString prompt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPrompt_1, prompt !is null ? prompt.id_ : null);
-    }
+public static NSSavePanel savePanel() {
+    objc.id result = OS.objc_msgSend(OS.class_NSSavePanel, OS.sel_savePanel);
+    return result !is null ? new NSSavePanel(result) : null;
+}
 
-    public void setRequiredFileType (NSString type)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRequiredFileType_1, type !is null ? type.id_ : null);
-    }
-
-    public void setTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void setTreatsFilePackagesAsDirectories (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTreatsFilePackagesAsDirectories_1, flag);
-    }
+public void setDirectory(NSString path) {
+    OS.objc_msgSend(this.id, OS.sel_setDirectory_, path !is null ? path.id : null);
+}
 
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool treatsFilePackagesAsDirectories ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_treatsFilePackagesAsDirectories) !is null;
-    }
-
-    public void validateVisibleColumns ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_validateVisibleColumns);
-    }
+public void setTitle(NSString title) {
+    OS.objc_msgSend(this.id, OS.sel_setTitle_, title !is null ? title.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSScanner.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScanner;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSCharacterSet;
-import dwt.internal.cocoa.NSDecimal;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScanner : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool caseSensitive ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_caseSensitive) !is null;
-    }
-
-    public NSCharacterSet charactersToBeSkipped ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_charactersToBeSkipped);
-        return result !is null ? new NSCharacterSet(result) : null;
-    }
-
-    public NSScanner initWithString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, string !is null ? string.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public bool isAtEnd ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAtEnd) !is null;
-    }
-
-    public id locale ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_locale);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id localizedScannerWithString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScanner, OS.sel_localizedScannerWithString_1, string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool scanCharactersFromSet (NSCharacterSet set, objc.id** value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanCharactersFromSet_1intoString_1, set !is null ? set.id_ : null, value) !is null;
-    }
-
-    public bool scanDecimal (NSDecimal* dcm)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanDecimal_1, dcm) !is null;
-    }
-
-    public bool scanDouble (double* value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanDouble_1, value) !is null;
-    }
-
-    public bool scanFloat (float* value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanFloat_1, value) !is null;
-    }
-
-    public bool scanHexDouble (objc.id result)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanHexDouble_1, result) !is null;
-    }
-
-    public bool scanHexFloat (objc.id result)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanHexFloat_1, result) !is null;
-    }
-
-    public bool scanHexInt (uint* value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanHexInt_1, value) !is null;
-    }
-
-    public bool scanHexLongLong (objc.id result)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanHexLongLong_1, result) !is null;
-    }
-
-    public bool scanInt (int* value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanInt_1, value) !is null;
-    }
-
-    public bool scanInteger (NSInteger* value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanInteger_1, value) !is null;
-    }
-
-    public NSUInteger scanLocation ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_scanLocation);
-    }
-
-    public bool scanLongLong (long* value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanLongLong_1, value) !is null;
-    }
-
-    public bool scanString (NSString string, objc.id** value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanString_1intoString_1, string !is null ? string.id_ : null, value) !is null;
-    }
-
-    public bool scanUpToCharactersFromSet (NSCharacterSet set, objc.id** value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanUpToCharactersFromSet_1intoString_1, set !is null ? set.id_ : null, value) !is null;
-    }
-
-    public bool scanUpToString (NSString string, objc.id** value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scanUpToString_1intoString_1, string !is null ? string.id_ : null, value) !is null;
-    }
-
-    public static id scannerWithString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScanner, OS.sel_scannerWithString_1, string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setCaseSensitive (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCaseSensitive_1, flag);
-    }
-
-    public void setCharactersToBeSkipped (NSCharacterSet set)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCharactersToBeSkipped_1, set !is null ? set.id_ : null);
-    }
-
-    public void setLocale (id locale)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocale_1, locale !is null ? locale.id_ : null);
-    }
-
-    public void setScanLocation (NSUInteger pos)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScanLocation_1, pos);
-    }
-
-    public NSString string ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_string);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSScreen.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSScreen.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,91 +1,71 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSScreen;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSDictionary;
+import dwt.internal.cocoa.NSGraphics;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSWindow : NSWindowDepth;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSScreen : NSObject
-{
+public class NSScreen : NSObject {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public static NSScreen deepestScreen ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_deepestScreen);
-        return result !is null ? new NSScreen(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSWindowDepth depth ()
-    {
-        return cast(NSWindowDepth) OS.objc_msgSend(this.id_, OS.sel_depth);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSDictionary deviceDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_deviceDescription);
-        return result !is null ? new NSDictionary(result) : null;
-    }
+public NSWindowDepth depth() {
+    return cast(NSWindowDepth)/*64*/OS.objc_msgSend(this.id, OS.sel_depth);
+}
 
-    public NSRect frame ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_frame);
-        return result;
-    }
+public NSDictionary deviceDescription() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_deviceDescription);
+    return result !is null ? new NSDictionary(result) : null;
+}
 
-    public static NSScreen mainScreen ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_mainScreen);
-        return result !is null ? new NSScreen(result) : null;
-    }
+public NSRect frame() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_frame);
+    return result;
+}
 
-    public static NSArray screens ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_screens);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public /*const*/NSWindowDepth* supportedWindowDepths ()
-    {
-        return cast(/*const*/NSWindowDepth*)OS.objc_msgSend(this.id_, OS.sel_supportedWindowDepths);
-    }
+public static NSScreen mainScreen() {
+    objc.id result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_mainScreen);
+    return result !is null ? new NSScreen(result) : null;
+}
 
-    public CGFloat userSpaceScaleFactor ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_userSpaceScaleFactor);
-    }
+public static NSArray screens() {
+    objc.id result = OS.objc_msgSend(OS.class_NSScreen, OS.sel_screens);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public NSRect visibleFrame ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_visibleFrame);
-        return result;
-    }
+public NSRect visibleFrame() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_visibleFrame);
+    return result;
+}
 
 }
--- a/dwt/internal/cocoa/NSScriptClassDescription.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScriptClassDescription;
-
-import dwt.internal.c.carboncore.MacTypes : FourCharCode;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSClassDescription;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSScriptCommandDescription;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScriptClassDescription : NSClassDescription
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public FourCharCode appleEventCode ()
-    {
-        return cast(FourCharCode) OS.objc_msgSend(this.id_, OS.sel_appleEventCode);
-    }
-
-    public FourCharCode appleEventCodeForKey (NSString key)
-    {
-        return cast(FourCharCode) OS.objc_msgSend(this.id_, OS.sel_appleEventCodeForKey_1, key !is null ? key.id_ : null);
-    }
-
-    //public static NSScriptClassDescription classDescriptionForClass(int aClass) {
-    //  objc.id result = OS.objc_msgSend(OS.class_NSScriptClassDescription, OS.sel_classDescriptionForClass_1, aClass);
-    //  return result !is null ? new NSScriptClassDescription(result) : null;
-    //}
-
-    public NSScriptClassDescription classDescriptionForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_classDescriptionForKey_1, key !is null ? key.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSScriptClassDescription(result) : null);
-    }
-
-    public NSString className ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_className);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString defaultSubcontainerAttributeKey ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaultSubcontainerAttributeKey);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool hasOrderedToManyRelationshipForKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasOrderedToManyRelationshipForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public bool hasPropertyForKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasPropertyForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public bool hasReadablePropertyForKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasReadablePropertyForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public bool hasWritablePropertyForKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasWritablePropertyForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public NSString implementationClassName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_implementationClassName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initWithSuiteName (NSString suiteName, NSString className, NSDictionary classDeclaration)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSuiteName_1className_1dictionary_1, suiteName !is null ? suiteName.id_ : null,
-                className !is null ? className.id_ : null, classDeclaration !is null ? classDeclaration.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isLocationRequiredToCreateForKey (NSString toManyRelationshipKey)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLocationRequiredToCreateForKey_1, toManyRelationshipKey !is null ? toManyRelationshipKey.id_ : null) !is null;
-    }
-
-    public bool isReadOnlyKey (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isReadOnlyKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public NSString keyWithAppleEventCode (FourCharCode appleEventCode)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyWithAppleEventCode_1, appleEventCode);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool matchesAppleEventCode (FourCharCode appleEventCode)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_matchesAppleEventCode_1, appleEventCode) !is null;
-    }
-
-    public objc.SEL selectorForCommand (NSScriptCommandDescription commandDescription)
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_selectorForCommand_1, commandDescription !is null ? commandDescription.id_ : null);
-    }
-
-    public NSString suiteName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_suiteName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSScriptClassDescription superclassDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_superclassDescription);
-        return result is this.id_ ? this : (result !is null ? new NSScriptClassDescription(result) : null);
-    }
-
-    public bool supportsCommand (NSScriptCommandDescription commandDescription)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_supportsCommand_1, commandDescription !is null ? commandDescription.id_ : null) !is null;
-    }
-
-    public NSString typeForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typeForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSScriptCoercionHandler.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScriptCoercionHandler;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScriptCoercionHandler : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id coerceValue (id value, objc.Class toClass)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_coerceValue_1toClass_1, value !is null ? value.id_ : null, toClass);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void registerCoercer (id coercer, objc.SEL selector, objc.Class fromClass, objc.Class toClass)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_registerCoercer_1selector_1toConvertFromClass_1toClass_1, coercer !is null ? coercer.id_ : null, selector,
-                fromClass, toClass);
-    }
-
-    public static NSScriptCoercionHandler sharedCoercionHandler ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScriptCoercionHandler, OS.sel_sharedCoercionHandler);
-        return result !is null ? new NSScriptCoercionHandler(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSScriptCommand.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScriptCommand;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAppleEventDescriptor;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSScriptCommandDescription;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScriptCommand : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSAppleEventDescriptor appleEvent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_appleEvent);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public NSDictionary arguments ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arguments);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSScriptCommandDescription commandDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_commandDescription);
-        return result !is null ? new NSScriptCommandDescription(result) : null;
-    }
-
-    public static NSScriptCommand currentCommand ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScriptCommand, OS.sel_currentCommand);
-        return result !is null ? new NSScriptCommand(result) : null;
-    }
-
-    public id directParameter ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_directParameter);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary evaluatedArguments ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_evaluatedArguments);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public id evaluatedReceivers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_evaluatedReceivers);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id executeCommand ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_executeCommand);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithCommandDescription (NSScriptCommandDescription commandDef)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCommandDescription_1, commandDef !is null ? commandDef.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isWellFormed ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isWellFormed) !is null;
-    }
-
-    public id performDefaultImplementation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_performDefaultImplementation);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSScriptObjectSpecifier receiversSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_receiversSpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public void resumeExecutionWithResult (id result)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resumeExecutionWithResult_1, result !is null ? result.id_ : null);
-    }
-
-    public NSAppleEventDescriptor scriptErrorExpectedTypeDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_scriptErrorExpectedTypeDescriptor);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public int scriptErrorNumber ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_scriptErrorNumber);
-    }
-
-    public NSAppleEventDescriptor scriptErrorOffendingObjectDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_scriptErrorOffendingObjectDescriptor);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public NSString scriptErrorString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_scriptErrorString);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setArguments (NSDictionary args)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setArguments_1, args !is null ? args.id_ : null);
-    }
-
-    public void setDirectParameter (id directParameter)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDirectParameter_1, directParameter !is null ? directParameter.id_ : null);
-    }
-
-    public void setReceiversSpecifier (NSScriptObjectSpecifier receiversRef)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReceiversSpecifier_1, receiversRef !is null ? receiversRef.id_ : null);
-    }
-
-    public void setScriptErrorExpectedTypeDescriptor (NSAppleEventDescriptor errorExpectedTypeDescriptor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScriptErrorExpectedTypeDescriptor_1,
-                errorExpectedTypeDescriptor !is null ? errorExpectedTypeDescriptor.id_ : null);
-    }
-
-    public void setScriptErrorNumber (int errorNumber)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScriptErrorNumber_1, errorNumber);
-    }
-
-    public void setScriptErrorOffendingObjectDescriptor (NSAppleEventDescriptor errorOffendingObjectDescriptor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScriptErrorOffendingObjectDescriptor_1,
-                errorOffendingObjectDescriptor !is null ? errorOffendingObjectDescriptor.id_ : null);
-    }
-
-    public void setScriptErrorString (NSString errorString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScriptErrorString_1, errorString !is null ? errorString.id_ : null);
-    }
-
-    public void suspendExecution ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_suspendExecution);
-    }
-
-}
--- a/dwt/internal/cocoa/NSScriptCommandDescription.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScriptCommandDescription;
-
-import dwt.internal.c.carboncore.MacTypes : FourCharCode;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSZone;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScriptCommandDescription : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public FourCharCode appleEventClassCode ()
-    {
-        return cast(FourCharCode) OS.objc_msgSend(this.id_, OS.sel_appleEventClassCode);
-    }
-
-    public FourCharCode appleEventCode ()
-    {
-        return cast(FourCharCode) OS.objc_msgSend(this.id_, OS.sel_appleEventCode);
-    }
-
-    public FourCharCode appleEventCodeForArgumentWithName (NSString argumentName)
-    {
-        return cast(FourCharCode) OS.objc_msgSend(this.id_, OS.sel_appleEventCodeForArgumentWithName_1, argumentName !is null ? argumentName.id_ : null);
-    }
-
-    public FourCharCode appleEventCodeForReturnType ()
-    {
-        return cast(FourCharCode) OS.objc_msgSend(this.id_, OS.sel_appleEventCodeForReturnType);
-    }
-
-    public NSArray argumentNames ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_argumentNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString commandClassName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_commandClassName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString commandName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_commandName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSScriptCommand createCommandInstance ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_createCommandInstance);
-        return result !is null ? new NSScriptCommand(result) : null;
-    }
-
-    public NSScriptCommand createCommandInstanceWithZone (NSZone* zone)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_createCommandInstanceWithZone_1, zone);
-        return result !is null ? new NSScriptCommand(result) : null;
-    }
-
-    public id initWithSuiteName (NSString suiteName, NSString commandName, NSDictionary commandDeclaration)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSuiteName_1commandName_1dictionary_1, suiteName !is null ? suiteName.id_ : null,
-                commandName !is null ? commandName.id_ : null, commandDeclaration !is null ? commandDeclaration.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isOptionalArgumentWithName (NSString argumentName)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOptionalArgumentWithName_1, argumentName !is null ? argumentName.id_ : null) !is null;
-    }
-
-    public NSString returnType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_returnType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString suiteName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_suiteName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString typeForArgumentWithName (NSString argumentName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typeForArgumentWithName_1, argumentName !is null ? argumentName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSScriptExecutionContext.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScriptExecutionContext;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScriptExecutionContext : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id objectBeingTested ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectBeingTested);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id rangeContainerObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rangeContainerObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setObjectBeingTested (id obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectBeingTested_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setRangeContainerObject (id obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRangeContainerObject_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setTopLevelObject (id obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTopLevelObject_1, obj !is null ? obj.id_ : null);
-    }
-
-    public static NSScriptExecutionContext sharedScriptExecutionContext ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScriptExecutionContext, OS.sel_sharedScriptExecutionContext);
-        return result !is null ? new NSScriptExecutionContext(result) : null;
-    }
-
-    public id topLevelObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_topLevelObject);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSScriptObjectSpecifier.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScriptObjectSpecifier;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAppleEventDescriptor;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScriptObjectSpecifier : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScriptObjectSpecifier childSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_childSpecifier);
-        return result is this.id_ ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
-    }
-
-    public NSScriptClassDescription containerClassDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_containerClassDescription);
-        return result !is null ? new NSScriptClassDescription(result) : null;
-    }
-
-    public bool containerIsObjectBeingTested ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containerIsObjectBeingTested) !is null;
-    }
-
-    public bool containerIsRangeContainerObject ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containerIsRangeContainerObject) !is null;
-    }
-
-    public NSScriptObjectSpecifier containerSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_containerSpecifier);
-        return result is this.id_ ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
-    }
-
-    public NSAppleEventDescriptor descriptor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptor);
-        return result !is null ? new NSAppleEventDescriptor(result) : null;
-    }
-
-    public NSInteger evaluationErrorNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_evaluationErrorNumber);
-    }
-
-    public NSScriptObjectSpecifier evaluationErrorSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_evaluationErrorSpecifier);
-        return result is this.id_ ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
-    }
-
-    public NSInteger* indicesOfObjectsByEvaluatingWithContainer (id container, NSInteger* count)
-    {
-        return cast(NSInteger*) OS.objc_msgSend(this.id_, OS.sel_indicesOfObjectsByEvaluatingWithContainer_1count_1, container !is null ? container.id_ : null, count);
-    }
-
-    public id initWithContainerClassDescription (NSScriptClassDescription classDesc, NSScriptObjectSpecifier container, NSString property)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContainerClassDescription_1containerSpecifier_1key_1,
-                classDesc !is null ? classDesc.id_ : null, container !is null ? container.id_ : null, property !is null ? property.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithContainerSpecifier (NSScriptObjectSpecifier container, NSString property)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContainerSpecifier_1key_1, container !is null ? container.id_ : null,
-                property !is null ? property.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString key ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_key);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSScriptClassDescription keyClassDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keyClassDescription);
-        return result !is null ? new NSScriptClassDescription(result) : null;
-    }
-
-    public static NSScriptObjectSpecifier objectSpecifierWithDescriptor (NSAppleEventDescriptor descriptor)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScriptObjectSpecifier, OS.sel_objectSpecifierWithDescriptor_1,
-                descriptor !is null ? descriptor.id_ : null);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public id objectsByEvaluatingSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectsByEvaluatingSpecifier);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id objectsByEvaluatingWithContainers (id containers)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectsByEvaluatingWithContainers_1, containers !is null ? containers.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setChildSpecifier (NSScriptObjectSpecifier child)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setChildSpecifier_1, child !is null ? child.id_ : null);
-    }
-
-    public void setContainerClassDescription (NSScriptClassDescription classDesc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContainerClassDescription_1, classDesc !is null ? classDesc.id_ : null);
-    }
-
-    public void setContainerIsObjectBeingTested (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContainerIsObjectBeingTested_1, flag);
-    }
-
-    public void setContainerIsRangeContainerObject (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContainerIsRangeContainerObject_1, flag);
-    }
-
-    public void setContainerSpecifier (NSScriptObjectSpecifier subRef)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContainerSpecifier_1, subRef !is null ? subRef.id_ : null);
-    }
-
-    public void setEvaluationErrorNumber (NSInteger error)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEvaluationErrorNumber_1, error);
-    }
-
-    public void setKey (NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKey_1, key !is null ? key.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSScriptSuiteRegistry.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScriptSuiteRegistry;
-
-import dwt.internal.c.carboncore.MacTypes : FourCharCode;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSBundle;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptCommandDescription;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScriptSuiteRegistry : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData aeteResource (NSString languageName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_aeteResource_1, languageName !is null ? languageName.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public FourCharCode appleEventCodeForSuite (NSString suiteName)
-    {
-        return cast(FourCharCode) OS.objc_msgSend(this.id_, OS.sel_appleEventCodeForSuite_1, suiteName !is null ? suiteName.id_ : null);
-    }
-
-    public NSBundle bundleForSuite (NSString suiteName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_bundleForSuite_1, suiteName !is null ? suiteName.id_ : null);
-        return result !is null ? new NSBundle(result) : null;
-    }
-
-    public NSScriptClassDescription classDescriptionWithAppleEventCode (FourCharCode appleEventCode)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_classDescriptionWithAppleEventCode_1, appleEventCode);
-        return result !is null ? new NSScriptClassDescription(result) : null;
-    }
-
-    public NSDictionary classDescriptionsInSuite (NSString suiteName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_classDescriptionsInSuite_1, suiteName !is null ? suiteName.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSScriptCommandDescription commandDescriptionWithAppleEventClass (FourCharCode appleEventClassCode, FourCharCode appleEventIDCode)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_commandDescriptionWithAppleEventClass_1andAppleEventCode_1, appleEventClassCode,
-                appleEventIDCode);
-        return result !is null ? new NSScriptCommandDescription(result) : null;
-    }
-
-    public NSDictionary commandDescriptionsInSuite (NSString suiteName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_commandDescriptionsInSuite_1, suiteName !is null ? suiteName.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void loadSuiteWithDictionary (NSDictionary suiteDeclaration, NSBundle bundle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_loadSuiteWithDictionary_1fromBundle_1, suiteDeclaration !is null ? suiteDeclaration.id_ : null,
-                bundle !is null ? bundle.id_ : null);
-    }
-
-    public void loadSuitesFromBundle (NSBundle bundle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_loadSuitesFromBundle_1, bundle !is null ? bundle.id_ : null);
-    }
-
-    public void registerClassDescription (NSScriptClassDescription classDescription)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_registerClassDescription_1, classDescription !is null ? classDescription.id_ : null);
-    }
-
-    public void registerCommandDescription (NSScriptCommandDescription commandDescription)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_registerCommandDescription_1, commandDescription !is null ? commandDescription.id_ : null);
-    }
-
-    public static void setSharedScriptSuiteRegistry (NSScriptSuiteRegistry registry)
-    {
-        OS.objc_msgSend(OS.class_NSScriptSuiteRegistry, OS.sel_setSharedScriptSuiteRegistry_1, registry !is null ? registry.id_ : null);
-    }
-
-    public static NSScriptSuiteRegistry sharedScriptSuiteRegistry ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSScriptSuiteRegistry, OS.sel_sharedScriptSuiteRegistry);
-        return result !is null ? new NSScriptSuiteRegistry(result) : null;
-    }
-
-    public NSString suiteForAppleEventCode (FourCharCode appleEventCode)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_suiteForAppleEventCode_1, appleEventCode);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray suiteNames ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_suiteNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSScriptWhoseTest.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSScriptWhoseTest;
-
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSScriptWhoseTest : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool isTrue ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isTrue) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSScrollView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSScrollView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,336 +1,110 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSScrollView;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.CGFloat;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSClipView;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSCursor;
-import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSRulerView;
 import dwt.internal.cocoa.NSScroller;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSScrollView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool autohidesScrollers ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autohidesScrollers) !is null;
-    }
+public class NSScrollView : NSView {
 
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSBorderType borderType ()
-    {
-        return cast(NSBorderType) OS.objc_msgSend(this.id_, OS.sel_borderType);
-    }
-
-    public NSSize contentSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_contentSize);
-        return result;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public static NSSize contentSizeForFrameSize (NSSize fSize, bool hFlag, bool vFlag, NSBorderType aType)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, OS.class_NSScrollView,
-                OS.sel_contentSizeForFrameSize_1hasHorizontalScroller_1hasVerticalScroller_1borderType_1, fSize, hFlag, vFlag, aType);
-        return result;
-    }
-
-    public NSClipView contentView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentView);
-        return result !is null ? new NSClipView(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSCursor documentCursor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documentCursor);
-        return result !is null ? new NSCursor(result) : null;
-    }
-
-    public id documentView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_documentView);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSRect documentVisibleRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_documentVisibleRect);
-        return result;
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
+public NSSize contentSize() {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_contentSize);
+    return result;
+}
 
-    public static NSSize frameSizeForContentSize (NSSize cSize, bool hFlag, bool vFlag, NSBorderType aType)
-    {
-        NSSize result;
-        OS.objc_msgSend_struct(&result, OS.class_NSScrollView,
-                OS.sel_frameSizeForContentSize_1hasHorizontalScroller_1hasVerticalScroller_1borderType_1, &cSize, hFlag, vFlag, aType);
-        return result;
-    }
-
-    public bool hasHorizontalRuler ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasHorizontalRuler) !is null;
-    }
+public static NSSize contentSizeForFrameSize(NSSize fSize, bool hFlag, bool vFlag, NSBorderType aType) {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, OS.class_NSScrollView, OS.sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_, fSize, hFlag, vFlag, aType);
+    return result;
+}
 
-    public bool hasHorizontalScroller ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasHorizontalScroller) !is null;
-    }
-
-    public bool hasVerticalRuler ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasVerticalRuler) !is null;
-    }
-
-    public bool hasVerticalScroller ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasVerticalScroller) !is null;
-    }
-
-    public CGFloat horizontalLineScroll ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_horizontalLineScroll);
-    }
+public NSClipView contentView() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_contentView);
+    return result !is null ? new NSClipView(result) : null;
+}
 
-    public CGFloat horizontalPageScroll ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_horizontalPageScroll);
-    }
-
-    public NSRulerView horizontalRulerView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_horizontalRulerView);
-        return result !is null ? new NSRulerView(result) : null;
-    }
-
-    public NSScroller horizontalScroller ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_horizontalScroller);
-        return result !is null ? new NSScroller(result) : null;
-    }
+public NSView documentView() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_documentView);
+    return result !is null ? new NSView(result) : null;
+}
 
-    public CGFloat lineScroll ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineScroll);
-    }
-
-    public CGFloat pageScroll ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_pageScroll);
-    }
-
-    public void reflectScrolledClipView (NSClipView cView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reflectScrolledClipView_1, cView !is null ? cView.id_ : null);
-    }
-
-    public static objc.Class rulerViewClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSScrollView, OS.sel_rulerViewClass);
-    }
-
-    public bool rulersVisible ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_rulersVisible) !is null;
-    }
+public NSRect documentVisibleRect() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_documentVisibleRect);
+    return result;
+}
 
-    public void scrollWheel (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollWheel_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public bool scrollsDynamically ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scrollsDynamically) !is null;
-    }
-
-    public void setAutohidesScrollers (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutohidesScrollers_1, flag);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setBorderType (NSBorderType aType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBorderType_1, aType);
-    }
-
-    public void setContentView (NSClipView contentView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentView_1, contentView !is null ? contentView.id_ : null);
-    }
-
-    public void setDocumentCursor (NSCursor anObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDocumentCursor_1, anObj !is null ? anObj.id_ : null);
-    }
+public static NSSize frameSizeForContentSize(NSSize cSize, bool hFlag, bool vFlag, NSBorderType aType) {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, OS.class_NSScrollView, OS.sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_, cSize, hFlag, vFlag, aType);
+    return result;
+}
 
-    public void setDocumentView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDocumentView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
-
-    public void setHasHorizontalRuler (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasHorizontalRuler_1, flag);
-    }
-
-    public void setHasHorizontalScroller (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasHorizontalScroller_1, flag);
-    }
+public void reflectScrolledClipView(NSClipView cView) {
+    OS.objc_msgSend(this.id, OS.sel_reflectScrolledClipView_, cView !is null ? cView.id : null);
+}
 
-    public void setHasVerticalRuler (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasVerticalRuler_1, flag);
-    }
-
-    public void setHasVerticalScroller (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasVerticalScroller_1, flag);
-    }
+public void setAutohidesScrollers(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAutohidesScrollers_, flag);
+}
 
-    public void setHorizontalLineScroll (CGFloat value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontalLineScroll_1, value);
-    }
-
-    public void setHorizontalPageScroll (CGFloat value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontalPageScroll_1, value);
-    }
+public void setBorderType(NSBorderType aType) {
+    OS.objc_msgSend(this.id, OS.sel_setBorderType_, aType);
+}
 
-    public void setHorizontalRulerView (NSRulerView ruler)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontalRulerView_1, ruler !is null ? ruler.id_ : null);
-    }
-
-    public void setHorizontalScroller (NSScroller anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontalScroller_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setLineScroll (CGFloat value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineScroll_1, value);
-    }
-
-    public void setPageScroll (CGFloat value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPageScroll_1, value);
-    }
+public void setDocumentView(NSView aView) {
+    OS.objc_msgSend(this.id, OS.sel_setDocumentView_, aView !is null ? aView.id : null);
+}
 
-    public static void setRulerViewClass (objc.Class rulerViewClass)
-    {
-        OS.objc_msgSend(OS.class_NSScrollView, OS.sel_setRulerViewClass_1, rulerViewClass);
-    }
-
-    public void setRulersVisible (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRulersVisible_1, flag);
-    }
+public void setDrawsBackground(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_, flag);
+}
 
-    public void setScrollsDynamically (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setScrollsDynamically_1, flag);
-    }
-
-    public void setVerticalLineScroll (CGFloat value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticalLineScroll_1, value);
-    }
+public void setHasHorizontalScroller(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setHasHorizontalScroller_, flag);
+}
 
-    public void setVerticalPageScroll (CGFloat value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticalPageScroll_1, value);
-    }
-
-    public void setVerticalRulerView (NSRulerView ruler)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticalRulerView_1, ruler !is null ? ruler.id_ : null);
-    }
-
-    public void setVerticalScroller (NSScroller anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticalScroller_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void tile ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_tile);
-    }
+public void setHasVerticalScroller(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setHasVerticalScroller_, flag);
+}
 
-    public CGFloat verticalLineScroll ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_verticalLineScroll);
-    }
-
-    public CGFloat verticalPageScroll ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_verticalPageScroll);
-    }
+public void setHorizontalScroller(NSScroller anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setHorizontalScroller_, anObject !is null ? anObject.id : null);
+}
 
-    public NSRulerView verticalRulerView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_verticalRulerView);
-        return result !is null ? new NSRulerView(result) : null;
-    }
-
-    public NSScroller verticalScroller ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_verticalScroller);
-        return result !is null ? new NSScroller(result) : null;
-    }
+public void setVerticalScroller(NSScroller anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setVerticalScroller_, anObject !is null ? anObject.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSScroller.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSScroller.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,56 +1,26 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSScroller;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSCell : NSControlSize, NSControlTint;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-
-
-enum NSScrollArrowPosition
-{
-    NSScrollerArrowsMaxEnd = 0,
-    NSScrollerArrowsMinEnd = 1,
-    NSScrollerArrowsDefaultSetting = 0,
-    NSScrollerArrowsNone = 2
-}
-
-alias NSScrollArrowPosition.NSScrollerArrowsMaxEnd NSScrollerArrowsMaxEnd;
-alias NSScrollArrowPosition.NSScrollerArrowsMinEnd NSScrollerArrowsMinEnd;
-alias NSScrollArrowPosition.NSScrollerArrowsDefaultSetting NSScrollerArrowsDefaultSetting;
-alias NSScrollArrowPosition.NSScrollerArrowsNone NSScrollerArrowsNone;
-
-
-
-enum NSScrollerArrow
-{
-    NSScrollerIncrementArrow = 0,
-    NSScrollerDecrementArrow = 1
-}
-
-alias NSScrollerArrow.NSScrollerIncrementArrow NSScrollerIncrementArrow;
-alias NSScrollerArrow.NSScrollerDecrementArrow NSScrollerDecrementArrow;
-
-
-
-enum NSScrollerPart
+enum NSScrollerPar
 {
     NSScrollerNoPart = 0,
     NSScrollerDecrementPage = 1,
@@ -59,157 +29,40 @@
     NSScrollerDecrementLine = 4,
     NSScrollerIncrementLine = 5,
     NSScrollerKnobSlot = 6
+} 
+
+public class NSScroller : NSControl {
+
+public this() {
+    super();
 }
 
-alias NSScrollerPart.NSScrollerNoPart NSScrollerNoPart;
-alias NSScrollerPart.NSScrollerDecrementPage NSScrollerDecrementPage;
-alias NSScrollerPart.NSScrollerKnob NSScrollerKnob;
-alias NSScrollerPart.NSScrollerIncrementPage NSScrollerIncrementPage;
-alias NSScrollerPart.NSScrollerDecrementLine NSScrollerDecrementLine;
-alias NSScrollerPart.NSScrollerIncrementLine NSScrollerIncrementLine;
-alias NSScrollerPart.NSScrollerKnobSlot NSScrollerKnobSlot;
+public this(objc.id id) {
+    super(id);
+}
 
-
-
-enum NSUsableScrollerParts
-{
-    NSNoScrollerParts = 0,
-    NSOnlyScrollerArrows = 1,
-    NSAllScrollerParts = 2
+public this(cocoa.id id) {
+    super(id);
 }
 
-alias NSUsableScrollerParts.NSNoScrollerParts NSNoScrollerParts;
-alias NSUsableScrollerParts.NSOnlyScrollerArrows NSOnlyScrollerArrows;
-alias NSUsableScrollerParts.NSAllScrollerParts NSAllScrollerParts;
-
-public class NSScroller : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScrollArrowPosition arrowsPosition ()
-    {
-        return cast(NSScrollArrowPosition) OS.objc_msgSend(this.id_, OS.sel_arrowsPosition);
-    }
-
-    public void checkSpaceForParts ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_checkSpaceForParts);
-    }
-
-    public NSControlSize controlSize ()
-    {
-        return cast(NSControlSize) OS.objc_msgSend(this.id_, OS.sel_controlSize);
-    }
+public NSScrollerPar hitPart() {
+    return cast(NSScrollerPar) OS.objc_msgSend(this.id, OS.sel_hitPart);
+}
 
-    public NSControlTint controlTint ()
-    {
-        return cast(NSControlTint) OS.objc_msgSend(this.id_, OS.sel_controlTint);
-    }
-
-    public void drawArrow (NSScrollerArrow whichArrow, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawArrow_1highlight_1, whichArrow, flag);
-    }
-
-    public void drawKnob ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawKnob);
-    }
-
-    public void drawKnobSlotInRect (NSRect slotRect, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawKnobSlotInRect_1highlight_1, slotRect, flag);
-    }
-
-    public void drawParts ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawParts);
-    }
-
-    public void highlight (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_highlight_1, flag);
-    }
-
-    public NSScrollerPart hitPart ()
-    {
-        return cast(NSScrollerPart) OS.objc_msgSend(this.id_, OS.sel_hitPart);
-    }
+public static CGFloat scrollerWidth() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSScroller, OS.sel_scrollerWidth);
+}
 
-    public CGFloat knobProportion ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_knobProportion);
-    }
-
-    public NSRect rectForPart (NSScrollerPart partCode)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectForPart_1, partCode);
-        return result;
-    }
-
-    public static CGFloat scrollerWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSScroller, OS.sel_scrollerWidth);
-    }
-
-    public static CGFloat scrollerWidthForControlSize (NSControlSize controlSize)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSScroller, OS.sel_scrollerWidthForControlSize_1, controlSize);
-    }
-
-    public void setArrowsPosition (NSScrollArrowPosition where)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setArrowsPosition_1, where);
-    }
-
-    public void setControlSize (NSControlSize controlSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, controlSize);
-    }
+public void setFloatValue(float aFloat, CGFloat proportion) {
+    OS.objc_msgSend(this.id, OS.sel_setFloatValue_knobProportion_, aFloat, proportion);
+}
 
-    public void setControlTint (NSControlTint controlTint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlTint_1, controlTint);
-    }
-
-    public void setFloatValue (float aFloat, CGFloat proportion)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFloatValue_1knobProportion_1, aFloat, proportion);
-    }
-
-    public void setKnobProportion (CGFloat proportion)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKnobProportion_1, proportion);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSScroller, OS.sel_cellClass);
+}
 
-    public NSScrollerPart testPart (NSPoint thePoint)
-    {
-        return cast(NSScrollerPart) OS.objc_msgSend(this.id_, OS.sel_testPart_1, thePoint);
-    }
-
-    public void trackKnob (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_trackKnob_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void trackScrollButtons (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_trackScrollButtons_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public NSUsableScrollerParts usableParts ()
-    {
-        return cast(NSUsableScrollerParts) OS.objc_msgSend(this.id_, OS.sel_usableParts);
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSScroller, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSSearchField.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSSearchField.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,57 +1,50 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSSearchField;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTextField;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSSearchField : NSTextField
-{
+public class NSSearchField : NSTextField {
 
-    public this ()
-    {
-        super();
-    }
+public this() {
+    super();
+}
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSArray recentSearches ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_recentSearches);
-        return result !is null ? new NSArray(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSString recentsAutosaveName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_recentsAutosaveName);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSArray recentSearches() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_recentSearches);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public void setRecentSearches (NSArray searches)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRecentSearches_1, searches !is null ? searches.id_ : null);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSSearchField, OS.sel_cellClass);
+}
 
-    public void setRecentsAutosaveName (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRecentsAutosaveName_1, string !is null ? string.id_ : null);
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSSearchField, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSSearchFieldCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSearchFieldCell;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSButtonCell;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTextFieldCell;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSearchFieldCell : NSTextFieldCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSButtonCell cancelButtonCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cancelButtonCell);
-        return result !is null ? new NSButtonCell(result) : null;
-    }
-
-    public NSRect cancelButtonRectForBounds (NSRect rect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_cancelButtonRectForBounds_1, rect);
-        return result;
-    }
-
-    public NSInteger maximumRecents ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_maximumRecents);
-    }
-
-    public NSArray recentSearches ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_recentSearches);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString recentsAutosaveName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_recentsAutosaveName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void resetCancelButtonCell ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resetCancelButtonCell);
-    }
-
-    public void resetSearchButtonCell ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resetSearchButtonCell);
-    }
-
-    public NSButtonCell searchButtonCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_searchButtonCell);
-        return result !is null ? new NSButtonCell(result) : null;
-    }
-
-    public NSRect searchButtonRectForBounds (NSRect rect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_searchButtonRectForBounds_1, rect);
-        return result;
-    }
-
-    public NSMenu searchMenuTemplate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_searchMenuTemplate);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSRect searchTextRectForBounds (NSRect rect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_searchTextRectForBounds_1, rect);
-        return result;
-    }
-
-    public bool sendsSearchStringImmediately ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendsSearchStringImmediately) !is null;
-    }
-
-    public bool sendsWholeSearchString ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_sendsWholeSearchString) !is null;
-    }
-
-    public void setCancelButtonCell (NSButtonCell cell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCancelButtonCell_1, cell !is null ? cell.id_ : null);
-    }
-
-    public void setMaximumRecents (NSInteger maxRecents)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaximumRecents_1, maxRecents);
-    }
-
-    public void setRecentSearches (NSArray searches)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRecentSearches_1, searches !is null ? searches.id_ : null);
-    }
-
-    public void setRecentsAutosaveName (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRecentsAutosaveName_1, string !is null ? string.id_ : null);
-    }
-
-    public void setSearchButtonCell (NSButtonCell cell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSearchButtonCell_1, cell !is null ? cell.id_ : null);
-    }
-
-    public void setSearchMenuTemplate (NSMenu menu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSearchMenuTemplate_1, menu !is null ? menu.id_ : null);
-    }
-
-    public void setSendsSearchStringImmediately (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSendsSearchStringImmediately_1, flag);
-    }
-
-    public void setSendsWholeSearchString (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSendsWholeSearchString_1, flag);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSecureTextField.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSSecureTextField.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,32 +1,44 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSSecureTextField;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSTextField;
+import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSSecureTextField : NSTextField
-{
+public class NSSecureTextField : NSTextField {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
 
-    public this ()
-    {
-        super();
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSSecureTextField, OS.sel_cellClass);
+}
+
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSSecureTextField, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSSecureTextFieldCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSecureTextFieldCell;
-
-import dwt.internal.cocoa.NSTextFieldCell;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSecureTextFieldCell : NSTextFieldCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool echosBullets ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_echosBullets) !is null;
-    }
-
-    public void setEchosBullets (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEchosBullets_1, flag);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSegmentedCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSegmentedCell;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSImageCell : NSImageScaling;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSBackgroundStyle : NSUInteger
-{
-    NSBackgroundStyleLight = 0,
-    NSBackgroundStyleDark,
-    NSBackgroundStyleRaised,
-    NSBackgroundStyleLowered
-}
-
-alias NSBackgroundStyle.NSBackgroundStyleLight NSBackgroundStyleLight;
-alias NSBackgroundStyle.NSBackgroundStyleDark NSBackgroundStyleDark;
-alias NSBackgroundStyle.NSBackgroundStyleRaised NSBackgroundStyleRaised;
-alias NSBackgroundStyle.NSBackgroundStyleLowered NSBackgroundStyleLowered;
-
-enum NSSegmentSwitchTracking : NSUInteger
-{
-    NSSegmentSwitchTrackingSelectOne = 0,
-    NSSegmentSwitchTrackingSelectAny = 1,
-    NSSegmentSwitchTrackingMomentary = 2
-}
-
-alias NSSegmentSwitchTracking.NSSegmentSwitchTrackingSelectOne NSSegmentSwitchTrackingSelectOne;
-alias NSSegmentSwitchTracking.NSSegmentSwitchTrackingSelectAny NSSegmentSwitchTrackingSelectAny;
-alias NSSegmentSwitchTracking.NSSegmentSwitchTrackingMomentary NSSegmentSwitchTrackingMomentary;
-
-public class NSSegmentedCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void drawSegment (NSInteger segment, NSRect frame, NSView controlView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawSegment_1inFrame_1withView_1, segment, frame, controlView !is null ? controlView.id_ : null);
-    }
-
-    public NSImage imageForSegment (NSInteger segment)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_imageForSegment_1, segment);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSImageScaling imageScalingForSegment (NSInteger segment)
-    {
-        return cast(NSImageScaling) OS.objc_msgSend(this.id_, OS.sel_imageScalingForSegment_1, segment);
-    }
-
-    public NSBackgroundStyle interiorBackgroundStyleForSegment (NSInteger segment)
-    {
-        return cast(NSBackgroundStyle) OS.objc_msgSend(this.id_, OS.sel_interiorBackgroundStyleForSegment_1, segment);
-    }
-
-    public bool isEnabledForSegment (NSInteger segment)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabledForSegment_1, segment) !is null;
-    }
-
-    public bool isSelectedForSegment (NSInteger segment)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelectedForSegment_1, segment) !is null;
-    }
-
-    public NSString labelForSegment (NSInteger segment)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_labelForSegment_1, segment);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void makeNextSegmentKey ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeNextSegmentKey);
-    }
-
-    public void makePreviousSegmentKey ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makePreviousSegmentKey);
-    }
-
-    public NSMenu menuForSegment (NSInteger segment)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuForSegment_1, segment);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSInteger segmentCount ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_segmentCount);
-    }
-
-    public NSInteger segmentStyle ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_segmentStyle);
-    }
-
-    public bool selectSegmentWithTag (NSInteger tag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_selectSegmentWithTag_1, tag) !is null;
-    }
-
-    public NSInteger selectedSegment ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedSegment);
-    }
-
-    public void setEnabled (bool enabled, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1forSegment_1, enabled, segment);
-    }
-
-    public void setImage (NSImage image, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1forSegment_1, image !is null ? image.id_ : null, segment);
-    }
-
-    public void setImageScaling (NSImageScaling scaling, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageScaling_1forSegment_1, scaling, segment);
-    }
-
-    public void setLabel (NSString label, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLabel_1forSegment_1, label !is null ? label.id_ : null, segment);
-    }
-
-    public void setMenu (NSMenu menu, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1forSegment_1, menu !is null ? menu.id_ : null, segment);
-    }
-
-    public void setSegmentCount (NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSegmentCount_1, count);
-    }
-
-    public void setSegmentStyle (NSInteger segmentStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSegmentStyle_1, segmentStyle);
-    }
-
-    public void setSelected (bool selected, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelected_1forSegment_1, selected, segment);
-    }
-
-    public void setSelectedSegment (NSInteger selectedSegment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedSegment_1, selectedSegment);
-    }
-
-    public void setTag (NSInteger tag, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTag_1forSegment_1, tag, segment);
-    }
-
-    public void setToolTip (NSString toolTip, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setToolTip_1forSegment_1, toolTip !is null ? toolTip.id_ : null, segment);
-    }
-
-    public void setTrackingMode (NSSegmentSwitchTracking trackingMode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTrackingMode_1, trackingMode);
-    }
-
-    public void setWidth (CGFloat width, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWidth_1forSegment_1, width, segment);
-    }
-
-    public NSInteger tagForSegment (NSInteger segment)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tagForSegment_1, segment);
-    }
-
-    public NSString toolTipForSegment (NSInteger segment)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolTipForSegment_1, segment);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSSegmentSwitchTracking trackingMode ()
-    {
-        return cast(NSSegmentSwitchTracking) OS.objc_msgSend(this.id_, OS.sel_trackingMode);
-    }
-
-    public CGFloat widthForSegment (NSInteger segment)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_widthForSegment_1, segment);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSegmentedControl.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSegmentedControl;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSImageCell : NSImageScaling;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSegmentedControl : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSImage imageForSegment (NSInteger segment)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_imageForSegment_1, segment);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSImageScaling imageScalingForSegment (NSInteger segment)
-    {
-        return cast(NSImageScaling) OS.objc_msgSend(this.id_, OS.sel_imageScalingForSegment_1, segment);
-    }
-
-    public bool isEnabledForSegment (NSInteger segment)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabledForSegment_1, segment) !is null;
-    }
-
-    public bool isSelectedForSegment (NSInteger segment)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelectedForSegment_1, segment) !is null;
-    }
-
-    public NSString labelForSegment (NSInteger segment)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_labelForSegment_1, segment);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSMenu menuForSegment (NSInteger segment)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuForSegment_1, segment);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public NSInteger segmentCount ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_segmentCount);
-    }
-
-    public NSInteger segmentStyle ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_segmentStyle);
-    }
-
-    public bool selectSegmentWithTag (NSInteger tag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_selectSegmentWithTag_1, tag) !is null;
-    }
-
-    public NSInteger selectedSegment ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedSegment);
-    }
-
-    public void setEnabled (bool enabled, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1forSegment_1, enabled, segment);
-    }
-
-    public void setImage (NSImage image, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1forSegment_1, image !is null ? image.id_ : null, segment);
-    }
-
-    public void setImageScaling (NSImageScaling scaling, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImageScaling_1forSegment_1, scaling, segment);
-    }
-
-    public void setLabel (NSString label, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLabel_1forSegment_1, label !is null ? label.id_ : null, segment);
-    }
-
-    public void setMenu (NSMenu menu, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1forSegment_1, menu !is null ? menu.id_ : null, segment);
-    }
-
-    public void setSegmentCount (NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSegmentCount_1, count);
-    }
-
-    public void setSegmentStyle (NSInteger segmentStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSegmentStyle_1, segmentStyle);
-    }
-
-    public void setSelected (bool selected, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelected_1forSegment_1, selected, segment);
-    }
-
-    public void setSelectedSegment (NSInteger selectedSegment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedSegment_1, selectedSegment);
-    }
-
-    public void setWidth (CGFloat width, NSInteger segment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWidth_1forSegment_1, width, segment);
-    }
-
-    public CGFloat widthForSegment (NSInteger segment)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_widthForSegment_1, segment);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSet.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSSet.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,223 +1,52 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSSet;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSEnumerator;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSKeyValueObserving;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPredicate;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSSet : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addObserver (NSObject observer, NSString keyPath, NSKeyValueObservingOptions options, void* context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addObserver_1forKeyPath_1options_1context_1, observer !is null ? observer.id_ : null,
-                keyPath !is null ? keyPath.id_ : null, options, context);
-    }
+public class NSSet : NSObject {
 
-    public NSArray allObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id anyObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_anyObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool containsObject (id anObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsObject_1, anObject !is null ? anObject.id_ : null) !is null;
-    }
-
-    public NSUInteger count ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_count);
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSString descriptionWithLocale (id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSSet filteredSetUsingPredicate (NSPredicate predicate)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_filteredSetUsingPredicate_1, predicate !is null ? predicate.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSSet(result) : null);
-    }
-
-    public NSSet initWithArray (NSArray array)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithArray_1, array !is null ? array.id_ : null);
-        return result !is null ? this : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSSet initWithObjects_ (id initWithObjects)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1, initWithObjects !is null ? initWithObjects.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSSet initWithObjects_count_ (objc.id* objects, NSUInteger cnt)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjects_1count_1, objects, cnt);
-        return result !is null ? this : null;
-    }
-
-    public NSSet initWithSet_ (NSSet set)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSet_1, set !is null ? set.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSSet initWithSet_copyItems_ (NSSet set, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSet_1copyItems_1, set !is null ? set.id_ : null, flag);
-        return result !is null ? this : null;
-    }
-
-    public bool intersectsSet (NSSet otherSet)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_intersectsSet_1, otherSet !is null ? otherSet.id_ : null) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool isEqualToSet (NSSet otherSet)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToSet_1, otherSet !is null ? otherSet.id_ : null) !is null;
-    }
-
-    public bool isSubsetOfSet (NSSet otherSet)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSubsetOfSet_1, otherSet !is null ? otherSet.id_ : null) !is null;
-    }
-
-    public void makeObjectsPerformSelector_ (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeObjectsPerformSelector_1, aSelector);
-    }
-
-    public void makeObjectsPerformSelector_withObject_ (objc.SEL aSelector, id argument)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeObjectsPerformSelector_1withObject_1, aSelector, argument !is null ? argument.id_ : null);
-    }
-
-    public id member (id object)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_member_1, object !is null ? object.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSEnumerator objectEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public void removeObserver (NSObject observer, NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObserver_1forKeyPath_1, observer !is null ? observer.id_ : null, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public static id set ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_set);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSSet setByAddingObject (id anObject)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_setByAddingObject_1, anObject !is null ? anObject.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSSet(result) : null);
-    }
+public NSUInteger count() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_count);
+}
 
-    public NSSet setByAddingObjectsFromArray (NSArray other)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_setByAddingObjectsFromArray_1, other !is null ? other.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSSet(result) : null);
-    }
-
-    public NSSet setByAddingObjectsFromSet (NSSet other)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_setByAddingObjectsFromSet_1, other !is null ? other.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSSet(result) : null);
-    }
-
-    public void setValue (id value, NSString key)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValue_1forKey_1, value !is null ? value.id_ : null, key !is null ? key.id_ : null);
-    }
-
-    public static id setWithArray (NSArray array)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithArray_1, array !is null ? array.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public NSEnumerator objectEnumerator() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_objectEnumerator);
+    return result !is null ? new NSEnumerator(result) : null;
+}
 
-    public static id setWithObject (id object)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithObject_1, object !is null ? object.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_setWithObjects_ (id setWithObjects)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithObjects_1, setWithObjects !is null ? setWithObjects.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_setWithObjects_count_ (objc.id* objects, NSUInteger cnt)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithObjects_1count_1, objects, cnt);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id setWithSet (NSSet set)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_setWithSet_1, set !is null ? set.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id valueForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public static NSSet set() {
+    objc.id result = OS.objc_msgSend(OS.class_NSSet, OS.sel_set);
+    return result !is null ? new NSSet(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSSetCommand.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSetCommand;
-
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSetCommand : NSScriptCommand
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSScriptObjectSpecifier keySpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_keySpecifier);
-        return result !is null ? new NSScriptObjectSpecifier(result) : null;
-    }
-
-    public void setReceiversSpecifier (NSScriptObjectSpecifier receiversRef)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReceiversSpecifier_1, receiversRef !is null ? receiversRef.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSShadow.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSShadow;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSShadow : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void set ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_set);
-    }
-
-    public void setShadowBlurRadius (CGFloat val)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShadowBlurRadius_1, val);
-    }
-
-    public void setShadowColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShadowColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setShadowOffset (NSSize offset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShadowOffset_1, offset);
-    }
-
-    public CGFloat shadowBlurRadius ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_shadowBlurRadius);
-    }
-
-    public NSColor shadowColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shadowColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSSize shadowOffset ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_shadowOffset);
-        return result;
-    }
-
-}
--- a/dwt/internal/cocoa/NSSize.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSSize.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,18 +9,17 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
+
 module dwt.internal.cocoa.NSSize;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
 
-extern (C):
 
-alias NSSize* NSSizeArray;
-alias NSSize* NSSizePointer;
-
-struct NSSize {
-    CGFloat width = 0;
-    CGFloat height = 0;
+public struct NSSize {
+    public CGFloat width;
+    public CGFloat height;
+    //public static final int sizeof = OS.NSSize_sizeof();
 }
--- a/dwt/internal/cocoa/NSSlider.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSSlider.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,202 +1,60 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSSlider;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSColor;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSliderCell : NSTickMarkPosition;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSSlider : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool acceptsFirstMouse (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstMouse_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
+public class NSSlider : NSControl {
 
-    public bool allowsTickMarkValuesOnly ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsTickMarkValuesOnly) !is null;
-    }
-
-    public double altIncrementValue ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_altIncrementValue);
-    }
-
-    public double closestTickMarkValueToValue (double value)
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_closestTickMarkValueToValue_1, value);
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSInteger indexOfTickMarkAtPoint (NSPoint point)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTickMarkAtPoint_1, point);
-    }
-
-    public NSInteger isVertical ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_isVertical);
-    }
-
-    public CGFloat knobThickness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_knobThickness);
-    }
-
-    public double maxValue ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public double minValue ()
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
-    }
-
-    public NSInteger numberOfTickMarks ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfTickMarks);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSRect rectOfTickMarkAtIndex (NSInteger index)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfTickMarkAtIndex_1, index);
-        return result;
-    }
-
-    public void setAllowsTickMarkValuesOnly (bool yorn)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsTickMarkValuesOnly_1, yorn);
-    }
+public double maxValue() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_maxValue);
+}
 
-    public void setAltIncrementValue (double incValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAltIncrementValue_1, incValue);
-    }
-
-    public void setImage (NSImage backgroundImage)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, backgroundImage !is null ? backgroundImage.id_ : null);
-    }
-
-    public void setKnobThickness (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKnobThickness_1, aFloat);
-    }
-
-    public void setMaxValue (double aDouble)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, aDouble);
-    }
+public double minValue() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_minValue);
+}
 
-    public void setMinValue (double aDouble)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, aDouble);
-    }
-
-    public void setNumberOfTickMarks (NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfTickMarks_1, count);
-    }
-
-    public void setTickMarkPosition (NSTickMarkPosition position)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTickMarkPosition_1, position);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
+public void setMaxValue(double aDouble) {
+    OS.objc_msgSend(this.id, OS.sel_setMaxValue_, aDouble);
+}
 
-    public void setTitleCell (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleCell_1, aCell !is null ? aCell.id_ : null);
-    }
-
-    public void setTitleColor (NSColor newColor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleColor_1, newColor !is null ? newColor.id_ : null);
-    }
-
-    public void setTitleFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public NSTickMarkPosition tickMarkPosition ()
-    {
-        return cast(NSTickMarkPosition) OS.objc_msgSend(this.id_, OS.sel_tickMarkPosition);
-    }
+public void setMinValue(double aDouble) {
+    OS.objc_msgSend(this.id, OS.sel_setMinValue_, aDouble);
+}
 
-    public double tickMarkValueAtIndex (NSInteger index)
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_tickMarkValueAtIndex_1, index);
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSSlider, OS.sel_cellClass);
+}
 
-    public id titleCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleCell);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSColor titleColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSFont titleFont ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleFont);
-        return result !is null ? new NSFont(result) : null;
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSSlider, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSSliderCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSliderCell;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-
-
-enum NSTickMarkPosition
-{
-    NSTickMarkBelow = 0,
-    NSTickMarkAbove = 1,
-    NSTickMarkLeft = NSTickMarkAbove,
-    NSTickMarkRight = NSTickMarkBelow
-}
-
-alias NSTickMarkPosition.NSTickMarkBelow NSTickMarkBelow;
-alias NSTickMarkPosition.NSTickMarkAbove NSTickMarkAbove;
-alias NSTickMarkPosition.NSTickMarkLeft NSTickMarkLeft;
-alias NSTickMarkPosition.NSTickMarkRight NSTickMarkRight;
-
-
-
-enum NSSliderType
-{
-    NSLinearSlider = 0,
-    NSCircularSlider = 1
-}
-
-alias NSSliderType.NSLinearSlider NSLinearSlider;
-alias NSSliderType.NSCircularSlider NSCircularSlider;
-
-public class NSSliderCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool allowsTickMarkValuesOnly ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsTickMarkValuesOnly) !is null;
-    }
-
-    public double altIncrementValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_altIncrementValue);
-    }
-
-    public double closestTickMarkValueToValue (double value)
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_closestTickMarkValueToValue_1, value);
-    }
-
-    public void drawBarInside (NSRect aRect, bool flipped)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawBarInside_1flipped_1, aRect, flipped);
-    }
-
-    public void drawKnob ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawKnob);
-    }
-
-    public void drawKnob_ (NSRect knobRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawKnob_1, knobRect);
-    }
-
-    public NSInteger indexOfTickMarkAtPoint (NSPoint point)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTickMarkAtPoint_1, point);
-    }
-
-    public NSInteger isVertical ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_isVertical);
-    }
-
-    public NSRect knobRectFlipped (bool flipped)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_knobRectFlipped_1, flipped);
-        return result;
-    }
-
-    public CGFloat knobThickness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_knobThickness);
-    }
-
-    public double maxValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
-    }
-
-    public double minValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
-    }
-
-    public NSInteger numberOfTickMarks ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfTickMarks);
-    }
-
-    public static bool prefersTrackingUntilMouseUp ()
-    {
-        return OS.objc_msgSend(OS.class_NSSliderCell, OS.sel_prefersTrackingUntilMouseUp) !is null;
-    }
-
-    public NSRect rectOfTickMarkAtIndex (NSInteger index)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfTickMarkAtIndex_1, index);
-        return result;
-    }
-
-    public void setAllowsTickMarkValuesOnly (bool yorn)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsTickMarkValuesOnly_1, yorn);
-    }
-
-    public void setAltIncrementValue (double incValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAltIncrementValue_1, incValue);
-    }
-
-    public void setKnobThickness (CGFloat aFloat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKnobThickness_1, aFloat);
-    }
-
-    public void setMaxValue (double aDouble)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, aDouble);
-    }
-
-    public void setMinValue (double aDouble)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, aDouble);
-    }
-
-    public void setNumberOfTickMarks (NSInteger count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfTickMarks_1, count);
-    }
-
-    public void setSliderType (NSSliderType sliderType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSliderType_1, sliderType);
-    }
-
-    public void setTickMarkPosition (NSTickMarkPosition position)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTickMarkPosition_1, position);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTitleCell (NSCell aCell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleCell_1, aCell !is null ? aCell.id_ : null);
-    }
-
-    public void setTitleColor (NSColor newColor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleColor_1, newColor !is null ? newColor.id_ : null);
-    }
-
-    public void setTitleFont (NSFont fontObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleFont_1, fontObj !is null ? fontObj.id_ : null);
-    }
-
-    public NSSliderType sliderType ()
-    {
-        return cast(NSSliderType) OS.objc_msgSend(this.id_, OS.sel_sliderType);
-    }
-
-    public NSTickMarkPosition tickMarkPosition ()
-    {
-        return cast(NSTickMarkPosition) OS.objc_msgSend(this.id_, OS.sel_tickMarkPosition);
-    }
-
-    public double tickMarkValueAtIndex (NSInteger index)
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_tickMarkValueAtIndex_1, index);
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id titleCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleCell);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSColor titleColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSFont titleFont ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_titleFont);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSRect trackRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_trackRect);
-        return result;
-    }
-
-}
--- a/dwt/internal/cocoa/NSSocketPort.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSocketPort;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSocketPort : NSPort
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData address ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_address);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public id initRemoteWithProtocolFamily (int family, int type, int protocol, NSData address)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initRemoteWithProtocolFamily_1socketType_1protocol_1address_1, family, type, protocol,
-                address !is null ? address.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initRemoteWithTCPPort (ushort port, NSString hostName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initRemoteWithTCPPort_1host_1, port, hostName !is null ? hostName.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithProtocolFamily_socketType_protocol_address_ (int family, int type, int protocol, NSData address)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithProtocolFamily_1socketType_1protocol_1address_1, family, type, protocol,
-                address !is null ? address.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithProtocolFamily_socketType_protocol_socket_ (int family, int type, int protocol, NSSocketNativeHandle sock)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithProtocolFamily_1socketType_1protocol_1socket_1, family, type, protocol, sock);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithTCPPort (short port)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTCPPort_1, port);
-        return result !is null ? new id(result) : null;
-    }
-
-    public int protocol ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_protocol);
-    }
-
-    public int protocolFamily ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_protocolFamily);
-    }
-
-    public NSSocketNativeHandle socket ()
-    {
-        return cast(NSSocketNativeHandle) OS.objc_msgSend(this.id_, OS.sel_socket);
-    }
-
-    public int socketType ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_socketType);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSocketPortNameServer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSocketPortNameServer;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSPort;
-import dwt.internal.cocoa.NSPortNameServer;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSocketPortNameServer : NSPortNameServer
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public ushort defaultNameServerPortNumber ()
-    {
-        return cast(ushort) OS.objc_msgSend(this.id_, OS.sel_defaultNameServerPortNumber);
-    }
-
-    public NSPort portForName_ (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public NSPort portForName_host_ (NSString name, NSString host)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1host_1, name !is null ? name.id_ : null, host !is null ? host.id_ : null);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public NSPort portForName_host_nameServerPortNumber_ (NSString name, NSString host, ushort portNumber)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_portForName_1host_1nameServerPortNumber_1, name !is null ? name.id_ : null,
-                host !is null ? host.id_ : null, portNumber);
-        return result !is null ? new NSPort(result) : null;
-    }
-
-    public bool registerPort_name_ (NSPort port, NSString name)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_registerPort_1name_1, port !is null ? port.id_ : null, name !is null ? name.id_ : null) !is null;
-    }
-
-    public bool registerPort_name_nameServerPortNumber_ (NSPort port, NSString name, ushort portNumber)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_registerPort_1name_1nameServerPortNumber_1, port !is null ? port.id_ : null,
-                name !is null ? name.id_ : null, portNumber) !is null;
-    }
-
-    public bool removePortForName (NSString name)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_removePortForName_1, name !is null ? name.id_ : null) !is null;
-    }
-
-    public void setDefaultNameServerPortNumber (ushort portNumber)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDefaultNameServerPortNumber_1, portNumber);
-    }
-
-    public static id sharedInstance ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSocketPortNameServer, OS.sel_sharedInstance);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSSortDescriptor.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSortDescriptor;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSComparisonResult;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSortDescriptor : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool ascending ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_ascending) !is null;
-    }
-
-    public NSComparisonResult compareObject (id object1, id object2)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compareObject_1toObject_1, object1 !is null ? object1.id_ : null, object2 !is null ? object2.id_ : null);
-    }
-
-    public id initWithKey_ascending_ (NSString key, bool ascending)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithKey_1ascending_1, key !is null ? key.id_ : null, ascending);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithKey_ascending_selector_ (NSString key, bool ascending, objc.SEL selector)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithKey_1ascending_1selector_1, key !is null ? key.id_ : null, ascending, selector);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString key ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_key);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id reversedSortDescriptor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_reversedSortDescriptor);
-        return result !is null ? new id(result) : null;
-    }
-
-    public objc.SEL selector ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_selector);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSound.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSound;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPasteboard;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSound : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static bool canInitWithPasteboard (NSPasteboard pasteboard)
-    {
-        return OS.objc_msgSend(OS.class_NSSound, OS.sel_canInitWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null) !is null;
-    }
-
-    public NSArray channelMapping ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_channelMapping);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSTimeInterval currentTime ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_currentTime);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSTimeInterval duration ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_duration);
-    }
-
-    public id initWithContentsOfFile (NSString path, bool byRef)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1byReference_1, path !is null ? path.id_ : null, byRef);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithContentsOfURL (NSURL url, bool byRef)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1byReference_1, url !is null ? url.id_ : null, byRef);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithPasteboard (NSPasteboard pasteboard)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isPlaying ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isPlaying) !is null;
-    }
-
-    public bool loops ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_loops) !is null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool pause ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_pause) !is null;
-    }
-
-    public bool play ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_play) !is null;
-    }
-
-    public NSString playbackDeviceIdentifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_playbackDeviceIdentifier);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool resume ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_resume) !is null;
-    }
-
-    public void setChannelMapping (NSArray channelMapping)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setChannelMapping_1, channelMapping !is null ? channelMapping.id_ : null);
-    }
-
-    public void setCurrentTime (NSTimeInterval seconds)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrentTime_1, seconds);
-    }
-
-    public void setDelegate (id aDelegate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, aDelegate !is null ? aDelegate.id_ : null);
-    }
-
-    public void setLoops (bool val)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLoops_1, val);
-    }
-
-    public bool setName (NSString string)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setName_1, string !is null ? string.id_ : null) !is null;
-    }
-
-    public void setPlaybackDeviceIdentifier (NSString deviceUID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaybackDeviceIdentifier_1, deviceUID !is null ? deviceUID.id_ : null);
-    }
-
-    public void setVolume (float volume)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVolume_1, volume);
-    }
-
-    public static id soundNamed (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSound, OS.sel_soundNamed_1, name !is null ? name.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static NSArray soundUnfilteredFileTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSound, OS.sel_soundUnfilteredFileTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray soundUnfilteredPasteboardTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSound, OS.sel_soundUnfilteredPasteboardTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSArray soundUnfilteredTypes ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSound, OS.sel_soundUnfilteredTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool stop ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_stop) !is null;
-    }
-
-    public float volume ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_volume);
-    }
-
-    public void writeToPasteboard (NSPasteboard pasteboard)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_writeToPasteboard_1, pasteboard !is null ? pasteboard.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSpecifierTest.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSpecifierTest;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSScriptWhoseTest;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-
-
-enum NSTestComparisonOperation
-{
-    NSEqualToComparison = 0,
-    NSLessThanOrEqualToComparison,
-    NSLessThanComparison,
-    NSGreaterThanOrEqualToComparison,
-    NSGreaterThanComparison,
-    NSBeginsWithComparison,
-    NSEndsWithComparison,
-    NSContainsComparison
-}
-
-alias NSTestComparisonOperation.NSEqualToComparison NSEqualToComparison;
-alias NSTestComparisonOperation.NSLessThanOrEqualToComparison NSLessThanOrEqualToComparison;
-alias NSTestComparisonOperation.NSLessThanComparison NSLessThanComparison;
-alias NSTestComparisonOperation.NSGreaterThanOrEqualToComparison NSGreaterThanOrEqualToComparison;
-alias NSTestComparisonOperation.NSGreaterThanComparison NSGreaterThanComparison;
-alias NSTestComparisonOperation.NSBeginsWithComparison NSBeginsWithComparison;
-alias NSTestComparisonOperation.NSEndsWithComparison NSEndsWithComparison;
-alias NSTestComparisonOperation.NSContainsComparison NSContainsComparison;
-
-
-
-public class NSSpecifierTest : NSScriptWhoseTest
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initWithObjectSpecifier (NSScriptObjectSpecifier obj1, NSTestComparisonOperation compOp, id obj2)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithObjectSpecifier_1comparisonOperator_1testObject_1, obj1 !is null ? obj1.id_ : null,
-                compOp, obj2 !is null ? obj2.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSSpeechRecognizer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSpeechRecognizer;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSpeechRecognizer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool blocksOtherRecognizers ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_blocksOtherRecognizers) !is null;
-    }
-
-    public NSArray commands ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_commands);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString displayedCommandsTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_displayedCommandsTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool listensInForegroundOnly ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_listensInForegroundOnly) !is null;
-    }
-
-    public void setBlocksOtherRecognizers (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBlocksOtherRecognizers_1, flag);
-    }
-
-    public void setCommands (NSArray commands)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCommands_1, commands !is null ? commands.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDisplayedCommandsTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDisplayedCommandsTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void setListensInForegroundOnly (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setListensInForegroundOnly_1, flag);
-    }
-
-    public void startListening ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_startListening);
-    }
-
-    public void stopListening ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopListening);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSpeechSynthesizer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSpeechSynthesizer;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-
-
-enum NSSpeechBoundar : NSUInteger
-{
-    NSSpeechImmediateBoundary = 0,
-    NSSpeechWordBoundary,
-    NSSpeechSentenceBoundary
-}
-
-alias NSSpeechBoundar.NSSpeechImmediateBoundary NSSpeechImmediateBoundary;
-alias NSSpeechBoundar.NSSpeechWordBoundary NSSpeechWordBoundary;
-alias NSSpeechBoundar.NSSpeechSentenceBoundary NSSpeechSentenceBoundary;
-
-
-
-public class NSSpeechSynthesizer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addSpeechDictionary (NSDictionary speechDictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addSpeechDictionary_1, speechDictionary !is null ? speechDictionary.id_ : null);
-    }
-
-    public static NSDictionary attributesForVoice (NSString voice)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSpeechSynthesizer, OS.sel_attributesForVoice_1, voice !is null ? voice.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public static NSArray availableVoices ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSpeechSynthesizer, OS.sel_availableVoices);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void continueSpeaking ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_continueSpeaking);
-    }
-
-    public static NSString defaultVoice ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSpeechSynthesizer, OS.sel_defaultVoice);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithVoice (NSString voice)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithVoice_1, voice !is null ? voice.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static bool isAnyApplicationSpeaking ()
-    {
-        return OS.objc_msgSend(OS.class_NSSpeechSynthesizer, OS.sel_isAnyApplicationSpeaking) !is null;
-    }
-
-    public bool isSpeaking ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSpeaking) !is null;
-    }
-
-    public id objectForProperty (NSString property, objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectForProperty_1error_1, property !is null ? property.id_ : null, outError);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void pauseSpeakingAtBoundary (NSSpeechBoundar boundary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_pauseSpeakingAtBoundary_1, boundary);
-    }
-
-    public NSString phonemesFromText (NSString text)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_phonemesFromText_1, text !is null ? text.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public float rate ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_rate);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public bool setObject (id object, NSString property, objc.id** outError)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setObject_1forProperty_1error_1, object !is null ? object.id_ : null,
-                property !is null ? property.id_ : null, outError) !is null;
-    }
-
-    public void setRate (float rate)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRate_1, rate);
-    }
-
-    public void setUsesFeedbackWindow (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesFeedbackWindow_1, flag);
-    }
-
-    public bool setVoice (NSString voice)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setVoice_1, voice !is null ? voice.id_ : null) !is null;
-    }
-
-    public void setVolume (float volume)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVolume_1, volume);
-    }
-
-    public bool startSpeakingString_ (NSString string)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_startSpeakingString_1, string !is null ? string.id_ : null) !is null;
-    }
-
-    public bool startSpeakingString_toURL_ (NSString string, NSURL url)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_startSpeakingString_1toURL_1, string !is null ? string.id_ : null, url !is null ? url.id_ : null) !is null;
-    }
-
-    public void stopSpeaking ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopSpeaking);
-    }
-
-    public void stopSpeakingAtBoundary (NSSpeechBoundar boundary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopSpeakingAtBoundary_1, boundary);
-    }
-
-    public bool usesFeedbackWindow ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesFeedbackWindow) !is null;
-    }
-
-    public NSString voice ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_voice);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public float volume ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_volume);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSpellChecker.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSpellChecker;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPanel;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSpellChecker : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSView accessoryView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_accessoryView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public NSArray availableLanguages ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableLanguages);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSRange checkGrammarOfString (NSString stringToCheck, NSInteger startingOffset, NSString language, bool wrapFlag, NSInteger tag, /*NSArray** */objc.id** details)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_checkGrammarOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1details_1,
-                stringToCheck !is null ? stringToCheck.id_ : null, startingOffset, language !is null ? language.id_ : null, wrapFlag, tag, details);
-        return result;
-    }
-
-    public NSRange checkSpellingOfString_startingAt_ (NSString stringToCheck, NSInteger startingOffset)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_checkSpellingOfString_1startingAt_1, stringToCheck !is null ? stringToCheck.id_ : null,
-                startingOffset);
-        return result;
-    }
-
-    public NSRange checkSpellingOfString_startingAt_language_wrap_inSpellDocumentWithTag_wordCount_ (NSString stringToCheck, NSInteger startingOffset,
-            NSString language, bool wrapFlag, NSInteger tag, NSInteger* wordCount)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_checkSpellingOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1wordCount_1,
-                stringToCheck !is null ? stringToCheck.id_ : null, startingOffset, language !is null ? language.id_ : null, wrapFlag, tag, wordCount);
-        return result;
-    }
-
-    public void closeSpellDocumentWithTag (NSInteger tag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_closeSpellDocumentWithTag_1, tag);
-    }
-
-    public NSArray completionsForPartialWordRange (NSRange range, NSString string, NSString language, NSInteger tag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_completionsForPartialWordRange_1inString_1language_1inSpellDocumentWithTag_1, range,
-                string !is null ? string.id_ : null, language !is null ? language.id_ : null, tag);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSInteger countWordsInString (NSString stringToCount, NSString language)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_countWordsInString_1language_1, stringToCount !is null ? stringToCount.id_ : null,
-                language !is null ? language.id_ : null);
-    }
-
-    public void forgetWord (NSString word)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_forgetWord_1, word !is null ? word.id_ : null);
-    }
-
-    public NSArray guessesForWord (NSString word)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_guessesForWord_1, word !is null ? word.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool hasLearnedWord (NSString word)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasLearnedWord_1, word !is null ? word.id_ : null) !is null;
-    }
-
-    public void ignoreWord (NSString wordToIgnore, NSInteger tag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ignoreWord_1inSpellDocumentWithTag_1, wordToIgnore !is null ? wordToIgnore.id_ : null, tag);
-    }
-
-    public NSArray ignoredWordsInSpellDocumentWithTag (NSInteger tag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_ignoredWordsInSpellDocumentWithTag_1, tag);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString language ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_language);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void learnWord (NSString word)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_learnWord_1, word !is null ? word.id_ : null);
-    }
-
-    public void setAccessoryView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAccessoryView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void setIgnoredWords (NSArray words, NSInteger tag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIgnoredWords_1inSpellDocumentWithTag_1, words !is null ? words.id_ : null, tag);
-    }
-
-    public bool setLanguage (NSString language)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setLanguage_1, language !is null ? language.id_ : null) !is null;
-    }
-
-    public void setWordFieldStringValue (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWordFieldStringValue_1, aString !is null ? aString.id_ : null);
-    }
-
-    public static NSSpellChecker sharedSpellChecker ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_sharedSpellChecker);
-        return result !is null ? new NSSpellChecker(result) : null;
-    }
-
-    public static bool sharedSpellCheckerExists ()
-    {
-        return OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_sharedSpellCheckerExists) !is null;
-    }
-
-    public NSPanel spellingPanel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_spellingPanel);
-        return result !is null ? new NSPanel(result) : null;
-    }
-
-    public static NSInteger uniqueSpellDocumentTag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(OS.class_NSSpellChecker, OS.sel_uniqueSpellDocumentTag);
-    }
-
-    public void unlearnWord (NSString word)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unlearnWord_1, word !is null ? word.id_ : null);
-    }
-
-    public void updateSpellingPanelWithGrammarString (NSString string, NSDictionary detail)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateSpellingPanelWithGrammarString_1detail_1, string !is null ? string.id_ : null,
-                detail !is null ? detail.id_ : null);
-    }
-
-    public void updateSpellingPanelWithMisspelledWord (NSString word)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateSpellingPanelWithMisspelledWord_1, word !is null ? word.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSpellServer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSpellServer;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSSpellServer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isWordInUserDictionaries (NSString word, bool flag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isWordInUserDictionaries_1caseSensitive_1, word !is null ? word.id_ : null, flag) !is null;
-    }
-
-    public bool registerLanguage (NSString language, NSString vendor)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_registerLanguage_1byVendor_1, language !is null ? language.id_ : null,
-                vendor !is null ? vendor.id_ : null) !is null;
-    }
-
-    public void run ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_run);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSSplitView.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSplitView;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-
-
-enum NSSplitViewDividerStyle : NSInteger
-{
-    NSSplitViewDividerStyleThick = 1,
-    NSSplitViewDividerStyleThin
-}
-
-alias NSSplitViewDividerStyle.NSSplitViewDividerStyleThick NSSplitViewDividerStyleThick;
-alias NSSplitViewDividerStyle.NSSplitViewDividerStyleThin NSSplitViewDividerStyleThin;
-
-
-
-public class NSSplitView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void adjustSubviews ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_adjustSubviews);
-    }
-
-    public NSString autosaveName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_autosaveName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSColor dividerColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dividerColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSSplitViewDividerStyle dividerStyle ()
-    {
-        return cast(NSSplitViewDividerStyle) OS.objc_msgSend(this.id_, OS.sel_dividerStyle);
-    }
-
-    public CGFloat dividerThickness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_dividerThickness);
-    }
-
-    public void drawDividerInRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawDividerInRect_1, rect);
-    }
-
-    public bool isPaneSplitter ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isPaneSplitter) !is null;
-    }
-
-    public bool isSubviewCollapsed (NSView subview)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSubviewCollapsed_1, subview !is null ? subview.id_ : null) !is null;
-    }
-
-    public bool isVertical ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isVertical) !is null;
-    }
-
-    public CGFloat maxPossiblePositionOfDividerAtIndex (NSInteger dividerIndex)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_maxPossiblePositionOfDividerAtIndex_1, dividerIndex);
-    }
-
-    public CGFloat minPossiblePositionOfDividerAtIndex (NSInteger dividerIndex)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_minPossiblePositionOfDividerAtIndex_1, dividerIndex);
-    }
-
-    public void setAutosaveName (NSString autosaveName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutosaveName_1, autosaveName !is null ? autosaveName.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setDividerStyle (NSSplitViewDividerStyle dividerStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDividerStyle_1, dividerStyle);
-    }
-
-    public void setIsPaneSplitter (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIsPaneSplitter_1, flag);
-    }
-
-    public void setPosition (CGFloat position, NSInteger dividerIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPosition_1ofDividerAtIndex_1, position, dividerIndex);
-    }
-
-    public void setVertical (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVertical_1, flag);
-    }
-
-}
--- a/dwt/internal/cocoa/NSStatusBar.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSStatusBar.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,62 +1,52 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSStatusBar;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSStatusItem;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSStatusBar : NSObject
-{
+public class NSStatusBar : NSObject {
 
-    public this ()
-    {
-        super();
-    }
+public this() {
+    super();
+}
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool isVertical ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isVertical) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void removeStatusItem (NSStatusItem item)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeStatusItem_1, item !is null ? item.id_ : null);
-    }
-
-    public NSStatusItem statusItemWithLength (CGFloat length)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_statusItemWithLength_1, length);
-        return result !is null ? new NSStatusItem(result) : null;
-    }
+public void removeStatusItem(NSStatusItem item) {
+    OS.objc_msgSend(this.id, OS.sel_removeStatusItem_, item !is null ? item.id : null);
+}
 
-    public static NSStatusBar systemStatusBar ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSStatusBar, OS.sel_systemStatusBar);
-        return result !is null ? new NSStatusBar(result) : null;
-    }
+public NSStatusItem statusItemWithLength(CGFloat length) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_statusItemWithLength_, length);
+    return result !is null ? new NSStatusItem(result) : null;
+}
 
-    public CGFloat thickness ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_thickness);
-    }
+public static NSStatusBar systemStatusBar() {
+    objc.id result = OS.objc_msgSend(OS.class_NSStatusBar, OS.sel_systemStatusBar);
+    return result !is null ? new NSStatusBar(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSStatusItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSStatusItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,202 +1,55 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSStatusItem;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSStatusBar;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSStatusItem : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.SEL action ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action);
-    }
+public class NSStatusItem : NSObject {
 
-    public NSImage alternateImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_alternateImage);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSAttributedString attributedTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedTitle);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public objc.SEL doubleAction ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction);
-    }
-
-    public void drawStatusBarBackgroundInRect (NSRect rect, bool highlight)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawStatusBarBackgroundInRect_1withHighlight_1, rect, highlight);
-    }
+public this() {
+    super();
+}
 
-    public bool highlightMode ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_highlightMode) !is null;
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public bool isEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
-    }
-
-    public CGFloat length ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_length);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSMenu menu ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menu);
-        return result !is null ? new NSMenu(result) : null;
-    }
-
-    public void popUpStatusItemMenu (NSMenu menu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_popUpStatusItemMenu_1, menu !is null ? menu.id_ : null);
-    }
-
-    public NSInteger sendActionOn (NSInteger mask)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_sendActionOn_1, mask);
-    }
-
-    public void setAction (objc.SEL action)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAction_1, action);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setAlternateImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlternateImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setAttributedTitle (NSAttributedString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void setDoubleAction (objc.SEL action)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, action);
-    }
-
-    public void setEnabled (bool enabled)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, enabled);
-    }
+public void drawStatusBarBackgroundInRect(NSRect rect, bool highlight) {
+    OS.objc_msgSend(this.id, OS.sel_drawStatusBarBackgroundInRect_withHighlight_, rect, highlight);
+}
 
-    public void setHighlightMode (bool highlightMode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHighlightMode_1, highlightMode);
-    }
-
-    public void setImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setLength (CGFloat length)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLength_1, length);
-    }
-
-    public void setMenu (NSMenu menu)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenu_1, menu !is null ? menu.id_ : null);
-    }
-
-    public void setTarget (id target)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, target !is null ? target.id_ : null);
-    }
+public void setHighlightMode(bool highlightMode) {
+    OS.objc_msgSend(this.id, OS.sel_setHighlightMode_, highlightMode);
+}
 
-    public void setTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void setToolTip (NSString toolTip)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setToolTip_1, toolTip !is null ? toolTip.id_ : null);
-    }
-
-    public void setView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null);
-    }
-
-    public NSStatusBar statusBar ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_statusBar);
-        return result !is null ? new NSStatusBar(result) : null;
-    }
+public void setLength(CGFloat length) {
+    OS.objc_msgSend(this.id, OS.sel_setLength_, length);
+}
 
-    public id target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString toolTip ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolTip);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSView view ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_view);
-        return result !is null ? new NSView(result) : null;
-    }
+public void setView(NSView view) {
+    OS.objc_msgSend(this.id, OS.sel_setView_, view !is null ? view.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSStepper.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSStepper.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,83 +1,72 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSStepper;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSControl;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSStepper : NSControl
-{
+public class NSStepper : NSControl {
 
-    public this ()
-    {
-        super();
-    }
+public this() {
+    super();
+}
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool autorepeat ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autorepeat) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public double increment ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_increment);
-    }
+public double increment() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_increment);
+}
 
-    public double maxValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
-    }
+public double maxValue() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_maxValue);
+}
 
-    public double minValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
-    }
+public double minValue() {
+    return OS.objc_msgSend_fpret(this.id, OS.sel_minValue);
+}
 
-    public void setAutorepeat (bool autorepeat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutorepeat_1, autorepeat);
-    }
+public void setIncrement(double increment) {
+    OS.objc_msgSend(this.id, OS.sel_setIncrement_, increment);
+}
 
-    public void setIncrement (double increment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIncrement_1, increment);
-    }
+public void setMaxValue(double maxValue) {
+    OS.objc_msgSend(this.id, OS.sel_setMaxValue_, maxValue);
+}
 
-    public void setMaxValue (double maxValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, maxValue);
-    }
+public void setMinValue(double minValue) {
+    OS.objc_msgSend(this.id, OS.sel_setMinValue_, minValue);
+}
 
-    public void setMinValue (double minValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, minValue);
-    }
+public void setValueWraps(bool valueWraps) {
+    OS.objc_msgSend(this.id, OS.sel_setValueWraps_, valueWraps);
+}
 
-    public void setValueWraps (bool valueWraps)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValueWraps_1, valueWraps);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSStepper, OS.sel_cellClass);
+}
 
-    public bool valueWraps ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_valueWraps) !is null;
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSStepper, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSStepperCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSStepperCell;
-
-import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSStepperCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool autorepeat ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autorepeat) !is null;
-    }
-
-    public double increment ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_increment);
-    }
-
-    public double maxValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
-    }
-
-    public double minValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
-    }
-
-    public void setAutorepeat (bool autorepeat)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutorepeat_1, autorepeat);
-    }
-
-    public void setIncrement (double increment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIncrement_1, increment);
-    }
-
-    public void setMaxValue (double maxValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, maxValue);
-    }
-
-    public void setMinValue (double minValue)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, minValue);
-    }
-
-    public void setValueWraps (bool valueWraps)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValueWraps_1, valueWraps);
-    }
-
-    public bool valueWraps ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_valueWraps) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSStream.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSStream;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSError;
-import dwt.internal.cocoa.NSHost;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRunLoop;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-
-
-enum NSStreamEvent : NSUInteger
-{
-    NSStreamEventNone = 0,
-    NSStreamEventOpenCompleted = 1 << 0,
-    NSStreamEventHasBytesAvailable = 1 << 1,
-    NSStreamEventHasSpaceAvailable = 1 << 2,
-    NSStreamEventErrorOccurred = 1 << 3,
-    NSStreamEventEndEncountered = 1 << 4
-}
-
-alias NSStreamEvent.NSStreamEventNone NSStreamEventNone;
-alias NSStreamEvent.NSStreamEventOpenCompleted NSStreamEventOpenCompleted;
-alias NSStreamEvent.NSStreamEventHasBytesAvailable NSStreamEventHasBytesAvailable;
-alias NSStreamEvent.NSStreamEventHasSpaceAvailable NSStreamEventHasSpaceAvailable;
-alias NSStreamEvent.NSStreamEventErrorOccurred NSStreamEventErrorOccurred;
-alias NSStreamEvent.NSStreamEventEndEncountered NSStreamEventEndEncountered;
-
-
-
-enum NSStreamStatus : NSUInteger
-{
-    NSStreamStatusNotOpen = 0,
-    NSStreamStatusOpening = 1,
-    NSStreamStatusOpen = 2,
-    NSStreamStatusReading = 3,
-    NSStreamStatusWriting = 4,
-    NSStreamStatusAtEnd = 5,
-    NSStreamStatusClosed = 6,
-    NSStreamStatusError = 7
-}
-
-alias NSStreamStatus.NSStreamStatusNotOpen NSStreamStatusNotOpen;
-alias NSStreamStatus.NSStreamStatusOpening NSStreamStatusOpening;
-alias NSStreamStatus.NSStreamStatusOpen NSStreamStatusOpen;
-alias NSStreamStatus.NSStreamStatusReading NSStreamStatusReading;
-alias NSStreamStatus.NSStreamStatusWriting NSStreamStatusWriting;
-alias NSStreamStatus.NSStreamStatusAtEnd NSStreamStatusAtEnd;
-alias NSStreamStatus.NSStreamStatusClosed NSStreamStatusClosed;
-alias NSStreamStatus.NSStreamStatusError NSStreamStatusError;
-
-
-
-public class NSStream : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void close ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_close);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static void getStreamsToHost (NSHost host, NSInteger port, /*NSInputStream** */objc.id** inputStream,
-            /*NSOutputStream** */objc.id** outputStream)
-    {
-        OS.objc_msgSend(OS.class_NSStream, OS.sel_getStreamsToHost_1port_1inputStream_1outputStream_1, host !is null ? host.id_ : null, port,
-                inputStream, outputStream);
-    }
-
-    public void open ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_open);
-    }
-
-    public id propertyForKey (NSString key)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyForKey_1, key !is null ? key.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void removeFromRunLoop (NSRunLoop aRunLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFromRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void scheduleInRunLoop (NSRunLoop aRunLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scheduleInRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public bool setProperty (id property, NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setProperty_1forKey_1, property !is null ? property.id_ : null, key !is null ? key.id_ : null) !is null;
-    }
-
-    public NSError streamError ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_streamError);
-        return result !is null ? new NSError(result) : null;
-    }
-
-    public NSStreamStatus streamStatus ()
-    {
-        return cast(NSStreamStatus) OS.objc_msgSend(this.id_, OS.sel_streamStatus);
-    }
-
-}
--- a/dwt/internal/cocoa/NSString.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSString.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,35 +1,24 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSString;
 
-import tango.core.Vararg : va_list;
-import tango.stdc.stringz : toString16z;
-import tango.text.convert.Utf : toString16;
-
 import dwt.dwthelper.utils;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCharacterSet;
-import dwt.internal.cocoa.NSComparisonResult;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSLocale;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 enum NSStringEncoding : NSUInteger
@@ -59,885 +48,104 @@
     NSProprietaryStringEncoding = 65536
 }
 
-alias NSStringEncoding.NSASCIIStringEncoding NSASCIIStringEncoding;
-alias NSStringEncoding.NSNEXTSTEPStringEncoding NSNEXTSTEPStringEncoding;
-alias NSStringEncoding.NSJapaneseEUCStringEncoding NSJapaneseEUCStringEncoding;
-alias NSStringEncoding.NSUTF8StringEncoding NSUTF8StringEncoding;
-alias NSStringEncoding.NSISOLatin1StringEncoding NSISOLatin1StringEncoding;
-alias NSStringEncoding.NSSymbolStringEncoding NSSymbolStringEncoding;
-alias NSStringEncoding.NSNonLossyASCIIStringEncoding NSNonLossyASCIIStringEncoding;
-alias NSStringEncoding.NSShiftJISStringEncoding NSShiftJISStringEncoding;
-alias NSStringEncoding.NSISOLatin2StringEncoding NSISOLatin2StringEncoding;
-alias NSStringEncoding.NSUnicodeStringEncoding NSUnicodeStringEncoding;
-alias NSStringEncoding.NSWindowsCP1251StringEncoding NSWindowsCP1251StringEncoding;
-alias NSStringEncoding.NSWindowsCP1252StringEncoding NSWindowsCP1252StringEncoding;
-alias NSStringEncoding.NSWindowsCP1253StringEncoding NSWindowsCP1253StringEncoding;
-alias NSStringEncoding.NSWindowsCP1254StringEncoding NSWindowsCP1254StringEncoding;
-alias NSStringEncoding.NSWindowsCP1250StringEncoding NSWindowsCP1250StringEncoding;
-alias NSStringEncoding.NSISO2022JPStringEncoding NSISO2022JPStringEncoding;
-alias NSStringEncoding.NSMacOSRomanStringEncoding NSMacOSRomanStringEncoding;
-alias NSStringEncoding.NSUTF16BigEndianStringEncoding NSUTF16BigEndianStringEncoding;
-alias NSStringEncoding.NSUTF16LittleEndianStringEncoding NSUTF16LittleEndianStringEncoding;
-alias NSStringEncoding.NSUTF32StringEncoding NSUTF32StringEncoding;
-alias NSStringEncoding.NSUTF32BigEndianStringEncoding NSUTF32BigEndianStringEncoding;
-alias NSStringEncoding.NSUTF32LittleEndianStringEncoding NSUTF32LittleEndianStringEncoding;
-alias NSStringEncoding.NSProprietaryStringEncoding NSProprietaryStringEncoding;
+public class NSString : NSObject {
+
+public this() {
+    super();
+}
 
-enum NSStringCompareOptions : NSUInteger
-{
-    NSCaseInsensitiveSearch = 1,
-    NSLiteralSearch = 2,
-    NSBackwardsSearch = 4,
-    NSAnchoredSearch = 8,
-    NSNumericSearch = 64,
-    NSDiacriticInsensitiveSearch = 128,
-    NSWidthInsensitiveSearch = 256,
-    NSForcedOrderingSearch = 512
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public String getString() {
+    wchar[] buffer = new wchar[length()];
+    getCharacters(buffer.ptr);
+    return buffer.toString();
 }
 
-alias NSStringCompareOptions.NSCaseInsensitiveSearch NSCaseInsensitiveSearch;
-alias NSStringCompareOptions.NSLiteralSearch NSLiteralSearch;
-alias NSStringCompareOptions.NSBackwardsSearch NSBackwardsSearch;
-alias NSStringCompareOptions.NSAnchoredSearch NSAnchoredSearch;
-alias NSStringCompareOptions.NSNumericSearch NSNumericSearch;
-alias NSStringCompareOptions.NSDiacriticInsensitiveSearch NSDiacriticInsensitiveSearch;
-alias NSStringCompareOptions.NSWidthInsensitiveSearch NSWidthInsensitiveSearch;
-alias NSStringCompareOptions.NSForcedOrderingSearch NSForcedOrderingSearch;
+public static NSString stringWith(String str) {
+    char[] buffer = new char[str.length];
+    str.getChars(0, buffer.length, buffer, 0);
+    return stringWithCharacters(buffer.toString16().ptr, buffer.length);
+}
+
+public /*const*/char* UTF8String() {
+    return cast(/*const*/char*) OS.objc_msgSend(this.id, OS.sel_UTF8String);
+}
+
+public wchar characterAtIndex(NSUInteger index) {
+    return cast(wchar) OS.objc_msgSend(this.id, OS.sel_characterAtIndex_, index);
+}
 
-enum NSStringEncodingConversionOptions : NSUInteger
-{
-    NSStringEncodingConversionAllowLossy = 1,
-    NSStringEncodingConversionExternalRepresentation = 2
+public void getCharacters(wchar* buffer) {
+    OS.objc_msgSend(this.id, OS.sel_getCharacters_, buffer);
+}
+
+public void getCharacters(wchar* buffer, NSRange aRange) {
+    OS.objc_msgSend(this.id, OS.sel_getCharacters_range_, buffer, aRange);
+}
+
+public bool isEqualToString(NSString aString) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isEqualToString_, aString !is null ? aString.id : null);
+}
+
+public NSString lastPathComponent() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_lastPathComponent);
+    return result is this.id ? this : (result !is null ? new NSString(result) : null);
 }
 
-alias NSStringEncodingConversionOptions.NSStringEncodingConversionAllowLossy NSStringEncodingConversionAllowLossy;
-alias NSStringEncodingConversionOptions.NSStringEncodingConversionExternalRepresentation NSStringEncodingConversionExternalRepresentation;
-
-public class NSString : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public /*const*/char* UTF8String ()
-    {
-        return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_UTF8String);
-    }
-
-    public static NSStringEncoding availableStringEncodings ()
-    {
-        return cast(NSStringEncoding) OS.objc_msgSend(OS.class_NSString, OS.sel_availableStringEncodings);
-    }
-
-    public bool boolValue ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_boolValue) !is null;
-    }
-
-    public /*const*/char* cString ()
-    {
-        return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_cString);
-    }
-
-    public NSUInteger cStringLength ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_cStringLength);
-    }
-
-    public /*const*/char* cStringUsingEncoding (NSStringEncoding encoding)
-    {
-        return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_cStringUsingEncoding_1, encoding);
-    }
-
-    public bool canBeConvertedToEncoding (NSStringEncoding encoding)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canBeConvertedToEncoding_1, encoding) !is null;
-    }
-
-    public NSString capitalizedString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_capitalizedString);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSComparisonResult caseInsensitiveCompare (NSString string)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_caseInsensitiveCompare_1, string !is null ? string.id_ : null);
-    }
-
-    public wchar characterAtIndex (NSUInteger index)
-    {
-        return cast(wchar) OS.objc_msgSend(this.id_, OS.sel_characterAtIndex_1, index);
-    }
-
-    public NSString commonPrefixWithString (NSString aString, NSStringCompareOptions mask)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_commonPrefixWithString_1options_1, aString !is null ? aString.id_ : null, mask);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSComparisonResult compare_ (NSString string)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1, string !is null ? string.id_ : null);
-    }
-
-    public NSComparisonResult compare_options_ (NSString string, NSStringCompareOptions mask)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1options_1, string !is null ? string.id_ : null, mask);
-    }
-
-    public NSComparisonResult compare_options_range_ (NSString string, NSStringCompareOptions mask, NSRange compareRange)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1options_1range_1, string !is null ? string.id_ : null, mask,
-                compareRange);
-    }
-
-    public NSComparisonResult compare_options_range_locale_ (NSString string, NSStringCompareOptions mask, NSRange compareRange, id locale)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_compare_1options_1range_1locale_1, string !is null ? string.id_ : null, mask,
-                compareRange, locale !is null ? locale.id_ : null);
-    }
-
-    public NSUInteger completePathIntoString (/*NSString** */objc.id** outputName, bool flag, /*NSArray** */objc.id** outputArray,
-            NSArray filterTypes)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_completePathIntoString_1caseSensitive_1matchesIntoArray_1filterTypes_1, outputName, flag, outputArray,
-                filterTypes !is null ? filterTypes.id_ : null);
-    }
+public NSUInteger length() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_length);
+}
 
-    public NSArray componentsSeparatedByCharactersInSet (NSCharacterSet separator)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_componentsSeparatedByCharactersInSet_1, separator !is null ? separator.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray componentsSeparatedByString (NSString separator)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_componentsSeparatedByString_1, separator !is null ? separator.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSData dataUsingEncoding_ (NSStringEncoding encoding)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataUsingEncoding_1, encoding);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData dataUsingEncoding_allowLossyConversion_ (NSStringEncoding encoding, bool lossy)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataUsingEncoding_1allowLossyConversion_1, encoding, lossy);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSString decomposedStringWithCanonicalMapping ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decomposedStringWithCanonicalMapping);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString decomposedStringWithCompatibilityMapping ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_decomposedStringWithCompatibilityMapping);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public static NSStringEncoding defaultCStringEncoding ()
-    {
-        return cast(NSStringEncoding) OS.objc_msgSend(OS.class_NSString, OS.sel_defaultCStringEncoding);
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public double doubleValue ()
-    {
-        return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
-    }
-
-    public NSStringEncoding fastestEncoding ()
-    {
-        return cast(NSStringEncoding) OS.objc_msgSend(this.id_, OS.sel_fastestEncoding);
-    }
-
-    public /*const*/char* fileSystemRepresentation ()
-    {
-        return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_fileSystemRepresentation);
-    }
-
-    public float floatValue ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue);
-    }
-
-    public bool getBytes (void* buffer, NSUInteger maxBufferCount, NSUInteger* usedBufferCount, NSStringEncoding encoding, NSStringEncodingConversionOptions options,
-            NSRange range, NSRangePointer leftover)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getBytes_1maxLength_1usedLength_1encoding_1options_1range_1remainingRange_1, buffer, maxBufferCount,
-                usedBufferCount, encoding, options, range, leftover) !is null;
-    }
-
-    public void getCString_ (/*char* */byte* bytes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getCString_1, bytes);
-    }
-
-    public void getCString_maxLength_ (/*char* */byte* bytes, NSUInteger maxLength)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getCString_1maxLength_1, bytes, maxLength);
-    }
-
-    public bool getCString_maxLength_encoding_ (/*char* */byte* buffer, NSUInteger maxBufferCount, NSStringEncoding encoding)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getCString_1maxLength_1encoding_1, buffer, maxBufferCount, encoding) !is null;
-    }
-
-    public void getCString_maxLength_range_remainingRange_ (/*char* */byte* bytes, NSUInteger maxLength, NSRange aRange, NSRangePointer leftoverRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getCString_1maxLength_1range_1remainingRange_1, bytes, maxLength, aRange, leftoverRange);
-    }
-
-    public void getCharacters_ (wchar* buffer)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getCharacters_1, buffer);
-    }
-
-    public void getCharacters_range_ (wchar* buffer, NSRange aRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getCharacters_1range_1, buffer, aRange);
-    }
+public NSString lowercaseString() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_lowercaseString);
+    return result is this.id ? this : (result !is null ? new NSString(result) : null);
+}
 
-    public bool getFileSystemRepresentation (/*char* */byte* cname, NSUInteger max)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getFileSystemRepresentation_1maxLength_1, cname, max) !is null;
-    }
-
-    public void getLineStart (NSUInteger* startPtr, NSUInteger* lineEndPtr, NSUInteger* contentsEndPtr, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getLineStart_1end_1contentsEnd_1forRange_1, startPtr, lineEndPtr, contentsEndPtr, range);
-    }
-
-    public void getParagraphStart (NSUInteger* startPtr, NSUInteger* parEndPtr, NSUInteger* contentsEndPtr, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getParagraphStart_1end_1contentsEnd_1forRange_1, startPtr, parEndPtr, contentsEndPtr, range);
-    }
-
-    public bool hasPrefix (NSString aString)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasPrefix_1, aString !is null ? aString.id_ : null) !is null;
-    }
-
-    public bool hasSuffix (NSString aString)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasSuffix_1, aString !is null ? aString.id_ : null) !is null;
-    }
-
-    public NSUInteger hash ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_hash);
-    }
-
-    public NSString initWithBytes (/*const*/void* bytes, NSUInteger len, NSStringEncoding encoding)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBytes_1length_1encoding_1, bytes, len, encoding);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithBytesNoCopy (/*const*/void* bytes, NSUInteger len, NSStringEncoding encoding, bool freeBuffer)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBytesNoCopy_1length_1encoding_1freeWhenDone_1, bytes, len, encoding, freeBuffer);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithCString_ (/*const*/char* bytes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCString_1, bytes);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithCString_encoding_ (/*const*/char* nullTerminatedCString, NSStringEncoding encoding)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCString_1encoding_1, nullTerminatedCString, encoding);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithCString_length_ (/*const*/char* bytes, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCString_1length_1, bytes, length);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithCStringNoCopy (/*const*/char* bytes, NSUInteger length, bool freeBuffer)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCStringNoCopy_1length_1freeWhenDone_1, bytes, length, freeBuffer);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithCharacters (/*const*/wchar* characters, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCharacters_1length_1, characters, length);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithCharactersNoCopy (/*const*/wchar* characters, NSUInteger length, bool freeBuffer)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithCharactersNoCopy_1length_1freeWhenDone_1, characters, length, freeBuffer);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithContentsOfFile_ (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1, path !is null ? path.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithContentsOfFile_encoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1encoding_1error_1, path !is null ? path.id_ : null, enc, error);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithContentsOfFile_usedEncoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1usedEncoding_1error_1, path !is null ? path.id_ : null, enc, error);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithContentsOfURL_ (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? this : null;
-    }
+public NSString stringByAddingPercentEscapesUsingEncoding(NSStringEncoding enc) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAddingPercentEscapesUsingEncoding_, enc);
+    return result is this.id ? this : (result !is null ? new NSString(result) : null);
+}
 
-    public NSString initWithContentsOfURL_encoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1encoding_1error_1, url !is null ? url.id_ : null, enc, error);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithContentsOfURL_usedEncoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1usedEncoding_1error_1, url !is null ? url.id_ : null, enc, error);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithData (NSData data, NSStringEncoding encoding)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1encoding_1, data !is null ? data.id_ : null, encoding);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithFormat_ (NSString initWithFormat)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1, initWithFormat !is null ? initWithFormat.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithFormat_arguments_ (NSString format, va_list argList)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1arguments_1, format !is null ? format.id_ : null, argList);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithFormat_locale_ (NSString format, id locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1locale_1, format !is null ? format.id_ : null,
-                locale !is null ? locale.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithFormat_locale_arguments_ (NSString format, id locale, va_list argList)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFormat_1locale_1arguments_1, format !is null ? format.id_ : null,
-                locale !is null ? locale.id_ : null, argList);
-        return result !is null ? this : null;
-    }
-
-    public NSString initWithString (NSString aString)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, aString !is null ? aString.id_ : null);
-        return result !is null ? this : null;
-    }
+public NSString stringByAppendingPathComponent(NSString str) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingPathComponent_, str !is null ? str.id : null);
+    return result is this.id ? this : (result !is null ? new NSString(result) : null);
+}
 
-    public NSString initWithUTF8String (/*const*/char* nullTerminatedCString)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUTF8String_1, nullTerminatedCString);
-        return result !is null ? this : null;
-    }
-
-    public int intValue ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_intValue);
-    }
-
-    public NSInteger integerValue ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_integerValue);
-    }
-
-    public bool isAbsolutePath ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAbsolutePath) !is null;
-    }
-
-    public bool isEqualToString (NSString aString)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToString_1, aString !is null ? aString.id_ : null) !is null;
-    }
-
-    public NSString lastPathComponent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_lastPathComponent);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSUInteger length ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_length);
-    }
-
-    public NSUInteger lengthOfBytesUsingEncoding (NSStringEncoding enc)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_lengthOfBytesUsingEncoding_1, enc);
-    }
-
-    public NSRange lineRangeForRange (NSRange range)
-    {
-        NSRange result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_lineRangeForRange_1, range);
-        return result;
-    }
-
-    public NSComparisonResult localizedCaseInsensitiveCompare (NSString string)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_localizedCaseInsensitiveCompare_1, string !is null ? string.id_ : null);
-    }
+public NSString stringByAppendingString(NSString aString) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingString_, aString !is null ? aString.id : null);
+    return result is this.id ? this : (result !is null ? new NSString(result) : null);
+}
 
-    public NSComparisonResult localizedCompare (NSString string)
-    {
-        return cast(NSComparisonResult) OS.objc_msgSend(this.id_, OS.sel_localizedCompare_1, string !is null ? string.id_ : null);
-    }
-
-    public static NSString localizedNameOfStringEncoding (NSStringEncoding encoding)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_localizedNameOfStringEncoding_1, encoding);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static id localizedStringWithFormat (NSString localizedStringWithFormat)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_localizedStringWithFormat_1,
-                localizedStringWithFormat !is null ? localizedStringWithFormat.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public long longLongValue ()
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_longLongValue);
-    }
-
-    public /*const*/char* lossyCString ()
-    {
-        return cast(/*const*/char*) OS.objc_msgSend(this.id_, OS.sel_lossyCString);
-    }
-
-    public NSString lowercaseString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_lowercaseString);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSUInteger maximumLengthOfBytesUsingEncoding (NSStringEncoding enc)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_maximumLengthOfBytesUsingEncoding_1, enc);
-    }
-
-    public NSRange paragraphRangeForRange (NSRange range)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphRangeForRange_1, range);
-        return result;
-    }
-
-    public NSArray pathComponents ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathComponents);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString pathExtension ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pathExtension);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public static NSString pathWithComponents (NSArray components)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_pathWithComponents_1, components !is null ? components.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString precomposedStringWithCanonicalMapping ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_precomposedStringWithCanonicalMapping);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString precomposedStringWithCompatibilityMapping ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_precomposedStringWithCompatibilityMapping);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public id propertyList ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyList);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary propertyListFromStringsFileFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyListFromStringsFileFormat);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSRange rangeOfCharacterFromSet_ (NSCharacterSet aSet)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfCharacterFromSet_1, aSet !is null ? aSet.id_ : null);
-        return result;
-    }
-
-    public NSRange rangeOfCharacterFromSet_options_ (NSCharacterSet aSet, NSStringCompareOptions mask)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfCharacterFromSet_1options_1, aSet !is null ? aSet.id_ : null, mask);
-        return result;
-    }
+public NSString stringByDeletingLastPathComponent() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByDeletingLastPathComponent);
+    return result is this.id ? this : (result !is null ? new NSString(result) : null);
+}
 
-    public NSRange rangeOfCharacterFromSet_options_range_ (NSCharacterSet aSet, NSStringCompareOptions mask, NSRange searchRange)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfCharacterFromSet_1options_1range_1, aSet !is null ? aSet.id_ : null, mask, searchRange);
-        return result;
-    }
-
-    public NSRange rangeOfComposedCharacterSequenceAtIndex (NSUInteger index)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfComposedCharacterSequenceAtIndex_1, index);
-        return result;
-    }
-
-    public NSRange rangeOfComposedCharacterSequencesForRange (NSRange range)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfComposedCharacterSequencesForRange_1, range);
-        return result;
-    }
-
-    public NSRange rangeOfString_ (NSString aString)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfString_1, aString !is null ? aString.id_ : null);
-        return result;
-    }
-
-    public NSRange rangeOfString_options_ (NSString aString, NSStringCompareOptions mask)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfString_1options_1, aString !is null ? aString.id_ : null, mask);
-        return result;
-    }
-
-    public NSRange rangeOfString_options_range_ (NSString aString, NSStringCompareOptions mask, NSRange searchRange)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfString_1options_1range_1, aString !is null ? aString.id_ : null, mask, searchRange);
-        return result;
-    }
-
-    public NSRange rangeOfString_options_range_locale_ (NSString aString, NSStringCompareOptions mask, NSRange searchRange, NSLocale locale)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfString_1options_1range_1locale_1, aString !is null ? aString.id_ : null, mask,
-                searchRange, locale !is null ? locale.id_ : null);
-        return result;
-    }
-
-    public NSStringEncoding smallestEncoding ()
-    {
-        return cast(NSStringEncoding) OS.objc_msgSend(this.id_, OS.sel_smallestEncoding);
-    }
-
-    public static NSString string ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_string);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString stringByAbbreviatingWithTildeInPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAbbreviatingWithTildeInPath);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByAddingPercentEscapesUsingEncoding (NSStringEncoding enc)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAddingPercentEscapesUsingEncoding_1, enc);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByAppendingFormat (NSString stringByAppendingFormat)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAppendingFormat_1,
-                stringByAppendingFormat !is null ? stringByAppendingFormat.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByAppendingPathComponent (NSString str)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAppendingPathComponent_1, str !is null ? str.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByAppendingPathExtension (NSString str)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAppendingPathExtension_1, str !is null ? str.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByAppendingString (NSString aString)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByAppendingString_1, aString !is null ? aString.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByDeletingLastPathComponent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByDeletingLastPathComponent);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
+public NSString stringByDeletingPathExtension() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByDeletingPathExtension);
+    return result is this.id ? this : (result !is null ? new NSString(result) : null);
+}
 
-    public NSString stringByDeletingPathExtension ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByDeletingPathExtension);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByExpandingTildeInPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByExpandingTildeInPath);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByFoldingWithOptions (NSStringCompareOptions options, NSLocale locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByFoldingWithOptions_1locale_1, options, locale !is null ? locale.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByPaddingToLength (NSUInteger newLength, NSString padString, NSUInteger padIndex)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByPaddingToLength_1withString_1startingAtIndex_1, newLength,
-                padString !is null ? padString.id_ : null, padIndex);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByReplacingCharactersInRange (NSRange range, NSString replacement)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByReplacingCharactersInRange_1withString_1, range,
-                replacement !is null ? replacement.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByReplacingOccurrencesOfString_withString_ (NSString target, NSString replacement)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByReplacingOccurrencesOfString_1withString_1, target !is null ? target.id_ : null,
-                replacement !is null ? replacement.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByReplacingOccurrencesOfString_withString_options_range_ (NSString target, NSString replacement, NSStringCompareOptions options,
-            NSRange searchRange)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByReplacingOccurrencesOfString_1withString_1options_1range_1,
-                target !is null ? target.id_ : null, replacement !is null ? replacement.id_ : null, options, searchRange);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByReplacingPercentEscapesUsingEncoding (NSStringEncoding enc)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByReplacingPercentEscapesUsingEncoding_1, enc);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByResolvingSymlinksInPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByResolvingSymlinksInPath);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByStandardizingPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByStandardizingPath);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString stringByTrimmingCharactersInSet (NSCharacterSet set)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringByTrimmingCharactersInSet_1, set !is null ? set.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public static id static_stringWithCString_ (/*const*/char* bytes)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1, bytes);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static id static_stringWithCString_encoding_ (/*const*/char* cString, NSStringEncoding enc)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1encoding_1, cString, enc);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString static_stringWithCString_length_ (/*const*/char* bytes, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCString_1length_1, bytes, length);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString stringWithCharacters (/*const*/wchar* characters, NSUInteger length)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCharacters_1length_1, characters, length);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString stringWith (String str)
-    {
-        char[] chars = new char[str.length];
-        str.getChars(0, chars.length, chars, 0);
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCharacters_1length_1, toString16z(chars.toString16()), chars.length);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSString stringByReplacingOccurrencesOfString(NSString target, NSString replacement) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByReplacingOccurrencesOfString_withString_, target !is null ? target.id : null, replacement !is null ? replacement.id : null);
+    return result is this.id ? this : (result !is null ? new NSString(result) : null);
+}
 
-    public static id static_stringWithContentsOfFile_ (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_stringWithContentsOfFile_encoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1encoding_1error_1, path !is null ? path.id_ : null, enc,
-                error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_stringWithContentsOfFile_usedEncoding_error_ (NSString path, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfFile_1usedEncoding_1error_1, path !is null ? path.id_ : null,
-                enc, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_stringWithContentsOfURL_ (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_stringWithContentsOfURL_encoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1encoding_1error_1, url !is null ? url.id_ : null, enc,
-                error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_stringWithContentsOfURL_usedEncoding_error_ (NSURL url, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithContentsOfURL_1usedEncoding_1error_1, url !is null ? url.id_ : null, enc,
-                error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id stringWithFormat (NSString stringWithFormat)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithFormat_1, stringWithFormat !is null ? stringWithFormat.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id stringWithString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithString_1, string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public static NSString stringWithCharacters(/*const*/wchar* characters, NSUInteger length) {
+    objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithCharacters_length_, characters, length);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public static id stringWithUTF8String (/*const*/char* nullTerminatedCString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithUTF8String_1, nullTerminatedCString);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray stringsByAppendingPaths (NSArray paths)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringsByAppendingPaths_1, paths !is null ? paths.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString substringFromIndex (NSUInteger from)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_substringFromIndex_1, from);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString substringToIndex (NSUInteger to)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_substringToIndex_1, to);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString substringWithRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_substringWithRange_1, range);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public NSString uppercaseString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_uppercaseString);
-        return result is this.id_ ? this : (result !is null ? new NSString(result) : null);
-    }
-
-    public bool writeToFile_atomically_ (NSString path, bool useAuxiliaryFile)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1, path !is null ? path.id_ : null, useAuxiliaryFile) !is null;
-    }
-
-    public bool writeToFile_atomically_encoding_error_ (NSString path, bool useAuxiliaryFile, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToFile_1atomically_1encoding_1error_1, path !is null ? path.id_ : null, useAuxiliaryFile, enc,
-                error) !is null;
-    }
-
-    public bool writeToURL_atomically_ (NSURL url, bool atomically)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1atomically_1, url !is null ? url.id_ : null, atomically) !is null;
-    }
-
-    public bool writeToURL_atomically_encoding_error_ (NSURL url, bool useAuxiliaryFile, NSStringEncoding enc, /*NSError** */objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeToURL_1atomically_1encoding_1error_1, url !is null ? url.id_ : null, useAuxiliaryFile, enc, error) !is null;
-    }
+public static NSString stringWithUTF8String(/*const*/char* nullTerminatedCString) {
+    objc.id result = OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithUTF8String_, nullTerminatedCString);
+    return result !is null ? new NSString(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSSwappedDouble.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSwappedDouble;
-
-struct NSSwappedDouble {
-    long v;
-}
--- a/dwt/internal/cocoa/NSSwappedFloat.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSSwappedFloat;
-
-struct NSSwappedFloat {
-    int v;
-}
--- a/dwt/internal/cocoa/NSTabView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTabView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,241 +1,103 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTabView;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCell : NSControlSize, NSControlTint;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSTabViewItem;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-enum NSTabViewType : NSUInteger
+enum NSTabViewType
 {
-    NSTopTabsBezelBorder = 0,
-    NSLeftTabsBezelBorder = 1,
-    NSBottomTabsBezelBorder = 2,
-    NSRightTabsBezelBorder = 3,
-    NSNoTabsBezelBorder = 4,
-    NSNoTabsLineBorder = 5,
-    NSNoTabsNoBorder = 6
+    NSTopTabsBezelBorder     = 0,
+    NSLeftTabsBezelBorder    = 1,
+    NSBottomTabsBezelBorder  = 2,
+    NSRightTabsBezelBorder   = 3,
+    NSNoTabsBezelBorder      = 4,
+    NSNoTabsLineBorder       = 5,
+    NSNoTabsNoBorder         = 6
+}
+
+public class NSTabView : NSView {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public void addTabViewItem(NSTabViewItem tabViewItem) {
+    OS.objc_msgSend(this.id, OS.sel_addTabViewItem_, tabViewItem !is null ? tabViewItem.id : null);
+}
+
+public NSRect contentRect() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_contentRect);
+    return result;
 }
 
-alias NSTabViewType.NSTopTabsBezelBorder NSTopTabsBezelBorder;
-alias NSTabViewType.NSLeftTabsBezelBorder NSLeftTabsBezelBorder;
-alias NSTabViewType.NSBottomTabsBezelBorder NSBottomTabsBezelBorder;
-alias NSTabViewType.NSRightTabsBezelBorder NSRightTabsBezelBorder;
-alias NSTabViewType.NSNoTabsBezelBorder NSNoTabsBezelBorder;
-alias NSTabViewType.NSNoTabsLineBorder NSNoTabsLineBorder;
-alias NSTabViewType.NSNoTabsNoBorder NSNoTabsNoBorder;
-
-public class NSTabView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addTabViewItem (NSTabViewItem tabViewItem)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null);
-    }
-
-    public bool allowsTruncatedLabels ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsTruncatedLabels) !is null;
-    }
-
-    public NSRect contentRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentRect);
-        return result;
-    }
-
-    public NSControlSize controlSize ()
-    {
-        return cast(NSControlSize) OS.objc_msgSend(this.id_, OS.sel_controlSize);
-    }
-
-    public NSControlTint controlTint ()
-    {
-        return cast(NSControlTint) OS.objc_msgSend(this.id_, OS.sel_controlTint);
-    }
+public void insertTabViewItem(NSTabViewItem tabViewItem, NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_insertTabViewItem_atIndex_, tabViewItem !is null ? tabViewItem.id : null, index);
+}
 
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
-
-    public NSFont font ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_font);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public NSInteger indexOfTabViewItem (NSTabViewItem tabViewItem)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null);
-    }
+public NSSize minimumSize() {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_minimumSize);
+    return result;
+}
 
-    public NSInteger indexOfTabViewItemWithIdentifier (id identifier)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_indexOfTabViewItemWithIdentifier_1, identifier !is null ? identifier.id_ : null);
-    }
-
-    public void insertTabViewItem (NSTabViewItem tabViewItem, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertTabViewItem_1atIndex_1, tabViewItem !is null ? tabViewItem.id_ : null, index);
-    }
+public void removeTabViewItem(NSTabViewItem tabViewItem) {
+    OS.objc_msgSend(this.id, OS.sel_removeTabViewItem_, tabViewItem !is null ? tabViewItem.id : null);
+}
 
-    public NSSize minimumSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_minimumSize);
-        return result;
-    }
-
-    public NSInteger numberOfTabViewItems ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfTabViewItems);
-    }
-
-    public void removeTabViewItem (NSTabViewItem tabViewItem)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null);
-    }
+public void selectTabViewItemAtIndex(NSInteger index) {
+    OS.objc_msgSend(this.id, OS.sel_selectTabViewItemAtIndex_, index);
+}
 
-    public void selectFirstTabViewItem (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectFirstTabViewItem_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectLastTabViewItem (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectLastTabViewItem_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectNextTabViewItem (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectNextTabViewItem_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectPreviousTabViewItem (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectPreviousTabViewItem_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectTabViewItem (NSTabViewItem tabViewItem)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectTabViewItem_1, tabViewItem !is null ? tabViewItem.id_ : null);
-    }
+public NSTabViewItem selectedTabViewItem() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedTabViewItem);
+    return result !is null ? new NSTabViewItem(result) : null;
+}
 
-    public void selectTabViewItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectTabViewItemAtIndex_1, index);
-    }
-
-    public void selectTabViewItemWithIdentifier (id identifier)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectTabViewItemWithIdentifier_1, identifier !is null ? identifier.id_ : null);
-    }
-
-    public NSTabViewItem selectedTabViewItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedTabViewItem);
-        return result !is null ? new NSTabViewItem(result) : null;
-    }
-
-    public void setAllowsTruncatedLabels (bool allowTruncatedLabels)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsTruncatedLabels_1, allowTruncatedLabels);
-    }
-
-    public void setControlSize (NSControlSize controlSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, controlSize);
-    }
+public void setDelegate(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setDelegate_, anObject !is null ? anObject.id : null);
+}
 
-    public void setControlTint (NSControlTint controlTint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setControlTint_1, controlTint);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
-
-    public void setFont (NSFont font)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1, font !is null ? font.id_ : null);
-    }
-
-    public void setTabViewType (NSTabViewType tabViewType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTabViewType_1, tabViewType);
-    }
+public void setFont(NSFont font) {
+    OS.objc_msgSend(this.id, OS.sel_setFont_, font !is null ? font.id : null);
+}
 
-    public NSTabViewItem tabViewItemAtIndex (NSInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItemAtIndex_1, index);
-        return result !is null ? new NSTabViewItem(result) : null;
-    }
-
-    public NSTabViewItem tabViewItemAtPoint (NSPoint point)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItemAtPoint_1, point);
-        return result !is null ? new NSTabViewItem(result) : null;
-    }
+public void setTabViewType(NSTabViewType tabViewType) {
+    OS.objc_msgSend(this.id, OS.sel_setTabViewType_, tabViewType);
+}
 
-    public NSArray tabViewItems ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabViewItems);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSTabViewType tabViewType ()
-    {
-        return cast(NSTabViewType) OS.objc_msgSend(this.id_, OS.sel_tabViewType);
-    }
-
-    public void takeSelectedTabViewItemFromSender (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_takeSelectedTabViewItemFromSender_1, sender !is null ? sender.id_ : null);
-    }
+public NSTabViewItem tabViewItemAtPoint(NSPoint point) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_tabViewItemAtPoint_, point);
+    return result !is null ? new NSTabViewItem(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSTabViewItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTabViewItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,135 +1,51 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTabViewItem;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSColor;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTabView;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSTabState
-{
-    NSSelectedTab = 0,
-    NSBackgroundTab = 1,
-    NSPressedTab = 2
+public class NSTabViewItem : NSObject {
+    
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
 }
 
-alias NSTabState.NSSelectedTab NSSelectedTab;
-alias NSTabState.NSBackgroundTab NSBackgroundTab;
-alias NSTabState.NSPressedTab NSPressedTab;
-
-public class NSTabViewItem : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSColor color ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_color);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void drawLabel (bool shouldTruncateLabel, NSRect labelRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawLabel_1inRect_1, shouldTruncateLabel, labelRect);
-    }
-
-    public id identifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_identifier);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSTabViewItem initWithIdentifier (id identifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIdentifier_1, identifier !is null ? identifier.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSTabViewItem initialFirstResponder ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initialFirstResponder);
-        return result !is null ? this : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
+    
+public cocoa.id initWithIdentifier(cocoa.id identifier) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier !is null ? identifier.id : null);
+    return result !is null ? new id(result) : null;
+}
 
-    public NSString label ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_label);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setIdentifier (id identifier)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIdentifier_1, identifier !is null ? identifier.id_ : null);
-    }
-
-    public void setInitialFirstResponder (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInitialFirstResponder_1, view !is null ? view.id_ : null);
-    }
-
-    public void setLabel (NSString label)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLabel_1, label !is null ? label.id_ : null);
-    }
+public void setLabel(NSString label) {
+    OS.objc_msgSend(this.id, OS.sel_setLabel_, label !is null ? label.id : null);
+}
 
-    public void setView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null);
-    }
-
-    public NSSize sizeOfLabel (bool computeMin)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_sizeOfLabel_1, computeMin);
-        return result;
-    }
-
-    public NSTabState tabState ()
-    {
-        return cast(NSTabState) OS.objc_msgSend(this.id_, OS.sel_tabState);
-    }
-
-    public NSTabView tabView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tabView);
-        return result !is null ? new NSTabView(result) : null;
-    }
-
-    public id view ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_view);
-        return result !is null ? new id(result) : null;
-    }
+public void setView(NSView view) {
+    OS.objc_msgSend(this.id, OS.sel_setView_, view !is null ? view.id : null);
+}
 
 }
--- a/dwt/internal/cocoa/NSTableColumn.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTableColumn.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,194 +1,86 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTableColumn;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSSortDescriptor;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTableHeaderCell;
-import dwt.internal.cocoa.NSTableView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSTableColumn : NSObject
-{
+public class NSTableColumn : NSObject {
 
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public id dataCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataCell);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id dataCellForRow (NSInteger row)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataCellForRow_1, row);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSTableHeaderCell headerCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_headerCell);
-        return result !is null ? new NSTableHeaderCell(result) : null;
-    }
-
-    public NSString headerToolTip ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_headerToolTip);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public id identifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_identifier);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSTableColumn initWithIdentifier (id identifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIdentifier_1, identifier !is null ? identifier.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
+public NSTableHeaderCell headerCell() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_headerCell);
+    return result !is null ? new NSTableHeaderCell(result) : null;
+}
 
-    public bool isHidden ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHidden) !is null;
-    }
-
-    public bool isResizable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isResizable) !is null;
-    }
+public cocoa.id initWithIdentifier(cocoa.id identifier) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier !is null ? identifier.id : null);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
-    public CGFloat maxWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_maxWidth);
-    }
-
-    public CGFloat minWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_minWidth);
-    }
-
-    public NSUInteger resizingMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_resizingMask);
-    }
+public NSUInteger resizingMask() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_resizingMask);
+}
 
-    public void setDataCell (NSCell cell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDataCell_1, cell !is null ? cell.id_ : null);
-    }
-
-    public void setEditable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, flag);
-    }
+public void setDataCell(NSCell cell) {
+    OS.objc_msgSend(this.id, OS.sel_setDataCell_, cell !is null ? cell.id : null);
+}
 
-    public void setHeaderCell (NSCell cell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHeaderCell_1, cell !is null ? cell.id_ : null);
-    }
-
-    public void setHeaderToolTip (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHeaderToolTip_1, string !is null ? string.id_ : null);
-    }
+public void setEditable(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setEditable_, flag);
+}
 
-    public void setHidden (bool hidden)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHidden_1, hidden);
-    }
-
-    public void setIdentifier (id identifier)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIdentifier_1, identifier !is null ? identifier.id_ : null);
-    }
+public void setHeaderCell(NSCell cell) {
+    OS.objc_msgSend(this.id, OS.sel_setHeaderCell_, cell !is null ? cell.id : null);
+}
 
-    public void setMaxWidth (CGFloat maxWidth)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxWidth_1, maxWidth);
-    }
-
-    public void setMinWidth (CGFloat minWidth)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinWidth_1, minWidth);
-    }
+public void setIdentifier(cocoa.id identifier) {
+    OS.objc_msgSend(this.id, OS.sel_setIdentifier_, identifier !is null ? identifier.id : null);
+}
 
-    public void setResizable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setResizable_1, flag);
-    }
-
-    public void setResizingMask (NSUInteger resizingMask)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setResizingMask_1, resizingMask);
-    }
+public void setMinWidth(CGFloat minWidth) {
+    OS.objc_msgSend(this.id, OS.sel_setMinWidth_, minWidth);
+}
 
-    public void setSortDescriptorPrototype (NSSortDescriptor sortDescriptor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSortDescriptorPrototype_1, sortDescriptor !is null ? sortDescriptor.id_ : null);
-    }
-
-    public void setTableView (NSTableView tableView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTableView_1, tableView !is null ? tableView.id_ : null);
-    }
+public void setResizingMask(NSUInteger resizingMask) {
+    OS.objc_msgSend(this.id, OS.sel_setResizingMask_, resizingMask);
+}
 
-    public void setWidth (CGFloat width)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWidth_1, width);
-    }
-
-    public void sizeToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
-    }
+public void setWidth(CGFloat width) {
+    OS.objc_msgSend(this.id, OS.sel_setWidth_, width);
+}
 
-    public NSSortDescriptor sortDescriptorPrototype ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortDescriptorPrototype);
-        return result !is null ? new NSSortDescriptor(result) : null;
-    }
-
-    public NSTableView tableView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tableView);
-        return result !is null ? new NSTableView(result) : null;
-    }
-
-    public CGFloat width ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_width);
-    }
+public CGFloat width() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_width);
+}
 
 }
--- a/dwt/internal/cocoa/NSTableHeaderCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTableHeaderCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,49 +1,49 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTableHeaderCell;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSTextFieldCell;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSTableHeaderCell : NSTextFieldCell
-{
+public class NSTableHeaderCell : NSTextFieldCell {
 
-    public this ()
-    {
-        super();
-    }
+public this() {
+    super();
+}
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void drawSortIndicatorWithFrame (NSRect cellFrame, NSView controlView, bool ascending, NSInteger priority)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawSortIndicatorWithFrame_1inView_1ascending_1priority_1, cellFrame,
-                controlView !is null ? controlView.id_ : null, ascending, priority);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSRect sortIndicatorRectForBounds (NSRect theRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_sortIndicatorRectForBounds_1, theRect);
-        return result;
-    }
+public void drawSortIndicatorWithFrame(NSRect cellFrame, NSView controlView, bool ascending, NSInteger priority) {
+    OS.objc_msgSend(this.id, OS.sel_drawSortIndicatorWithFrame_inView_ascending_priority_, cellFrame, controlView !is null ? controlView.id : null, ascending, priority);
+}
+
+public NSRect sortIndicatorRectForBounds(NSRect theRect) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_sortIndicatorRectForBounds_, theRect);
+    return result;
+}
 
 }
--- a/dwt/internal/cocoa/NSTableHeaderView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTableHeaderView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,76 +1,49 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTableHeaderView;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSTableView;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-public class NSTableHeaderView : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSTableHeaderView : NSView {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public this() {
+    super();
+}
 
-    public NSInteger columnAtPoint (NSPoint point)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_columnAtPoint_1, point);
-    }
-
-    public NSInteger draggedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_draggedColumn);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public CGFloat draggedDistance ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_draggedDistance);
-    }
-
-    public NSRect headerRectOfColumn (NSInteger column)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_headerRectOfColumn_1, column);
-        return result;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSInteger resizedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_resizedColumn);
-    }
+public NSInteger columnAtPoint(NSPoint point) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_columnAtPoint_, point);
+}
 
-    public void setTableView (NSTableView tableView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTableView_1, tableView !is null ? tableView.id_ : null);
-    }
-
-    public NSTableView tableView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tableView);
-        return result !is null ? new NSTableView(result) : null;
-    }
+public NSRect headerRectOfColumn(NSInteger column) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_headerRectOfColumn_, column);
+    return result;
+}
 
 }
--- a/dwt/internal/cocoa/NSTableView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTableView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,41 +1,33 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTableView;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSCell;
+import dwt.internal.cocoa.NSIndexSet;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSDragOperation;
-import dwt.internal.cocoa.NSEnumerator;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSIndexSet;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSNotification;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTableColumn;
 import dwt.internal.cocoa.NSTableHeaderView;
-import dwt.internal.cocoa.NSText;
-import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 enum NSTableViewColumnAutoresizingStyle : NSUInteger
@@ -48,657 +40,212 @@
     NSTableViewFirstColumnOnlyAutoresizingStyle
 }
 
-alias NSTableViewColumnAutoresizingStyle.NSTableViewNoColumnAutoresizing NSTableViewNoColumnAutoresizing;
-alias NSTableViewColumnAutoresizingStyle.NSTableViewUniformColumnAutoresizingStyle NSTableViewUniformColumnAutoresizingStyle;
-alias NSTableViewColumnAutoresizingStyle.NSTableViewSequentialColumnAutoresizingStyle NSTableViewSequentialColumnAutoresizingStyle;
-alias NSTableViewColumnAutoresizingStyle.NSTableViewReverseSequentialColumnAutoresizingStyle NSTableViewReverseSequentialColumnAutoresizingStyle;
-alias NSTableViewColumnAutoresizingStyle.NSTableViewLastColumnOnlyAutoresizingStyle NSTableViewLastColumnOnlyAutoresizingStyle;
-alias NSTableViewColumnAutoresizingStyle.NSTableViewFirstColumnOnlyAutoresizingStyle NSTableViewFirstColumnOnlyAutoresizingStyle;
+public class NSTableView : NSControl {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+public void addTableColumn(NSTableColumn column) {
+    OS.objc_msgSend(this.id, OS.sel_addTableColumn_, column !is null ? column.id : null);
+}
+
+public NSTableViewColumnAutoresizingStyle columnAutoresizingStyle() {
+    return cast(NSTableViewColumnAutoresizingStyle) OS.objc_msgSend(this.id, OS.sel_columnAutoresizingStyle);
+}
 
-enum NSTableViewSelectionHighlightStyle : NSInteger
-{
-    NSTableViewSelectionHighlightStyleRegular = 0,
-    NSTableViewSelectionHighlightStyleSourceList = 1,
+public NSIndexSet columnIndexesInRect(NSRect rect) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_columnIndexesInRect_, rect);
+    return result !is null ? new NSIndexSet(result) : null;
+}
+
+public NSInteger columnWithIdentifier(cocoa.id identifier) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_columnWithIdentifier_, identifier !is null ? identifier.id : null);
+}
+
+public void deselectAll(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_deselectAll_, sender !is null ? sender.id : null);
+}
+
+public void deselectRow(NSInteger row) {
+    OS.objc_msgSend(this.id, OS.sel_deselectRow_, row);
+}
+
+public NSRect frameOfCellAtColumn(NSInteger column, NSInteger row) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_frameOfCellAtColumn_row_, column, row);
+    return result;
+}
+
+public NSTableHeaderView headerView() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_headerView);
+    return result !is null ? new NSTableHeaderView(result) : null;
 }
 
-alias NSTableViewSelectionHighlightStyle.NSTableViewSelectionHighlightStyleRegular NSTableViewSelectionHighlightStyleRegular;
-alias NSTableViewSelectionHighlightStyle.NSTableViewSelectionHighlightStyleSourceList NSTableViewSelectionHighlightStyleSourceList;
+public void highlightSelectionInClipRect(NSRect clipRect) {
+    OS.objc_msgSend(this.id, OS.sel_highlightSelectionInClipRect_, clipRect);
+}
+
+public NSSize intercellSpacing() {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_intercellSpacing);
+    return result;
+}
+
+public bool isRowSelected(NSInteger row) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isRowSelected_, row);
+}
+
+public void moveColumn(NSInteger column, NSInteger newIndex) {
+    OS.objc_msgSend(this.id, OS.sel_moveColumn_toColumn_, column, newIndex);
+}
+
+public void noteNumberOfRowsChanged() {
+    OS.objc_msgSend(this.id, OS.sel_noteNumberOfRowsChanged);
+}
+
+public NSInteger numberOfColumns() {
+    return OS.objc_msgSend(this.id, OS.sel_numberOfColumns);
+}
 
-enum NSTableViewDropOperation : NSUInteger
-{
-    NSTableViewDropOn,
-    NSTableViewDropAbove
+public NSInteger numberOfRows() {
+    return OS.objc_msgSend(this.id, OS.sel_numberOfRows);
+}
+
+public NSInteger numberOfSelectedRows() {
+    return OS.objc_msgSend(this.id, OS.sel_numberOfSelectedRows);
+}
+
+public NSRect rectOfColumn(NSInteger column) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfColumn_, column);
+    return result;
+}
+
+public NSRect rectOfRow(NSInteger row) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfRow_, row);
+    return result;
+}
+
+public void reloadData() {
+    OS.objc_msgSend(this.id, OS.sel_reloadData);
+}
+
+public void removeTableColumn(NSTableColumn column) {
+    OS.objc_msgSend(this.id, OS.sel_removeTableColumn_, column !is null ? column.id : null);
 }
 
-alias NSTableViewDropOperation.NSTableViewDropOn NSTableViewDropOn;
-alias NSTableViewDropOperation.NSTableViewDropAbove NSTableViewDropAbove;
-
-public class NSTableView : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addTableColumn (NSTableColumn column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addTableColumn_1, column !is null ? column.id_ : null);
-    }
-
-    public bool allowsColumnReordering ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsColumnReordering) !is null;
-    }
-
-    public bool allowsColumnResizing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsColumnResizing) !is null;
-    }
-
-    public bool allowsColumnSelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsColumnSelection) !is null;
-    }
+public NSInteger rowAtPoint(NSPoint point) {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_rowAtPoint_, point);
+}
 
-    public bool allowsEmptySelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsEmptySelection) !is null;
-    }
-
-    public bool allowsMultipleSelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsMultipleSelection) !is null;
-    }
-
-    public bool allowsTypeSelect ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsTypeSelect) !is null;
-    }
-
-    public bool autoresizesAllColumnsToFit ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autoresizesAllColumnsToFit) !is null;
-    }
-
-    public NSString autosaveName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_autosaveName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool autosaveTableColumns ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autosaveTableColumns) !is null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public CGFloat rowHeight() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_rowHeight);
+}
 
-    public bool canDragRowsWithIndexes (NSIndexSet rowIndexes, NSPoint mouseDownPoint)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canDragRowsWithIndexes_1atPoint_1, rowIndexes !is null ? rowIndexes.id_ : null, mouseDownPoint) !is null;
-    }
-
-    public NSInteger clickedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_clickedColumn);
-    }
-
-    public NSInteger clickedRow ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_clickedRow);
-    }
-
-    public NSTableViewColumnAutoresizingStyle columnAtPoint (NSPoint point)
-    {
-        return cast(NSTableViewColumnAutoresizingStyle) OS.objc_msgSend(this.id_, OS.sel_columnAtPoint_1, point);
-    }
-
-    public NSInteger columnAutoresizingStyle ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_columnAutoresizingStyle);
-    }
-
-    public NSIndexSet columnIndexesInRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_columnIndexesInRect_1, rect);
-        return result !is null ? new NSIndexSet(result) : null;
-    }
-
-    public NSInteger columnWithIdentifier (id identifier)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_columnWithIdentifier_1, identifier !is null ? identifier.id_ : null);
-    }
+public NSRange rowsInRect(NSRect rect) {
+    NSRange result = NSRange();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_rowsInRect_, rect);
+    return result;
+}
 
-    public NSRange columnsInRect (NSRect rect)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_columnsInRect_1, rect);
-        return result;
-    }
-
-    public NSView cornerView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cornerView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public id dataSource ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataSource);
-        return result !is null ? new id(result) : null;
-    }
+public void scrollColumnToVisible(NSInteger column) {
+    OS.objc_msgSend(this.id, OS.sel_scrollColumnToVisible_, column);
+}
 
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void deselectAll (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deselectAll_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void deselectColumn (NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deselectColumn_1, column);
-    }
-
-    public void deselectRow (NSInteger row)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deselectRow_1, row);
-    }
-
-    public objc.SEL doubleAction ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_doubleAction);
-    }
+public void scrollRowToVisible(NSInteger row) {
+    OS.objc_msgSend(this.id, OS.sel_scrollRowToVisible_, row);
+}
 
-    public NSImage dragImageForRows (NSArray dragRows, NSEvent dragEvent, NSPointPointer dragImageOffset)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dragImageForRows_1event_1dragImageOffset_1, dragRows !is null ? dragRows.id_ : null,
-                dragEvent !is null ? dragEvent.id_ : null, dragImageOffset);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSImage dragImageForRowsWithIndexes (NSIndexSet dragRows, NSArray tableColumns, NSEvent dragEvent, NSPointPointer dragImageOffset)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dragImageForRowsWithIndexes_1tableColumns_1event_1offset_1,
-                dragRows !is null ? dragRows.id_ : null, tableColumns !is null ? tableColumns.id_ : null, dragEvent !is null ? dragEvent.id_ : null,
-                dragImageOffset);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public void drawBackgroundInClipRect (NSRect clipRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawBackgroundInClipRect_1, clipRect);
-    }
-
-    public void drawGridInClipRect (NSRect clipRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawGridInClipRect_1, clipRect);
-    }
-
-    public void drawRow (NSInteger row, NSRect clipRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawRow_1clipRect_1, row, clipRect);
-    }
-
-    public bool drawsGrid ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsGrid) !is null;
-    }
+public void selectAll(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_selectAll_, sender !is null ? sender.id : null);
+}
 
-    public void editColumn (NSInteger column, NSInteger row, NSEvent theEvent, bool select)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_editColumn_1row_1withEvent_1select_1, column, row, theEvent !is null ? theEvent.id_ : null, select);
-    }
-
-    public NSInteger editedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_editedColumn);
-    }
-
-    public NSInteger editedRow ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_editedRow);
-    }
+public void selectRow(NSInteger row, bool extend) {
+    OS.objc_msgSend(this.id, OS.sel_selectRow_byExtendingSelection_, row, extend);
+}
 
-    public NSRect frameOfCellAtColumn (NSInteger column, NSInteger row)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_frameOfCellAtColumn_1row_1, column, row);
-        return result;
-    }
-
-    public NSColor gridColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_gridColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSUInteger gridStyleMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_gridStyleMask);
-    }
-
-    public NSTableHeaderView headerView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_headerView);
-        return result !is null ? new NSTableHeaderView(result) : null;
-    }
+public void selectRowIndexes(NSIndexSet indexes, bool extend) {
+    OS.objc_msgSend(this.id, OS.sel_selectRowIndexes_byExtendingSelection_, indexes !is null ? indexes.id : null, extend);
+}
 
-    public void highlightSelectionInClipRect (NSRect clipRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_highlightSelectionInClipRect_1, clipRect);
-    }
-
-    public NSTableColumn highlightedTableColumn ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_highlightedTableColumn);
-        return result !is null ? new NSTableColumn(result) : null;
-    }
-
-    public NSImage indicatorImageInTableColumn (NSTableColumn tc)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_indicatorImageInTableColumn_1, tc !is null ? tc.id_ : null);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSSize intercellSpacing ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_intercellSpacing);
-        return result;
-    }
-
-    public bool isColumnSelected (NSInteger column)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isColumnSelected_1, column) !is null;
-    }
-
-    public bool isRowSelected (NSInteger row)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRowSelected_1, row) !is null;
-    }
-
-    public void moveColumn (NSInteger column, NSInteger newIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveColumn_1toColumn_1, column, newIndex);
-    }
+public NSInteger selectedRow() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_selectedRow);
+}
 
-    public void noteHeightOfRowsWithIndexesChanged (NSIndexSet indexSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteHeightOfRowsWithIndexesChanged_1, indexSet !is null ? indexSet.id_ : null);
-    }
-
-    public void noteNumberOfRowsChanged ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteNumberOfRowsChanged);
-    }
-
-    public NSInteger numberOfColumns ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfColumns);
-    }
-
-    public NSInteger numberOfRows ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfRows);
-    }
+public NSIndexSet selectedRowIndexes() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedRowIndexes);
+    return result !is null ? new NSIndexSet(result) : null;
+}
 
-    public NSInteger numberOfSelectedColumns ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfSelectedColumns);
-    }
-
-    public NSInteger numberOfSelectedRows ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfSelectedRows);
-    }
+public void setAllowsColumnReordering(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAllowsColumnReordering_, flag);
+}
 
-    public NSCell preparedCellAtColumn (NSInteger column, NSInteger row)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_preparedCellAtColumn_1row_1, column, row);
-        return result !is null ? new NSCell(result) : null;
-    }
-
-    public NSRect rectOfColumn (NSInteger column)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfColumn_1, column);
-        return result;
-    }
+public void setAllowsMultipleSelection(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAllowsMultipleSelection_, flag);
+}
 
-    public NSRect rectOfRow (NSInteger row)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectOfRow_1, row);
-        return result;
-    }
-
-    public void reloadData ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reloadData);
-    }
-
-    public void removeTableColumn (NSTableColumn column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeTableColumn_1, column !is null ? column.id_ : null);
-    }
-
-    public NSInteger rowAtPoint (NSPoint point)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_rowAtPoint_1, point);
-    }
-
-    public CGFloat rowHeight ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_rowHeight);
-    }
-
-    public NSRange rowsInRect (NSRect rect)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rowsInRect_1, rect);
-        return result;
-    }
+public void setBackgroundColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, color !is null ? color.id : null);
+}
 
-    public void scrollColumnToVisible (NSInteger column)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollColumnToVisible_1, column);
-    }
-
-    public void scrollRowToVisible (NSInteger row)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollRowToVisible_1, row);
-    }
-
-    public void selectAll (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectAll_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectColumn (NSInteger column, bool extend)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectColumn_1byExtendingSelection_1, column, extend);
-    }
+public void setColumnAutoresizingStyle(NSTableViewColumnAutoresizingStyle style) {
+    OS.objc_msgSend(this.id, OS.sel_setColumnAutoresizingStyle_, style);
+}
 
-    public void selectColumnIndexes (NSIndexSet indexes, bool extend)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectColumnIndexes_1byExtendingSelection_1, indexes !is null ? indexes.id_ : null, extend);
-    }
-
-    public void selectRow (NSInteger row, bool extend)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectRow_1byExtendingSelection_1, row, extend);
-    }
-
-    public void selectRowIndexes (NSIndexSet indexes, bool extend)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectRowIndexes_1byExtendingSelection_1, indexes !is null ? indexes.id_ : null, extend);
-    }
-
-    public NSInteger selectedColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedColumn);
-    }
+public void setDataSource(cocoa.id aSource) {
+    OS.objc_msgSend(this.id, OS.sel_setDataSource_, aSource !is null ? aSource.id : null);
+}
 
-    public NSEnumerator selectedColumnEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedColumnEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public NSIndexSet selectedColumnIndexes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedColumnIndexes);
-        return result !is null ? new NSIndexSet(result) : null;
-    }
-
-    public NSInteger selectedRow ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedRow);
-    }
-
-    public NSEnumerator selectedRowEnumerator ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedRowEnumerator);
-        return result !is null ? new NSEnumerator(result) : null;
-    }
-
-    public NSIndexSet selectedRowIndexes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedRowIndexes);
-        return result !is null ? new NSIndexSet(result) : null;
-    }
-
-    public NSTableViewSelectionHighlightStyle selectionHighlightStyle ()
-    {
-        return cast(NSTableViewSelectionHighlightStyle) OS.objc_msgSend(this.id_, OS.sel_selectionHighlightStyle);
-    }
-
-    public void setAllowsColumnReordering (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsColumnReordering_1, flag);
-    }
+public void setDelegate(cocoa.id delegate_) {
+    OS.objc_msgSend(this.id, OS.sel_setDelegate_, delegate_ !is null ? delegate_.id : null);
+}
 
-    public void setAllowsColumnResizing (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsColumnResizing_1, flag);
-    }
-
-    public void setAllowsColumnSelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsColumnSelection_1, flag);
-    }
-
-    public void setAllowsEmptySelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsEmptySelection_1, flag);
-    }
-
-    public void setAllowsMultipleSelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsMultipleSelection_1, flag);
-    }
+public void setDoubleAction(objc.SEL aSelector) {
+    OS.objc_msgSend(this.id, OS.sel_setDoubleAction_, aSelector);
+}
 
-    public void setAllowsTypeSelect (bool value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsTypeSelect_1, value);
-    }
-
-    public void setAutoresizesAllColumnsToFit (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutoresizesAllColumnsToFit_1, flag);
-    }
-
-    public void setAutosaveName (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutosaveName_1, name !is null ? name.id_ : null);
-    }
-
-    public void setAutosaveTableColumns (bool save)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutosaveTableColumns_1, save);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
+public void setHeaderView(NSTableHeaderView headerView) {
+    OS.objc_msgSend(this.id, OS.sel_setHeaderView_, headerView !is null ? headerView.id : null);
+}
 
-    public void setColumnAutoresizingStyle (NSTableViewColumnAutoresizingStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setColumnAutoresizingStyle_1, style);
-    }
-
-    public void setCornerView (NSView cornerView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCornerView_1, cornerView !is null ? cornerView.id_ : null);
-    }
-
-    public void setDataSource (id aSource)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDataSource_1, aSource !is null ? aSource.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setDoubleAction (objc.SEL aSelector)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDoubleAction_1, aSelector);
-    }
-
-    public void setDraggingSourceOperationMask (NSDragOperation mask, bool isLocal)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDraggingSourceOperationMask_1forLocal_1, mask, isLocal);
-    }
-
-    public void setDrawsGrid (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsGrid_1, flag);
-    }
-
-    public void setDropRow (NSInteger row, NSTableViewDropOperation op)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDropRow_1dropOperation_1, row, op);
-    }
+public void setRowHeight(CGFloat rowHeight) {
+    OS.objc_msgSend(this.id, OS.sel_setRowHeight_, rowHeight);
+}
 
-    public void setGridColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGridColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setGridStyleMask (NSUInteger gridType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGridStyleMask_1, gridType);
-    }
-
-    public void setHeaderView (NSTableHeaderView headerView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHeaderView_1, headerView !is null ? headerView.id_ : null);
-    }
-
-    public void setHighlightedTableColumn (NSTableColumn tc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHighlightedTableColumn_1, tc !is null ? tc.id_ : null);
-    }
+public void setUsesAlternatingRowBackgroundColors(bool useAlternatingRowColors) {
+    OS.objc_msgSend(this.id, OS.sel_setUsesAlternatingRowBackgroundColors_, useAlternatingRowColors);
+}
 
-    public void setIndicatorImage (NSImage anImage, NSTableColumn tc)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIndicatorImage_1inTableColumn_1, anImage !is null ? anImage.id_ : null, tc !is null ? tc.id_ : null);
-    }
-
-    public void setIntercellSpacing (NSSize aSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIntercellSpacing_1, aSize);
-    }
-
-    public void setRowHeight (CGFloat rowHeight)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRowHeight_1, rowHeight);
-    }
-
-    public void setSelectionHighlightStyle (NSTableViewSelectionHighlightStyle selectionHighlightStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectionHighlightStyle_1, selectionHighlightStyle);
-    }
+public NSArray tableColumns() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_tableColumns);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public void setSortDescriptors (NSArray array)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSortDescriptors_1, array !is null ? array.id_ : null);
-    }
-
-    public void setUsesAlternatingRowBackgroundColors (bool useAlternatingRowColors)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesAlternatingRowBackgroundColors_1, useAlternatingRowColors);
-    }
-
-    public void setVerticalMotionCanBeginDrag (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticalMotionCanBeginDrag_1, flag);
-    }
+public void tile() {
+    OS.objc_msgSend(this.id, OS.sel_tile);
+}
 
-    public void sizeLastColumnToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeLastColumnToFit);
-    }
-
-    public void sizeToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
-    }
-
-    public NSArray sortDescriptors ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortDescriptors);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSTableColumn tableColumnWithIdentifier (id identifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tableColumnWithIdentifier_1, identifier !is null ? identifier.id_ : null);
-        return result !is null ? new NSTableColumn(result) : null;
-    }
+public bool usesAlternatingRowBackgroundColors() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_usesAlternatingRowBackgroundColors);
+}
 
-    public NSArray tableColumns ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tableColumns);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void textDidBeginEditing (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidBeginEditing_1, notification !is null ? notification.id_ : null);
-    }
-
-    public void textDidChange (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidChange_1, notification !is null ? notification.id_ : null);
-    }
-
-    public void textDidEndEditing (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidEndEditing_1, notification !is null ? notification.id_ : null);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSTableView, OS.sel_cellClass);
+}
 
-    public bool textShouldBeginEditing (NSText textObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_textShouldBeginEditing_1, textObject !is null ? textObject.id_ : null) !is null;
-    }
-
-    public bool textShouldEndEditing (NSText textObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_textShouldEndEditing_1, textObject !is null ? textObject.id_ : null) !is null;
-    }
-
-    public void tile ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_tile);
-    }
-
-    public bool usesAlternatingRowBackgroundColors ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesAlternatingRowBackgroundColors) !is null;
-    }
-
-    public bool verticalMotionCanBeginDrag ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_verticalMotionCanBeginDrag) !is null;
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSTableView, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSTask.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTask;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSTask : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray arguments ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arguments);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString currentDirectoryPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentDirectoryPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary environment ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_environment);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void interrupt ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_interrupt);
-    }
-
-    public bool isRunning ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRunning) !is null;
-    }
-
-    public void launch ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_launch);
-    }
-
-    public NSString launchPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_launchPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSTask launchedTaskWithLaunchPath (NSString path, NSArray arguments)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTask, OS.sel_launchedTaskWithLaunchPath_1arguments_1, path !is null ? path.id_ : null,
-                arguments !is null ? arguments.id_ : null);
-        return result !is null ? new NSTask(result) : null;
-    }
-
-    public int processIdentifier ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_processIdentifier);
-    }
-
-    public bool resume ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_resume) !is null;
-    }
-
-    public void setArguments (NSArray arguments)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setArguments_1, arguments !is null ? arguments.id_ : null);
-    }
-
-    public void setCurrentDirectoryPath (NSString path)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCurrentDirectoryPath_1, path !is null ? path.id_ : null);
-    }
-
-    public void setEnvironment (NSDictionary dict)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnvironment_1, dict !is null ? dict.id_ : null);
-    }
-
-    public void setLaunchPath (NSString path)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLaunchPath_1, path !is null ? path.id_ : null);
-    }
-
-    public void setStandardError (id error)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStandardError_1, error !is null ? error.id_ : null);
-    }
-
-    public void setStandardInput (id input)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStandardInput_1, input !is null ? input.id_ : null);
-    }
-
-    public void setStandardOutput (id output)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStandardOutput_1, output !is null ? output.id_ : null);
-    }
-
-    public id standardError ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_standardError);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id standardInput ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_standardInput);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id standardOutput ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_standardOutput);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool suspend ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_suspend) !is null;
-    }
-
-    public void terminate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_terminate);
-    }
-
-    public int terminationStatus ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_terminationStatus);
-    }
-
-    public void waitUntilExit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_waitUntilExit);
-    }
-
-}
--- a/dwt/internal/cocoa/NSText.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSText.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,21 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSText;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSData;
 import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSSize;
@@ -24,21 +24,6 @@
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-
-
-enum NSWritingDirection
-{
-    NSWritingDirectionNatural = -1,
-    NSWritingDirectionLeftToRight = 0,
-    NSWritingDirectionRightToLeft
-}
-
-alias NSWritingDirection.NSWritingDirectionNatural NSWritingDirectionNatural;
-alias NSWritingDirection.NSWritingDirectionLeftToRight NSWritingDirectionLeftToRight;
-alias NSWritingDirection.NSWritingDirectionRightToLeft NSWritingDirectionRightToLeft;
-
-
-
 enum NSTextAlignment
 {
     NSLeftTextAlignment = 0,
@@ -48,393 +33,104 @@
     NSNaturalTextAlignment = 4
 }
 
-alias NSTextAlignment.NSLeftTextAlignment NSLeftTextAlignment;
-alias NSTextAlignment.NSRightTextAlignment NSRightTextAlignment;
-alias NSTextAlignment.NSCenterTextAlignment NSCenterTextAlignment;
-alias NSTextAlignment.NSJustifiedTextAlignment NSJustifiedTextAlignment;
-alias NSTextAlignment.NSNaturalTextAlignment NSNaturalTextAlignment;
-
-
-
-public class NSText : NSView
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSText : NSView {
+    
+public this() {
+    super();
+}
 
-    public static objc.Class static_class ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSText, OS.sel_class);
-    }
-
-    public NSData RTFDFromRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_RTFDFromRange_1, range);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData RTFFromRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_RTFFromRange_1, range);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void alignCenter (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_alignCenter_1, sender !is null ? sender.id_ : null);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public void alignLeft (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_alignLeft_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void alignRight (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_alignRight_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSTextAlignment alignment ()
-    {
-        return cast(NSTextAlignment) OS.objc_msgSend(this.id_, OS.sel_alignment);
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSWritingDirection baseWritingDirection ()
-    {
-        return cast(NSWritingDirection) OS.objc_msgSend(this.id_, OS.sel_baseWritingDirection);
-    }
-
-    public void changeFont (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_changeFont_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void checkSpelling (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_checkSpelling_1, sender !is null ? sender.id_ : null);
-    }
+public void copy(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_copy_, sender !is null ? sender.id : null);
+}
 
-    public void copy (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_copy_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void copyFont (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_copyFont_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void copyRuler (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_copyRuler_1, sender !is null ? sender.id_ : null);
-    }
+public void cut(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_cut_, sender !is null ? sender.id : null);
+}
 
-    public void cut (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cut_1, sender !is null ? sender.id_ : null);
-    }
-
-    public id delegate_ ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void deletee (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_delete_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
+public void paste(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_paste_, sender !is null ? sender.id : null);
+}
 
-    public NSFont font ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_font);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public bool importsGraphics ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_importsGraphics) !is null;
-    }
+public void replaceCharactersInRange(NSRange range, NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_replaceCharactersInRange_withString_, range, aString !is null ? aString.id : null);
+}
 
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
-
-    public bool isFieldEditor ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFieldEditor) !is null;
-    }
-
-    public bool isHorizontallyResizable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHorizontallyResizable) !is null;
-    }
+public void scrollRangeToVisible(NSRange range) {
+    OS.objc_msgSend(this.id, OS.sel_scrollRangeToVisible_, range);
+}
 
-    public bool isRichText ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRichText) !is null;
-    }
-
-    public bool isRulerVisible ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRulerVisible) !is null;
-    }
-
-    public bool isSelectable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelectable) !is null;
-    }
-
-    public bool isVerticallyResizable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isVerticallyResizable) !is null;
-    }
+public void selectAll(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_selectAll_, sender !is null ? sender.id : null);
+}
 
-    public NSSize maxSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_maxSize);
-        return result;
-    }
-
-    public NSSize minSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_minSize);
-        return result;
-    }
+public NSRange selectedRange() {
+    NSRange result = NSRange();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_selectedRange);
+    return result;
+}
 
-    public void paste (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_paste_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void pasteFont (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_pasteFont_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void pasteRuler (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_pasteRuler_1, sender !is null ? sender.id_ : null);
-    }
+public void setAlignment(NSTextAlignment mode) {
+    OS.objc_msgSend(this.id, OS.sel_setAlignment_, mode);
+}
 
-    public bool readRTFDFromFile (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readRTFDFromFile_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public void replaceCharactersInRange_withRTF_ (NSRange range, NSData rtfData)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceCharactersInRange_1withRTF_1, range, rtfData !is null ? rtfData.id_ : null);
-    }
-
-    public void replaceCharactersInRange_withRTFD_ (NSRange range, NSData rtfdData)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceCharactersInRange_1withRTFD_1, range, rtfdData !is null ? rtfdData.id_ : null);
-    }
-
-    public void replaceCharactersInRange_withString_ (NSRange range, NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceCharactersInRange_1withString_1, range, aString !is null ? aString.id_ : null);
-    }
+public void setBackgroundColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, color !is null ? color.id : null);
+}
 
-    public void scrollRangeToVisible (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollRangeToVisible_1, range);
-    }
-
-    public void selectAll (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectAll_1, sender !is null ? sender.id_ : null);
-    }
+public void setDelegate(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setDelegate_, anObject !is null ? anObject.id : null);
+}
 
-    public NSRange selectedRange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_selectedRange);
-        return result;
-    }
-
-    public void setAlignment (NSTextAlignment mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlignment_1, mode);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
+public void setDrawsBackground(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_, flag);
+}
 
-    public void setBaseWritingDirection (NSWritingDirection writingDirection)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBaseWritingDirection_1, writingDirection);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
-
-    public void setEditable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, flag);
-    }
-
-    public void setFieldEditor (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFieldEditor_1, flag);
-    }
+public void setEditable(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setEditable_, flag);
+}
 
-    public void setFont_ (NSFont obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1, obj !is null ? obj.id_ : null);
-    }
-
-    public void setFont_range_ (NSFont font, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1range_1, font !is null ? font.id_ : null, range);
-    }
+public void setFont(NSFont obj) {
+    OS.objc_msgSend(this.id, OS.sel_setFont_, obj !is null ? obj.id : null);
+}
 
-    public void setHorizontallyResizable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHorizontallyResizable_1, flag);
-    }
-
-    public void setImportsGraphics (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImportsGraphics_1, flag);
-    }
-
-    public void setMaxSize (NSSize newMaxSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxSize_1, newMaxSize);
-    }
+public void setHorizontallyResizable(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setHorizontallyResizable_, flag);
+}
 
-    public void setMinSize (NSSize newMinSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinSize_1, newMinSize);
-    }
-
-    public void setRichText (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRichText_1, flag);
-    }
-
-    public void setSelectable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectable_1, flag);
-    }
-
-    public void setSelectedRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedRange_1, range);
-    }
-
-    public void setString (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setString_1, string !is null ? string.id_ : null);
-    }
+public void setMaxSize(NSSize newMaxSize) {
+    OS.objc_msgSend(this.id, OS.sel_setMaxSize_, newMaxSize);
+}
 
-    public void setTextColor_ (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setTextColor_range_ (NSColor color, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextColor_1range_1, color !is null ? color.id_ : null, range);
-    }
+public void setMinSize(NSSize newMinSize) {
+    OS.objc_msgSend(this.id, OS.sel_setMinSize_, newMinSize);
+}
 
-    public void setUsesFontPanel (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesFontPanel_1, flag);
-    }
-
-    public void setVerticallyResizable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticallyResizable_1, flag);
-    }
-
-    public void showGuessPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showGuessPanel_1, sender !is null ? sender.id_ : null);
-    }
+public void setSelectable(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setSelectable_, flag);
+}
 
-    public void sizeToFit ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
-    }
+public void setSelectedRange(NSRange range) {
+    OS.objc_msgSend(this.id, OS.sel_setSelectedRange_, range);
+}
 
-    public NSString string ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_string);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void subscript (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_subscript_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void superscript (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_superscript_1, sender !is null ? sender.id_ : null);
-    }
+public void setString(NSString string) {
+    OS.objc_msgSend(this.id, OS.sel_setString_, string !is null ? string.id : null);
+}
 
-    public NSColor textColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void toggleRuler (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleRuler_1, sender !is null ? sender.id_ : null);
-    }
+public void setTextColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setTextColor_, color !is null ? color.id : null);
+}
 
-    public void underline (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_underline_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void unscript (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unscript_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool usesFontPanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesFontPanel) !is null;
-    }
-
-    public bool writeRTFDToFile (NSString path, bool flag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeRTFDToFile_1atomically_1, path !is null ? path.id_ : null, flag) !is null;
-    }
+public void sizeToFit() {
+    OS.objc_msgSend(this.id, OS.sel_sizeToFit);
+}
 
 }
--- a/dwt/internal/cocoa/NSTextAttachment.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTextAttachment;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSFileWrapper;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSTextAttachment : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id attachmentCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attachmentCell);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSFileWrapper fileWrapper ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileWrapper);
-        return result !is null ? new NSFileWrapper(result) : null;
-    }
-
-    public id initWithFileWrapper (NSFileWrapper fileWrapper)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFileWrapper_1, fileWrapper !is null ? fileWrapper.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setAttachmentCell (id cell)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttachmentCell_1, cell !is null ? cell.id_ : null);
-    }
-
-    public void setFileWrapper (NSFileWrapper fileWrapper)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFileWrapper_1, fileWrapper !is null ? fileWrapper.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSTextBlock.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTextBlock;
-
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSLayoutManager;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSTextContainer;
-import dwt.internal.cocoa.NSTextTable : NSTextBlockDimension, NSTextBlockLayer, NSTextBlockValueType, NSTextBlockVerticalAlignment;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSTextBlock : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSColor borderColorForEdge (NSRectEdge edge)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_borderColorForEdge_1, edge);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSRect boundsRectForContentRect (NSRect contentRect, NSRect rect, NSTextContainer textContainer, NSRange charRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundsRectForContentRect_1inRect_1textContainer_1characterRange_1, contentRect, rect,
-                textContainer !is null ? textContainer.id_ : null, charRange);
-        return result;
-    }
-
-    public CGFloat contentWidth ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_contentWidth);
-    }
-
-    public NSTextBlockValueType contentWidthValueType ()
-    {
-        return cast(NSTextBlockValueType) OS.objc_msgSend(this.id_, OS.sel_contentWidthValueType);
-    }
-
-    public void drawBackgroundWithFrame (NSRect frameRect, NSView controlView, NSRange charRange, NSLayoutManager layoutManager)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawBackgroundWithFrame_1inView_1characterRange_1layoutManager_1, frameRect,
-                controlView !is null ? controlView.id_ : null, charRange, layoutManager !is null ? layoutManager.id_ : null);
-    }
-
-    public NSRect rectForLayoutAtPoint (NSPoint startingPoint, NSRect rect, NSTextContainer textContainer, NSRange charRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectForLayoutAtPoint_1inRect_1textContainer_1characterRange_1, startingPoint, rect,
-                textContainer !is null ? textContainer.id_ : null, charRange);
-        return result;
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setBorderColor_ (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBorderColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setBorderColor_forEdge_ (NSColor color, NSRectEdge edge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBorderColor_1forEdge_1, color !is null ? color.id_ : null, edge);
-    }
-
-    public void setContentWidth (CGFloat val, NSTextBlockValueType type)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentWidth_1type_1, val, type);
-    }
-
-    public void setValue (CGFloat val, NSTextBlockValueType type, NSTextBlockDimension dimension)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setValue_1type_1forDimension_1, val, type, dimension);
-    }
-
-    public void setVerticalAlignment (NSTextBlockVerticalAlignment alignment)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVerticalAlignment_1, alignment);
-    }
-
-    public void setWidth_type_forLayer_ (CGFloat val, NSTextBlockValueType type, NSTextBlockLayer layer)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWidth_1type_1forLayer_1, val, type, layer);
-    }
-
-    public void setWidth_type_forLayer_edge_ (CGFloat val, NSTextBlockValueType type, NSTextBlockLayer layer, NSRectEdge edge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWidth_1type_1forLayer_1edge_1, val, type, layer, edge);
-    }
-
-    public CGFloat valueForDimension (NSTextBlockDimension dimension)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_valueForDimension_1, dimension);
-    }
-
-    public NSTextBlockValueType valueTypeForDimension (NSTextBlockDimension dimension)
-    {
-        return cast(NSTextBlockValueType) OS.objc_msgSend(this.id_, OS.sel_valueTypeForDimension_1, dimension);
-    }
-
-    public NSTextBlockVerticalAlignment verticalAlignment ()
-    {
-        return cast(NSTextBlockVerticalAlignment) OS.objc_msgSend(this.id_, OS.sel_verticalAlignment);
-    }
-
-    public CGFloat widthForLayer (NSTextBlockLayer layer, NSRectEdge edge)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_widthForLayer_1edge_1, layer, edge);
-    }
-
-    public NSTextBlockValueType widthValueTypeForLayer (NSTextBlockLayer layer, NSRectEdge edge)
-    {
-        return cast(NSTextBlockValueType) OS.objc_msgSend(this.id_, OS.sel_widthValueTypeForLayer_1edge_1, layer, edge);
-    }
-
-}
--- a/dwt/internal/cocoa/NSTextContainer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTextContainer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,167 +1,61 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTextContainer;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSLayoutManager;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSTextView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-
+public class NSTextContainer : NSObject {
 
-enum NSLineSweepDirection
-{
-    NSLineSweepLeft = 0,
-    NSLineSweepRight = 1,
-    NSLineSweepDown = 2,
-    NSLineSweepUp = 3
+public this() {
+    super();
 }
 
-alias NSLineSweepDirection.NSLineSweepLeft NSLineSweepLeft;
-alias NSLineSweepDirection.NSLineSweepRight NSLineSweepRight;
-alias NSLineSweepDirection.NSLineSweepDown NSLineSweepDown;
-alias NSLineSweepDirection.NSLineSweepUp NSLineSweepUp;
-
-
+public this(objc.id id) {
+    super(id);
+}
 
-enum NSLineMovementDirection
-{
-    NSLineDoesntMove = 0,
-    NSLineMovesLeft = 1,
-    NSLineMovesRight = 2,
-    NSLineMovesDown = 3,
-    NSLineMovesUp = 4
+public this(cocoa.id id) {
+    super(id);
 }
 
-alias NSLineMovementDirection.NSLineDoesntMove NSLineDoesntMove;
-alias NSLineMovementDirection.NSLineMovesLeft NSLineMovesLeft;
-alias NSLineMovementDirection.NSLineMovesRight NSLineMovesRight;
-alias NSLineMovementDirection.NSLineMovesDown NSLineMovesDown;
-alias NSLineMovementDirection.NSLineMovesUp NSLineMovesUp;
-
-
-
-public class NSTextContainer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public NSSize containerSize() {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_containerSize);
+    return result;
+}
 
-    public NSSize containerSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_containerSize);
-        return result;
-    }
-
-    public bool containsPoint (NSPoint point)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_containsPoint_1, point) !is null;
-    }
-
-    public bool heightTracksTextView ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_heightTracksTextView) !is null;
-    }
-
-    public id initWithContainerSize (NSSize size)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContainerSize_1, size);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isSimpleRectangularTextContainer ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSimpleRectangularTextContainer) !is null;
-    }
-
-    public NSLayoutManager layoutManager ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_layoutManager);
-        return result !is null ? new NSLayoutManager(result) : null;
-    }
+public NSTextContainer initWithContainerSize(NSSize size) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContainerSize_, size);
+    return result is this.id ? this : (result !is null ? new NSTextContainer(result) : null);
+}
 
-    public CGFloat lineFragmentPadding ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineFragmentPadding);
-    }
-
-    public NSRect lineFragmentRectForProposedRect (NSRect proposedRect, NSLineSweepDirection sweepDirection, NSLineMovementDirection movementDirection, NSRectPointer remainingRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentRectForProposedRect_1sweepDirection_1movementDirection_1remainingRect_1,
-                proposedRect, sweepDirection, movementDirection, remainingRect);
-        return result;
-    }
-
-    public void replaceLayoutManager (NSLayoutManager newLayoutManager)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceLayoutManager_1, newLayoutManager !is null ? newLayoutManager.id_ : null);
-    }
-
-    public void setContainerSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContainerSize_1, size);
-    }
-
-    public void setHeightTracksTextView (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHeightTracksTextView_1, flag);
-    }
+public void setContainerSize(NSSize size) {
+    OS.objc_msgSend(this.id, OS.sel_setContainerSize_, size);
+}
 
-    public void setLayoutManager (NSLayoutManager layoutManager)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLayoutManager_1, layoutManager !is null ? layoutManager.id_ : null);
-    }
-
-    public void setLineFragmentPadding (CGFloat pad)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineFragmentPadding_1, pad);
-    }
-
-    public void setTextView (NSTextView textView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextView_1, textView !is null ? textView.id_ : null);
-    }
+public void setLineFragmentPadding(CGFloat pad) {
+    OS.objc_msgSend(this.id, OS.sel_setLineFragmentPadding_, pad);
+}
 
-    public void setWidthTracksTextView (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWidthTracksTextView_1, flag);
-    }
-
-    public NSTextView textView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textView);
-        return result !is null ? new NSTextView(result) : null;
-    }
-
-    public bool widthTracksTextView ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_widthTracksTextView) !is null;
-    }
+public void setWidthTracksTextView(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setWidthTracksTextView_, flag);
+}
 
 }
--- a/dwt/internal/cocoa/NSTextField.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTextField.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,192 +1,73 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTextField;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSControl;
-import dwt.internal.cocoa.NSNotification;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSText;
-import dwt.internal.cocoa.NSTextFieldCell : NSTextFieldBezelStyle;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSTextField : NSControl
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool acceptsFirstResponder ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstResponder) !is null;
-    }
+public class NSTextField : NSControl {
 
-    public bool allowsEditingTextAttributes ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsEditingTextAttributes) !is null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public NSTextFieldBezelStyle bezelStyle ()
-    {
-        return cast(NSTextFieldBezelStyle) OS.objc_msgSend(this.id_, OS.sel_bezelStyle);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
-
-    public bool importsGraphics ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_importsGraphics) !is null;
-    }
-
-    public bool isBezeled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBezeled) !is null;
-    }
-
-    public bool isBordered ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isBordered) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
-
-    public bool isSelectable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelectable) !is null;
-    }
+public void setBackgroundColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, color !is null ? color.id : null);
+}
 
-    public void selectText (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectText_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void setAllowsEditingTextAttributes (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsEditingTextAttributes_1, flag);
-    }
+public void setBordered(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setBordered_, flag);
+}
 
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setBezelStyle (NSTextFieldBezelStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezelStyle_1, style);
-    }
-
-    public void setBezeled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag);
-    }
-
-    public void setBordered (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBordered_1, flag);
-    }
+public void setDelegate(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setDelegate_, anObject !is null ? anObject.id : null);
+}
 
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
+public void setDrawsBackground(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_, flag);
+}
 
-    public void setEditable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, flag);
-    }
-
-    public void setImportsGraphics (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImportsGraphics_1, flag);
-    }
+public void setEditable(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setEditable_, flag);
+}
 
-    public void setSelectable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectable_1, flag);
-    }
-
-    public void setTextColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextColor_1, color !is null ? color.id_ : null);
-    }
+public void setSelectable(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setSelectable_, flag);
+}
 
-    public void setTitleWithMnemonic (NSString stringWithAmpersand)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWithMnemonic_1, stringWithAmpersand !is null ? stringWithAmpersand.id_ : null);
-    }
-
-    public NSColor textColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public void setTextColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setTextColor_, color !is null ? color.id : null);
+}
 
-    public void textDidBeginEditing (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidBeginEditing_1, notification !is null ? notification.id_ : null);
-    }
-
-    public void textDidChange (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidChange_1, notification !is null ? notification.id_ : null);
-    }
+public static objc.Class cellClass() {
+    return cast(objc.Class) OS.objc_msgSend(OS.class_NSTextField, OS.sel_cellClass);
+}
 
-    public void textDidEndEditing (NSNotification notification)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_textDidEndEditing_1, notification !is null ? notification.id_ : null);
-    }
-
-    public bool textShouldBeginEditing (NSText textObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_textShouldBeginEditing_1, textObject !is null ? textObject.id_ : null) !is null;
-    }
-
-    public bool textShouldEndEditing (NSText textObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_textShouldEndEditing_1, textObject !is null ? textObject.id_ : null) !is null;
-    }
+public static void setCellClass(objc.Class factoryId) {
+    OS.objc_msgSend(OS.class_NSTextField, OS.sel_setCellClass_, factoryId);
+}
 
 }
--- a/dwt/internal/cocoa/NSTextFieldCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTextFieldCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,133 +1,46 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTextFieldCell;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSActionCell;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSAttributedString;
 import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSText;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSTextFieldBezelStyle
-{
-    NSTextFieldSquareBezel = 0,
-    NSTextFieldRoundedBezel = 1
+public class NSTextFieldCell : NSActionCell {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
 }
 
-alias NSTextFieldBezelStyle.NSTextFieldSquareBezel NSTextFieldSquareBezel;
-alias NSTextFieldBezelStyle.NSTextFieldRoundedBezel NSTextFieldRoundedBezel;
-
-public class NSTextFieldCell : NSActionCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray allowedInputSourceLocales ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allowedInputSourceLocales);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSTextFieldBezelStyle bezelStyle ()
-    {
-        return cast(NSTextFieldBezelStyle) OS.objc_msgSend(this.id_, OS.sel_bezelStyle);
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
-
-    public NSAttributedString placeholderAttributedString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderAttributedString);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSString placeholderString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_placeholderString);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setAllowedInputSourceLocales (NSArray localeIdentifiers)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowedInputSourceLocales_1, localeIdentifiers !is null ? localeIdentifiers.id_ : null);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setBezelStyle (NSTextFieldBezelStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBezelStyle_1, style);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
-
-    public void setPlaceholderAttributedString (NSAttributedString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaceholderAttributedString_1, string !is null ? string.id_ : null);
-    }
+public void setTextColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setTextColor_, color !is null ? color.id : null);
+}
 
-    public void setPlaceholderString (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPlaceholderString_1, string !is null ? string.id_ : null);
-    }
-
-    public void setTextColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextColor_1, color !is null ? color.id_ : null);
-    }
-
-    public NSText setUpFieldEditorAttributes (NSText textObj)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_setUpFieldEditorAttributes_1, textObj !is null ? textObj.id_ : null);
-        return result !is null ? new NSText(result) : null;
-    }
-
-    public void setWantsNotificationForMarkedText (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWantsNotificationForMarkedText_1, flag);
-    }
-
-    public NSColor textColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textColor);
-        return result !is null ? new NSColor(result) : null;
-    }
+public NSColor textColor() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_textColor);
+    return result !is null ? new NSColor(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSTextList.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTextList;
-
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSTextList : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSTextList initWithMarkerFormat (NSString format, NSUInteger mask)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithMarkerFormat_1options_1, format !is null ? format.id_ : null, mask);
-        return result !is null ? this : null;
-    }
-
-    public NSUInteger listOptions ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_listOptions);
-    }
-
-    public NSString markerForItemNumber (NSInteger itemNum)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_markerForItemNumber_1, itemNum);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString markerFormat ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_markerFormat);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSTextStorage.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTextStorage.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,175 +1,47 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTextStorage;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSLayoutManager;
 import dwt.internal.cocoa.NSMutableAttributedString;
-import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSTextStorage : NSMutableAttributedString
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addLayoutManager (NSLayoutManager obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addLayoutManager_1, obj !is null ? obj.id_ : null);
-    }
-
-    public NSArray attributeRuns ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeRuns);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSInteger changeInLength ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_changeInLength);
-    }
-
-    public NSArray characters ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_characters);
-        return result !is null ? new NSArray(result) : null;
-    }
+public class NSTextStorage : NSMutableAttributedString {
 
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void edited (NSUInteger editedMask, NSRange range, NSInteger delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_edited_1range_1changeInLength_1, editedMask, range, delta);
-    }
-
-    public NSUInteger editedMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_editedMask);
-    }
+public this() {
+    super();
+}
 
-    public NSRange editedRange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_editedRange);
-        return result;
-    }
-
-    public void ensureAttributesAreFixedInRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_ensureAttributesAreFixedInRange_1, range);
-    }
-
-    public bool fixesAttributesLazily ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fixesAttributesLazily) !is null;
-    }
-
-    public NSFont font ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_font);
-        return result !is null ? new NSFont(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSColor foregroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_foregroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void invalidateAttributesInRange (NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateAttributesInRange_1, range);
-    }
-
-    public NSArray layoutManagers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_layoutManagers);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray paragraphs ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_paragraphs);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void processEditing ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_processEditing);
-    }
-
-    public void removeLayoutManager (NSLayoutManager obj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeLayoutManager_1, obj !is null ? obj.id_ : null);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setAttributeRuns (NSArray attributeRuns)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributeRuns_1, attributeRuns !is null ? attributeRuns.id_ : null);
-    }
-
-    public void setCharacters (NSArray characters)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCharacters_1, characters !is null ? characters.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setFont (NSFont font)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFont_1, font !is null ? font.id_ : null);
-    }
+public void addLayoutManager(NSLayoutManager obj) {
+    OS.objc_msgSend(this.id, OS.sel_addLayoutManager_, obj !is null ? obj.id : null);
+}
 
-    public void setForegroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setForegroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setParagraphs (NSArray paragraphs)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setParagraphs_1, paragraphs !is null ? paragraphs.id_ : null);
-    }
-
-    public void setWords (NSArray words)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWords_1, words !is null ? words.id_ : null);
-    }
-
-    public NSArray words ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_words);
-        return result !is null ? new NSArray(result) : null;
-    }
+public NSArray paragraphs() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_paragraphs);
+    return result !is null ? new NSArray(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSTextTab.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTextTab.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,83 +1,51 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTextTab;
 
-import dwt.internal.cocoa.CGFloat;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSText : NSTextAlignment;
+import dwt.internal.cocoa.NSParagraphStyle;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSTextTabType
-{
-    NSLeftTabStopType = 0,
-    NSRightTabStopType,
-    NSCenterTabStopType,
-    NSDecimalTabStopType
+public class NSTextTab : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
 }
 
-alias NSTextTabType.NSLeftTabStopType NSLeftTabStopType;
-alias NSTextTabType.NSRightTabStopType NSRightTabStopType;
-alias NSTextTabType.NSCenterTabStopType NSCenterTabStopType;
-alias NSTextTabType.NSDecimalTabStopType NSDecimalTabStopType;
-
-public class NSTextTab : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSTextAlignment alignment ()
-    {
-        return cast(NSTextAlignment) OS.objc_msgSend(this.id_, OS.sel_alignment);
-    }
+public NSTextTab initWithType(NSTextTabType type, CGFloat loc) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithType_location_, type, loc);
+    return result is this.id ? this : (result !is null ? new NSTextTab(result) : null);
+}
 
-    public NSTextTab initWithTextAlignment (NSTextAlignment alignment, CGFloat loc, NSDictionary options)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTextAlignment_1location_1options_1, alignment, loc,
-                options !is null ? options.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSTextTab initWithType (NSTextTabType type, CGFloat loc)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithType_1location_1, type, loc);
-        return result !is null ? this : null;
-    }
+public CGFloat location() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_location);
+}
 
-    public CGFloat location ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_location);
-    }
-
-    public NSDictionary options ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_options);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSTextTabType tabStopType ()
-    {
-        return cast(NSTextTabType) OS.objc_msgSend(this.id_, OS.sel_tabStopType);
-    }
+public NSTextTabType tabStopType() {
+    return cast(NSTextTabType) OS.objc_msgSend(this.id, OS.sel_tabStopType);
+}
 
 }
--- a/dwt/internal/cocoa/NSTextTable.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTextTable;
-
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSLayoutManager;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSTextBlock;
-import dwt.internal.cocoa.NSTextContainer;
-import dwt.internal.cocoa.NSTextTableBlock;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSTextBlockValueType : NSUInteger
-{
-    NSTextBlockAbsoluteValueType = 0,
-    NSTextBlockPercentageValueType = 1
-}
-
-alias NSTextBlockValueType.NSTextBlockAbsoluteValueType NSTextBlockAbsoluteValueType;
-alias NSTextBlockValueType.NSTextBlockPercentageValueType NSTextBlockPercentageValueType;
-
-enum NSTextBlockDimension : NSUInteger
-{
-    NSTextBlockWidth = 0,
-    NSTextBlockMinimumWidth = 1,
-    NSTextBlockMaximumWidth = 2,
-    NSTextBlockHeight = 4,
-    NSTextBlockMinimumHeight = 5,
-    NSTextBlockMaximumHeight = 6
-}
-
-alias NSTextBlockDimension.NSTextBlockWidth NSTextBlockWidth;
-alias NSTextBlockDimension.NSTextBlockMinimumWidth NSTextBlockMinimumWidth;
-alias NSTextBlockDimension.NSTextBlockMaximumWidth NSTextBlockMaximumWidth;
-alias NSTextBlockDimension.NSTextBlockHeight NSTextBlockHeight;
-alias NSTextBlockDimension.NSTextBlockMinimumHeight NSTextBlockMinimumHeight;
-alias NSTextBlockDimension.NSTextBlockMaximumHeight NSTextBlockMaximumHeight;
-
-enum NSTextBlockVerticalAlignment : NSUInteger
-{
-    NSTextBlockTopAlignment = 0,
-    NSTextBlockMiddleAlignment = 1,
-    NSTextBlockBottomAlignment = 2,
-    NSTextBlockBaselineAlignment = 3
-}
-
-alias NSTextBlockVerticalAlignment.NSTextBlockTopAlignment NSTextBlockTopAlignment;
-alias NSTextBlockVerticalAlignment.NSTextBlockMiddleAlignment NSTextBlockMiddleAlignment;
-alias NSTextBlockVerticalAlignment.NSTextBlockBottomAlignment NSTextBlockBottomAlignment;
-alias NSTextBlockVerticalAlignment.NSTextBlockBaselineAlignment NSTextBlockBaselineAlignment;
-
-enum NSTextBlockLayer : NSInteger
-{
-    NSTextBlockPadding = -1,
-    NSTextBlockBorder = 0,
-    NSTextBlockMargin = 1
-}
-
-alias NSTextBlockLayer.NSTextBlockPadding NSTextBlockPadding;
-alias NSTextBlockLayer.NSTextBlockBorder NSTextBlockBorder;
-alias NSTextBlockLayer.NSTextBlockMargin NSTextBlockMargin;
-
-enum NSTextTableLayoutAlgorithm : NSUInteger
-{
-    NSTextTableAutomaticLayoutAlgorithm = 0,
-    NSTextTableFixedLayoutAlgorithm = 1
-}
-
-alias NSTextTableLayoutAlgorithm.NSTextTableAutomaticLayoutAlgorithm NSTextTableAutomaticLayoutAlgorithm;
-alias NSTextTableLayoutAlgorithm.NSTextTableFixedLayoutAlgorithm NSTextTableFixedLayoutAlgorithm;
-
-public class NSTextTable : NSTextBlock
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSRect boundsRectForBlock (NSTextTableBlock block, NSRect contentRect, NSRect rect, NSTextContainer textContainer, NSRange charRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundsRectForBlock_1contentRect_1inRect_1textContainer_1characterRange_1,
-                block !is null ? block.id_ : null, contentRect, rect, textContainer !is null ? textContainer.id_ : null, charRange);
-        return result;
-    }
-
-    public bool collapsesBorders ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_collapsesBorders) !is null;
-    }
-
-    public void drawBackgroundForBlock (NSTextTableBlock block, NSRect frameRect, NSView controlView, NSRange charRange,
-            NSLayoutManager layoutManager)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawBackgroundForBlock_1withFrame_1inView_1characterRange_1layoutManager_1, block !is null ? block.id_ : null,
-                frameRect, controlView !is null ? controlView.id_ : null, charRange, layoutManager !is null ? layoutManager.id_ : null);
-    }
-
-    public bool hidesEmptyCells ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hidesEmptyCells) !is null;
-    }
-
-    public NSTextTableLayoutAlgorithm layoutAlgorithm ()
-    {
-        return cast(NSTextTableLayoutAlgorithm) OS.objc_msgSend(this.id_, OS.sel_layoutAlgorithm);
-    }
-
-    public NSUInteger numberOfColumns ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfColumns);
-    }
-
-    public NSRect rectForBlock (NSTextTableBlock block, NSPoint startingPoint, NSRect rect, NSTextContainer textContainer, NSRange charRange)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectForBlock_1layoutAtPoint_1inRect_1textContainer_1characterRange_1,
-                block !is null ? block.id_ : null, startingPoint, rect, textContainer !is null ? textContainer.id_ : null, charRange);
-        return result;
-    }
-
-    public void setCollapsesBorders (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCollapsesBorders_1, flag);
-    }
-
-    public void setHidesEmptyCells (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHidesEmptyCells_1, flag);
-    }
-
-    public void setLayoutAlgorithm (NSTextTableLayoutAlgorithm algorithm)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLayoutAlgorithm_1, algorithm);
-    }
-
-    public void setNumberOfColumns (NSUInteger numCols)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNumberOfColumns_1, numCols);
-    }
-
-}
--- a/dwt/internal/cocoa/NSTextTableBlock.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTextTableBlock;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSTextBlock;
-import dwt.internal.cocoa.NSTextTable;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSTextTableBlock : NSTextBlock
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSInteger columnSpan ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_columnSpan);
-    }
-
-    public id initWithTable (NSTextTable table, NSInteger row, NSInteger rowSpan, NSInteger col, NSInteger colSpan)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTable_1startingRow_1rowSpan_1startingColumn_1columnSpan_1,
-                table !is null ? table.id_ : null, row, rowSpan, col, colSpan);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger rowSpan ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_rowSpan);
-    }
-
-    public NSInteger startingColumn ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_startingColumn);
-    }
-
-    public NSInteger startingRow ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_startingRow);
-    }
-
-    public NSTextTable table ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_table);
-        return result !is null ? new NSTextTable(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSTextView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTextView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,968 +1,58 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTextView;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSColor;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSDragOperation;
-import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSLayoutManager;
-import dwt.internal.cocoa.NSParagraphStyle;
-import dwt.internal.cocoa.NSPasteboard;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSRulerMarker;
-import dwt.internal.cocoa.NSRulerView;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSText;
 import dwt.internal.cocoa.NSTextContainer;
 import dwt.internal.cocoa.NSTextStorage;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSSelectionAffinity
-{
-    NSSelectionAffinityUpstream = 0,
-    NSSelectionAffinityDownstream = 1
+public class NSTextView : NSText {
+
+public this() {
+    super();
 }
 
-alias NSSelectionAffinity.NSSelectionAffinityUpstream NSSelectionAffinityUpstream;
-alias NSSelectionAffinity.NSSelectionAffinityDownstream NSSelectionAffinityDownstream;
+public this(objc.id id) {
+    super(id);
+}
 
-enum NSSelectionGranularity
-{
-    NSSelectByCharacter = 0,
-    NSSelectByWord = 1,
-    NSSelectByParagraph = 2
+public this(cocoa.id id) {
+    super(id);
 }
 
-alias NSSelectionGranularity.NSSelectByCharacter NSSelectByCharacter;
-alias NSSelectionGranularity.NSSelectByWord NSSelectByWord;
-alias NSSelectionGranularity.NSSelectByParagraph NSSelectByParagraph;
-
-public class NSTextView : NSText
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray acceptableDragTypes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_acceptableDragTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool acceptsGlyphInfo ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsGlyphInfo) !is null;
-    }
-
-    public void alignJustified (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_alignJustified_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSArray allowedInputSourceLocales ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allowedInputSourceLocales);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool allowsDocumentBackgroundColorChange ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsDocumentBackgroundColorChange) !is null;
-    }
-
-    public bool allowsImageEditing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsImageEditing) !is null;
-    }
-
-    public bool allowsUndo ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsUndo) !is null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void breakUndoCoalescing ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_breakUndoCoalescing);
-    }
-
-    public void changeAttributes (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_changeAttributes_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void changeColor (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_changeColor_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void changeDocumentBackgroundColor (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_changeDocumentBackgroundColor_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSUInteger characterIndexForInsertionAtPoint (NSPoint point)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_characterIndexForInsertionAtPoint_1, point);
-    }
-
-    public void cleanUpAfterDragOperation ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cleanUpAfterDragOperation);
-    }
-
-    public void clickedOnLink (id link, NSUInteger charIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_clickedOnLink_1atIndex_1, link !is null ? link.id_ : null, charIndex);
-    }
-
-    public void complete (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_complete_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSArray completionsForPartialWordRange (NSRange charRange, NSInteger* index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_completionsForPartialWordRange_1indexOfSelectedItem_1, charRange, index);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSParagraphStyle defaultParagraphStyle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaultParagraphStyle);
-        return result !is null ? new NSParagraphStyle(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void didChangeText ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_didChangeText);
-    }
-
-    public bool displaysLinkToolTips ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_displaysLinkToolTips) !is null;
-    }
-
-    public NSImage dragImageForSelectionWithEvent (NSEvent event, NSPointPointer origin)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dragImageForSelectionWithEvent_1origin_1, event !is null ? event.id_ : null, origin);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSDragOperation dragOperationForDraggingInfo (id dragInfo, NSString type)
-    {
-        return cast(NSDragOperation) OS.objc_msgSend(this.id_, OS.sel_dragOperationForDraggingInfo_1type_1, dragInfo !is null ? dragInfo.id_ : null,
-                type !is null ? type.id_ : null);
-    }
-
-    public bool dragSelectionWithEvent (NSEvent event, NSSize mouseOffset, bool slideBack)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_dragSelectionWithEvent_1offset_1slideBack_1, event !is null ? event.id_ : null, mouseOffset, slideBack) !is null;
-    }
-
-    public void drawInsertionPointInRect (NSRect rect, NSColor color, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawInsertionPointInRect_1color_1turnedOn_1, rect, color !is null ? color.id_ : null, flag);
-    }
-
-    public void drawViewBackgroundInRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawViewBackgroundInRect_1, rect);
-    }
-
-    public bool drawsBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_drawsBackground) !is null;
-    }
-
-    public NSRect firstRectForCharacterRange (NSRange range)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, id_, OS.sel_firstRectForCharacterRange_1, range);
-        return result;
-    }
-
-    public bool importsGraphics ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_importsGraphics) !is null;
-    }
-
-    public id initWithFrame_ (NSRect frameRect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1, frameRect);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithFrame_textContainer_ (NSRect frameRect, NSTextContainer container)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1textContainer_1, frameRect, container !is null ? container.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void insertCompletion (NSString word, NSRange charRange, NSInteger movement, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertCompletion_1forPartialWordRange_1movement_1isFinal_1, word !is null ? word.id_ : null, charRange,
-                movement, flag);
-    }
-
-    public void insertText (id insertString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertText_1, insertString !is null ? insertString.id_ : null);
-    }
-
-    public NSColor insertionPointColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_insertionPointColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public void invalidateTextContainerOrigin ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateTextContainerOrigin);
-    }
-
-    public bool isAutomaticLinkDetectionEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAutomaticLinkDetectionEnabled) !is null;
-    }
-
-    public bool isAutomaticQuoteSubstitutionEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAutomaticQuoteSubstitutionEnabled) !is null;
-    }
-
-    public bool isContinuousSpellCheckingEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isContinuousSpellCheckingEnabled) !is null;
-    }
+public NSDictionary markedTextAttributes() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_markedTextAttributes);
+    return result !is null ? new NSDictionary(result) : null;
+}
 
-    public bool isEditable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEditable) !is null;
-    }
-
-    public bool isFieldEditor ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFieldEditor) !is null;
-    }
-
-    public bool isGrammarCheckingEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isGrammarCheckingEnabled) !is null;
-    }
-
-    public bool isRichText ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRichText) !is null;
-    }
-
-    public bool isRulerVisible ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRulerVisible) !is null;
-    }
-
-    public bool isSelectable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSelectable) !is null;
-    }
-
-    public NSLayoutManager layoutManager ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_layoutManager);
-        return result !is null ? new NSLayoutManager(result) : null;
-    }
-
-    public NSDictionary linkTextAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_linkTextAttributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void loosenKerning (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_loosenKerning_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void lowerBaseline (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_lowerBaseline_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSDictionary markedTextAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_markedTextAttributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void orderFrontLinkPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontLinkPanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFrontListPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontListPanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFrontSpacingPanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontSpacingPanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFrontTablePanel (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontTablePanel_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void outline (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_outline_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void pasteAsPlainText (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_pasteAsPlainText_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void pasteAsRichText (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_pasteAsRichText_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void performFindPanelAction (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performFindPanelAction_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSString preferredPasteboardTypeFromArray (NSArray availableTypes, NSArray allowedTypes)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_preferredPasteboardTypeFromArray_1restrictedToTypesFromArray_1,
-                availableTypes !is null ? availableTypes.id_ : null, allowedTypes !is null ? allowedTypes.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void raiseBaseline (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_raiseBaseline_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSRange rangeForUserCharacterAttributeChange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeForUserCharacterAttributeChange);
-        return result;
-    }
-
-    public NSRange rangeForUserCompletion ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeForUserCompletion);
-        return result;
-    }
-
-    public NSRange rangeForUserParagraphAttributeChange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeForUserParagraphAttributeChange);
-        return result;
-    }
-
-    public NSRange rangeForUserTextChange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeForUserTextChange);
-        return result;
-    }
-
-    public NSArray rangesForUserCharacterAttributeChange ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rangesForUserCharacterAttributeChange);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray rangesForUserParagraphAttributeChange ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rangesForUserParagraphAttributeChange);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray rangesForUserTextChange ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rangesForUserTextChange);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool readSelectionFromPasteboard_ (NSPasteboard pboard)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readSelectionFromPasteboard_1, pboard !is null ? pboard.id_ : null) !is null;
-    }
-
-    public bool readSelectionFromPasteboard_type_ (NSPasteboard pboard, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_readSelectionFromPasteboard_1type_1, pboard !is null ? pboard.id_ : null,
-                type !is null ? type.id_ : null) !is null;
-    }
-
-    public NSArray readablePasteboardTypes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_readablePasteboardTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static void registerForServices ()
-    {
-        OS.objc_msgSend(OS.class_NSTextView, OS.sel_registerForServices);
-    }
-
-    public void replaceTextContainer (NSTextContainer newContainer)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceTextContainer_1, newContainer !is null ? newContainer.id_ : null);
-    }
-
-    public void rulerView_didAddMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1didAddMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null);
-    }
-
-    public void rulerView_didMoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1didMoveMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null);
-    }
-
-    public void rulerView_didRemoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1didRemoveMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null);
-    }
-
-    public void rulerView_handleMouseDown_ (NSRulerView ruler, NSEvent event)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1handleMouseDown_1, ruler !is null ? ruler.id_ : null, event !is null ? event.id_ : null);
-    }
-
-    public bool rulerView_shouldAddMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_rulerView_1shouldAddMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null) !is null;
-    }
-
-    public bool rulerView_shouldMoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_rulerView_1shouldMoveMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null) !is null;
-    }
-
-    public bool rulerView_shouldRemoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_rulerView_1shouldRemoveMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null) !is null;
-    }
-
-    public CGFloat rulerView_willAddMarker_atLocation_ (NSRulerView ruler, NSRulerMarker marker, CGFloat location)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_rulerView_1willAddMarker_1atLocation_1, ruler !is null ? ruler.id_ : null,
-                marker !is null ? marker.id_ : null, location);
-    }
-
-    public CGFloat rulerView_willMoveMarker_toLocation_ (NSRulerView ruler, NSRulerMarker marker, CGFloat location)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_rulerView_1willMoveMarker_1toLocation_1, ruler !is null ? ruler.id_ : null,
-                marker !is null ? marker.id_ : null, location);
-    }
+public void setRichText(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setRichText_, flag);
+}
 
-    public NSArray selectedRanges ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedRanges);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSDictionary selectedTextAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedTextAttributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSSelectionAffinity selectionAffinity ()
-    {
-        return cast(NSSelectionAffinity) OS.objc_msgSend(this.id_, OS.sel_selectionAffinity);
-    }
-
-    public NSSelectionGranularity selectionGranularity ()
-    {
-        return cast(NSSelectionGranularity) OS.objc_msgSend(this.id_, OS.sel_selectionGranularity);
-    }
-
-    public NSRange selectionRangeForProposedRange (NSRange proposedCharRange, NSSelectionGranularity granularity)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_selectionRangeForProposedRange_1granularity_1, proposedCharRange, granularity);
-        return result;
-    }
-
-    public void setAcceptsGlyphInfo (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAcceptsGlyphInfo_1, flag);
-    }
-
-    public void setAlignment (NSTextAlignment alignment, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlignment_1range_1, alignment, range);
-    }
-
-    public void setAllowedInputSourceLocales (NSArray localeIdentifiers)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowedInputSourceLocales_1, localeIdentifiers !is null ? localeIdentifiers.id_ : null);
-    }
-
-    public void setAllowsDocumentBackgroundColorChange (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsDocumentBackgroundColorChange_1, flag);
-    }
-
-    public void setAllowsImageEditing (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsImageEditing_1, flag);
-    }
-
-    public void setAllowsUndo (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsUndo_1, flag);
-    }
-
-    public void setAutomaticLinkDetectionEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutomaticLinkDetectionEnabled_1, flag);
-    }
-
-    public void setAutomaticQuoteSubstitutionEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutomaticQuoteSubstitutionEnabled_1, flag);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setBaseWritingDirection (NSWritingDirection writingDirection, NSRange range)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBaseWritingDirection_1range_1, writingDirection, range);
-    }
-
-    public void setConstrainedFrameSize (NSSize desiredSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setConstrainedFrameSize_1, desiredSize);
-    }
-
-    public void setContinuousSpellCheckingEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContinuousSpellCheckingEnabled_1, flag);
-    }
-
-    public void setDefaultParagraphStyle (NSParagraphStyle paragraphStyle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDefaultParagraphStyle_1, paragraphStyle !is null ? paragraphStyle.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setDisplaysLinkToolTips (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDisplaysLinkToolTips_1, flag);
-    }
-
-    public void setDrawsBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsBackground_1, flag);
-    }
-
-    public void setEditable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEditable_1, flag);
-    }
-
-    public void setFieldEditor (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFieldEditor_1, flag);
-    }
-
-    public void setGrammarCheckingEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGrammarCheckingEnabled_1, flag);
-    }
-
-    public void setImportsGraphics (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImportsGraphics_1, flag);
-    }
-
-    public void setInsertionPointColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInsertionPointColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setLinkTextAttributes (NSDictionary attributeDictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLinkTextAttributes_1, attributeDictionary !is null ? attributeDictionary.id_ : null);
-    }
-
-    public void setMarkedTextAttributes (NSDictionary attributeDictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMarkedTextAttributes_1, attributeDictionary !is null ? attributeDictionary.id_ : null);
-    }
-
-    public void setNeedsDisplayInRect (NSRect rect, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNeedsDisplayInRect_1avoidAdditionalLayout_1, rect, flag);
-    }
-
-    public void setRichText (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRichText_1, flag);
-    }
-
-    public void setRulerVisible (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRulerVisible_1, flag);
-    }
-
-    public void setSelectable (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectable_1, flag);
-    }
-
-    public void setSelectedRange_ (NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedRange_1, charRange);
-    }
-
-    public void setSelectedRange_affinity_stillSelecting_ (NSRange charRange, NSSelectionAffinity affinity, bool stillSelectingFlag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedRange_1affinity_1stillSelecting_1, charRange, affinity, stillSelectingFlag);
-    }
-
-    public void setSelectedRanges_ (NSArray ranges)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedRanges_1, ranges !is null ? ranges.id_ : null);
-    }
-
-    public void setSelectedRanges_affinity_stillSelecting_ (NSArray ranges, NSSelectionAffinity affinity, bool stillSelectingFlag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedRanges_1affinity_1stillSelecting_1, ranges !is null ? ranges.id_ : null, affinity,
-                stillSelectingFlag);
-    }
-
-    public void setSelectedTextAttributes (NSDictionary attributeDictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedTextAttributes_1, attributeDictionary !is null ? attributeDictionary.id_ : null);
-    }
-
-    public void setSelectionGranularity (NSSelectionGranularity granularity)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectionGranularity_1, granularity);
-    }
-
-    public void setSmartInsertDeleteEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSmartInsertDeleteEnabled_1, flag);
-    }
-
-    public void setSpellingState (NSInteger value, NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSpellingState_1range_1, value, charRange);
-    }
-
-    public void setTextContainer (NSTextContainer container)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextContainer_1, container !is null ? container.id_ : null);
-    }
-
-    public void setTextContainerInset (NSSize inset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTextContainerInset_1, inset);
-    }
-
-    public void setTypingAttributes (NSDictionary attrs)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTypingAttributes_1, attrs !is null ? attrs.id_ : null);
-    }
-
-    public void setUsesFindPanel (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesFindPanel_1, flag);
-    }
-
-    public void setUsesFontPanel (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesFontPanel_1, flag);
-    }
+public NSTextContainer textContainer() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_textContainer);
+    return result !is null ? new NSTextContainer(result) : null;
+}
 
-    public void setUsesRuler (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesRuler_1, flag);
-    }
-
-    public bool shouldChangeTextInRange (NSRange affectedCharRange, NSString replacementString)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldChangeTextInRange_1replacementString_1, affectedCharRange,
-                replacementString !is null ? replacementString.id_ : null) !is null;
-    }
-
-    public bool shouldChangeTextInRanges (NSArray affectedRanges, NSArray replacementStrings)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldChangeTextInRanges_1replacementStrings_1, affectedRanges !is null ? affectedRanges.id_ : null,
-                replacementStrings !is null ? replacementStrings.id_ : null) !is null;
-    }
-
-    public bool shouldDrawInsertionPoint ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldDrawInsertionPoint) !is null;
-    }
-
-    public void showFindIndicatorForRange (NSRange charRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showFindIndicatorForRange_1, charRange);
-    }
-
-    public NSRange smartDeleteRangeForProposedRange (NSRange proposedCharRange)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_smartDeleteRangeForProposedRange_1, proposedCharRange);
-        return result;
-    }
-
-    public NSString smartInsertAfterStringForString (NSString pasteString, NSRange charRangeToReplace)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_smartInsertAfterStringForString_1replacingRange_1,
-                pasteString !is null ? pasteString.id_ : null, charRangeToReplace);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString smartInsertBeforeStringForString (NSString pasteString, NSRange charRangeToReplace)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_smartInsertBeforeStringForString_1replacingRange_1,
-                pasteString !is null ? pasteString.id_ : null, charRangeToReplace);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool smartInsertDeleteEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_smartInsertDeleteEnabled) !is null;
-    }
-
-    public void smartInsertForString (NSString pasteString, NSRange charRangeToReplace, /*NSString** */objc.id** beforeString, /*NSString** */objc.id* afterString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_smartInsertForString_1replacingRange_1beforeString_1afterString_1,
-                pasteString !is null ? pasteString.id_ : null, charRangeToReplace, beforeString, afterString);
-    }
-
-    public NSInteger spellCheckerDocumentTag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_spellCheckerDocumentTag);
-    }
-
-    public void startSpeaking (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_startSpeaking_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void stopSpeaking (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopSpeaking_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSTextContainer textContainer ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainer);
-        return result !is null ? new NSTextContainer(result) : null;
-    }
-
-    public NSSize textContainerInset ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_textContainerInset);
-        return result;
-    }
-
-    public NSPoint textContainerOrigin ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_textContainerOrigin);
-        return result;
-    }
-
-    public NSTextStorage textStorage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textStorage);
-        return result !is null ? new NSTextStorage(result) : null;
-    }
-
-    public void tightenKerning (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_tightenKerning_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void toggleAutomaticLinkDetection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleAutomaticLinkDetection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void toggleAutomaticQuoteSubstitution (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleAutomaticQuoteSubstitution_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void toggleBaseWritingDirection (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleBaseWritingDirection_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void toggleContinuousSpellChecking (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleContinuousSpellChecking_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void toggleGrammarChecking (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleGrammarChecking_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void toggleSmartInsertDelete (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleSmartInsertDelete_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void toggleTraditionalCharacterShape (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleTraditionalCharacterShape_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void turnOffKerning (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_turnOffKerning_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void turnOffLigatures (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_turnOffLigatures_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSDictionary typingAttributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typingAttributes);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void updateDragTypeRegistration ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateDragTypeRegistration);
-    }
-
-    public void updateFontPanel ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateFontPanel);
-    }
-
-    public void updateInsertionPointStateAndRestartTimer (bool restartFlag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateInsertionPointStateAndRestartTimer_1, restartFlag);
-    }
-
-    public void updateRuler ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateRuler);
-    }
-
-    public void useAllLigatures (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_useAllLigatures_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void useStandardKerning (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_useStandardKerning_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void useStandardLigatures (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_useStandardLigatures_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool usesFindPanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesFindPanel) !is null;
-    }
-
-    public bool usesFontPanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesFontPanel) !is null;
-    }
-
-    public bool usesRuler ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesRuler) !is null;
-    }
-
-    public id validRequestorForSendType (NSString sendType, NSString returnType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id_ : null,
-                returnType !is null ? returnType.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray writablePasteboardTypes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_writablePasteboardTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool writeSelectionToPasteboard_type_ (NSPasteboard pboard, NSString type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeSelectionToPasteboard_1type_1, pboard !is null ? pboard.id_ : null, type !is null ? type.id_ : null) !is null;
-    }
-
-    public bool writeSelectionToPasteboard_types_ (NSPasteboard pboard, NSArray types)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeSelectionToPasteboard_1types_1, pboard !is null ? pboard.id_ : null,
-                types !is null ? types.id_ : null) !is null;
-    }
+public NSTextStorage textStorage() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_textStorage);
+    return result !is null ? new NSTextStorage(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSThread.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSThread.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,167 +1,51 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSThread;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSMutableDictionary;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSThread : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSThread : NSObject {
 
-    public static NSArray callStackReturnAddresses ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSThread, OS.sel_callStackReturnAddresses);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void cancel ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancel);
-    }
-
-    public static NSThread currentThread ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSThread, OS.sel_currentThread);
-        return result !is null ? new NSThread(result) : null;
-    }
+public this() {
+    super();
+}
 
-    public static void detachNewThreadSelector (objc.SEL selector, id target, id argument)
-    {
-        OS.objc_msgSend(OS.class_NSThread, OS.sel_detachNewThreadSelector_1toTarget_1withObject_1, selector, target !is null ? target.id_ : null,
-                argument !is null ? argument.id_ : null);
-    }
-
-    public static void exit ()
-    {
-        OS.objc_msgSend(OS.class_NSThread, OS.sel_exit);
-    }
-
-    public id initWithTarget (id target, objc.SEL selector, id argument)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithTarget_1selector_1object_1, target !is null ? target.id_ : null, selector,
-                argument !is null ? argument.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public bool isCancelled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isCancelled) !is null;
-    }
-
-    public bool isExecuting ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isExecuting) !is null;
-    }
-
-    public bool isFinished ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFinished) !is null;
-    }
-
-    public static bool static_isMainThread ()
-    {
-        return OS.objc_msgSend(OS.class_NSThread, OS.sel_isMainThread) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool isMainThread ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMainThread) !is null;
-    }
-
-    public static bool isMultiThreaded ()
-    {
-        return OS.objc_msgSend(OS.class_NSThread, OS.sel_isMultiThreaded) !is null;
-    }
-
-    public void main ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_main);
-    }
-
-    public static NSThread mainThread ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSThread, OS.sel_mainThread);
-        return result !is null ? new NSThread(result) : null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setName (NSString n)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setName_1, n !is null ? n.id_ : null);
-    }
+public static NSThread currentThread() {
+    objc.id result = OS.objc_msgSend(OS.class_NSThread, OS.sel_currentThread);
+    return result !is null ? new NSThread(result) : null;
+}
 
-    public void setStackSize (NSUInteger s)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStackSize_1, s);
-    }
-
-    public static bool setThreadPriority (double p)
-    {
-        return OS.objc_msgSend(OS.class_NSThread, OS.sel_setThreadPriority_1, p) !is null;
-    }
-
-    public static void sleepForTimeInterval (NSTimeInterval ti)
-    {
-        OS.objc_msgSend(OS.class_NSThread, OS.sel_sleepForTimeInterval_1, ti);
-    }
-
-    public static void sleepUntilDate (NSDate date)
-    {
-        OS.objc_msgSend(OS.class_NSThread, OS.sel_sleepUntilDate_1, date !is null ? date.id_ : null);
-    }
+public static bool isMainThread() {
+    return OS.objc_msgSend_bool(OS.class_NSThread, OS.sel_isMainThread);
+}
 
-    public NSUInteger stackSize ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_stackSize);
-    }
-
-    public void start ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_start);
-    }
-
-    public NSMutableDictionary threadDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_threadDictionary);
-        return result !is null ? new NSMutableDictionary(result) : null;
-    }
-
-    public static double threadPriority ()
-    {
-        return OS.objc_msgSend_fpret(OS.class_NSThread, OS.sel_threadPriority);
-    }
+public NSMutableDictionary threadDictionary() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_threadDictionary);
+    return result !is null ? new NSMutableDictionary(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSTimeInterval.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.NSTimeInterval;
-
-alias double NSTimeInterval;
\ No newline at end of file
--- a/dwt/internal/cocoa/NSTimeZone.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTimeZone.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,214 +1,41 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTimeZone;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSLocale;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSTimeZoneNameStyle : NSInteger
-{
-    NSTimeZoneNameStyleStandard,
-    NSTimeZoneNameStyleShortStandard,
-    NSTimeZoneNameStyleDaylightSaving,
-    NSTimeZoneNameStyleShortDaylightSaving
+public class NSTimeZone : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
 }
 
-alias NSTimeZoneNameStyle.NSTimeZoneNameStyleStandard NSTimeZoneNameStyleStandard;
-alias NSTimeZoneNameStyle.NSTimeZoneNameStyleShortStandard NSTimeZoneNameStyleShortStandard;
-alias NSTimeZoneNameStyle.NSTimeZoneNameStyleDaylightSaving NSTimeZoneNameStyleDaylightSaving;
-alias NSTimeZoneNameStyle.NSTimeZoneNameStyleShortDaylightSaving NSTimeZoneNameStyleShortDaylightSaving;
-
-public class NSTimeZone : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString abbreviation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_abbreviation);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSDictionary abbreviationDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_abbreviationDictionary);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSString abbreviationForDate (NSDate aDate)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_abbreviationForDate_1, aDate !is null ? aDate.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSData data ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_data);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSTimeInterval daylightSavingTimeOffset ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_daylightSavingTimeOffset);
-    }
-
-    public NSTimeInterval daylightSavingTimeOffsetForDate (NSDate aDate)
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_daylightSavingTimeOffsetForDate_1, aDate !is null ? aDate.id_ : null);
-    }
-
-    public static NSTimeZone defaultTimeZone ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_defaultTimeZone);
-        return result !is null ? new NSTimeZone(result) : null;
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initWithName_ (NSString tzName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1, tzName !is null ? tzName.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithName_data_ (NSString tzName, NSData aData)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1data_1, tzName !is null ? tzName.id_ : null, aData !is null ? aData.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isDaylightSavingTime ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDaylightSavingTime) !is null;
-    }
-
-    public bool isDaylightSavingTimeForDate (NSDate aDate)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDaylightSavingTimeForDate_1, aDate !is null ? aDate.id_ : null) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public bool isEqualToTimeZone (NSTimeZone aTimeZone)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToTimeZone_1, aTimeZone !is null ? aTimeZone.id_ : null) !is null;
-    }
-
-    public static NSArray knownTimeZoneNames ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_knownTimeZoneNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static NSTimeZone localTimeZone ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_localTimeZone);
-        return result !is null ? new NSTimeZone(result) : null;
-    }
-
-    public NSString localizedName (NSTimeZoneNameStyle style, NSLocale locale)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedName_1locale_1, style, locale !is null ? locale.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDate nextDaylightSavingTimeTransition ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextDaylightSavingTimeTransition);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public NSDate nextDaylightSavingTimeTransitionAfterDate (NSDate aDate)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextDaylightSavingTimeTransitionAfterDate_1, aDate !is null ? aDate.id_ : null);
-        return result !is null ? new NSDate(result) : null;
-    }
-
-    public static void resetSystemTimeZone ()
-    {
-        OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_resetSystemTimeZone);
-    }
-
-    public NSInteger secondsFromGMT ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_secondsFromGMT);
-    }
-
-    public NSInteger secondsFromGMTForDate (NSDate aDate)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_secondsFromGMTForDate_1, aDate !is null ? aDate.id_ : null);
-    }
-
-    public static void setDefaultTimeZone (NSTimeZone aTimeZone)
-    {
-        OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_setDefaultTimeZone_1, aTimeZone !is null ? aTimeZone.id_ : null);
-    }
-
-    public static NSTimeZone systemTimeZone ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_systemTimeZone);
-        return result !is null ? new NSTimeZone(result) : null;
-    }
-
-    public static id timeZoneForSecondsFromGMT (NSInteger seconds)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneForSecondsFromGMT_1, seconds);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id timeZoneWithAbbreviation (NSString abbreviation)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithAbbreviation_1, abbreviation !is null ? abbreviation.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_timeZoneWithName_ (NSString tzName)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithName_1, tzName !is null ? tzName.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_timeZoneWithName_data_ (NSString tzName, NSData aData)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithName_1data_1, tzName !is null ? tzName.id_ : null,
-                aData !is null ? aData.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public static NSTimeZone defaultTimeZone() {
+    objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_defaultTimeZone);
+    return result !is null ? new NSTimeZone(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSTimer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTimer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,111 +1,55 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTimer;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSInvocation;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-import dwt.dwthelper.utils;
-
-public class NSTimer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
+public class NSTimer : NSObject {
 
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void fire ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_fire);
-    }
+public this() {
+    super();
+}
 
-    public NSDate fireDate ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fireDate);
-        return result !is null ? new NSDate(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public id initWithFireDate (NSDate date, NSTimeInterval ti, id t, objc.SEL s, id ui, bool rep)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFireDate_1interval_1target_1selector_1userInfo_1repeats_1,
-                date !is null ? date.id_ : null, ti, t !is null ? t.id_ : null, s, ui !is null ? ui.id_ : null, rep);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void invalidate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidate);
-    }
-
-    public bool isValid ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isValid) !is null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public static NSTimer static_scheduledTimerWithTimeInterval_invocation_repeats_ (NSTimeInterval ti, NSInvocation invocation, bool yesOrNo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimer, OS.sel_scheduledTimerWithTimeInterval_1invocation_1repeats_1, ti,
-                invocation !is null ? invocation.id_ : null, yesOrNo);
-        return result !is null ? new NSTimer(result) : null;
-    }
+public void invalidate() {
+    OS.objc_msgSend(this.id, OS.sel_invalidate);
+}
 
-    public static NSTimer static_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ (NSTimeInterval ti, id aTarget, String aSelector,
-            objc.id userInfo, bool yesOrNo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimer, OS.sel_scheduledTimerWithTimeInterval_1target_1selector_1userInfo_1repeats_1, ti,
-                aTarget !is null ? aTarget.id_ : null, aSelector.ptr, userInfo, yesOrNo);
-        return result !is null ? new NSTimer(result) : null;
-    }
-
-    public void setFireDate (NSDate date)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFireDate_1, date !is null ? date.id_ : null);
-    }
+public static NSTimer scheduledTimerWithTimeInterval(NSTimeInterval ti, cocoa.id aTarget, objc.SEL aSelector, cocoa.id userInfo, bool yesOrNo) {
+    objc.id result = OS.objc_msgSend(OS.class_NSTimer, OS.sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, ti, aTarget !is null ? aTarget.id : null, aSelector, userInfo !is null ? userInfo.id : null, yesOrNo);
+    return result !is null ? new NSTimer(result) : null;
+}
 
-    public NSTimeInterval timeInterval ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_timeInterval);
-    }
-
-    public static NSTimer static_timerWithTimeInterval_invocation_repeats_ (NSTimeInterval ti, NSInvocation invocation, bool yesOrNo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimer, OS.sel_timerWithTimeInterval_1invocation_1repeats_1, ti,
-                invocation !is null ? invocation.id_ : null, yesOrNo);
-        return result !is null ? new NSTimer(result) : null;
-    }
+public void setFireDate(NSDate date) {
+    OS.objc_msgSend(this.id, OS.sel_setFireDate_, date !is null ? date.id : null);
+}
 
-    public static NSTimer static_timerWithTimeInterval_target_selector_userInfo_repeats_ (NSTimeInterval ti, id aTarget, String aSelector, id userInfo,
-            bool yesOrNo)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTimer, OS.sel_timerWithTimeInterval_1target_1selector_1userInfo_1repeats_1, ti,
-                aTarget !is null ? aTarget.id_ : null, aSelector.ptr, userInfo !is null ? userInfo.id_ : null, yesOrNo);
-        return result !is null ? new NSTimer(result) : null;
-    }
-
-    public objc.id userInfo ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_userInfo);
-    }
+public cocoa.id userInfo() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_userInfo);
+    return result !is null ? new cocoa.id(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSTokenField.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTokenField;
-
-import dwt.internal.cocoa.NSCharacterSet;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSTextField;
-import dwt.internal.cocoa.NSTokenFieldCell : NSTokenStyle;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSTokenField : NSTextField
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSTimeInterval completionDelay ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_completionDelay);
-    }
-
-    public static NSTimeInterval defaultCompletionDelay ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(OS.class_NSTokenField, OS.sel_defaultCompletionDelay);
-    }
-
-    public static NSCharacterSet defaultTokenizingCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTokenField, OS.sel_defaultTokenizingCharacterSet);
-        return result !is null ? new NSCharacterSet(result) : null;
-    }
-
-    public void setCompletionDelay (NSTimeInterval delay)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCompletionDelay_1, delay);
-    }
-
-    public void setTokenStyle (NSTokenStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTokenStyle_1, style);
-    }
-
-    public void setTokenizingCharacterSet (NSCharacterSet characterSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTokenizingCharacterSet_1, characterSet !is null ? characterSet.id_ : null);
-    }
-
-    public NSTokenStyle tokenStyle ()
-    {
-        return cast(NSTokenStyle) OS.objc_msgSend(this.id_, OS.sel_tokenStyle);
-    }
-
-    public NSCharacterSet tokenizingCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tokenizingCharacterSet);
-        return result !is null ? new NSCharacterSet(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSTokenFieldCell.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTokenFieldCell;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSCharacterSet;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSTextFieldCell;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSTokenStyle : NSUInteger
-{
-    NSDefaultTokenStyle,
-    NSPlainTextTokenStyle,
-    NSRoundedTokenStyle
-}
-
-alias NSTokenStyle.NSDefaultTokenStyle NSDefaultTokenStyle;
-alias NSTokenStyle.NSPlainTextTokenStyle NSPlainTextTokenStyle;
-alias NSTokenStyle.NSRoundedTokenStyle NSRoundedTokenStyle;
-
-public class NSTokenFieldCell : NSTextFieldCell
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSTimeInterval completionDelay ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_completionDelay);
-    }
-
-    public static NSTimeInterval defaultCompletionDelay ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(OS.class_NSTokenFieldCell, OS.sel_defaultCompletionDelay);
-    }
-
-    public static NSCharacterSet defaultTokenizingCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTokenFieldCell, OS.sel_defaultTokenizingCharacterSet);
-        return result !is null ? new NSCharacterSet(result) : null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setCompletionDelay (NSTimeInterval delay)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCompletionDelay_1, delay);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public void setTokenStyle (NSTokenStyle style)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTokenStyle_1, style);
-    }
-
-    public void setTokenizingCharacterSet (NSCharacterSet characterSet)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTokenizingCharacterSet_1, characterSet !is null ? characterSet.id_ : null);
-    }
-
-    public NSTokenStyle tokenStyle ()
-    {
-        return cast(NSTokenStyle) OS.objc_msgSend(this.id_, OS.sel_tokenStyle);
-    }
-
-    public NSCharacterSet tokenizingCharacterSet ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_tokenizingCharacterSet);
-        return result !is null ? new NSCharacterSet(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSToolbar.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSToolbar;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSToolbarDisplayMode
-{
-    NSToolbarDisplayModeDefault,
-    NSToolbarDisplayModeIconAndLabel,
-    NSToolbarDisplayModeIconOnly,
-    NSToolbarDisplayModeLabelOnly
-}
-
-alias NSToolbarDisplayMode.NSToolbarDisplayModeDefault NSToolbarDisplayModeDefault;
-alias NSToolbarDisplayMode.NSToolbarDisplayModeIconAndLabel NSToolbarDisplayModeIconAndLabel;
-alias NSToolbarDisplayMode.NSToolbarDisplayModeIconOnly NSToolbarDisplayModeIconOnly;
-alias NSToolbarDisplayMode.NSToolbarDisplayModeLabelOnly NSToolbarDisplayModeLabelOnly;
-
-enum NSToolbarSizeMode
-{
-    NSToolbarSizeModeDefault,
-    NSToolbarSizeModeRegular,
-    NSToolbarSizeModeSmall
-}
-
-alias NSToolbarSizeMode.NSToolbarSizeModeDefault NSToolbarSizeModeDefault;
-alias NSToolbarSizeMode.NSToolbarSizeModeRegular NSToolbarSizeModeRegular;
-alias NSToolbarSizeMode.NSToolbarSizeModeSmall NSToolbarSizeModeSmall;
-
-public class NSToolbar : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool allowsUserCustomization ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsUserCustomization) !is null;
-    }
-
-    public bool autosavesConfiguration ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autosavesConfiguration) !is null;
-    }
-
-    public NSDictionary configurationDictionary ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_configurationDictionary);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public bool customizationPaletteIsRunning ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_customizationPaletteIsRunning) !is null;
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSToolbarDisplayMode displayMode ()
-    {
-        return cast(NSToolbarDisplayMode) OS.objc_msgSend(this.id_, OS.sel_displayMode);
-    }
-
-    public NSString identifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_identifier);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initWithIdentifier (NSString identifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIdentifier_1, identifier !is null ? identifier.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void insertItemWithItemIdentifier (NSString itemIdentifier, NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertItemWithItemIdentifier_1atIndex_1, itemIdentifier !is null ? itemIdentifier.id_ : null, index);
-    }
-
-    public bool isVisible ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isVisible) !is null;
-    }
-
-    public NSArray items ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_items);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void removeItemAtIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeItemAtIndex_1, index);
-    }
-
-    public void runCustomizationPalette (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runCustomizationPalette_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSString selectedItemIdentifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedItemIdentifier);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setAllowsUserCustomization (bool allowCustomization)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsUserCustomization_1, allowCustomization);
-    }
-
-    public void setAutosavesConfiguration (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutosavesConfiguration_1, flag);
-    }
-
-    public void setConfigurationFromDictionary (NSDictionary configDict)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setConfigurationFromDictionary_1, configDict !is null ? configDict.id_ : null);
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setDisplayMode (NSToolbarDisplayMode displayMode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDisplayMode_1, displayMode);
-    }
-
-    public void setSelectedItemIdentifier (NSString itemIdentifier)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectedItemIdentifier_1, itemIdentifier !is null ? itemIdentifier.id_ : null);
-    }
-
-    public void setShowsBaselineSeparator (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsBaselineSeparator_1, flag);
-    }
-
-    public void setSizeMode (NSToolbarSizeMode sizeMode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSizeMode_1, sizeMode);
-    }
-
-    public void setVisible (bool shown)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVisible_1, shown);
-    }
-
-    public bool showsBaselineSeparator ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsBaselineSeparator) !is null;
-    }
-
-    public NSToolbarSizeMode sizeMode ()
-    {
-        return cast(NSToolbarSizeMode) OS.objc_msgSend(this.id_, OS.sel_sizeMode);
-    }
-
-    public void validateVisibleItems ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_validateVisibleItems);
-    }
-
-    public NSArray visibleItems ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_visibleItems);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSToolbarItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSToolbarItem;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenuItem;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSToolbar;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSToolbarItem : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public objc.SEL action ()
-    {
-        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action);
-    }
-
-    public bool allowsDuplicatesInToolbar ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsDuplicatesInToolbar) !is null;
-    }
-
-    public bool autovalidates ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autovalidates) !is null;
-    }
-
-    public NSImage image ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_image);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public id initWithItemIdentifier (NSString itemIdentifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithItemIdentifier_1, itemIdentifier !is null ? itemIdentifier.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
-    }
-
-    public NSString itemIdentifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_itemIdentifier);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString label ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_label);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSSize maxSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_maxSize);
-        return result;
-    }
-
-    public NSMenuItem menuFormRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuFormRepresentation);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSSize minSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_minSize);
-        return result;
-    }
-
-    public NSString paletteLabel ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_paletteLabel);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setAction (objc.SEL action)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAction_1, action);
-    }
-
-    public void setAutovalidates (bool resistance)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutovalidates_1, resistance);
-    }
-
-    public void setEnabled (bool enabled)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, enabled);
-    }
-
-    public void setImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null);
-    }
-
-    public void setLabel (NSString label)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLabel_1, label !is null ? label.id_ : null);
-    }
-
-    public void setMaxSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxSize_1, size);
-    }
-
-    public void setMenuFormRepresentation (NSMenuItem menuItem)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMenuFormRepresentation_1, menuItem !is null ? menuItem.id_ : null);
-    }
-
-    public void setMinSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinSize_1, size);
-    }
-
-    public void setPaletteLabel (NSString paletteLabel)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPaletteLabel_1, paletteLabel !is null ? paletteLabel.id_ : null);
-    }
-
-    public void setTag (NSInteger tag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTag_1, tag);
-    }
-
-    public void setTarget (id target)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, target !is null ? target.id_ : null);
-    }
-
-    public void setToolTip (NSString toolTip)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setToolTip_1, toolTip !is null ? toolTip.id_ : null);
-    }
-
-    public void setView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null);
-    }
-
-    public void setVisibilityPriority (NSInteger visibilityPriority)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVisibilityPriority_1, visibilityPriority);
-    }
-
-    public NSInteger tag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag);
-    }
-
-    public id target ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString toolTip ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolTip);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSToolbar toolbar ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolbar);
-        return result !is null ? new NSToolbar(result) : null;
-    }
-
-    public void validate ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_validate);
-    }
-
-    public NSView view ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_view);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public NSInteger visibilityPriority ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_visibilityPriority);
-    }
-
-}
--- a/dwt/internal/cocoa/NSToolbarItemGroup.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSToolbarItemGroup;
-
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSToolbarItem;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSToolbarItemGroup : NSToolbarItem
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void setSubitems (NSArray subitems)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSubitems_1, subitems !is null ? subitems.id_ : null);
-    }
-
-    public NSArray subitems ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subitems);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSTrackingArea.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTrackingArea;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-/* Type of tracking area.  You must specify one or more type from this list in the NSTrackingAreaOptions argument of -initWithRect:options:owner:userInfo: */
-enum : NSUInteger
-{
-    NSTrackingMouseEnteredAndExited = 0x01, // owner receives mouseEntered when mouse enters area, and mouseExited when mouse leaves area
-    NSTrackingMouseMoved = 0x02, // owner receives mouseMoved while mouse is within area.  Note that mouseMoved events do not contain userInfo 
-    NSTrackingCursorUpdate = 0x04, // owner receives cursorUpdate when mouse enters area.  Cursor is set appropriately when mouse exits area
-}
-
-/* When tracking area is active.  You must specify one of the following in the NSTrackingAreaOptions argument of -initWithRect:options:owner:userInfo: */
-enum : NSUInteger
-{
-    NSTrackingActiveWhenFirstResponder = 0x10, // owner receives mouseEntered/Exited, mouseMoved, or cursorUpdate when view is first responder
-    NSTrackingActiveInKeyWindow = 0x20, // owner receives mouseEntered/Exited, mouseMoved, or cursorUpdate when view is in key window
-    NSTrackingActiveInActiveApp = 0x40, // owner receives mouseEntered/Exited, mouseMoved, or cursorUpdate when app is active
-    NSTrackingActiveAlways = 0x80, // owner receives mouseEntered/Exited or mouseMoved regardless of activation.  Not supported for NSTrackingCursorUpdate.
-}
-
-/* Behavior of tracking area.  These values are used in NSTrackingAreaOptions.  You may specify any number of the following in the NSTrackingAreaOptions argument of -initWithRect:options:owner:userInfo: */
-enum : NSUInteger
-{
-    NSTrackingAssumeInside = 0x100, // If set, generate mouseExited event when mouse leaves area (same as assumeInside argument in deprecated addtrackingArea:owner:userData:assumeInside:)
-    NSTrackingInVisibleRect = 0x200, // If set, tracking occurs in visibleRect of view and rect is ignored
-    NSTrackingEnabledDuringMouseDrag = 0x400 // If set, mouseEntered events will be generated as mouse is dragged.  If not set, mouseEntered events will be generated as mouse is moved, and on mouseUp after a drag.  mouseExited events are paired with mouseEntered events so their delivery is affected indirectly.  That is, if a mouseEntered event is generated and the mouse subsequently moves out of the trackingArea, a mouseExited event will be generated whether the mouse is being moved or dragged, independent of this flag.
-}
-
-alias NSUInteger NSTrackingAreaOptions;
-
-public class NSTrackingArea : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSTrackingArea initWithRect (NSRect rect, NSTrackingAreaOptions options, id owner, NSDictionary userInfo)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRect_1options_1owner_1userInfo_1, rect, options, owner !is null ? owner.id_ : null,
-                userInfo !is null ? userInfo.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSTrackingArea(result) : null);
-    }
-
-    public NSTrackingAreaOptions options ()
-    {
-        return cast(NSTrackingAreaOptions) OS.objc_msgSend(this.id_, OS.sel_options);
-    }
-
-    public id owner ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_owner);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSRect rect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rect);
-        return result;
-    }
-
-    public NSDictionary userInfo ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_userInfo);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSTreeController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTreeController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSIndexPath;
-import dwt.internal.cocoa.NSObjectController;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTreeNode;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSTreeController : NSObjectController
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void add (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_add_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void addChild (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addChild_1, sender !is null ? sender.id_ : null);
-    }
-
-    public bool addSelectionIndexPaths (NSArray indexPaths)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_addSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id_ : null) !is null;
-    }
-
-    public bool alwaysUsesMultipleValuesMarker ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_alwaysUsesMultipleValuesMarker) !is null;
-    }
-
-    public id arrangedObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrangedObjects);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool avoidsEmptySelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_avoidsEmptySelection) !is null;
-    }
-
-    public bool canAddChild ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canAddChild) !is null;
-    }
-
-    public bool canInsert ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canInsert) !is null;
-    }
-
-    public bool canInsertChild ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canInsertChild) !is null;
-    }
-
-    public NSString childrenKeyPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_childrenKeyPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString childrenKeyPathForNode (NSTreeNode node)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_childrenKeyPathForNode_1, node !is null ? node.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id content ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_content);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString countKeyPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_countKeyPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString countKeyPathForNode (NSTreeNode node)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_countKeyPathForNode_1, node !is null ? node.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void insert (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insert_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertChild (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertChild_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void insertObject (id object, NSIndexPath indexPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertObject_1atArrangedObjectIndexPath_1, object !is null ? object.id_ : null,
-                indexPath !is null ? indexPath.id_ : null);
-    }
-
-    public void insertObjects (NSArray objects, NSArray indexPaths)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertObjects_1atArrangedObjectIndexPaths_1, objects !is null ? objects.id_ : null,
-                indexPaths !is null ? indexPaths.id_ : null);
-    }
-
-    public NSString leafKeyPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_leafKeyPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString leafKeyPathForNode (NSTreeNode node)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_leafKeyPathForNode_1, node !is null ? node.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void moveNode (NSTreeNode node, NSIndexPath indexPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveNode_1toIndexPath_1, node !is null ? node.id_ : null, indexPath !is null ? indexPath.id_ : null);
-    }
-
-    public void moveNodes (NSArray nodes, NSIndexPath startingIndexPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_moveNodes_1toIndexPath_1, nodes !is null ? nodes.id_ : null,
-                startingIndexPath !is null ? startingIndexPath.id_ : null);
-    }
-
-    public bool preservesSelection ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_preservesSelection) !is null;
-    }
-
-    public void rearrangeObjects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rearrangeObjects);
-    }
-
-    public void remove (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_remove_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void removeObjectAtArrangedObjectIndexPath (NSIndexPath indexPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectAtArrangedObjectIndexPath_1, indexPath !is null ? indexPath.id_ : null);
-    }
-
-    public void removeObjectsAtArrangedObjectIndexPaths (NSArray indexPaths)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectsAtArrangedObjectIndexPaths_1, indexPaths !is null ? indexPaths.id_ : null);
-    }
-
-    public bool removeSelectionIndexPaths (NSArray indexPaths)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_removeSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id_ : null) !is null;
-    }
-
-    public NSArray selectedNodes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedNodes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray selectedObjects ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedObjects);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSIndexPath selectionIndexPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectionIndexPath);
-        return result !is null ? new NSIndexPath(result) : null;
-    }
-
-    public NSArray selectionIndexPaths ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectionIndexPaths);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool selectsInsertedObjects ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_selectsInsertedObjects) !is null;
-    }
-
-    public void setAlwaysUsesMultipleValuesMarker (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlwaysUsesMultipleValuesMarker_1, flag);
-    }
-
-    public void setAvoidsEmptySelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAvoidsEmptySelection_1, flag);
-    }
-
-    public void setChildrenKeyPath (NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setChildrenKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void setContent (id content)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContent_1, content !is null ? content.id_ : null);
-    }
-
-    public void setCountKeyPath (NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCountKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void setLeafKeyPath (NSString keyPath)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLeafKeyPath_1, keyPath !is null ? keyPath.id_ : null);
-    }
-
-    public void setPreservesSelection (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPreservesSelection_1, flag);
-    }
-
-    public bool setSelectionIndexPath (NSIndexPath indexPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setSelectionIndexPath_1, indexPath !is null ? indexPath.id_ : null) !is null;
-    }
-
-    public bool setSelectionIndexPaths (NSArray indexPaths)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setSelectionIndexPaths_1, indexPaths !is null ? indexPaths.id_ : null) !is null;
-    }
-
-    public void setSelectsInsertedObjects (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSelectsInsertedObjects_1, flag);
-    }
-
-    public void setSortDescriptors (NSArray sortDescriptors)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSortDescriptors_1, sortDescriptors !is null ? sortDescriptors.id_ : null);
-    }
-
-    public NSArray sortDescriptors ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sortDescriptors);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSTreeNode.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSTreeNode;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSIndexPath;
-import dwt.internal.cocoa.NSMutableArray;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSTreeNode : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSArray childNodes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_childNodes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSTreeNode descendantNodeAtIndexPath (NSIndexPath indexPath)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_descendantNodeAtIndexPath_1, indexPath !is null ? indexPath.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSTreeNode(result) : null);
-    }
-
-    public NSIndexPath indexPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_indexPath);
-        return result !is null ? new NSIndexPath(result) : null;
-    }
-
-    public id initWithRepresentedObject (id modelObject)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRepresentedObject_1, modelObject !is null ? modelObject.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isLeaf ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isLeaf) !is null;
-    }
-
-    public NSMutableArray mutableChildNodes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mutableChildNodes);
-        return result !is null ? new NSMutableArray(result) : null;
-    }
-
-    public NSTreeNode parentNode ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_parentNode);
-        return result is this.id_ ? this : (result !is null ? new NSTreeNode(result) : null);
-    }
-
-    public id representedObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void sortWithSortDescriptors (NSArray sortDescriptors, bool recursively)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sortWithSortDescriptors_1recursively_1, sortDescriptors !is null ? sortDescriptors.id_ : null, recursively);
-    }
-
-    public static id treeNodeWithRepresentedObject (id modelObject)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTreeNode, OS.sel_treeNodeWithRepresentedObject_1, modelObject !is null ? modelObject.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSTypesetter.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSTypesetter.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,422 +1,43 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSTypesetter;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSLayoutManager;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSParagraphStyle;
-import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSize;
-import dwt.internal.cocoa.NSText : NSWritingDirection;
-import dwt.internal.cocoa.NSTextContainer;
-import dwt.internal.cocoa.NSTextTab;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-enum NSTypesetterControlCharacterAction : NSUInteger
-{
-    NSTypesetterZeroAdvancementAction = (1 << 0),
-    NSTypesetterWhitespaceAction = (1 << 1),
-    NSTypesetterHorizontalTabAction = (1 << 2),
-    NSTypesetterLineBreakAction = (1 << 3),
-    NSTypesetterParagraphBreakAction = (1 << 4),
-    NSTypesetterContainerBreakAction = (1 << 5)
+public class NSTypesetter : NSObject {
+
+public this() {
+    super();
 }
 
-alias NSTypesetterControlCharacterAction.NSTypesetterZeroAdvancementAction NSTypesetterZeroAdvancementAction;
-alias NSTypesetterControlCharacterAction.NSTypesetterWhitespaceAction NSTypesetterWhitespaceAction;
-alias NSTypesetterControlCharacterAction.NSTypesetterHorizontalTabAction NSTypesetterHorizontalTabAction;
-alias NSTypesetterControlCharacterAction.NSTypesetterLineBreakAction NSTypesetterLineBreakAction;
-alias NSTypesetterControlCharacterAction.NSTypesetterParagraphBreakAction NSTypesetterParagraphBreakAction;
-alias NSTypesetterControlCharacterAction.NSTypesetterContainerBreakAction NSTypesetterContainerBreakAction;
-
-public class NSTypesetter : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSTypesetterControlCharacterAction actionForControlCharacterAtIndex (NSUInteger charIndex)
-    {
-        return cast(NSTypesetterControlCharacterAction) OS.objc_msgSend(this.id_, OS.sel_actionForControlCharacterAtIndex_1, charIndex);
-    }
-
-    public NSAttributedString attributedString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedString);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSDictionary attributesForExtraLineFragment ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributesForExtraLineFragment);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public CGFloat baselineOffsetInLayoutManager (NSLayoutManager layoutMgr, NSUInteger glyphIndex)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_baselineOffsetInLayoutManager_1glyphIndex_1,
-                layoutMgr !is null ? layoutMgr.id_ : null, glyphIndex);
-    }
-
-    public void beginLineWithGlyphAtIndex (NSUInteger glyphIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginLineWithGlyphAtIndex_1, glyphIndex);
-    }
-
-    public void beginParagraph ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginParagraph);
-    }
-
-    public bool bidiProcessingEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_bidiProcessingEnabled) !is null;
-    }
-
-    public NSRect boundingBoxForControlGlyphAtIndex (NSUInteger glyphIndex, NSTextContainer textContainer, NSRect proposedRect,
-            NSPoint glyphPosition, NSUInteger charIndex)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_,
-                OS.sel_boundingBoxForControlGlyphAtIndex_1forTextContainer_1proposedLineFragment_1glyphPosition_1characterIndex_1, glyphIndex,
-                textContainer !is null ? textContainer.id_ : null, proposedRect, glyphPosition, charIndex);
-        return result;
-    }
-
-    public NSRange characterRangeForGlyphRange (NSRange glyphRange, NSRangePointer actualGlyphRange)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_characterRangeForGlyphRange_1actualGlyphRange_1, glyphRange, actualGlyphRange);
-        return result;
-    }
-
-    public NSParagraphStyle currentParagraphStyle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentParagraphStyle);
-        return result !is null ? new NSParagraphStyle(result) : null;
-    }
-
-    public NSTextContainer currentTextContainer ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentTextContainer);
-        return result !is null ? new NSTextContainer(result) : null;
-    }
-
-    public static NSTypesetterBehavior defaultTypesetterBehavior ()
-    {
-        return cast(NSTypesetterBehavior) OS.objc_msgSend(OS.class_NSTypesetter, OS.sel_defaultTypesetterBehavior);
-    }
-
-    public void deleteGlyphsInRange (NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deleteGlyphsInRange_1, glyphRange);
-    }
-
-    public void endLineWithGlyphRange (NSRange lineGlyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endLineWithGlyphRange_1, lineGlyphRange);
-    }
-
-    public void endParagraph ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endParagraph);
-    }
-
-    public NSUInteger getGlyphsInRange (NSRange glyphsRange, NSGlyph* glyphBuffer, NSUInteger* charIndexBuffer, NSGlyphInscription* inscribeBuffer,
-            bool* elasticBuffer, /*unsigned char* */ubyte* bidiLevelBuffer)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_,
-                OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1bidiLevels_1, glyphsRange, glyphBuffer,
-                charIndexBuffer, inscribeBuffer, elasticBuffer, bidiLevelBuffer);
-    }
-
-    public void getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin_ (NSRectPointer lineFragmentRect,
-            NSRectPointer lineFragmentUsedRect, NSRange paragraphSeparatorGlyphRange, NSPoint lineOrigin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getLineFragmentRect_1usedRect_1forParagraphSeparatorGlyphRange_1atProposedOrigin_1, lineFragmentRect,
-                lineFragmentUsedRect, paragraphSeparatorGlyphRange, lineOrigin);
-    }
-
-    public void getLineFragmentRect_usedRect_remainingRect_forStartingGlyphAtIndex_proposedRect_lineSpacing_paragraphSpacingBefore_paragraphSpacingAfter_ (
-            NSRectPointer lineFragmentRect, NSRectPointer lineFragmentUsedRect, NSRectPointer remainingRect, NSUInteger startingGlyphIndex,
-            NSRect proposedRect, CGFloat lineSpacing, CGFloat paragraphSpacingBefore, CGFloat paragraphSpacingAfter)
-    {
-        OS.objc_msgSend(
-                this.id_,
-                OS.sel_getLineFragmentRect_1usedRect_1remainingRect_1forStartingGlyphAtIndex_1proposedRect_1lineSpacing_1paragraphSpacingBefore_1paragraphSpacingAfter_1,
-                lineFragmentRect, lineFragmentUsedRect, remainingRect, startingGlyphIndex, proposedRect, lineSpacing, paragraphSpacingBefore,
-                paragraphSpacingAfter);
-    }
-
-    public NSRange glyphRangeForCharacterRange (NSRange charRange, NSRangePointer actualCharRange)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_glyphRangeForCharacterRange_1actualCharacterRange_1, charRange, actualCharRange);
-        return result;
-    }
-
-    public /*UTF32Char*/dchar hyphenCharacterForGlyphAtIndex (NSUInteger glyphIndex)
-    {
-        return cast(/*UTF32Char*/dchar) OS.objc_msgSend(this.id_, OS.sel_hyphenCharacterForGlyphAtIndex_1, glyphIndex);
-    }
-
-    public float hyphenationFactor ()
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_hyphenationFactor);
-    }
-
-    public float hyphenationFactorForGlyphAtIndex (NSUInteger glyphIndex)
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_hyphenationFactorForGlyphAtIndex_1, glyphIndex);
-    }
-
-    public void insertGlyph (NSGlyph glyph, NSUInteger glyphIndex, NSUInteger characterIndex)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertGlyph_1atGlyphIndex_1characterIndex_1, glyph, glyphIndex, characterIndex);
-    }
-
-    public NSRange layoutCharactersInRange (NSRange characterRange, NSLayoutManager layoutManager, NSUInteger maxNumLines)
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_layoutCharactersInRange_1forLayoutManager_1maximumNumberOfLineFragments_1, characterRange,
-                layoutManager !is null ? layoutManager.id_ : null, maxNumLines);
-        return result;
-    }
-
-    public void layoutGlyphsInLayoutManager (NSLayoutManager layoutManager, NSUInteger startGlyphIndex, NSUInteger maxNumLines, NSUInteger* nextGlyph)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_layoutGlyphsInLayoutManager_1startingAtGlyphIndex_1maxNumberOfLineFragments_1nextGlyphIndex_1,
-                layoutManager !is null ? layoutManager.id_ : null, startGlyphIndex, maxNumLines, nextGlyph);
-    }
-
-    public NSLayoutManager layoutManager ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_layoutManager);
-        return result !is null ? new NSLayoutManager(result) : null;
-    }
-
-    public NSUInteger layoutParagraphAtPoint (NSPointPointer lineFragmentOrigin)
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_layoutParagraphAtPoint_1, lineFragmentOrigin);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public CGFloat lineFragmentPadding ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineFragmentPadding);
-    }
-
-    public CGFloat lineSpacingAfterGlyphAtIndex (NSUInteger glyphIndex, NSRect rect)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect);
-    }
-
-    public NSRange paragraphCharacterRange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphCharacterRange);
-        return result;
-    }
-
-    public NSRange paragraphGlyphRange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphGlyphRange);
-        return result;
-    }
-
-    public NSRange paragraphSeparatorCharacterRange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphSeparatorCharacterRange);
-        return result;
-    }
-
-    public NSRange paragraphSeparatorGlyphRange ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphSeparatorGlyphRange);
-        return result;
-    }
-
-    public CGFloat paragraphSpacingAfterGlyphAtIndex (NSUInteger glyphIndex, NSRect rect)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_paragraphSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect);
-    }
-
-    public CGFloat paragraphSpacingBeforeGlyphAtIndex (NSUInteger glyphIndex, NSRect rect)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_paragraphSpacingBeforeGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect);
-    }
-
-    public static NSSize printingAdjustmentInLayoutManager (NSLayoutManager layoutMgr, NSRange nominallySpacedGlyphsRange,
-            /*const unsigned char* */ubyte* packedGlyphs, NSUInteger packedGlyphsCount)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, OS.class_NSTypesetter,
-                OS.sel_printingAdjustmentInLayoutManager_1forNominallySpacedGlyphRange_1packedGlyphs_1count_1,
-                layoutMgr !is null ? layoutMgr.id_ : null, nominallySpacedGlyphsRange, packedGlyphs, packedGlyphsCount);
-        return result;
-    }
-
-    public void setAttachmentSize (NSSize attachmentSize, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttachmentSize_1forGlyphRange_1, attachmentSize, glyphRange);
-    }
-
-    public void setAttributedString (NSAttributedString attrString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributedString_1, attrString !is null ? attrString.id_ : null);
-    }
-
-    public void setBidiLevels (/*const uint8_t* */ubyte* levels, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBidiLevels_1forGlyphRange_1, levels, glyphRange);
-    }
-
-    public void setBidiProcessingEnabled (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBidiProcessingEnabled_1, flag);
-    }
-
-    public void setDrawsOutsideLineFragment (bool flag, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDrawsOutsideLineFragment_1forGlyphRange_1, flag, glyphRange);
-    }
-
-    public void setHardInvalidation (bool flag, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHardInvalidation_1forGlyphRange_1, flag, glyphRange);
-    }
-
-    public void setHyphenationFactor (float factor)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHyphenationFactor_1, factor);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public void setLineFragmentPadding (CGFloat padding)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineFragmentPadding_1, padding);
-    }
-
-    public void setLineFragmentRect (NSRect fragmentRect, NSRange glyphRange, NSRect usedRect, CGFloat baselineOffset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1, fragmentRect, glyphRange, usedRect,
-                baselineOffset);
-    }
-
-    public void setLocation (NSPoint location, /*const CGFloat* */CGFloat* advancements, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLocation_1withAdvancements_1forStartOfGlyphRange_1, location, advancements, glyphRange);
-    }
-
-    public void setNotShownAttribute (bool flag, NSRange glyphRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNotShownAttribute_1forGlyphRange_1, flag, glyphRange);
-    }
-
-    public void setParagraphGlyphRange (NSRange paragraphRange, NSRange paragraphSeparatorRange)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setParagraphGlyphRange_1separatorGlyphRange_1, paragraphRange, paragraphSeparatorRange);
-    }
-
-    public void setTypesetterBehavior (NSTypesetterBehavior behavior)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTypesetterBehavior_1, behavior);
-    }
-
-    public void setUsesFontLeading (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUsesFontLeading_1, flag);
-    }
-
-    public static id sharedSystemTypesetter ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTypesetter, OS.sel_sharedSystemTypesetter);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id sharedSystemTypesetterForBehavior (NSTypesetterBehavior theBehavior)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSTypesetter, OS.sel_sharedSystemTypesetterForBehavior_1, theBehavior);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool shouldBreakLineByHyphenatingBeforeCharacterAtIndex (NSUInteger charIndex)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldBreakLineByHyphenatingBeforeCharacterAtIndex_1, charIndex) !is null;
-    }
-
-    public bool shouldBreakLineByWordBeforeCharacterAtIndex (NSUInteger charIndex)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldBreakLineByWordBeforeCharacterAtIndex_1, charIndex) !is null;
-    }
-
-    public NSFont substituteFontForFont (NSFont originalFont)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_substituteFontForFont_1, originalFont !is null ? originalFont.id_ : null);
-        return result !is null ? new NSFont(result) : null;
-    }
-
-    public void substituteGlyphsInRange (NSRange glyphRange, NSGlyph* glyphs)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_substituteGlyphsInRange_1withGlyphs_1, glyphRange, glyphs);
-    }
-
-    public NSArray textContainers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainers);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSTextTab textTabForGlyphLocation (CGFloat glyphLocation, NSWritingDirection direction, CGFloat maxLocation)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textTabForGlyphLocation_1writingDirection_1maxLocation_1, glyphLocation, direction,
-                maxLocation);
-        return result !is null ? new NSTextTab(result) : null;
-    }
-
-    public NSTypesetterBehavior typesetterBehavior ()
-    {
-        return cast(NSTypesetterBehavior) OS.objc_msgSend(this.id_, OS.sel_typesetterBehavior);
-    }
-
-    public bool usesFontLeading ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_usesFontLeading) !is null;
-    }
-
-    public void willSetLineFragmentRect (NSRectPointer lineRect, NSRange glyphRange, NSRectPointer usedRect, CGFloat* baselineOffset)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_willSetLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1, lineRect, glyphRange, usedRect,
-                baselineOffset);
-    }
+public CGFloat baselineOffsetInLayoutManager(NSLayoutManager layoutMgr, NSUInteger glyphIndex) {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_baselineOffsetInLayoutManager_glyphIndex_, layoutMgr !is null ? layoutMgr.id : null, glyphIndex);
+}
 
 }
--- a/dwt/internal/cocoa/NSURL.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSURL.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,230 +1,62 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSURL;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSNumber;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSPasteboard;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURLHandle;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSURL : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSURLHandle URLHandleUsingCache (bool shouldUseCache)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URLHandleUsingCache_1, shouldUseCache);
-        return result !is null ? new NSURLHandle(result) : null;
-    }
+public class NSURL : NSObject {
 
-    public static NSURL static_URLWithString_ (NSString URLString)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_1, URLString !is null ? URLString.id_ : null);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public static id static_URLWithString_relativeToURL_ (NSString URLString, NSURL baseURL)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_1relativeToURL_1, URLString !is null ? URLString.id_ : null,
-                baseURL !is null ? baseURL.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString absoluteString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_absoluteString);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSURL absoluteURL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_absoluteURL);
-        return result is this.id_ ? this : (result !is null ? new NSURL(result) : null);
-    }
+public this() {
+    super();
+}
 
-    public NSURL baseURL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_baseURL);
-        return result is this.id_ ? this : (result !is null ? new NSURL(result) : null);
-    }
-
-    public static NSURL static_fileURLWithPath_ (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public static id static_fileURLWithPath_isDirectory_ (NSString path, bool isDir)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_1isDirectory_1, path !is null ? path.id_ : null, isDir);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString fragment ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fragment);
-        return result !is null ? new NSString(result) : null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSString host ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_host);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initFileURLWithPath_ (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initFileURLWithPath_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public id initFileURLWithPath_isDirectory_ (NSString path, bool isDir)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initFileURLWithPath_1isDirectory_1, path !is null ? path.id_ : null, isDir);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithScheme (NSString scheme, NSString host, NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithScheme_1host_1path_1, scheme !is null ? scheme.id_ : null,
-                host !is null ? host.id_ : null, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithString_ (NSString URLString)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, URLString !is null ? URLString.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public static NSURL URLFromPasteboard(NSPasteboard pasteBoard) {
+    objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLFromPasteboard_, pasteBoard !is null ? pasteBoard.id : null);
+    return result !is null ? new NSURL(result) : null;
+}
 
-    public id initWithString_relativeToURL_ (NSString URLString, NSURL baseURL)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1relativeToURL_1, URLString !is null ? URLString.id_ : null,
-                baseURL !is null ? baseURL.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isFileURL ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFileURL) !is null;
-    }
-
-    public void loadResourceDataNotifyingClient (id client, bool shouldUseCache)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_loadResourceDataNotifyingClient_1usingCache_1, client !is null ? client.id_ : null, shouldUseCache);
-    }
-
-    public NSString parameterString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_parameterString);
-        return result !is null ? new NSString(result) : null;
-    }
+public void writeToPasteboard(NSPasteboard pasteBoard) {
+    OS.objc_msgSend(this.id, OS.sel_writeToPasteboard_, pasteBoard !is null ? pasteBoard.id : null);
+}
 
-    public NSString password ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_password);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString path ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_path);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSNumber port ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_port);
-        return result !is null ? new NSNumber(result) : null;
-    }
-
-    public id propertyForKey (NSString propertyKey)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyForKey_1, propertyKey !is null ? propertyKey.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString query ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_query);
-        return result !is null ? new NSString(result) : null;
-    }
+public static NSURL URLWithString(NSString URLString) {
+    objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_, URLString !is null ? URLString.id : null);
+    return result !is null ? new NSURL(result) : null;
+}
 
-    public NSString relativePath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_relativePath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString relativeString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_relativeString);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSData resourceDataUsingCache (bool shouldUseCache)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resourceDataUsingCache_1, shouldUseCache);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSString resourceSpecifier ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resourceSpecifier);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSString absoluteString() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_absoluteString);
+    return result !is null ? new NSString(result) : null;
+}
 
-    public NSString scheme ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_scheme);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool setProperty (id property, NSString propertyKey)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setProperty_1forKey_1, property !is null ? property.id_ : null,
-                propertyKey !is null ? propertyKey.id_ : null) !is null;
-    }
-
-    public bool setResourceData (NSData data)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setResourceData_1, data !is null ? data.id_ : null) !is null;
-    }
-
-    public NSURL standardizedURL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_standardizedURL);
-        return result is this.id_ ? this : (result !is null ? new NSURL(result) : null);
-    }
-
-    public NSString user ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_user);
-        return result !is null ? new NSString(result) : null;
-    }
+public static NSURL fileURLWithPath(NSString path) {
+    objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_, path !is null ? path.id : null);
+    return result !is null ? new NSURL(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSURLAuthenticationChallenge.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLAuthenticationChallenge;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSError;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSURLCredential;
-import dwt.internal.cocoa.NSURLProtectionSpace;
-import dwt.internal.cocoa.NSURLResponse;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSURLAuthenticationChallenge : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSError error ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_error);
-        return result !is null ? new NSError(result) : null;
-    }
-
-    public NSURLResponse failureResponse ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_failureResponse);
-        return result !is null ? new NSURLResponse(result) : null;
-    }
-
-    public id initWithAuthenticationChallenge (NSURLAuthenticationChallenge challenge, id sender)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithAuthenticationChallenge_1sender_1, challenge !is null ? challenge.id_ : null,
-                sender !is null ? sender.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithProtectionSpace (NSURLProtectionSpace space, NSURLCredential credential, NSInteger previousFailureCount, NSURLResponse response,
-            NSError error, id sender)
-    {
-        objc.id result = OS.objc_msgSend(this.id_,
-                OS.sel_initWithProtectionSpace_1proposedCredential_1previousFailureCount_1failureResponse_1error_1sender_1,
-                space !is null ? space.id_ : null, credential !is null ? credential.id_ : null, previousFailureCount,
-                response !is null ? response.id_ : null, error !is null ? error.id_ : null, sender !is null ? sender.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger previousFailureCount ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_previousFailureCount);
-    }
-
-    public NSURLCredential proposedCredential ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_proposedCredential);
-        return result !is null ? new NSURLCredential(result) : null;
-    }
-
-    public NSURLProtectionSpace protectionSpace ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_protectionSpace);
-        return result !is null ? new NSURLProtectionSpace(result) : null;
-    }
-
-    public id sender ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_sender);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSURLCache.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLCache;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSCachedURLResponse;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURLRequest;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSURLCacheStoragePolicy : NSUInteger
-{
-    NSURLCacheStorageAllowed,
-    NSURLCacheStorageAllowedInMemoryOnly,
-    NSURLCacheStorageNotAllowed,
-}
-
-alias NSURLCacheStoragePolicy.NSURLCacheStorageAllowed NSURLCacheStorageAllowed;
-alias NSURLCacheStoragePolicy.NSURLCacheStorageAllowedInMemoryOnly NSURLCacheStorageAllowedInMemoryOnly;
-alias NSURLCacheStoragePolicy.NSURLCacheStorageNotAllowed NSURLCacheStorageNotAllowed;
-
-public class NSURLCache : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSCachedURLResponse cachedResponseForRequest (NSURLRequest request)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cachedResponseForRequest_1, request !is null ? request.id_ : null);
-        return result !is null ? new NSCachedURLResponse(result) : null;
-    }
-
-    public NSUInteger currentDiskUsage ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_currentDiskUsage);
-    }
-
-    public NSUInteger currentMemoryUsage ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_currentMemoryUsage);
-    }
-
-    public NSUInteger diskCapacity ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_diskCapacity);
-    }
-
-    public id initWithMemoryCapacity (NSUInteger memoryCapacity, NSUInteger diskCapacity, NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithMemoryCapacity_1diskCapacity_1diskPath_1, memoryCapacity, diskCapacity,
-                path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSUInteger memoryCapacity ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_memoryCapacity);
-    }
-
-    public void removeAllCachedResponses ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllCachedResponses);
-    }
-
-    public void removeCachedResponseForRequest (NSURLRequest request)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeCachedResponseForRequest_1, request !is null ? request.id_ : null);
-    }
-
-    public void setDiskCapacity (NSUInteger diskCapacity)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDiskCapacity_1, diskCapacity);
-    }
-
-    public void setMemoryCapacity (NSUInteger memoryCapacity)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMemoryCapacity_1, memoryCapacity);
-    }
-
-    public static void setSharedURLCache (NSURLCache cache)
-    {
-        OS.objc_msgSend(OS.class_NSURLCache, OS.sel_setSharedURLCache_1, cache !is null ? cache.id_ : null);
-    }
-
-    public static NSURLCache sharedURLCache ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLCache, OS.sel_sharedURLCache);
-        return result !is null ? new NSURLCache(result) : null;
-    }
-
-    public void storeCachedResponse (NSCachedURLResponse cachedResponse, NSURLRequest request)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_storeCachedResponse_1forRequest_1, cachedResponse !is null ? cachedResponse.id_ : null,
-                request !is null ? request.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSURLConnection.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLConnection;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSRunLoop;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURLRequest;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSURLConnection : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static bool canHandleRequest (NSURLRequest request)
-    {
-        return OS.objc_msgSend(OS.class_NSURLConnection, OS.sel_canHandleRequest_1, request !is null ? request.id_ : null) !is null;
-    }
-
-    public void cancel ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancel);
-    }
-
-    public static NSURLConnection connectionWithRequest (NSURLRequest request, id delegatee)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLConnection, OS.sel_connectionWithRequest_1delegate_1, request !is null ? request.id_ : null,
-                delegatee !is null ? delegatee.id_ : null);
-        return result !is null ? new NSURLConnection(result) : null;
-    }
-
-    public id initWithRequest_delegate_ (NSURLRequest request, id delegatee)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRequest_1delegate_1, request !is null ? request.id_ : null,
-                delegatee !is null ? delegatee.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithRequest_delegate_startImmediately_ (NSURLRequest request, id delegatee, bool startImmediately)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRequest_1delegate_1startImmediately_1, request !is null ? request.id_ : null,
-                delegatee !is null ? delegatee.id_ : null, startImmediately);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void scheduleInRunLoop (NSRunLoop aRunLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scheduleInRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-    public static NSData sendSynchronousRequest (NSURLRequest request, /*NSURLResponse** */objc.id** response, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLConnection, OS.sel_sendSynchronousRequest_1returningResponse_1error_1,
-                request !is null ? request.id_ : null, response, error);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void start ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_start);
-    }
-
-    public void unscheduleFromRunLoop (NSRunLoop aRunLoop, NSString mode)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unscheduleFromRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSURLCredential.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLCredential;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSURLCredentialPersistence
-{
-    NSURLCredentialPersistenceNone,
-    NSURLCredentialPersistenceForSession,
-    NSURLCredentialPersistencePermanent
-}
-
-alias NSURLCredentialPersistence.NSURLCredentialPersistenceNone NSURLCredentialPersistenceNone;
-alias NSURLCredentialPersistence.NSURLCredentialPersistenceForSession NSURLCredentialPersistenceForSession;
-alias NSURLCredentialPersistence.NSURLCredentialPersistencePermanent NSURLCredentialPersistencePermanent;
-
-public class NSURLCredential : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSURLCredential credentialWithUser (NSString user, NSString password, NSURLCredentialPersistence persistence)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLCredential, OS.sel_credentialWithUser_1password_1persistence_1,
-                user !is null ? user.id_ : null, password !is null ? password.id_ : null, persistence);
-        return result !is null ? new NSURLCredential(result) : null;
-    }
-
-    public bool hasPassword ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasPassword) !is null;
-    }
-
-    public id initWithUser (NSString user, NSString password, NSURLCredentialPersistence persistence)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUser_1password_1persistence_1, user !is null ? user.id_ : null,
-                password !is null ? password.id_ : null, persistence);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString password ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_password);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSURLCredentialPersistence persistence ()
-    {
-        return cast(NSURLCredentialPersistence) OS.objc_msgSend(this.id_, OS.sel_persistence);
-    }
-
-    public NSString user ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_user);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSURLCredentialStorage.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLCredentialStorage;
-
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSURLCredential;
-import dwt.internal.cocoa.NSURLProtectionSpace;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSURLCredentialStorage : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSDictionary allCredentials ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allCredentials);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary credentialsForProtectionSpace (NSURLProtectionSpace space)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_credentialsForProtectionSpace_1, space !is null ? space.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSURLCredential defaultCredentialForProtectionSpace (NSURLProtectionSpace space)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaultCredentialForProtectionSpace_1, space !is null ? space.id_ : null);
-        return result !is null ? new NSURLCredential(result) : null;
-    }
-
-    public void removeCredential (NSURLCredential credential, NSURLProtectionSpace space)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeCredential_1forProtectionSpace_1, credential !is null ? credential.id_ : null,
-                space !is null ? space.id_ : null);
-    }
-
-    public void setCredential (NSURLCredential credential, NSURLProtectionSpace space)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCredential_1forProtectionSpace_1, credential !is null ? credential.id_ : null,
-                space !is null ? space.id_ : null);
-    }
-
-    public void setDefaultCredential (NSURLCredential credential, NSURLProtectionSpace space)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDefaultCredential_1forProtectionSpace_1, credential !is null ? credential.id_ : null,
-                space !is null ? space.id_ : null);
-    }
-
-    public static NSURLCredentialStorage sharedCredentialStorage ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLCredentialStorage, OS.sel_sharedCredentialStorage);
-        return result !is null ? new NSURLCredentialStorage(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSURLDownload.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSURLDownload.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,88 +1,45 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSURLDownload;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURLRequest;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSURLDownload : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSURLDownload : NSObject {
 
-    public static bool canResumeDownloadDecodedWithEncodingMIMEType (NSString MIMEType)
-    {
-        return OS.objc_msgSend(OS.class_NSURLDownload, OS.sel_canResumeDownloadDecodedWithEncodingMIMEType_1, MIMEType !is null ? MIMEType.id_ : null) !is null;
-    }
+public this() {
+    super();
+}
 
-    public void cancel ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancel);
-    }
-
-    public bool deletesFileUponFailure ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_deletesFileUponFailure) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public id initWithRequest (NSURLRequest request, id delegatee)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRequest_1delegate_1, request !is null ? request.id_ : null,
-                delegatee !is null ? delegatee.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithResumeData (NSData resumeData, id delegatee, NSString path)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithResumeData_1delegate_1path_1, resumeData !is null ? resumeData.id_ : null,
-                delegatee !is null ? delegatee.id_ : null, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSURLRequest request ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_request);
-        return result !is null ? new NSURLRequest(result) : null;
-    }
+public void cancel() {
+    OS.objc_msgSend(this.id, OS.sel_cancel);
+}
 
-    public NSData resumeData ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resumeData);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void setDeletesFileUponFailure (bool deletesFileUponFailure)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDeletesFileUponFailure_1, deletesFileUponFailure);
-    }
-
-    public void setDestination (NSString path, bool allowOverwrite)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDestination_1allowOverwrite_1, path !is null ? path.id_ : null, allowOverwrite);
-    }
+public void setDestination(NSString path, bool allowOverwrite) {
+    OS.objc_msgSend(this.id, OS.sel_setDestination_allowOverwrite_, path !is null ? path.id : null, allowOverwrite);
+}
 
 }
--- a/dwt/internal/cocoa/NSURLHandle.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLHandle;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSURLHandleStatus : NSUInteger
-{
-    NSURLHandleNotLoaded = 0,
-    NSURLHandleLoadSucceeded,
-    NSURLHandleLoadInProgress,
-    NSURLHandleLoadFailed
-}
-
-alias NSURLHandleStatus.NSURLHandleNotLoaded NSURLHandleNotLoaded;
-alias NSURLHandleStatus.NSURLHandleLoadSucceeded NSURLHandleLoadSucceeded;
-alias NSURLHandleStatus.NSURLHandleLoadInProgress NSURLHandleLoadInProgress;
-alias NSURLHandleStatus.NSURLHandleLoadFailed NSURLHandleLoadFailed;
-
-public class NSURLHandle : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static objc.Class URLHandleClassForURL (NSURL anURL)
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSURLHandle, OS.sel_URLHandleClassForURL_1, anURL !is null ? anURL.id_ : null);
-    }
-
-    public void addClient (id client)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addClient_1, client !is null ? client.id_ : null);
-    }
-
-    public NSData availableResourceData ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableResourceData);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void backgroundLoadDidFailWithReason (NSString reason)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_backgroundLoadDidFailWithReason_1, reason !is null ? reason.id_ : null);
-    }
-
-    public void beginLoadInBackground ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginLoadInBackground);
-    }
-
-    public static NSURLHandle cachedHandleForURL (NSURL anURL)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLHandle, OS.sel_cachedHandleForURL_1, anURL !is null ? anURL.id_ : null);
-        return result !is null ? new NSURLHandle(result) : null;
-    }
-
-    public static bool canInitWithURL (NSURL anURL)
-    {
-        return OS.objc_msgSend(OS.class_NSURLHandle, OS.sel_canInitWithURL_1, anURL !is null ? anURL.id_ : null) !is null;
-    }
-
-    public void cancelLoadInBackground ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cancelLoadInBackground);
-    }
-
-    public void didLoadBytes (NSData newBytes, bool yorn)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_didLoadBytes_1loadComplete_1, newBytes !is null ? newBytes.id_ : null, yorn);
-    }
-
-    public void endLoadInBackground ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endLoadInBackground);
-    }
-
-    public long expectedResourceDataSize ()
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_expectedResourceDataSize);
-    }
-
-    public NSString failureReason ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_failureReason);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void flushCachedData ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_flushCachedData);
-    }
-
-    public id initWithURL (NSURL anURL, bool willCache)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithURL_1cached_1, anURL !is null ? anURL.id_ : null, willCache);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void loadInBackground ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_loadInBackground);
-    }
-
-    public NSData loadInForeground ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_loadInForeground);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public id propertyForKey (NSString propertyKey)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyForKey_1, propertyKey !is null ? propertyKey.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id propertyForKeyIfAvailable (NSString propertyKey)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyForKeyIfAvailable_1, propertyKey !is null ? propertyKey.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static void registerURLHandleClass (objc.Class anURLHandleSubclass)
-    {
-        OS.objc_msgSend(OS.class_NSURLHandle, OS.sel_registerURLHandleClass_1, anURLHandleSubclass);
-    }
-
-    public void removeClient (id client)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeClient_1, client !is null ? client.id_ : null);
-    }
-
-    public NSData resourceData ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resourceData);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSURLHandleStatus status ()
-    {
-        return cast(NSURLHandleStatus) OS.objc_msgSend(this.id_, OS.sel_status);
-    }
-
-    public bool writeData (NSData data)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeData_1, data !is null ? data.id_ : null) !is null;
-    }
-
-    public bool writeProperty (id propertyValue, NSString propertyKey)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_writeProperty_1forKey_1, propertyValue !is null ? propertyValue.id_ : null,
-                propertyKey !is null ? propertyKey.id_ : null) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSURLProtectionSpace.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLProtectionSpace;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSURLProtectionSpace : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString authenticationMethod ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_authenticationMethod);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString host ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_host);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id initWithHost (NSString host, NSInteger port, NSString protocol, NSString realm, NSString authenticationMethod)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithHost_1port_1protocol_1realm_1authenticationMethod_1, host !is null ? host.id_ : null,
-                port, protocol !is null ? protocol.id_ : null, realm !is null ? realm.id_ : null,
-                authenticationMethod !is null ? authenticationMethod.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithProxyHost (NSString host, NSInteger port, NSString type, NSString realm, NSString authenticationMethod)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithProxyHost_1port_1type_1realm_1authenticationMethod_1,
-                host !is null ? host.id_ : null, port, type !is null ? type.id_ : null, realm !is null ? realm.id_ : null,
-                authenticationMethod !is null ? authenticationMethod.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isProxy ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isProxy) !is null;
-    }
-
-    public NSInteger port ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_port);
-    }
-
-    public NSString protocol ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_protocol);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString proxyType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_proxyType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString realm ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_realm);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool receivesCredentialSecurely ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_receivesCredentialSecurely) !is null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSURLProtocol.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLProtocol;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSCachedURLResponse;
-import dwt.internal.cocoa.NSMutableURLRequest;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURLRequest;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSURLProtocol : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSCachedURLResponse cachedResponse ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cachedResponse);
-        return result !is null ? new NSCachedURLResponse(result) : null;
-    }
-
-    public static bool canInitWithRequest (NSURLRequest request)
-    {
-        return OS.objc_msgSend(OS.class_NSURLProtocol, OS.sel_canInitWithRequest_1, request !is null ? request.id_ : null) !is null;
-    }
-
-    public static NSURLRequest canonicalRequestForRequest (NSURLRequest request)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLProtocol, OS.sel_canonicalRequestForRequest_1, request !is null ? request.id_ : null);
-        return result !is null ? new NSURLRequest(result) : null;
-    }
-
-    public id client ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_client);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithRequest (NSURLRequest request, NSCachedURLResponse cachedResponse, id client)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRequest_1cachedResponse_1client_1, request !is null ? request.id_ : null,
-                cachedResponse !is null ? cachedResponse.id_ : null, client !is null ? client.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id propertyForKey (NSString key, NSURLRequest request)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLProtocol, OS.sel_propertyForKey_1inRequest_1, key !is null ? key.id_ : null,
-                request !is null ? request.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static bool registerClass (objc.Class protocolClass)
-    {
-        return OS.objc_msgSend(OS.class_NSURLProtocol, OS.sel_registerClass_1, protocolClass) !is null;
-    }
-
-    public static void removePropertyForKey (NSString key, NSMutableURLRequest request)
-    {
-        OS.objc_msgSend(OS.class_NSURLProtocol, OS.sel_removePropertyForKey_1inRequest_1, key !is null ? key.id_ : null,
-                request !is null ? request.id_ : null);
-    }
-
-    public NSURLRequest request ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_request);
-        return result !is null ? new NSURLRequest(result) : null;
-    }
-
-    public static bool requestIsCacheEquivalent (NSURLRequest a, NSURLRequest b)
-    {
-        return OS.objc_msgSend(OS.class_NSURLProtocol, OS.sel_requestIsCacheEquivalent_1toRequest_1, a !is null ? a.id_ : null,
-                b !is null ? b.id_ : null) !is null;
-    }
-
-    public static void setProperty (id value, NSString key, NSMutableURLRequest request)
-    {
-        OS.objc_msgSend(OS.class_NSURLProtocol, OS.sel_setProperty_1forKey_1inRequest_1, value !is null ? value.id_ : null,
-                key !is null ? key.id_ : null, request !is null ? request.id_ : null);
-    }
-
-    public void startLoading ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_startLoading);
-    }
-
-    public void stopLoading ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_stopLoading);
-    }
-
-    public static void unregisterClass (objc.Class protocolClass)
-    {
-        OS.objc_msgSend(OS.class_NSURLProtocol, OS.sel_unregisterClass_1, protocolClass);
-    }
-
-}
--- a/dwt/internal/cocoa/NSURLRequest.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSURLRequest.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,144 +1,52 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSURLRequest;
 
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDate : NSTimeInterval;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInputStream;
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSURLRequest;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSURLRequestCachePolicy : NSUInteger
-{
-    NSURLRequestUseProtocolCachePolicy = 0,
-    NSURLRequestReloadIgnoringLocalCacheData = 1,
-    NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4,
-    NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData,
-    NSURLRequestReturnCacheDataElseLoad = 2,
-    NSURLRequestReturnCacheDataDontLoad = 3,
-    NSURLRequestReloadRevalidatingCacheData = 5
+public class NSURLRequest : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
 }
 
-alias NSURLRequestCachePolicy.NSURLRequestUseProtocolCachePolicy NSURLRequestUseProtocolCachePolicy;
-alias NSURLRequestCachePolicy.NSURLRequestReloadIgnoringLocalCacheData NSURLRequestReloadIgnoringLocalCacheData;
-alias NSURLRequestCachePolicy.NSURLRequestReloadIgnoringLocalAndRemoteCacheData NSURLRequestReloadIgnoringLocalAndRemoteCacheData;
-alias NSURLRequestCachePolicy.NSURLRequestReloadIgnoringCacheData NSURLRequestReloadIgnoringCacheData;
-alias NSURLRequestCachePolicy.NSURLRequestReturnCacheDataElseLoad NSURLRequestReturnCacheDataElseLoad;
-alias NSURLRequestCachePolicy.NSURLRequestReturnCacheDataDontLoad NSURLRequestReturnCacheDataDontLoad;
-alias NSURLRequestCachePolicy.NSURLRequestReloadRevalidatingCacheData NSURLRequestReloadRevalidatingCacheData;
-
-public class NSURLRequest : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSData HTTPBody ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_HTTPBody);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSInputStream HTTPBodyStream ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_HTTPBodyStream);
-        return result !is null ? new NSInputStream(result) : null;
-    }
-
-    public NSString HTTPMethod ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_HTTPMethod);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool HTTPShouldHandleCookies ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_HTTPShouldHandleCookies) !is null;
-    }
-
-    public NSURL URL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL);
-        return result !is null ? new NSURL(result) : null;
-    }
+public NSURL URL() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_URL);
+    return result !is null ? new NSURL(result) : null;
+}
 
-    public NSDictionary allHTTPHeaderFields ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_allHTTPHeaderFields);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSURLRequestCachePolicy cachePolicy ()
-    {
-        return cast(NSURLRequestCachePolicy) OS.objc_msgSend(this.id_, OS.sel_cachePolicy);
-    }
-
-    public id initWithURL_ (NSURL URL)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithURL_1, URL !is null ? URL.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithURL_cachePolicy_timeoutInterval_ (NSURL URL, NSURLRequestCachePolicy cachePolicy, NSTimeInterval timeoutInterval)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithURL_1cachePolicy_1timeoutInterval_1, URL !is null ? URL.id_ : null, cachePolicy,
-                timeoutInterval);
-        return result !is null ? new id(result) : null;
-    }
+public NSURLRequest initWithURL(NSURL URL) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithURL_, URL !is null ? URL.id : null);
+    return result is this.id ? this : (result !is null ? new NSURLRequest(result) : null);
+}
 
-    public NSURL mainDocumentURL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mainDocumentURL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public static NSURLRequest static_requestWithURL_ (NSURL URL)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLRequest, OS.sel_requestWithURL_1, URL !is null ? URL.id_ : null);
-        return result !is null ? new NSURLRequest(result) : null;
-    }
-
-    public static id static_requestWithURL_cachePolicy_timeoutInterval_ (NSURL URL, NSURLRequestCachePolicy cachePolicy, NSTimeInterval timeoutInterval)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSURLRequest, OS.sel_requestWithURL_1cachePolicy_1timeoutInterval_1, URL !is null ? URL.id_ : null,
-                cachePolicy, timeoutInterval);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSTimeInterval timeoutInterval ()
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_timeoutInterval);
-    }
-
-    public NSString valueForHTTPHeaderField (NSString field)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_valueForHTTPHeaderField_1, field !is null ? field.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public static NSURLRequest requestWithURL(NSURL URL) {
+    objc.id result = OS.objc_msgSend(OS.class_NSURLRequest, OS.sel_requestWithURL_, URL !is null ? URL.id : null);
+    return result !is null ? new NSURLRequest(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSURLResponse.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSURLResponse;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSURLResponse : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString MIMEType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_MIMEType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSURL URL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public long expectedContentLength ()
-    {
-        return cast(long) OS.objc_msgSend(this.id_, OS.sel_expectedContentLength);
-    }
-
-    public id initWithURL (NSURL URL, NSString MIMEType, NSInteger length, NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithURL_1MIMEType_1expectedContentLength_1textEncodingName_1,
-                URL !is null ? URL.id_ : null, MIMEType !is null ? MIMEType.id_ : null, length, name !is null ? name.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString suggestedFilename ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_suggestedFilename);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString textEncodingName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textEncodingName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSUnarchiver.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSUnarchiver;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSCoder;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSZone;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSUnarchiver : NSCoder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static NSString static_classNameDecodedForArchiveClassName_ (NSString inArchiveName)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_classNameDecodedForArchiveClassName_1,
-                inArchiveName !is null ? inArchiveName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString classNameDecodedForArchiveClassName_ (NSString inArchiveName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_classNameDecodedForArchiveClassName_1, inArchiveName !is null ? inArchiveName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void decodeClassName_asClassName_ (NSString inArchiveName, NSString trueName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_decodeClassName_1asClassName_1, inArchiveName !is null ? inArchiveName.id_ : null,
-                trueName !is null ? trueName.id_ : null);
-    }
-
-    public static void static_decodeClassName_asClassName_ (NSString inArchiveName, NSString trueName)
-    {
-        OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_decodeClassName_1asClassName_1, inArchiveName !is null ? inArchiveName.id_ : null,
-                trueName !is null ? trueName.id_ : null);
-    }
-
-    public id initForReadingWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initForReadingWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isAtEnd ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAtEnd) !is null;
-    }
-
-    public NSZone* objectZone ()
-    {
-        return cast(NSZone*) OS.objc_msgSend(this.id_, OS.sel_objectZone);
-    }
-
-    public void replaceObject (id object, id newObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceObject_1withObject_1, object !is null ? object.id_ : null, newObject !is null ? newObject.id_ : null);
-    }
-
-    public void setObjectZone (NSZone* zone)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectZone_1, zone);
-    }
-
-    public uint systemVersion ()
-    {
-        return cast(uint) OS.objc_msgSend(this.id_, OS.sel_systemVersion);
-    }
-
-    public static id unarchiveObjectWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_unarchiveObjectWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id unarchiveObjectWithFile (NSString path)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSUnarchiver, OS.sel_unarchiveObjectWithFile_1, path !is null ? path.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSUndoManager.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSUndoManager;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSUndoManager : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void beginUndoGrouping ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginUndoGrouping);
-    }
-
-    public bool canRedo ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canRedo) !is null;
-    }
-
-    public bool canUndo ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canUndo) !is null;
-    }
-
-    public void disableUndoRegistration ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_disableUndoRegistration);
-    }
-
-    public void enableUndoRegistration ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enableUndoRegistration);
-    }
-
-    public void endUndoGrouping ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endUndoGrouping);
-    }
-
-    public NSInteger groupingLevel ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_groupingLevel);
-    }
-
-    public bool groupsByEvent ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_groupsByEvent) !is null;
-    }
-
-    public bool isRedoing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRedoing) !is null;
-    }
-
-    public bool isUndoRegistrationEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isUndoRegistrationEnabled) !is null;
-    }
-
-    public bool isUndoing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isUndoing) !is null;
-    }
-
-    public NSUInteger levelsOfUndo ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_levelsOfUndo);
-    }
-
-    public id prepareWithInvocationTarget (id target)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_prepareWithInvocationTarget_1, target !is null ? target.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void redo ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_redo);
-    }
-
-    public NSString redoActionName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_redoActionName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString redoMenuItemTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_redoMenuItemTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString redoMenuTitleForUndoActionName (NSString actionName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_redoMenuTitleForUndoActionName_1, actionName !is null ? actionName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void registerUndoWithTarget (id target, objc.SEL selector, id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_registerUndoWithTarget_1selector_1object_1, target !is null ? target.id_ : null, selector,
-                anObject !is null ? anObject.id_ : null);
-    }
-
-    public void removeAllActions ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllActions);
-    }
-
-    public void removeAllActionsWithTarget (id target)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllActionsWithTarget_1, target !is null ? target.id_ : null);
-    }
-
-    public NSArray runLoopModes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_runLoopModes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void setActionName (NSString actionName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setActionName_1, actionName !is null ? actionName.id_ : null);
-    }
-
-    public void setGroupsByEvent (bool groupsByEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setGroupsByEvent_1, groupsByEvent);
-    }
-
-    public void setLevelsOfUndo (NSUInteger levels)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLevelsOfUndo_1, levels);
-    }
-
-    public void setRunLoopModes (NSArray runLoopModes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRunLoopModes_1, runLoopModes !is null ? runLoopModes.id_ : null);
-    }
-
-    public void undo ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_undo);
-    }
-
-    public NSString undoActionName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_undoActionName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString undoMenuItemTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_undoMenuItemTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString undoMenuTitleForUndoActionName (NSString actionName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_undoMenuTitleForUndoActionName_1, actionName !is null ? actionName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void undoNestedGroup ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_undoNestedGroup);
-    }
-
-}
--- a/dwt/internal/cocoa/NSUniqueIDSpecifier.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSUniqueIDSpecifier;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSUniqueIDSpecifier : NSScriptObjectSpecifier
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initWithContainerClassDescription (NSScriptClassDescription classDesc, NSScriptObjectSpecifier container, NSString property,
-            id uniqueID)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContainerClassDescription_1containerSpecifier_1key_1uniqueID_1,
-                classDesc !is null ? classDesc.id_ : null, container !is null ? container.id_ : null, property !is null ? property.id_ : null,
-                uniqueID !is null ? uniqueID.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setUniqueID (id uniqueID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUniqueID_1, uniqueID !is null ? uniqueID.id_ : null);
-    }
-
-    public id uniqueID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_uniqueID);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSUserDefaults.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSUserDefaults;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSUserDefaults : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addSuiteNamed (NSString suiteName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addSuiteNamed_1, suiteName !is null ? suiteName.id_ : null);
-    }
-
-    public NSArray arrayForKey (NSString defaultName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_arrayForKey_1, defaultName !is null ? defaultName.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public bool boolForKey (NSString defaultName)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_boolForKey_1, defaultName !is null ? defaultName.id_ : null) !is null;
-    }
-
-    public NSData dataForKey (NSString defaultName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataForKey_1, defaultName !is null ? defaultName.id_ : null);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSDictionary dictionaryForKey (NSString defaultName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dictionaryForKey_1, defaultName !is null ? defaultName.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSDictionary dictionaryRepresentation ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dictionaryRepresentation);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public double doubleForKey (NSString defaultName)
-    {
-        return cast(double) OS.objc_msgSend_fpret(this.id_, OS.sel_doubleForKey_1, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public float floatForKey (NSString defaultName)
-    {
-        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatForKey_1, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public id initWithUser (NSString username)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithUser_1, username !is null ? username.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger integerForKey (NSString defaultName)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_integerForKey_1, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public id objectForKey (NSString defaultName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectForKey_1, defaultName !is null ? defaultName.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool objectIsForcedForKey_ (NSString key)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_objectIsForcedForKey_1, key !is null ? key.id_ : null) !is null;
-    }
-
-    public bool objectIsForcedForKey_inDomain_ (NSString key, NSString domain)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_objectIsForcedForKey_1inDomain_1, key !is null ? key.id_ : null, domain !is null ? domain.id_ : null) !is null;
-    }
-
-    public NSDictionary persistentDomainForName (NSString domainName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_persistentDomainForName_1, domainName !is null ? domainName.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSArray persistentDomainNames ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_persistentDomainNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void registerDefaults (NSDictionary registrationDictionary)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_registerDefaults_1, registrationDictionary !is null ? registrationDictionary.id_ : null);
-    }
-
-    public void removeObjectForKey (NSString defaultName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeObjectForKey_1, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public void removePersistentDomainForName (NSString domainName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removePersistentDomainForName_1, domainName !is null ? domainName.id_ : null);
-    }
-
-    public void removeSuiteNamed (NSString suiteName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeSuiteNamed_1, suiteName !is null ? suiteName.id_ : null);
-    }
-
-    public void removeVolatileDomainForName (NSString domainName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeVolatileDomainForName_1, domainName !is null ? domainName.id_ : null);
-    }
-
-    public static void resetStandardUserDefaults ()
-    {
-        OS.objc_msgSend(OS.class_NSUserDefaults, OS.sel_resetStandardUserDefaults);
-    }
-
-    public void setBool (bool value, NSString defaultName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBool_1forKey_1, value, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public void setDouble (double value, NSString defaultName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDouble_1forKey_1, value, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public void setFloat (float value, NSString defaultName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFloat_1forKey_1, value, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public void setInteger (NSInteger value, NSString defaultName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInteger_1forKey_1, value, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public void setObject (id value, NSString defaultName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObject_1forKey_1, value !is null ? value.id_ : null, defaultName !is null ? defaultName.id_ : null);
-    }
-
-    public void setPersistentDomain (NSDictionary domain, NSString domainName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPersistentDomain_1forName_1, domain !is null ? domain.id_ : null,
-                domainName !is null ? domainName.id_ : null);
-    }
-
-    public void setVolatileDomain (NSDictionary domain, NSString domainName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVolatileDomain_1forName_1, domain !is null ? domain.id_ : null, domainName !is null ? domainName.id_ : null);
-    }
-
-    public static NSUserDefaults standardUserDefaults ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSUserDefaults, OS.sel_standardUserDefaults);
-        return result !is null ? new NSUserDefaults(result) : null;
-    }
-
-    public NSArray stringArrayForKey (NSString defaultName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringArrayForKey_1, defaultName !is null ? defaultName.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString stringForKey (NSString defaultName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringForKey_1, defaultName !is null ? defaultName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool synchronize ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_synchronize) !is null;
-    }
-
-    public NSDictionary volatileDomainForName (NSString domainName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_volatileDomainForName_1, domainName !is null ? domainName.id_ : null);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public NSArray volatileDomainNames ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_volatileDomainNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSUserDefaultsController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSUserDefaultsController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSController;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSUserDefaults;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSUserDefaultsController : NSController
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool appliesImmediately ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_appliesImmediately) !is null;
-    }
-
-    public NSUserDefaults defaults ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaults);
-        return result !is null ? new NSUserDefaults(result) : null;
-    }
-
-    public bool hasUnappliedChanges ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasUnappliedChanges) !is null;
-    }
-
-    public id initWithDefaults (NSUserDefaults defaults, NSDictionary initialValues)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithDefaults_1initialValues_1, defaults !is null ? defaults.id_ : null,
-                initialValues !is null ? initialValues.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSDictionary initialValues ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initialValues);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void revert (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_revert_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void revertToInitialValues (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_revertToInitialValues_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void save (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_save_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void setAppliesImmediately (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAppliesImmediately_1, flag);
-    }
-
-    public void setInitialValues (NSDictionary initialValues)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInitialValues_1, initialValues !is null ? initialValues.id_ : null);
-    }
-
-    public static id sharedUserDefaultsController ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSUserDefaultsController, OS.sel_sharedUserDefaultsController);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id values ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_values);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSValue.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSValue.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,146 +1,78 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSValue;
 
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSRange;
-import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class NSValue : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
+public class NSValue : NSObject {
 
-    public void getValue (void* value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getValue_1, value);
-    }
+public this() {
+    super();
+}
 
-    public id initWithBytes (/*const*/void* value, /*const char* */byte* type)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithBytes_1objCType_1, value, type);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isEqualToValue (NSValue value)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isEqualToValue_1, value !is null ? value.id_ : null) !is null;
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public id nonretainedObjectValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nonretainedObjectValue);
-        return result !is null ? new id(result) : null;
-    }
-
-    public /*const char* */byte* objCType ()
-    {
-        return cast(/*const char* */byte*) OS.objc_msgSend(this.id_, OS.sel_objCType);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public NSPoint pointValue ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_pointValue);
-        return result;
-    }
+public NSPoint pointValue() {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_pointValue);
+    return result;
+}
 
-    public void* pointerValue ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_pointerValue);
-    }
-
-    public NSRange rangeValue ()
-    {
-        NSRange result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeValue);
-        return result;
-    }
+public NSRange rangeValue() {
+    NSRange result = NSRange();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_rangeValue);
+    return result;
+}
 
-    public NSRect rectValue ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectValue);
-        return result;
-    }
+public NSSize sizeValue() {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_sizeValue);
+    return result;
+}
 
-    public NSSize sizeValue ()
-    {
-        NSSize result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_sizeValue);
-        return result;
-    }
-
-    public static NSValue value (/*const*/void* value, /*const char* */byte* type)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_value_1withObjCType_1, value, type);
-        return result !is null ? new NSValue(result) : null;
-    }
-
-    public static NSValue valueWithBytes (/*const*/void* value, /*const char* */byte* type)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithBytes_1objCType_1, value, type);
-        return result !is null ? new NSValue(result) : null;
-    }
+public static NSValue valueWithPoint(NSPoint point) {
+    objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithPoint_, point);
+    return result !is null ? new NSValue(result) : null;
+}
 
-    public static NSValue valueWithNonretainedObject (id anObject)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithNonretainedObject_1, anObject !is null ? anObject.id_ : null);
-        return result !is null ? new NSValue(result) : null;
-    }
-
-    public static NSValue valueWithPoint (NSPoint point)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithPoint_1, point);
-        return result !is null ? new NSValue(result) : null;
-    }
-
-    public static NSValue valueWithPointer (/*const*/void* pointer)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithPointer_1, pointer);
-        return result !is null ? new NSValue(result) : null;
-    }
+public static NSValue valueWithRange(NSRange range) {
+    objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithRange_, range);
+    return result !is null ? new NSValue(result) : null;
+}
 
-    public static NSValue valueWithRange (NSRange range)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithRange_1, range);
-        return result !is null ? new NSValue(result) : null;
-    }
+public static NSValue valueWithRect(NSRect rect) {
+    objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithRect_, rect);
+    return result !is null ? new NSValue(result) : null;
+}
 
-    public static NSValue valueWithRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithRect_1, rect);
-        return result !is null ? new NSValue(result) : null;
-    }
-
-    public static NSValue valueWithSize (NSSize size)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithSize_1, size);
-        return result !is null ? new NSValue(result) : null;
-    }
+public static NSValue valueWithSize(NSSize size) {
+    objc.id result = OS.objc_msgSend(OS.class_NSValue, OS.sel_valueWithSize_, size);
+    return result !is null ? new NSValue(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSValueTransformer.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSValueTransformer;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSValueTransformer : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static bool allowsReverseTransformation ()
-    {
-        return OS.objc_msgSend(OS.class_NSValueTransformer, OS.sel_allowsReverseTransformation) !is null;
-    }
-
-    public id reverseTransformedValue (id value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_reverseTransformedValue_1, value !is null ? value.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static void setValueTransformer (NSValueTransformer transformer, NSString name)
-    {
-        OS.objc_msgSend(OS.class_NSValueTransformer, OS.sel_setValueTransformer_1forName_1, transformer !is null ? transformer.id_ : null,
-                name !is null ? name.id_ : null);
-    }
-
-    public id transformedValue (id value)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_transformedValue_1, value !is null ? value.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static objc.Class transformedValueClass ()
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSValueTransformer, OS.sel_transformedValueClass);
-    }
-
-    public static NSValueTransformer valueTransformerForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValueTransformer, OS.sel_valueTransformerForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSValueTransformer(result) : null;
-    }
-
-    public static NSArray valueTransformerNames ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSValueTransformer, OS.sel_valueTransformerNames);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,57 +1,35 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSView;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSAttributedString;
-import dwt.internal.cocoa.NSBitmapImageRep;
-import dwt.internal.cocoa.NSClipView;
-import dwt.internal.cocoa.NSComparisonResult;
-import dwt.internal.cocoa.NSCursor;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSEvent;
-import dwt.internal.cocoa.NSFocusRingType;
-import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSMenu;
-import dwt.internal.cocoa.NSMenuItem;
 import dwt.internal.cocoa.NSPasteboard;
 import dwt.internal.cocoa.NSPoint;
-import dwt.internal.cocoa.NSRange : NSRangePointer;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSResponder;
-import dwt.internal.cocoa.NSRulerMarker;
-import dwt.internal.cocoa.NSRulerView;
-import dwt.internal.cocoa.NSScreen;
-import dwt.internal.cocoa.NSScrollView;
-import dwt.internal.cocoa.NSShadow;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSTrackingArea;
 import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-alias NSInteger NSToolTipTag;
-alias NSInteger NSTrackingRectTag;
-
-
-
 enum NSBorderType
 {
     NSNoBorder = 0,
@@ -60,1137 +38,238 @@
     NSGrooveBorder = 3
 }
 
-alias NSBorderType.NSNoBorder NSNoBorder;
-alias NSBorderType.NSLineBorder NSLineBorder;
-alias NSBorderType.NSBezelBorder NSBezelBorder;
-alias NSBorderType.NSGrooveBorder NSGrooveBorder;
-
-
-
-public class NSView : NSResponder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool acceptsFirstMouse (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsFirstMouse_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public void addCursorRect (NSRect aRect, NSCursor anObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addCursorRect_1cursor_1, aRect, anObj !is null ? anObj.id_ : null);
-    }
+public class NSView : NSResponder {
 
-    public void addSubview_ (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addSubview_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void addSubview_positioned_relativeTo_ (NSView aView, NSWindowOrderingMode place, NSView otherView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addSubview_1positioned_1relativeTo_1, aView !is null ? aView.id_ : null, place,
-                otherView !is null ? otherView.id_ : null);
-    }
-
-    public NSToolTipTag addToolTipRect (NSRect aRect, id anObject, void* data)
-    {
-        return cast(NSToolTipTag) OS.objc_msgSend(this.id_, OS.sel_addToolTipRect_1owner_1userData_1, aRect, anObject !is null ? anObject.id_ : null, data);
-    }
+public this() {
+    super();
+}
 
-    public void addTrackingArea (NSTrackingArea trackingArea)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addTrackingArea_1, trackingArea !is null ? trackingArea.id_ : null);
-    }
-
-    public NSTrackingRectTag addTrackingRect (NSRect aRect, id anObject, void* data, bool flag)
-    {
-        return cast(NSTrackingRectTag) OS.objc_msgSend(this.id_, OS.sel_addTrackingRect_1owner_1userData_1assumeInside_1, aRect, anObject !is null ? anObject.id_ : null, data,
-                flag);
-    }
-
-    public void adjustPageHeightNew (CGFloat* newBottom, CGFloat oldTop, CGFloat oldBottom, CGFloat bottomLimit)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_adjustPageHeightNew_1top_1bottom_1limit_1, newBottom, oldTop, oldBottom, bottomLimit);
-    }
-
-    public void adjustPageWidthNew (CGFloat* newRight, CGFloat oldLeft, CGFloat oldRight, CGFloat rightLimit)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_adjustPageWidthNew_1left_1right_1limit_1, newRight, oldLeft, oldRight, rightLimit);
-    }
+public this(objc.id id) {
+    super(id);
+}
 
-    public NSRect adjustScroll (NSRect newVisible)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_adjustScroll_1, newVisible);
-        return result;
-    }
-
-    public void allocateGState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_allocateGState);
-    }
+public this(cocoa.id id) {
+    super(id);
+}
 
-    public CGFloat alphaValue ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_alphaValue);
-    }
-
-    public NSView ancestorSharedWithView (NSView aView)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_ancestorSharedWithView_1, aView !is null ? aView.id_ : null);
-        return result is this.id_ ? this : (result !is null ? new NSView(result) : null);
-    }
-
-    public bool autoresizesSubviews ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autoresizesSubviews) !is null;
-    }
-
-    public NSUInteger autoresizingMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_autoresizingMask);
-    }
+public void addSubview(NSView aView) {
+    OS.objc_msgSend(this.id, OS.sel_addSubview_, aView !is null ? aView.id : null);
+}
 
-    public bool autoscroll (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autoscroll_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public NSArray backgroundFilters ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundFilters);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void beginDocument ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginDocument);
-    }
+public void addSubview(NSView aView, NSWindowOrderingMode place, NSView otherView) {
+    OS.objc_msgSend(this.id, OS.sel_addSubview_positioned_relativeTo_, aView !is null ? aView.id : null, place, otherView !is null ? otherView.id : null);
+}
 
-    public void beginPageInRect (NSRect aRect, NSPoint location)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_beginPageInRect_1atPlacement_1, aRect, location);
-    }
-
-    public NSBitmapImageRep bitmapImageRepForCachingDisplayInRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_bitmapImageRepForCachingDisplayInRect_1, rect);
-        return result !is null ? new NSBitmapImageRep(result) : null;
-    }
-
-    public NSRect bounds ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_bounds);
-        return result;
-    }
-
-    public CGFloat boundsRotation ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_boundsRotation);
-    }
+public void beginDocument() {
+    OS.objc_msgSend(this.id, OS.sel_beginDocument);
+}
 
-    public void cacheDisplayInRect (NSRect rect, NSBitmapImageRep bitmapImageRep)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cacheDisplayInRect_1toBitmapImageRep_1, rect, bitmapImageRep !is null ? bitmapImageRep.id_ : null);
-    }
-
-    public bool canBecomeKeyView ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canBecomeKeyView) !is null;
-    }
-
-    public bool canDraw ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canDraw) !is null;
-    }
-
-    public NSRect centerScanRect (NSRect aRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_centerScanRect_1, aRect);
-        return result;
-    }
-
-    //public CIFilter compositingFilter() {
-    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_compositingFilter);
-    //  return result !is null ? new CIFilter(result) : null;
-    //}
-
-    public NSArray contentFilters ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentFilters);
-        return result !is null ? new NSArray(result) : null;
-    }
+public void beginPageInRect(NSRect aRect, NSPoint location) {
+    OS.objc_msgSend(this.id, OS.sel_beginPageInRect_atPlacement_, aRect, location);
+}
 
-    public NSPoint convertPoint_fromView_ (NSPoint aPoint, NSView aView)
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_convertPoint_1fromView_1, aPoint, aView !is null ? aView.id_ : null);
-        return result;
-    }
-
-    public NSPoint convertPoint_toView_ (NSPoint aPoint, NSView aView)
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_convertPoint_1toView_1, aPoint, aView !is null ? aView.id_ : null);
-        return result;
-    }
-
-    public NSPoint convertPointFromBase (NSPoint aPoint)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertPointFromBase_1, aPoint);
-        return result;
-    }
-
-    public NSPoint convertPointToBase (NSPoint aPoint)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertPointToBase_1, aPoint);
-        return result;
-    }
-
-    public NSRect convertRect_fromView_ (NSRect aRect, NSView aView)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertRect_1fromView_1, aRect, aView !is null ? aView.id_ : null);
-        return result;
-    }
+public NSRect bounds() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_bounds);
+    return result;
+}
 
-    public NSRect convertRect_toView_ (NSRect aRect, NSView aView)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertRect_1toView_1, aRect, aView !is null ? aView.id_ : null);
-        return result;
-    }
-
-    public NSRect convertRectFromBase (NSRect aRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertRectFromBase_1, aRect);
-        return result;
-    }
-
-    public NSRect convertRectToBase (NSRect aRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertRectToBase_1, aRect);
-        return result;
-    }
-
-    public NSSize convertSize_fromView_ (NSSize aSize, NSView aView)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertSize_1fromView_1, aSize, aView !is null ? aView.id_ : null);
-        return result;
-    }
-
-    public NSSize convertSize_toView_ (NSSize aSize, NSView aView)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertSize_1toView_1, aSize, aView !is null ? aView.id_ : null);
-        return result;
-    }
+public NSPoint convertPoint_fromView_(NSPoint aPoint, NSView aView) {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertPoint_fromView_, aPoint, aView !is null ? aView.id : null);
+    return result;
+}
 
-    public NSSize convertSizeFromBase (NSSize aSize)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertSizeFromBase_1, aSize);
-        return result;
-    }
-
-    public NSSize convertSizeToBase (NSSize aSize)
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_convertSizeToBase_1, aSize);
-        return result;
-    }
+public NSPoint convertPoint_toView_(NSPoint aPoint, NSView aView) {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertPoint_toView_, aPoint, aView !is null ? aView.id : null);
+    return result;
+}
 
-    public NSData dataWithEPSInsideRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataWithEPSInsideRect_1, rect);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData dataWithPDFInsideRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataWithPDFInsideRect_1, rect);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public static NSFocusRingType defaultFocusRingType ()
-    {
-        return cast(NSFocusRingType) OS.objc_msgSend(OS.class_NSView, OS.sel_defaultFocusRingType);
-    }
-
-    public static NSMenu defaultMenu ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSView, OS.sel_defaultMenu);
-        return result !is null ? new NSMenu(result) : null;
-    }
+public NSPoint convertPointFromBase(NSPoint aPoint) {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertPointFromBase_, aPoint);
+    return result;
+}
 
-    public void didAddSubview (NSView subview)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_didAddSubview_1, subview !is null ? subview.id_ : null);
-    }
-
-    public void discardCursorRects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_discardCursorRects);
-    }
-
-    public void display ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_display);
-    }
-
-    public void displayIfNeeded ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayIfNeeded);
-    }
-
-    public void displayIfNeededIgnoringOpacity ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayIfNeededIgnoringOpacity);
-    }
-
-    public void displayIfNeededInRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayIfNeededInRect_1, rect);
-    }
-
-    public void displayIfNeededInRectIgnoringOpacity (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayIfNeededInRectIgnoringOpacity_1, rect);
-    }
+public NSPoint convertPointToBase(NSPoint aPoint) {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertPointToBase_, aPoint);
+    return result;
+}
 
-    public void displayRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayRect_1, rect);
-    }
-
-    public void displayRectIgnoringOpacity_ (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayRectIgnoringOpacity_1, rect);
-    }
-
-    public void displayRectIgnoringOpacity_inContext_ (NSRect aRect, NSGraphicsContext context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayRectIgnoringOpacity_1inContext_1, aRect, context !is null ? context.id_ : null);
-    }
-
-    public bool dragFile (NSString filename, NSRect rect, bool aFlag, NSEvent event)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_dragFile_1fromRect_1slideBack_1event_1, filename !is null ? filename.id_ : null, rect, aFlag,
-                event !is null ? event.id_ : null) !is null;
-    }
-
-    public void dragImage (NSImage anImage, NSPoint viewLocation, NSSize initialOffset, NSEvent event, NSPasteboard pboard, id sourceObj,
-            bool slideFlag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dragImage_1at_1offset_1event_1pasteboard_1source_1slideBack_1, anImage !is null ? anImage.id_ : null,
-                viewLocation, initialOffset, event !is null ? event.id_ : null, pboard !is null ? pboard.id_ : null,
-                sourceObj !is null ? sourceObj.id_ : null, slideFlag);
-    }
-
-    public bool dragPromisedFilesOfTypes (NSArray typeArray, NSRect rect, id sourceObject, bool aFlag, NSEvent event)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_dragPromisedFilesOfTypes_1fromRect_1source_1slideBack_1event_1,
-                typeArray !is null ? typeArray.id_ : null, rect, sourceObject !is null ? sourceObject.id_ : null, aFlag,
-                event !is null ? event.id_ : null) !is null;
-    }
+public NSRect convertRect_fromView_(NSRect aRect, NSView aView) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertRect_fromView_, aRect, aView !is null ? aView.id : null);
+    return result;
+}
 
-    public void drawPageBorderWithSize (NSSize borderSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawPageBorderWithSize_1, borderSize);
-    }
-
-    public void drawRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawRect_1, rect);
-    }
-
-    public void drawSheetBorderWithSize (NSSize borderSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_drawSheetBorderWithSize_1, borderSize);
-    }
-
-    public NSMenuItem enclosingMenuItem ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_enclosingMenuItem);
-        return result !is null ? new NSMenuItem(result) : null;
-    }
-
-    public NSScrollView enclosingScrollView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_enclosingScrollView);
-        return result !is null ? new NSScrollView(result) : null;
-    }
-
-    public void endDocument ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endDocument);
-    }
+public NSRect convertRect_toView_(NSRect aRect, NSView aView) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertRect_toView_, aRect, aView !is null ? aView.id : null);
+    return result;
+}
 
-    public void endPage ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endPage);
-    }
-
-    public bool enterFullScreenMode (NSScreen screen, NSDictionary options)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_enterFullScreenMode_1withOptions_1, screen !is null ? screen.id_ : null,
-                options !is null ? options.id_ : null) !is null;
-    }
-
-    public void exitFullScreenModeWithOptions (NSDictionary options)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_exitFullScreenModeWithOptions_1, options !is null ? options.id_ : null);
-    }
+public NSRect convertRectFromBase(NSRect aRect) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertRectFromBase_, aRect);
+    return result;
+}
 
-    public NSFocusRingType focusRingType ()
-    {
-        return cast(NSFocusRingType) OS.objc_msgSend(this.id_, OS.sel_focusRingType);
-    }
-
-    public static NSView focusView ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSView, OS.sel_focusView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public NSRect frame ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_frame);
-        return result;
-    }
-
-    public CGFloat frameCenterRotation ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_frameCenterRotation);
-    }
+public NSRect convertRectToBase(NSRect aRect) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertRectToBase_, aRect);
+    return result;
+}
 
-    public CGFloat frameRotation ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_frameRotation);
-    }
-
-    public NSInteger gState ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_gState);
-    }
-
-    public void getRectsBeingDrawn (/*const NSRect** */objc.id** rects, NSInteger* count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getRectsBeingDrawn_1count_1, rects, count);
-    }
-
-    public void getRectsExposedDuringLiveResize (/*NSRect[4]*/NSRect* exposedRects, NSInteger* count)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_getRectsExposedDuringLiveResize_1count_1, exposedRects, count);
-    }
-
-    public CGFloat heightAdjustLimit ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_heightAdjustLimit);
-    }
-
-    public NSView hitTest (NSPoint aPoint)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_hitTest_1, aPoint);
-        return result is this.id_ ? this : (result !is null ? new NSView(result) : null);
-    }
-
-    public bool inLiveResize ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_inLiveResize) !is null;
-    }
+public NSSize convertSize_fromView_(NSSize aSize, NSView aView) {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertSize_fromView_, aSize, aView !is null ? aView.id : null);
+    return result;
+}
 
-    public NSView initWithFrame (NSRect frameRect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1, frameRect);
-        return result !is null ? this : null;
-    }
-
-    public bool isDescendantOf (NSView aView)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDescendantOf_1, aView !is null ? aView.id_ : null) !is null;
-    }
-
-    public bool isFlipped ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFlipped) !is null;
-    }
-
-    public bool isHidden ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHidden) !is null;
-    }
-
-    public bool isHiddenOrHasHiddenAncestor ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isHiddenOrHasHiddenAncestor) !is null;
-    }
-
-    public bool isInFullScreenMode ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isInFullScreenMode) !is null;
-    }
-
-    public bool isOpaque ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOpaque) !is null;
-    }
+public NSSize convertSize_toView_(NSSize aSize, NSView aView) {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertSize_toView_, aSize, aView !is null ? aView.id : null);
+    return result;
+}
 
-    public bool isRotatedFromBase ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRotatedFromBase) !is null;
-    }
-
-    public bool isRotatedOrScaledFromBase ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isRotatedOrScaledFromBase) !is null;
-    }
-
-    public bool knowsPageRange (NSRangePointer range)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_knowsPageRange_1, range) !is null;
-    }
-
-    //public CALayer layer() {
-    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_layer);
-    //  return result !is null ? new CALayer(result) : null;
-    //}
-
-    public NSPoint locationOfPrintRect (NSRect aRect)
-    {
-        NSPoint result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_locationOfPrintRect_1, aRect);
-        return result;
-    }
-
-    public void lockFocus ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_lockFocus);
-    }
+public NSSize convertSizeFromBase(NSSize aSize) {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertSizeFromBase_, aSize);
+    return result;
+}
 
-    public bool lockFocusIfCanDraw ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_lockFocusIfCanDraw) !is null;
-    }
-
-    public bool lockFocusIfCanDrawInContext (NSGraphicsContext context)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_lockFocusIfCanDrawInContext_1, context !is null ? context.id_ : null) !is null;
-    }
-
-    public NSMenu menuForEvent (NSEvent event)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_menuForEvent_1, event !is null ? event.id_ : null);
-        return result !is null ? new NSMenu(result) : null;
-    }
+public NSSize convertSizeToBase(NSSize aSize) {
+    NSSize result = NSSize();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertSizeToBase_, aSize);
+    return result;
+}
 
-    public bool mouse (NSPoint aPoint, NSRect aRect)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_mouse_1inRect_1, aPoint, aRect) !is null;
-    }
-
-    public bool mouseDownCanMoveWindow ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_mouseDownCanMoveWindow) !is null;
-    }
+public void displayIfNeeded() {
+    OS.objc_msgSend(this.id, OS.sel_displayIfNeeded);
+}
 
-    public bool needsDisplay ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_needsDisplay) !is null;
-    }
-
-    public bool needsPanelToBecomeKey ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_needsPanelToBecomeKey) !is null;
-    }
-
-    public bool needsToDrawRect (NSRect aRect)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_needsToDrawRect_1, aRect) !is null;
-    }
+public void dragImage(NSImage anImage, NSPoint viewLocation, NSSize initialOffset, NSEvent event, NSPasteboard pboard, cocoa.id sourceObj, bool slideFlag) {
+    OS.objc_msgSend(this.id, OS.sel_dragImage_at_offset_event_pasteboard_source_slideBack_, anImage !is null ? anImage.id : null, viewLocation, initialOffset, event !is null ? event.id : null, pboard !is null ? pboard.id : null, sourceObj !is null ? sourceObj.id : null, slideFlag);
+}
 
-    public NSView nextKeyView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextKeyView);
-        return result is this.id_ ? this : (result !is null ? new NSView(result) : null);
-    }
-
-    public NSView nextValidKeyView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextValidKeyView);
-        return result is this.id_ ? this : (result !is null ? new NSView(result) : null);
-    }
-
-    public NSView opaqueAncestor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_opaqueAncestor);
-        return result is this.id_ ? this : (result !is null ? new NSView(result) : null);
-    }
-
-    public NSAttributedString pageFooter ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pageFooter);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
-
-    public NSAttributedString pageHeader ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_pageHeader);
-        return result !is null ? new NSAttributedString(result) : null;
-    }
+public void drawRect(NSRect rect) {
+    OS.objc_msgSend(this.id, OS.sel_drawRect_, rect);
+}
 
-    public bool performKeyEquivalent (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_performKeyEquivalent_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public bool performMnemonic (NSString theString)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_performMnemonic_1, theString !is null ? theString.id_ : null) !is null;
-    }
-
-    public bool postsBoundsChangedNotifications ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_postsBoundsChangedNotifications) !is null;
-    }
+public void endDocument() {
+    OS.objc_msgSend(this.id, OS.sel_endDocument);
+}
 
-    public bool postsFrameChangedNotifications ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_postsFrameChangedNotifications) !is null;
-    }
-
-    public bool preservesContentDuringLiveResize ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_preservesContentDuringLiveResize) !is null;
-    }
-
-    public NSView previousKeyView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_previousKeyView);
-        return result is this.id_ ? this : (result !is null ? new NSView(result) : null);
-    }
-
-    public NSView previousValidKeyView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_previousValidKeyView);
-        return result is this.id_ ? this : (result !is null ? new NSView(result) : null);
-    }
+public void endPage() {
+    OS.objc_msgSend(this.id, OS.sel_endPage);
+}
 
-    public void print (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_print_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSString printJobTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_printJobTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSRect rectForPage (NSInteger page)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectForPage_1, page);
-        return result;
-    }
-
-    public NSRect rectPreservedDuringLiveResize ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rectPreservedDuringLiveResize);
-        return result;
-    }
-
-    public void reflectScrolledClipView (NSClipView aClipView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_reflectScrolledClipView_1, aClipView !is null ? aClipView.id_ : null);
-    }
-
-    public void registerForDraggedTypes (NSArray newTypes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_registerForDraggedTypes_1, newTypes !is null ? newTypes.id_ : null);
-    }
+public NSRect frame() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_frame);
+    return result;
+}
 
-    public NSArray registeredDraggedTypes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_registeredDraggedTypes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void releaseGState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_releaseGState);
-    }
-
-    public void removeAllToolTips ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAllToolTips);
-    }
+public NSView hitTest(NSPoint aPoint) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_hitTest_, aPoint);
+    return result is this.id ? this : (result !is null ? new NSView(result) : null);
+}
 
-    public void removeCursorRect (NSRect aRect, NSCursor anObj)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeCursorRect_1cursor_1, aRect, anObj !is null ? anObj.id_ : null);
-    }
-
-    public void removeFromSuperview ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFromSuperview);
-    }
-
-    public void removeFromSuperviewWithoutNeedingDisplay ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeFromSuperviewWithoutNeedingDisplay);
-    }
-
-    public void removeToolTip (NSToolTipTag tag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeToolTip_1, tag);
-    }
+public NSView initWithFrame(NSRect frameRect) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_, frameRect);
+    return result is this.id ? this : (result !is null ? new NSView(result) : null);
+}
 
-    public void removeTrackingArea (NSTrackingArea trackingArea)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeTrackingArea_1, trackingArea !is null ? trackingArea.id_ : null);
-    }
-
-    public void removeTrackingRect (NSTrackingRectTag tag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeTrackingRect_1, tag);
-    }
-
-    public void renewGState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_renewGState);
-    }
-
-    public void replaceSubview (NSView oldView, NSView newView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceSubview_1with_1, oldView !is null ? oldView.id_ : null, newView !is null ? newView.id_ : null);
-    }
-
-    public void resetCursorRects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resetCursorRects);
-    }
-
-    public void resizeSubviewsWithOldSize (NSSize oldSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resizeSubviewsWithOldSize_1, oldSize);
-    }
-
-    public void resizeWithOldSuperviewSize (NSSize oldSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resizeWithOldSuperviewSize_1, oldSize);
-    }
+public bool isFlipped() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isFlipped);
+}
 
-    public void rotateByAngle (CGFloat angle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rotateByAngle_1, angle);
-    }
-
-    public void rulerView_didAddMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1didAddMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null);
-    }
-
-    public void rulerView_didMoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1didMoveMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null);
-    }
+public bool isOpaque() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isOpaque);
+}
 
-    public void rulerView_didRemoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1didRemoveMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null);
-    }
-
-    public void rulerView_handleMouseDown_ (NSRulerView ruler, NSEvent event)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1handleMouseDown_1, ruler !is null ? ruler.id_ : null, event !is null ? event.id_ : null);
-    }
-
-    public bool rulerView_shouldAddMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_rulerView_1shouldAddMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null) !is null;
-    }
-
-    public bool rulerView_shouldMoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_rulerView_1shouldMoveMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null) !is null;
-    }
+public NSMenu menuForEvent(NSEvent event) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_menuForEvent_, event !is null ? event.id : null);
+    return result !is null ? new NSMenu(result) : null;
+}
 
-    public bool rulerView_shouldRemoveMarker_ (NSRulerView ruler, NSRulerMarker marker)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_rulerView_1shouldRemoveMarker_1, ruler !is null ? ruler.id_ : null, marker !is null ? marker.id_ : null) !is null;
-    }
-
-    public CGFloat rulerView_willAddMarker_atLocation_ (NSRulerView ruler, NSRulerMarker marker, CGFloat location)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_rulerView_1willAddMarker_1atLocation_1, ruler !is null ? ruler.id_ : null,
-                marker !is null ? marker.id_ : null, location);
-    }
+public void registerForDraggedTypes(NSArray newTypes) {
+    OS.objc_msgSend(this.id, OS.sel_registerForDraggedTypes_, newTypes !is null ? newTypes.id : null);
+}
 
-    public CGFloat rulerView_willMoveMarker_toLocation_ (NSRulerView ruler, NSRulerMarker marker, CGFloat location)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_rulerView_1willMoveMarker_1toLocation_1, ruler !is null ? ruler.id_ : null,
-                marker !is null ? marker.id_ : null, location);
-    }
-
-    public void rulerView_willSetClientView_ (NSRulerView ruler, NSView newClient)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_rulerView_1willSetClientView_1, ruler !is null ? ruler.id_ : null, newClient !is null ? newClient.id_ : null);
-    }
-
-    public void scaleUnitSquareToSize (NSSize newUnitSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scaleUnitSquareToSize_1, newUnitSize);
-    }
-
-    public void scrollClipView (NSClipView aClipView, NSPoint aPoint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollClipView_1toPoint_1, aClipView !is null ? aClipView.id_ : null, aPoint);
-    }
+public void removeFromSuperview() {
+    OS.objc_msgSend(this.id, OS.sel_removeFromSuperview);
+}
 
-    public void scrollPoint (NSPoint aPoint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollPoint_1, aPoint);
-    }
-
-    public void scrollRect (NSRect aRect, NSSize delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_scrollRect_1by_1, aRect, delta);
-    }
-
-    public bool scrollRectToVisible (NSRect aRect)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_scrollRectToVisible_1, aRect) !is null;
-    }
-
-    public void setAlphaValue (CGFloat viewAlpha)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlphaValue_1, viewAlpha);
-    }
+public bool scrollRectToVisible(NSRect aRect) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_scrollRectToVisible_, aRect);
+}
 
-    public void setAutoresizesSubviews (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutoresizesSubviews_1, flag);
-    }
-
-    public void setAutoresizingMask (NSUInteger mask)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutoresizingMask_1, mask);
-    }
-
-    public void setBackgroundFilters (NSArray filters)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundFilters_1, filters !is null ? filters.id_ : null);
-    }
-
-    public void setBounds (NSRect aRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBounds_1, aRect);
-    }
+public void setAutoresizesSubviews(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAutoresizesSubviews_, flag);
+}
 
-    public void setBoundsOrigin (NSPoint newOrigin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBoundsOrigin_1, newOrigin);
-    }
-
-    public void setBoundsRotation (CGFloat angle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBoundsRotation_1, angle);
-    }
-
-    public void setBoundsSize (NSSize newSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBoundsSize_1, newSize);
-    }
-
-    //public void setCompositingFilter(CIFilter filter) {
-    //  OS.objc_msgSend(this.id_, OS.sel_setCompositingFilter_1, filter !is null ? filter.id_ : null);
-    //}
-
-    public void setContentFilters (NSArray filters)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentFilters_1, filters !is null ? filters.id_ : null);
-    }
-
-    public void setFocusRingType (NSFocusRingType focusRingType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFocusRingType_1, focusRingType);
-    }
-
-    public void setFrame (NSRect frameRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrame_1, frameRect);
-    }
+public void setAutoresizingMask(NSUInteger mask) {
+    OS.objc_msgSend(this.id, OS.sel_setAutoresizingMask_, mask);
+}
 
-    public void setFrameCenterRotation (CGFloat angle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameCenterRotation_1, angle);
-    }
-
-    public void setFrameOrigin (NSPoint newOrigin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameOrigin_1, newOrigin);
-    }
-
-    public void setFrameRotation (CGFloat angle)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameRotation_1, angle);
-    }
+public void setFocusRingType(NSFocusRingType focusRingType) {
+    OS.objc_msgSend(this.id, OS.sel_setFocusRingType_, focusRingType);
+}
 
-    public void setFrameSize (NSSize newSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameSize_1, newSize);
-    }
-
-    public void setHidden (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHidden_1, flag);
-    }
-
-    public void setKeyboardFocusRingNeedsDisplayInRect (NSRect rect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setKeyboardFocusRingNeedsDisplayInRect_1, rect);
-    }
-
-    //public void setLayer(CALayer newLayer) {
-    //  OS.objc_msgSend(this.id_, OS.sel_setLayer_1, newLayer !is null ? newLayer.id_ : null);
-    //}
+public void setFrame(NSRect frameRect) {
+    OS.objc_msgSend(this.id, OS.sel_setFrame_, frameRect);
+}
 
-    public void setNeedsDisplay (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNeedsDisplay_1, flag);
-    }
-
-    public void setNeedsDisplayInRect (NSRect invalidRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNeedsDisplayInRect_1, invalidRect);
-    }
-
-    public void setNextKeyView (NSView next)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNextKeyView_1, next !is null ? next.id_ : null);
-    }
+public void setFrameOrigin(NSPoint newOrigin) {
+    OS.objc_msgSend(this.id, OS.sel_setFrameOrigin_, newOrigin);
+}
 
-    public void setPostsBoundsChangedNotifications (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPostsBoundsChangedNotifications_1, flag);
-    }
-
-    public void setPostsFrameChangedNotifications (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPostsFrameChangedNotifications_1, flag);
-    }
-
-    public void setShadow (NSShadow shadow)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShadow_1, shadow !is null ? shadow.id_ : null);
-    }
-
-    public void setSubviews (NSArray newSubviews)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSubviews_1, newSubviews !is null ? newSubviews.id_ : null);
-    }
+public void setFrameSize(NSSize newSize) {
+    OS.objc_msgSend(this.id, OS.sel_setFrameSize_, newSize);
+}
 
-    public void setToolTip (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setToolTip_1, string !is null ? string.id_ : null);
-    }
-
-    public void setUpGState ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setUpGState);
-    }
-
-    public void setWantsLayer (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWantsLayer_1, flag);
-    }
+public void setHidden(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setHidden_, flag);
+}
 
-    public NSShadow shadow ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_shadow);
-        return result !is null ? new NSShadow(result) : null;
-    }
-
-    public bool shouldDelayWindowOrderingForEvent (NSEvent theEvent)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldDelayWindowOrderingForEvent_1, theEvent !is null ? theEvent.id_ : null) !is null;
-    }
-
-    public bool shouldDrawColor ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldDrawColor) !is null;
-    }
-
-    public void sortSubviewsUsingFunction (/*NSComparisonResult (*)(id, id, void *) */NSComparisonResult function(objc.id, objc.id, void*) compare, void* context)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sortSubviewsUsingFunction_1context_1, compare, context);
-    }
+public void setNeedsDisplay(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setNeedsDisplay_, flag);
+}
 
-    public NSArray subviews ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_subviews);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSView superview ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_superview);
-        return result is this.id_ ? this : (result !is null ? new NSView(result) : null);
-    }
-
-    public NSInteger tag ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag);
-    }
-
-    public NSString toolTip ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolTip);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSArray trackingAreas ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_trackingAreas);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void translateOriginToPoint (NSPoint translation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_translateOriginToPoint_1, translation);
-    }
+public void setNeedsDisplayInRect(NSRect invalidRect) {
+    OS.objc_msgSend(this.id, OS.sel_setNeedsDisplayInRect_, invalidRect);
+}
 
-    public void translateRectsNeedingDisplayInRect (NSRect clipRect, NSSize delta)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_translateRectsNeedingDisplayInRect_1by_1, clipRect, delta);
-    }
-
-    public void unlockFocus ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unlockFocus);
-    }
-
-    public void unregisterDraggedTypes ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unregisterDraggedTypes);
-    }
-
-    public void updateTrackingAreas ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_updateTrackingAreas);
-    }
+public void setToolTip(NSString string) {
+    OS.objc_msgSend(this.id, OS.sel_setToolTip_, string !is null ? string.id : null);
+}
 
-    public void viewDidEndLiveResize ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewDidEndLiveResize);
-    }
-
-    public void viewDidHide ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewDidHide);
-    }
-
-    public void viewDidMoveToSuperview ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewDidMoveToSuperview);
-    }
-
-    public void viewDidMoveToWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewDidMoveToWindow);
-    }
+public NSArray subviews() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_subviews);
+    return result !is null ? new NSArray(result) : null;
+}
 
-    public void viewDidUnhide ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewDidUnhide);
-    }
-
-    public void viewWillDraw ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewWillDraw);
-    }
-
-    public void viewWillMoveToSuperview (NSView newSuperview)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewWillMoveToSuperview_1, newSuperview !is null ? newSuperview.id_ : null);
-    }
+public NSView superview() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_superview);
+    return result is this.id ? this : (result !is null ? new NSView(result) : null);
+}
 
-    public void viewWillMoveToWindow (NSWindow newWindow)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewWillMoveToWindow_1, newWindow !is null ? newWindow.id_ : null);
-    }
-
-    public void viewWillStartLiveResize ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_viewWillStartLiveResize);
-    }
-
-    public id viewWithTag (NSInteger aTag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_viewWithTag_1, aTag);
-        return result !is null ? new id(result) : null;
-    }
+public void unregisterDraggedTypes() {
+    OS.objc_msgSend(this.id, OS.sel_unregisterDraggedTypes);
+}
 
-    public NSRect visibleRect ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_visibleRect);
-        return result;
-    }
-
-    public bool wantsDefaultClipping ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_wantsDefaultClipping) !is null;
-    }
-
-    public bool wantsLayer ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_wantsLayer) !is null;
-    }
+public NSRect visibleRect() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_visibleRect);
+    return result;
+}
 
-    public CGFloat widthAdjustLimit ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_widthAdjustLimit);
-    }
-
-    public void willRemoveSubview (NSView subview)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_willRemoveSubview_1, subview !is null ? subview.id_ : null);
-    }
-
-    public NSWindow window ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_window);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-    public void writeEPSInsideRect (NSRect rect, NSPasteboard pasteboard)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_writeEPSInsideRect_1toPasteboard_1, rect, pasteboard !is null ? pasteboard.id_ : null);
-    }
-
-    public void writePDFInsideRect (NSRect rect, NSPasteboard pasteboard)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_writePDFInsideRect_1toPasteboard_1, rect, pasteboard !is null ? pasteboard.id_ : null);
-    }
+public NSWindow window() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_window);
+    return result !is null ? new NSWindow(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSViewAnimation.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSViewAnimation;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSAnimation;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSViewAnimation : NSAnimation
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public id initWithViewAnimations (NSArray viewAnimations)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithViewAnimations_1, viewAnimations !is null ? viewAnimations.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setViewAnimations (NSArray viewAnimations)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setViewAnimations_1, viewAnimations !is null ? viewAnimations.id_ : null);
-    }
-
-    public NSArray viewAnimations ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_viewAnimations);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSViewController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSViewController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSBundle;
-import dwt.internal.cocoa.NSResponder;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSViewController : NSResponder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool commitEditing ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_commitEditing) !is null;
-    }
-
-    public void commitEditingWithDelegate (id delegatee, objc.SEL didCommitSelector, void* contextInfo)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_commitEditingWithDelegate_1didCommitSelector_1contextInfo_1, delegatee !is null ? delegatee.id_ : null,
-                didCommitSelector, contextInfo);
-    }
-
-    public void discardEditing ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_discardEditing);
-    }
-
-    public id initWithNibName (NSString nibNameOrNil, NSBundle nibBundleOrNil)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithNibName_1bundle_1, nibNameOrNil !is null ? nibNameOrNil.id_ : null,
-                nibBundleOrNil !is null ? nibBundleOrNil.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void loadView ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_loadView);
-    }
-
-    public NSBundle nibBundle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nibBundle);
-        return result !is null ? new NSBundle(result) : null;
-    }
-
-    public NSString nibName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nibName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public id representedObject ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedObject);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setRepresentedObject (id representedObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRepresentedObject_1, representedObject !is null ? representedObject.id_ : null);
-    }
-
-    public void setTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void setView (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setView_1, view !is null ? view.id_ : null);
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSView view ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_view);
-        return result !is null ? new NSView(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSWhoseSpecifier.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSWhoseSpecifier;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSScriptClassDescription;
-import dwt.internal.cocoa.NSScriptObjectSpecifier;
-import dwt.internal.cocoa.NSScriptWhoseTest;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-
-
-enum NSWhoseSubelementIdentifier
-{
-    NSIndexSubelement = 0,
-    NSEverySubelement = 1,
-    NSMiddleSubelement = 2,
-    NSRandomSubelement = 3,
-    NSNoSubelement = 4
-}
-
-alias NSWhoseSubelementIdentifier.NSIndexSubelement NSIndexSubelement;
-alias NSWhoseSubelementIdentifier.NSEverySubelement NSEverySubelement;
-alias NSWhoseSubelementIdentifier.NSMiddleSubelement NSMiddleSubelement;
-alias NSWhoseSubelementIdentifier.NSRandomSubelement NSRandomSubelement;
-alias NSWhoseSubelementIdentifier.NSNoSubelement NSNoSubelement;
-
-
-
-public class NSWhoseSpecifier : NSScriptObjectSpecifier
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSWhoseSubelementIdentifier endSubelementIdentifier ()
-    {
-        return cast(NSWhoseSubelementIdentifier) OS.objc_msgSend(this.id_, OS.sel_endSubelementIdentifier);
-    }
-
-    public NSInteger endSubelementIndex ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_endSubelementIndex);
-    }
-
-    public id initWithContainerClassDescription (NSScriptClassDescription classDesc, NSScriptObjectSpecifier container, NSString property,
-            NSScriptWhoseTest test)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContainerClassDescription_1containerSpecifier_1key_1test_1,
-                classDesc !is null ? classDesc.id_ : null, container !is null ? container.id_ : null, property !is null ? property.id_ : null,
-                test !is null ? test.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setEndSubelementIdentifier (NSWhoseSubelementIdentifier subelement)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEndSubelementIdentifier_1, subelement);
-    }
-
-    public void setEndSubelementIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setEndSubelementIndex_1, index);
-    }
-
-    public void setStartSubelementIdentifier (NSWhoseSubelementIdentifier subelement)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStartSubelementIdentifier_1, subelement);
-    }
-
-    public void setStartSubelementIndex (NSInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStartSubelementIndex_1, index);
-    }
-
-    public void setTest (NSScriptWhoseTest test)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTest_1, test !is null ? test.id_ : null);
-    }
-
-    public NSWhoseSubelementIdentifier startSubelementIdentifier ()
-    {
-        return cast(NSWhoseSubelementIdentifier) OS.objc_msgSend(this.id_, OS.sel_startSubelementIdentifier);
-    }
-
-    public NSInteger startSubelementIndex ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_startSubelementIndex);
-    }
-
-    public NSScriptWhoseTest test ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_test);
-        return result !is null ? new NSScriptWhoseTest(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSWindow.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSWindow.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,1482 +1,219 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSWindow;
 
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSButton;
-import dwt.internal.cocoa.NSButtonCell;
-import dwt.internal.cocoa.NSCloseCommand;
+import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSColor;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDate;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSDockTile;
-import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSGraphicsContext;
-import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSMenu;
-import dwt.internal.cocoa.NSPasteboard;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSResponder;
 import dwt.internal.cocoa.NSScreen;
-import dwt.internal.cocoa.NSScriptCommand;
-import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSText;
-import dwt.internal.cocoa.NSToolbar;
-import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSWindowController;
 import dwt.internal.cocoa.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-extern (C)
-{
-    alias int NSWindowDepth;
+public class NSWindow : NSResponder {
 
-    enum NSWindowOrderingMode : NSInteger
-    {
-    NSWindowAbove = 1,
-    NSWindowBelow = -1,
-    NSWindowOut = 0
-    }
+public this() {
+    super();
+}
 
-    alias NSWindowOrderingMode.NSWindowAbove NSWindowAbove;
-    alias NSWindowOrderingMode.NSWindowBelow NSWindowBelow;
-    alias NSWindowOrderingMode.NSWindowOut NSWindowOut;
+public this(objc.id id) {
+    super(id);
+}
 
-    enum NSWindowBackingLocation : NSUInteger
-    {
-    NSWindowBackingLocationDefault = 0,
-    NSWindowBackingLocationVideoMemory = 1,
-    NSWindowBackingLocationMainMemory = 2
-    }
+public this(cocoa.id id) {
+    super(id);
+}
+
+public CGFloat alphaValue() {
+    return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_alphaValue);
+}
 
-    alias NSWindowBackingLocation.NSWindowBackingLocationDefault NSWindowBackingLocationDefault;
-    alias NSWindowBackingLocation.NSWindowBackingLocationVideoMemory NSWindowBackingLocationVideoMemory;
-    alias NSWindowBackingLocation.NSWindowBackingLocationMainMemory NSWindowBackingLocationMainMemory;
+public bool canBecomeKeyWindow() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_canBecomeKeyWindow);
+}
 
-    enum NSBackingStoreType
-    {
-    NSBackingStoreRetained = 0,
-    NSBackingStoreNonretained = 1,
-    NSBackingStoreBuffered = 2
-    }
+public NSPoint cascadeTopLeftFromPoint(NSPoint topLeftPoint) {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_cascadeTopLeftFromPoint_, topLeftPoint);
+    return result;
+}
 
-    alias NSBackingStoreType.NSBackingStoreRetained NSBackingStoreRetained;
-    alias NSBackingStoreType.NSBackingStoreNonretained NSBackingStoreNonretained;
-    alias NSBackingStoreType.NSBackingStoreBuffered NSBackingStoreBuffered;
+public void close() {
+    OS.objc_msgSend(this.id, OS.sel_close);
+}
 
-    enum NSWindowCollectionBehavior : NSUInteger
-    {
-    NSWindowCollectionBehaviorDefault = 0,
-    NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0,
-    NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1
-    }
+public NSRect contentRectForFrameRect(NSRect frameRect) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_contentRectForFrameRect_, frameRect);
+    return result;
+}
 
-    alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorDefault NSWindowCollectionBehaviorDefault;
-    alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorCanJoinAllSpaces NSWindowCollectionBehaviorCanJoinAllSpaces;
-    alias NSWindowCollectionBehavior.NSWindowCollectionBehaviorMoveToActiveSpace NSWindowCollectionBehaviorMoveToActiveSpace;
+public NSView contentView() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_contentView);
+    return result !is null ? new NSView(result) : null;
+}
 
-    enum NSSelectionDirection
-    {
-    NSDirectSelection = 0,
-    NSSelectingNext,
-    NSSelectingPrevious
-    }
-
-    alias NSSelectionDirection.NSDirectSelection NSDirectSelection;
-    alias NSSelectionDirection.NSSelectingNext NSSelectingNext;
-    alias NSSelectionDirection.NSSelectingPrevious NSSelectingPrevious;
+public NSPoint convertBaseToScreen(NSPoint aPoint) {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertBaseToScreen_, aPoint);
+    return result;
+}
 
-    enum NSWindowSharingType : NSUInteger
-    {
-    NSWindowSharingNone = 0,
-    NSWindowSharingReadOnly = 1,
-    NSWindowSharingReadWrite = 2
-    }
+public NSPoint convertScreenToBase(NSPoint aPoint) {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_convertScreenToBase_, aPoint);
+    return result;
+}
 
-    alias NSWindowSharingType.NSWindowSharingNone NSWindowSharingNone;
-    alias NSWindowSharingType.NSWindowSharingReadOnly NSWindowSharingReadOnly;
-    alias NSWindowSharingType.NSWindowSharingReadWrite NSWindowSharingReadWrite;
+public void disableCursorRects() {
+    OS.objc_msgSend(this.id, OS.sel_disableCursorRects);
+}
+
+public NSText fieldEditor(bool createFlag, cocoa.id anObject) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_fieldEditor_forObject_, createFlag, anObject !is null ? anObject.id : null);
+    return result !is null ? new NSText(result) : null;
+}
 
-    enum NSWindowButton
-    {
-    NSWindowCloseButton,
-    NSWindowMiniaturizeButton,
-    NSWindowZoomButton,
-    NSWindowToolbarButton,
-    NSWindowDocumentIconButton
-    }
+public NSResponder firstResponder() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_firstResponder);
+    return result !is null ? new NSResponder(result) : null;
+}
+
+public NSRect frame() {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_frame);
+    return result;
+}
 
-    alias NSWindowButton.NSWindowCloseButton NSWindowCloseButton;
-    alias NSWindowButton.NSWindowMiniaturizeButton NSWindowMiniaturizeButton;
-    alias NSWindowButton.NSWindowZoomButton NSWindowZoomButton;
-    alias NSWindowButton.NSWindowToolbarButton NSWindowToolbarButton;
-    alias NSWindowButton.NSWindowDocumentIconButton NSWindowDocumentIconButton;
-
+public NSRect frameRectForContentRect(NSRect contentRect) {
+    NSRect result = NSRect();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_frameRectForContentRect_, contentRect);
+    return result;
+}
 
-    enum 
-    {
-    NSBorderlessWindowMask = 0,
-    NSTitledWindowMask = 1 << 0,
-    NSClosableWindowMask = 1 << 1,
-    NSMiniaturizableWindowMask = 1 << 2,
-    NSResizableWindowMask = 1 << 3,
-    NSTexturedBackgroundWindowMask = 1 << 8
-    }
+public NSGraphicsContext graphicsContext() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_graphicsContext);
+    return result !is null ? new NSGraphicsContext(result) : null;
+}
+
+public NSWindow initWithContentRect(NSRect contentRect, NSUInteger aStyle, NSBackingStoreType bufferingType, bool flag) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_styleMask_backing_defer_, contentRect, aStyle, bufferingType, flag);
+    return result is this.id ? this : (result !is null ? new NSWindow(result) : null);
 }
 
-
-public class NSWindow : NSResponder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public bool acceptsMouseMovedEvents ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_acceptsMouseMovedEvents) !is null;
-    }
-
-    public void addChildWindow (NSWindow childWin, NSWindowOrderingMode place)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addChildWindow_1ordered_1, childWin !is null ? childWin.id_ : null, place);
-    }
-
-    public bool allowsToolTipsWhenApplicationIsInactive ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_allowsToolTipsWhenApplicationIsInactive) !is null;
-    }
-
-    public CGFloat alphaValue ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_alphaValue);
-    }
-
-    public NSTimeInterval animationResizeTime (NSRect newFrame)
-    {
-        return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_animationResizeTime_1, newFrame);
-    }
-
-    public bool areCursorRectsEnabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_areCursorRectsEnabled) !is null;
-    }
-
-    public NSSize aspectRatio ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_aspectRatio);
-        return result;
-    }
-
-    public NSWindow attachedSheet ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attachedSheet);
-        return result is this.id_ ? this : (result !is null ? new NSWindow(result) : null);
-    }
-
-    public bool autorecalculatesContentBorderThicknessForEdge (NSRectEdge edge)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autorecalculatesContentBorderThicknessForEdge_1, edge) !is null;
-    }
-
-    public bool autorecalculatesKeyViewLoop ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_autorecalculatesKeyViewLoop) !is null;
-    }
-
-    public NSColor backgroundColor ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
-        return result !is null ? new NSColor(result) : null;
-    }
-
-    public NSWindowBackingLocation backingLocation ()
-    {
-        return cast(NSWindowBackingLocation) OS.objc_msgSend(this.id_, OS.sel_backingLocation);
-    }
+public NSWindow initWithContentRect(NSRect contentRect, NSUInteger aStyle, NSBackingStoreType bufferingType, bool flag, NSScreen screen) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentRect_styleMask_backing_defer_screen_, contentRect, aStyle, bufferingType, flag, screen !is null ? screen.id : null);
+    return result is this.id ? this : (result !is null ? new NSWindow(result) : null);
+}
 
-    public NSBackingStoreType backingType ()
-    {
-        return cast(NSBackingStoreType) OS.objc_msgSend(this.id_, OS.sel_backingType);
-    }
-
-    public void becomeKeyWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_becomeKeyWindow);
-    }
-
-    public void becomeMainWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_becomeMainWindow);
-    }
-
-    public void cacheImageInRect (NSRect aRect)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_cacheImageInRect_1, aRect);
-    }
-
-    public bool canBeVisibleOnAllSpaces ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canBeVisibleOnAllSpaces) !is null;
-    }
-
-    public bool canBecomeKeyWindow ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canBecomeKeyWindow) !is null;
-    }
-
-    public bool canBecomeMainWindow ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canBecomeMainWindow) !is null;
-    }
-
-    public bool canBecomeVisibleWithoutLogin ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canBecomeVisibleWithoutLogin) !is null;
-    }
-
-    public bool canHide ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canHide) !is null;
-    }
-
-    public bool canStoreColor ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_canStoreColor) !is null;
-    }
-
-    public NSPoint cascadeTopLeftFromPoint (NSPoint topLeftPoint)
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_cascadeTopLeftFromPoint_1, topLeftPoint);
-        return result;
-    }
-
-    public void center ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_center);
-    }
-
-    public NSArray childWindows ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_childWindows);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void close ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_close);
-    }
-
-    public NSWindowCollectionBehavior collectionBehavior ()
-    {
-        return cast(NSWindowCollectionBehavior) OS.objc_msgSend(this.id_, OS.sel_collectionBehavior);
-    }
-
-    public NSRect constrainFrameRect (NSRect frameRect, NSScreen screen)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_constrainFrameRect_1toScreen_1, frameRect, screen !is null ? screen.id_ : null);
-        return result;
-    }
+public bool isKeyWindow() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isKeyWindow);
+}
 
-    public NSSize contentAspectRatio ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentAspectRatio);
-        return result;
-    }
-
-    public CGFloat contentBorderThicknessForEdge (NSRectEdge edge)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_contentBorderThicknessForEdge_1, edge);
-    }
-
-    public NSSize contentMaxSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentMaxSize);
-        return result;
-    }
-
-    public NSSize contentMinSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentMinSize);
-        return result;
-    }
-
-    public NSRect contentRectForFrameRect_ (NSRect frameRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentRectForFrameRect_1, frameRect);
-        return result;
-    }
-
-    public static NSRect static_contentRectForFrameRect_styleMask_ (NSRect fRect, NSUInteger aStyle)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, OS.class_NSWindow, OS.sel_contentRectForFrameRect_1styleMask_1, fRect, aStyle);
-        return result;
-    }
-
-    public NSSize contentResizeIncrements ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_contentResizeIncrements);
-        return result;
-    }
-
-    public NSView contentView ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_contentView);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public NSPoint convertBaseToScreen (NSPoint aPoint)
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_convertBaseToScreen_1, &aPoint);
-        return result;
-    }
-
-    public NSPoint convertScreenToBase (NSPoint aPoint)
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_convertScreenToBase_1, aPoint);
-        return result;
-    }
-
-    public NSEvent currentEvent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentEvent);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public NSData dataWithEPSInsideRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataWithEPSInsideRect_1, rect);
-        return result !is null ? new NSData(result) : null;
-    }
+public bool isVisible() {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isVisible);
+}
 
-    public NSData dataWithPDFInsideRect (NSRect rect)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dataWithPDFInsideRect_1, rect);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSScreen deepestScreen ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_deepestScreen);
-        return result !is null ? new NSScreen(result) : null;
-    }
-
-    public NSButtonCell defaultButtonCell ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_defaultButtonCell);
-        return result !is null ? new NSButtonCell(result) : null;
-    }
-
-    public static NSWindowDepth defaultDepthLimit ()
-    {
-        return cast(NSWindowDepth) OS.objc_msgSend(OS.class_NSWindow, OS.sel_defaultDepthLimit);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void deminiaturize (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_deminiaturize_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSWindowDepth depthLimit ()
-    {
-        return cast(NSWindowDepth) OS.objc_msgSend(this.id_, OS.sel_depthLimit);
-    }
+public bool makeFirstResponder(NSResponder aResponder) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_makeFirstResponder_, aResponder !is null ? aResponder.id : null);
+}
 
-    public NSDictionary deviceDescription ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_deviceDescription);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void disableCursorRects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_disableCursorRects);
-    }
-
-    public void disableFlushWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_disableFlushWindow);
-    }
-
-    public void disableKeyEquivalentForDefaultButtonCell ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_disableKeyEquivalentForDefaultButtonCell);
-    }
-
-    public void disableScreenUpdatesUntilFlush ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_disableScreenUpdatesUntilFlush);
-    }
-
-    public void discardCachedImage ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_discardCachedImage);
-    }
-
-    public void discardCursorRects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_discardCursorRects);
-    }
-
-    public void discardEventsMatchingMask (NSUInteger mask, NSEvent lastEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_discardEventsMatchingMask_1beforeEvent_1, mask, lastEvent !is null ? lastEvent.id_ : null);
-    }
-
-    public void display ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_display);
-    }
+public void makeKeyAndOrderFront(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_makeKeyAndOrderFront_, sender !is null ? sender.id : null);
+}
 
-    public void displayIfNeeded ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_displayIfNeeded);
-    }
-
-    public bool displaysWhenScreenProfileChanges ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_displaysWhenScreenProfileChanges) !is null;
-    }
-
-    public NSDockTile dockTile ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_dockTile);
-        return result !is null ? new NSDockTile(result) : null;
-    }
-
-    public void dragImage (NSImage anImage, NSPoint baseLocation, NSSize initialOffset, NSEvent event, NSPasteboard pboard, id sourceObj,
-            bool slideFlag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_dragImage_1at_1offset_1event_1pasteboard_1source_1slideBack_1, anImage !is null ? anImage.id_ : null,
-                baseLocation, initialOffset, event !is null ? event.id_ : null, pboard !is null ? pboard.id_ : null,
-                sourceObj !is null ? sourceObj.id_ : null, slideFlag);
-    }
-
-    public NSArray drawers ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_drawers);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void enableCursorRects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enableCursorRects);
-    }
-
-    public void enableFlushWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enableFlushWindow);
-    }
-
-    public void enableKeyEquivalentForDefaultButtonCell ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_enableKeyEquivalentForDefaultButtonCell);
-    }
-
-    public void endEditingFor (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_endEditingFor_1, anObject !is null ? anObject.id_ : null);
-    }
-
-    public NSText fieldEditor (bool createFlag, id anObject)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fieldEditor_1forObject_1, createFlag, anObject !is null ? anObject.id_ : null);
-        return result !is null ? new NSText(result) : null;
-    }
-
-    public NSResponder firstResponder ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_firstResponder);
-        return result !is null ? new NSResponder(result) : null;
-    }
-
-    public void flushWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_flushWindow);
-    }
-
-    public void flushWindowIfNeeded ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_flushWindowIfNeeded);
-    }
-
-    public NSRect frame ()
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_frame);
-        return result;
-    }
+public NSPoint mouseLocationOutsideOfEventStream() {
+    NSPoint result = NSPoint();
+    OS.objc_msgSend_stret(result, this.id, OS.sel_mouseLocationOutsideOfEventStream);
+    return result;
+}
 
-    public NSString frameAutosaveName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_frameAutosaveName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSRect frameRectForContentRect_ (NSRect contentRect)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_frameRectForContentRect_1, contentRect);
-        return result;
-    }
-
-    public static NSRect static_frameRectForContentRect_styleMask_ (NSRect cRect, NSUInteger aStyle)
-    {
-        NSRect result;
-        OS.objc_msgSend_stret(&result, OS.class_NSWindow, OS.sel_frameRectForContentRect_1styleMask_1, cRect, aStyle);
-        return result;
-    }
-
-    public NSInteger gState ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_gState);
-    }
-
-    public NSGraphicsContext graphicsContext ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_graphicsContext);
-        return result !is null ? new NSGraphicsContext(result) : null;
-    }
-
-    public id handleCloseScriptCommand (NSCloseCommand command)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_handleCloseScriptCommand_1, command !is null ? command.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id handlePrintScriptCommand (NSScriptCommand command)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_handlePrintScriptCommand_1, command !is null ? command.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id handleSaveScriptCommand (NSScriptCommand command)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_handleSaveScriptCommand_1, command !is null ? command.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool hasCloseBox ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasCloseBox) !is null;
-    }
-
-    public bool hasDynamicDepthLimit ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasDynamicDepthLimit) !is null;
-    }
-
-    public bool hasShadow ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasShadow) !is null;
-    }
-
-    public bool hasTitleBar ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hasTitleBar) !is null;
-    }
-
-    public bool hidesOnDeactivate ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_hidesOnDeactivate) !is null;
-    }
-
-    public bool ignoresMouseEvents ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_ignoresMouseEvents) !is null;
-    }
-
-    public NSWindow initWithContentRect_styleMask_backing_defer_ (NSRect contentRect, NSUInteger aStyle, NSBackingStoreType bufferingType, bool flag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentRect_1styleMask_1backing_1defer_1, contentRect, aStyle, bufferingType, flag);
-        return result !is null ? this : null;
-    }
+public void orderFront(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_orderFront_, sender !is null ? sender.id : null);
+}
 
-    public NSWindow initWithContentRect_styleMask_backing_defer_screen_ (NSRect contentRect, NSUInteger aStyle, NSBackingStoreType bufferingType,
-            bool flag, NSScreen screen)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentRect_1styleMask_1backing_1defer_1screen_1, contentRect, aStyle,
-                bufferingType, flag, screen !is null ? screen.id_ : null);
-        return result !is null ? this : null;
-    }
-
-    public NSWindow initWithWindowRef (void* windowRef)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindowRef_1, windowRef);
-        return result is this.id_ ? this : (result !is null ? new NSWindow(result) : null);
-    }
-
-    public NSView initialFirstResponder ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initialFirstResponder);
-        return result !is null ? new NSView(result) : null;
-    }
-
-    public void invalidateCursorRectsForView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateCursorRectsForView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void invalidateShadow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_invalidateShadow);
-    }
-
-    public bool isAutodisplay ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isAutodisplay) !is null;
-    }
-
-    public bool isDocumentEdited ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isDocumentEdited) !is null;
-    }
+public void orderFrontRegardless() {
+    OS.objc_msgSend(this.id, OS.sel_orderFrontRegardless);
+}
 
-    public bool isExcludedFromWindowsMenu ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isExcludedFromWindowsMenu) !is null;
-    }
-
-    public bool isFloatingPanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFloatingPanel) !is null;
-    }
-
-    public bool isFlushWindowDisabled ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFlushWindowDisabled) !is null;
-    }
-
-    public bool isKeyWindow ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isKeyWindow) !is null;
-    }
-
-    public bool isMainWindow ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMainWindow) !is null;
-    }
-
-    public bool isMiniaturizable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMiniaturizable) !is null;
-    }
-
-    public bool isMiniaturized ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMiniaturized) !is null;
-    }
-
-    public bool isModalPanel ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isModalPanel) !is null;
-    }
-
-    public bool isMovableByWindowBackground ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isMovableByWindowBackground) !is null;
-    }
+public void orderOut(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_orderOut_, sender !is null ? sender.id : null);
+}
 
-    public bool isOneShot ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOneShot) !is null;
-    }
-
-    public bool isOpaque ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isOpaque) !is null;
-    }
-
-    public bool isReleasedWhenClosed ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isReleasedWhenClosed) !is null;
-    }
-
-    public bool isResizable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isResizable) !is null;
-    }
-
-    public bool isSheet ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isSheet) !is null;
-    }
-
-    public bool isVisible ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isVisible) !is null;
-    }
-
-    public bool isZoomable ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isZoomable) !is null;
-    }
-
-    public bool isZoomed ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isZoomed) !is null;
-    }
+public NSScreen screen() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_screen);
+    return result !is null ? new NSScreen(result) : null;
+}
 
-    public void keyDown (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_keyDown_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public NSSelectionDirection keyViewSelectionDirection ()
-    {
-        return cast(NSSelectionDirection) OS.objc_msgSend(this.id_, OS.sel_keyViewSelectionDirection);
-    }
-
-    public NSInteger level ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_level);
-    }
-
-    public bool makeFirstResponder (NSResponder aResponder)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_makeFirstResponder_1, aResponder !is null ? aResponder.id_ : null) !is null;
-    }
-
-    public void makeKeyAndOrderFront (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeKeyAndOrderFront_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void makeKeyWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeKeyWindow);
-    }
-
-    public void makeMainWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_makeMainWindow);
-    }
-
-    public NSSize maxSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_maxSize);
-        return result;
-    }
-
-    public static void menuChanged (NSMenu menu)
-    {
-        OS.objc_msgSend(OS.class_NSWindow, OS.sel_menuChanged_1, menu !is null ? menu.id_ : null);
-    }
+public void setAcceptsMouseMovedEvents(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setAcceptsMouseMovedEvents_, flag);
+}
 
-    public static CGFloat minFrameWidthWithTitle (NSString aTitle, NSUInteger aStyle)
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(OS.class_NSWindow, OS.sel_minFrameWidthWithTitle_1styleMask_1, aTitle !is null ? aTitle.id_ : null,
-                aStyle);
-    }
-
-    public NSSize minSize ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_minSize);
-        return result;
-    }
-
-    public void miniaturize (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_miniaturize_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSImage miniwindowImage ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_miniwindowImage);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSString miniwindowTitle ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_miniwindowTitle);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSPoint mouseLocationOutsideOfEventStream ()
-    {
-        NSPoint result;
-        OS.objc_msgSend_struct(&result, this.id_, OS.sel_mouseLocationOutsideOfEventStream);
-        return result;
-    }
-
-    public NSEvent nextEventMatchingMask_ (NSUInteger mask)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextEventMatchingMask_1, mask);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public NSEvent nextEventMatchingMask_untilDate_inMode_dequeue_ (NSUInteger mask, NSDate expiration, NSString mode, bool deqFlag)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1, mask,
-                expiration !is null ? expiration.id_ : null, mode !is null ? mode.id_ : null, deqFlag);
-        return result !is null ? new NSEvent(result) : null;
-    }
-
-    public void orderBack (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderBack_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFront (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFront_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderFrontRegardless ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderFrontRegardless);
-    }
-
-    public void orderOut (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderOut_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void orderWindow (NSWindowOrderingMode place, NSInteger otherWin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_orderWindow_1relativeTo_1, place, otherWin);
-    }
-
-    public int orderedIndex ()
-    {
-        return cast(int) OS.objc_msgSend(this.id_, OS.sel_orderedIndex);
-    }
+public void setAlphaValue(CGFloat windowAlpha) {
+    OS.objc_msgSend(this.id, OS.sel_setAlphaValue_, windowAlpha);
+}
 
-    public NSWindow parentWindow ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_parentWindow);
-        return result is this.id_ ? this : (result !is null ? new NSWindow(result) : null);
-    }
-
-    public void performClose (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performClose_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void performMiniaturize (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performMiniaturize_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void performZoom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_performZoom_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void postEvent (NSEvent event, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_postEvent_1atStart_1, event !is null ? event.id_ : null, flag);
-    }
-
-    public NSWindowBackingLocation preferredBackingLocation ()
-    {
-        return cast(NSWindowBackingLocation) OS.objc_msgSend(this.id_, OS.sel_preferredBackingLocation);
-    }
-
-    public bool preservesContentDuringLiveResize ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_preservesContentDuringLiveResize) !is null;
-    }
-
-    public void print (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_print_1, sender !is null ? sender.id_ : null);
-    }
+public void setBackgroundColor(NSColor color) {
+    OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, color !is null ? color.id : null);
+}
 
-    public void recalculateKeyViewLoop ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_recalculateKeyViewLoop);
-    }
-
-    public void registerForDraggedTypes (NSArray newTypes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_registerForDraggedTypes_1, newTypes !is null ? newTypes.id_ : null);
-    }
-
-    public void removeChildWindow (NSWindow childWin)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeChildWindow_1, childWin !is null ? childWin.id_ : null);
-    }
-
-    public static void removeFrameUsingName (NSString name)
-    {
-        OS.objc_msgSend(OS.class_NSWindow, OS.sel_removeFrameUsingName_1, name !is null ? name.id_ : null);
-    }
-
-    public NSString representedFilename ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedFilename);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSURL representedURL ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedURL);
-        return result !is null ? new NSURL(result) : null;
-    }
-
-    public void resetCursorRects ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resetCursorRects);
-    }
-
-    public void resignKeyWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resignKeyWindow);
-    }
-
-    public void resignMainWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_resignMainWindow);
-    }
+public void setContentView(NSView aView) {
+    OS.objc_msgSend(this.id, OS.sel_setContentView_, aView !is null ? aView.id : null);
+}
 
-    public NSInteger resizeFlags ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_resizeFlags);
-    }
-
-    public NSSize resizeIncrements ()
-    {
-        NSSize result;
-        OS.objc_msgSend_stret(&result, this.id_, OS.sel_resizeIncrements);
-        return result;
-    }
-
-    public void restoreCachedImage ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_restoreCachedImage);
-    }
-
-    public void runToolbarCustomizationPalette (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_runToolbarCustomizationPalette_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void saveFrameUsingName (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_saveFrameUsingName_1, name !is null ? name.id_ : null);
-    }
-
-    public NSScreen screen ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_screen);
-        return result !is null ? new NSScreen(result) : null;
-    }
-
-    public void selectKeyViewFollowingView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectKeyViewFollowingView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void selectKeyViewPrecedingView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectKeyViewPrecedingView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void selectNextKeyView (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectNextKeyView_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void selectPreviousKeyView (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_selectPreviousKeyView_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void sendEvent (NSEvent theEvent)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_sendEvent_1, theEvent !is null ? theEvent.id_ : null);
-    }
-
-    public void setAcceptsMouseMovedEvents (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAcceptsMouseMovedEvents_1, flag);
-    }
-
-    public void setAllowsToolTipsWhenApplicationIsInactive (bool allowWhenInactive)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAllowsToolTipsWhenApplicationIsInactive_1, allowWhenInactive);
-    }
-
-    public void setAlphaValue (CGFloat windowAlpha)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAlphaValue_1, windowAlpha);
-    }
-
-    public void setAspectRatio (NSSize ratio)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAspectRatio_1, ratio);
-    }
-
-    public void setAutodisplay (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutodisplay_1, flag);
-    }
+public void setDelegate(cocoa.id anObject) {
+    OS.objc_msgSend(this.id, OS.sel_setDelegate_, anObject !is null ? anObject.id : null);
+}
 
-    public void setAutorecalculatesContentBorderThickness (bool flag, NSRectEdge edge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutorecalculatesContentBorderThickness_1forEdge_1, flag, edge);
-    }
-
-    public void setAutorecalculatesKeyViewLoop (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAutorecalculatesKeyViewLoop_1, flag);
-    }
-
-    public void setBackgroundColor (NSColor color)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, color !is null ? color.id_ : null);
-    }
-
-    public void setBackingType (NSBackingStoreType bufferingType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setBackingType_1, bufferingType);
-    }
-
-    public void setCanBeVisibleOnAllSpaces (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanBeVisibleOnAllSpaces_1, flag);
-    }
-
-    public void setCanBecomeVisibleWithoutLogin (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanBecomeVisibleWithoutLogin_1, flag);
-    }
-
-    public void setCanHide (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCanHide_1, flag);
-    }
-
-    public void setCollectionBehavior (NSWindowCollectionBehavior behavior)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCollectionBehavior_1, behavior);
-    }
+public void setFrame(NSRect frameRect, bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setFrame_display_, frameRect, flag);
+}
 
-    public void setContentAspectRatio (NSSize ratio)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentAspectRatio_1, ratio);
-    }
-
-    public void setContentBorderThickness (CGFloat thickness, NSRectEdge edge)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentBorderThickness_1forEdge_1, thickness, edge);
-    }
-
-    public void setContentMaxSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentMaxSize_1, size);
-    }
-
-    public void setContentMinSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentMinSize_1, size);
-    }
-
-    public void setContentResizeIncrements (NSSize increments)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentResizeIncrements_1, increments);
-    }
-
-    public void setContentSize (NSSize aSize)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentSize_1, aSize);
-    }
-
-    public void setContentView (NSView aView)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setContentView_1, aView !is null ? aView.id_ : null);
-    }
-
-    public void setDefaultButtonCell (NSButtonCell defButt)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDefaultButtonCell_1, defButt !is null ? defButt.id_ : null);
-    }
-
-    public void setDelegate (id anObject)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
-    }
+public void setHasShadow(bool hasShadow) {
+    OS.objc_msgSend(this.id, OS.sel_setHasShadow_, hasShadow);
+}
 
-    public void setDepthLimit (NSWindowDepth limit)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDepthLimit_1, limit);
-    }
-
-    public void setDisplaysWhenScreenProfileChanges (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDisplaysWhenScreenProfileChanges_1, flag);
-    }
-
-    public void setDocumentEdited (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDocumentEdited_1, flag);
-    }
-
-    public void setDynamicDepthLimit (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDynamicDepthLimit_1, flag);
-    }
-
-    public void setExcludedFromWindowsMenu (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setExcludedFromWindowsMenu_1, flag);
-    }
-
-    public void setFrame_display_ (NSRect frameRect, bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrame_1display_1, frameRect, flag);
-    }
-
-    public void setFrame_display_animate_ (NSRect frameRect, bool displayFlag, bool animateFlag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrame_1display_1animate_1, frameRect, displayFlag, animateFlag);
-    }
-
-    public bool setFrameAutosaveName (NSString name)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setFrameAutosaveName_1, name !is null ? name.id_ : null) !is null;
-    }
-
-    public void setFrameFromString (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameFromString_1, string !is null ? string.id_ : null);
-    }
-
-    public void setFrameOrigin (NSPoint aPoint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameOrigin_1, aPoint);
-    }
-
-    public void setFrameTopLeftPoint (NSPoint aPoint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setFrameTopLeftPoint_1, aPoint);
-    }
-
-    public bool setFrameUsingName_ (NSString name)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setFrameUsingName_1, name !is null ? name.id_ : null) !is null;
-    }
-
-    public bool setFrameUsingName_force_ (NSString name, bool force)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setFrameUsingName_1force_1, name !is null ? name.id_ : null, force) !is null;
-    }
-
-    public void setHasShadow (bool hasShadow)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHasShadow_1, hasShadow);
-    }
-
-    public void setHidesOnDeactivate (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setHidesOnDeactivate_1, flag);
-    }
-
-    public void setIgnoresMouseEvents (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIgnoresMouseEvents_1, flag);
-    }
+public void setLevel(NSInteger newLevel) {
+    OS.objc_msgSend(this.id, OS.sel_setLevel_, newLevel);
+}
 
-    public void setInitialFirstResponder (NSView view)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setInitialFirstResponder_1, view !is null ? view.id_ : null);
-    }
-
-    public void setIsMiniaturized (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIsMiniaturized_1, flag);
-    }
-
-    public void setIsVisible (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIsVisible_1, flag);
-    }
-
-    public void setIsZoomed (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setIsZoomed_1, flag);
-    }
-
-    public void setLevel (NSInteger newLevel)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setLevel_1, newLevel);
-    }
-
-    public void setMaxSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMaxSize_1, size);
-    }
-
-    public void setMinSize (NSSize size)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMinSize_1, size);
-    }
-
-    public void setMiniwindowImage (NSImage image)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMiniwindowImage_1, image !is null ? image.id_ : null);
-    }
+public void setOpaque(bool isOpaque) {
+    OS.objc_msgSend(this.id, OS.sel_setOpaque_, isOpaque);
+}
 
-    public void setMiniwindowTitle (NSString title)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMiniwindowTitle_1, title !is null ? title.id_ : null);
-    }
-
-    public void setMovableByWindowBackground (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMovableByWindowBackground_1, flag);
-    }
-
-    public void setOneShot (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOneShot_1, flag);
-    }
-
-    public void setOpaque (bool isOpaque)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOpaque_1, isOpaque);
-    }
-
-    public void setOrderedIndex (int index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setOrderedIndex_1, index);
-    }
-
-    public void setParentWindow (NSWindow window)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setParentWindow_1, window !is null ? window.id_ : null);
-    }
-
-    public void setPreferredBackingLocation (NSWindowBackingLocation backingLocation)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPreferredBackingLocation_1, backingLocation);
-    }
-
-    public void setPreservesContentDuringLiveResize (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPreservesContentDuringLiveResize_1, flag);
-    }
-
-    public void setReleasedWhenClosed (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setReleasedWhenClosed_1, flag);
-    }
+public void setReleasedWhenClosed(bool flag) {
+    OS.objc_msgSend(this.id, OS.sel_setReleasedWhenClosed_, flag);
+}
 
-    public void setRepresentedFilename (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRepresentedFilename_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setRepresentedURL (NSURL url)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRepresentedURL_1, url !is null ? url.id_ : null);
-    }
-
-    public void setResizeIncrements (NSSize increments)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setResizeIncrements_1, increments);
-    }
-
-    public void setSharingType (NSWindowSharingType type)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSharingType_1, type);
-    }
-
-    public void setShowsResizeIndicator (bool show)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsResizeIndicator_1, show);
-    }
-
-    public void setShowsToolbarButton (bool show)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShowsToolbarButton_1, show);
-    }
-
-    public void setTitle (NSString aString)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitle_1, aString !is null ? aString.id_ : null);
-    }
-
-    public void setTitleWithRepresentedFilename (NSString filename)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setTitleWithRepresentedFilename_1, filename !is null ? filename.id_ : null);
-    }
-
-    public void setToolbar (NSToolbar toolbar)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setToolbar_1, toolbar !is null ? toolbar.id_ : null);
-    }
-
-    public void setViewsNeedDisplay (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setViewsNeedDisplay_1, flag);
-    }
-
-    public void setWindowController (NSWindowController windowController)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWindowController_1, windowController !is null ? windowController.id_ : null);
-    }
-
-    public NSWindowSharingType sharingType ()
-    {
-        return cast(NSWindowSharingType) OS.objc_msgSend(this.id_, OS.sel_sharingType);
-    }
-
-    public bool showsResizeIndicator ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsResizeIndicator) !is null;
-    }
-
-    public bool showsToolbarButton ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_showsToolbarButton) !is null;
-    }
-
-    public NSButton standardWindowButton_ (NSWindowButton b)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_standardWindowButton_1, b);
-        return result !is null ? new NSButton(result) : null;
-    }
-
-    public static NSButton static_standardWindowButton_forStyleMask_ (int b, int styleMask)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSWindow, OS.sel_standardWindowButton_1forStyleMask_1, b, styleMask);
-        return result !is null ? new NSButton(result) : null;
-    }
+public void setTitle(NSString aString) {
+    OS.objc_msgSend(this.id, OS.sel_setTitle_, aString !is null ? aString.id : null);
+}
 
-    public NSString stringWithSavedFrame ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringWithSavedFrame);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSUInteger styleMask ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_styleMask);
-    }
-
-    public NSString title ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_title);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void toggleToolbarShown (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_toggleToolbarShown_1, sender !is null ? sender.id_ : null);
-    }
-
-    public NSToolbar toolbar ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_toolbar);
-        return result !is null ? new NSToolbar(result) : null;
-    }
-
-    public bool tryToPerform (objc.SEL anAction, id anObject)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_tryToPerform_1with_1, anAction, anObject !is null ? anObject.id_ : null) !is null;
-    }
-
-    public void unregisterDraggedTypes ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_unregisterDraggedTypes);
-    }
-
-    public void update ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_update);
-    }
+public NSUInteger styleMask() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_styleMask);
+}
 
-    public void useOptimizedDrawing (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_useOptimizedDrawing_1, flag);
-    }
-
-    public CGFloat userSpaceScaleFactor ()
-    {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_userSpaceScaleFactor);
-    }
-
-    public id validRequestorForSendType (NSString sendType, NSString returnType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_validRequestorForSendType_1returnType_1, sendType !is null ? sendType.id_ : null,
-                returnType !is null ? returnType.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool viewsNeedDisplay ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_viewsNeedDisplay) !is null;
-    }
-
-    public id windowController ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowController);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger windowNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_windowNumber);
-    }
-
-    public void* windowRef ()
-    {
-        return cast(void*) OS.objc_msgSend(this.id_, OS.sel_windowRef);
-    }
-
-    public bool worksWhenModal ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_worksWhenModal) !is null;
-    }
-
-    public void zoom (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_zoom_1, sender !is null ? sender.id_ : null);
-    }
+public NSInteger windowNumber() {
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_windowNumber);
+}
 
 }
--- a/dwt/internal/cocoa/NSWindowController.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSWindowController;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSDocument;
-import dwt.internal.cocoa.NSResponder;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSWindow;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSWindowController : NSResponder
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void close ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_close);
-    }
-
-    public id document ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_document);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithWindow (NSWindow window)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindow_1, window !is null ? window.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithWindowNibName_ (NSString windowNibName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindowNibName_1, windowNibName !is null ? windowNibName.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithWindowNibName_owner_ (NSString windowNibName, id owner)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindowNibName_1owner_1, windowNibName !is null ? windowNibName.id_ : null,
-                owner !is null ? owner.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithWindowNibPath (NSString windowNibPath, id owner)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithWindowNibPath_1owner_1, windowNibPath !is null ? windowNibPath.id_ : null,
-                owner !is null ? owner.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isWindowLoaded ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isWindowLoaded) !is null;
-    }
-
-    public void loadWindow ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_loadWindow);
-    }
-
-    public id owner ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_owner);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void setDocument (NSDocument document)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDocument_1, document !is null ? document.id_ : null);
-    }
-
-    public void setDocumentEdited (bool dirtyFlag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDocumentEdited_1, dirtyFlag);
-    }
-
-    public void setShouldCascadeWindows (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShouldCascadeWindows_1, flag);
-    }
-
-    public void setShouldCloseDocument (bool flag)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShouldCloseDocument_1, flag);
-    }
-
-    public void setWindow (NSWindow window)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWindow_1, window !is null ? window.id_ : null);
-    }
-
-    public void setWindowFrameAutosaveName (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setWindowFrameAutosaveName_1, name !is null ? name.id_ : null);
-    }
-
-    public bool shouldCascadeWindows ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldCascadeWindows) !is null;
-    }
-
-    public bool shouldCloseDocument ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldCloseDocument) !is null;
-    }
-
-    public void showWindow (id sender)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_showWindow_1, sender !is null ? sender.id_ : null);
-    }
-
-    public void synchronizeWindowTitleWithDocumentName ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_synchronizeWindowTitleWithDocumentName);
-    }
-
-    public NSWindow window ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_window);
-        return result !is null ? new NSWindow(result) : null;
-    }
-
-    public void windowDidLoad ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_windowDidLoad);
-    }
-
-    public NSString windowFrameAutosaveName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowFrameAutosaveName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString windowNibName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowNibName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString windowNibPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowNibPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString windowTitleForDocumentDisplayName (NSString displayName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_windowTitleForDocumentDisplayName_1, displayName !is null ? displayName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void windowWillLoad ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_windowWillLoad);
-    }
-
-}
--- a/dwt/internal/cocoa/NSWorkspace.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/NSWorkspace.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,29 +1,26 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.NSWorkspace;
 
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSAppleEventDescriptor;
 import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSImage;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSNotificationCenter;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
@@ -42,290 +39,58 @@
     NSWorkspaceLaunchDefault = NSWorkspaceLaunchAsync | NSWorkspaceLaunchAllowingClassicStartup
 }
 
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchAndPrint NSWorkspaceLaunchAndPrint;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchInhibitingBackgroundOnly NSWorkspaceLaunchInhibitingBackgroundOnly;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchWithoutAddingToRecents NSWorkspaceLaunchWithoutAddingToRecents;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchWithoutActivation NSWorkspaceLaunchWithoutActivation;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchAsync NSWorkspaceLaunchAsync;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchAllowingClassicStartup NSWorkspaceLaunchAllowingClassicStartup;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchPreferringClassic NSWorkspaceLaunchPreferringClassic;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchNewInstance NSWorkspaceLaunchNewInstance;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchAndHide NSWorkspaceLaunchAndHide;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchAndHideOthers NSWorkspaceLaunchAndHideOthers;
-alias NSWorkspaceLaunchOptions.NSWorkspaceLaunchDefault NSWorkspaceLaunchDefault;
+public class NSWorkspace : NSObject {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
 
-enum NSWorkspaceIconCreationOptions : NSUInteger
-{
-    NSExcludeQuickDrawElementsIconCreationOption = 1 << 1,
-    NSExclude10_4ElementsIconCreationOption = 1 << 2
+public this(cocoa.id id) {
+    super(id);
+}
+
+public NSString fullPathForApplication(NSString appName) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_fullPathForApplication_, appName !is null ? appName.id : null);
+    return result !is null ? new NSString(result) : null;
+}
+
+public bool getInfoForFile(NSString fullPath, ref objc.id appName, ref objc.id type) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_getInfoForFile_application_type_, fullPath !is null ? fullPath.id : null, appName, type);
+}
+
+public NSImage iconForFile(NSString fullPath) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_iconForFile_, fullPath !is null ? fullPath.id : null);
+    return result !is null ? new NSImage(result) : null;
 }
 
-alias NSWorkspaceIconCreationOptions.NSExcludeQuickDrawElementsIconCreationOption NSExcludeQuickDrawElementsIconCreationOption;
-alias NSWorkspaceIconCreationOptions.NSExclude10_4ElementsIconCreationOption NSExclude10_4ElementsIconCreationOption;
-
-public class NSWorkspace : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSString absolutePathForAppBundleWithIdentifier (NSString bundleIdentifier)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_absolutePathForAppBundleWithIdentifier_1,
-                bundleIdentifier !is null ? bundleIdentifier.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSDictionary activeApplication ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_activeApplication);
-        return result !is null ? new NSDictionary(result) : null;
-    }
-
-    public void checkForRemovableMedia ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_checkForRemovableMedia);
-    }
-
-    public NSInteger extendPowerOffBy (NSInteger requested)
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_extendPowerOffBy_1, requested);
-    }
-
-    public bool fileSystemChanged ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_fileSystemChanged) !is null;
-    }
-
-    public bool filenameExtension (NSString filenameExtension, NSString typeName)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_filenameExtension_1isValidForType_1, filenameExtension !is null ? filenameExtension.id_ : null,
-                typeName !is null ? typeName.id_ : null) !is null;
-    }
-
-    public void findApplications ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_findApplications);
-    }
-
-    public NSString fullPathForApplication (NSString appName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fullPathForApplication_1, appName !is null ? appName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public NSImage iconForFileType(NSString fileType) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_iconForFileType_, fileType !is null ? fileType.id : null);
+    return result !is null ? new NSImage(result) : null;
+}
 
-    public bool getFileSystemInfoForPath (NSString fullPath, bool* removableFlag, bool* writableFlag, bool* unmountableFlag,
-    /*NSString** */objc.id** description,
-    /*NSString** */objc.id** fileSystemType)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getFileSystemInfoForPath_1isRemovable_1isWritable_1isUnmountable_1description_1type_1,
-                fullPath !is null ? fullPath.id_ : null, removableFlag, writableFlag, unmountableFlag, description, fileSystemType) !is null;
-    }
-
-    public bool getInfoForFile (NSString fullPath, /*NSString** */objc.id** appName, /*NSString** */objc.id** type)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_getInfoForFile_1application_1type_1, fullPath !is null ? fullPath.id_ : null, appName, type) !is null;
-    }
-
-    public void hideOtherApplications ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_hideOtherApplications);
-    }
-
-    public NSImage iconForFile (NSString fullPath)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_iconForFile_1, fullPath !is null ? fullPath.id_ : null);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public NSImage iconForFileType (NSString fileType)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_iconForFileType_1, fileType !is null ? fileType.id_ : null);
-        return result !is null ? new NSImage(result) : null;
-    }
+public bool isFilePackageAtPath(NSString fullPath) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_isFilePackageAtPath_, fullPath !is null ? fullPath.id : null);
+}
 
-    public NSImage iconForFiles (NSArray fullPaths)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_iconForFiles_1, fullPaths !is null ? fullPaths.id_ : null);
-        return result !is null ? new NSImage(result) : null;
-    }
-
-    public bool isFilePackageAtPath (NSString fullPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isFilePackageAtPath_1, fullPath !is null ? fullPath.id_ : null) !is null;
-    }
-
-    public bool launchAppWithBundleIdentifier (NSString bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor,
-    /*NSNumber** */objc.id** identifier)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_launchAppWithBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifier_1,
-                bundleIdentifier !is null ? bundleIdentifier.id_ : null, options, descriptor !is null ? descriptor.id_ : null, identifier) !is null;
-    }
-
-    public bool launchApplication_ (NSString appName)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_launchApplication_1, appName !is null ? appName.id_ : null) !is null;
-    }
-
-    public bool launchApplication_showIcon_autolaunch_ (NSString appName, bool showIcon, bool autolaunch)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_launchApplication_1showIcon_1autolaunch_1, appName !is null ? appName.id_ : null, showIcon, autolaunch) !is null;
-    }
-
-    public NSArray launchedApplications ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_launchedApplications);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSString localizedDescriptionForType (NSString typeName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedDescriptionForType_1, typeName !is null ? typeName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
+public bool openFile(NSString fullPath, NSString appName) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_openFile_withApplication_, fullPath !is null ? fullPath.id : null, appName !is null ? appName.id : null);
+}
 
-    public NSArray mountNewRemovableMedia ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mountNewRemovableMedia);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray mountedLocalVolumePaths ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mountedLocalVolumePaths);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray mountedRemovableMedia ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mountedRemovableMedia);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void noteFileSystemChanged ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteFileSystemChanged);
-    }
-
-    public void noteFileSystemChanged_ (NSString path)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteFileSystemChanged_1, path !is null ? path.id_ : null);
-    }
-
-    public void noteUserDefaultsChanged ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_noteUserDefaultsChanged);
-    }
-
-    public NSNotificationCenter notificationCenter ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_notificationCenter);
-        return result !is null ? new NSNotificationCenter(result) : null;
-    }
-
-    public bool openFile_ (NSString fullPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_openFile_1, fullPath !is null ? fullPath.id_ : null) !is null;
-    }
-
-    public bool openFile_fromImage_at_inView_ (NSString fullPath, NSImage anImage, NSPoint point, NSView aView)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_openFile_1fromImage_1at_1inView_1, fullPath !is null ? fullPath.id_ : null,
-                anImage !is null ? anImage.id_ : null, point, aView !is null ? aView.id_ : null) !is null;
-    }
-
-    public bool openFile_withApplication_ (NSString fullPath, NSString appName)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_openFile_1withApplication_1, fullPath !is null ? fullPath.id_ : null,
-                appName !is null ? appName.id_ : null) !is null;
-    }
-
-    public bool openFile_withApplication_andDeactivate_ (NSString fullPath, NSString appName, bool flag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_openFile_1withApplication_1andDeactivate_1, fullPath !is null ? fullPath.id_ : null,
-                appName !is null ? appName.id_ : null, flag) !is null;
-    }
-
-    public bool openTempFile (NSString fullPath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_openTempFile_1, fullPath !is null ? fullPath.id_ : null) !is null;
-    }
+public bool openURL(NSURL url) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_openURL_, url !is null ? url.id : null);
+}
 
-    public bool openURL (NSURL url)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_openURL_1, url !is null ? url.id_ : null) !is null;
-    }
-
-    public bool openURLs (NSArray urls, NSString bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor,
-            /*NSArray** */objc.id** identifiers)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_openURLs_1withAppBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifiers_1,
-                urls !is null ? urls.id_ : null, bundleIdentifier !is null ? bundleIdentifier.id_ : null, options,
-                descriptor !is null ? descriptor.id_ : null, identifiers) !is null;
-    }
-
-    public bool performFileOperation (NSString operation, NSString source, NSString destination, NSArray files, NSInteger* tag)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_performFileOperation_1source_1destination_1files_1tag_1, operation !is null ? operation.id_ : null,
-                source !is null ? source.id_ : null, destination !is null ? destination.id_ : null, files !is null ? files.id_ : null, tag) !is null;
-    }
-
-    public NSString preferredFilenameExtensionForType (NSString typeName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_preferredFilenameExtensionForType_1, typeName !is null ? typeName.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool selectFile (NSString fullPath, NSString rootFullpath)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_selectFile_1inFileViewerRootedAtPath_1, fullPath !is null ? fullPath.id_ : null,
-                rootFullpath !is null ? rootFullpath.id_ : null) !is null;
-    }
+public bool openURLs(NSArray urls, NSString bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor, int /*long*/ identifiers) {
+    return OS.objc_msgSend_bool(this.id, OS.sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_, urls !is null ? urls.id : null, bundleIdentifier !is null ? bundleIdentifier.id : null, options, descriptor !is null ? descriptor.id : null, identifiers);
+}
 
-    public bool setIcon (NSImage image, NSString fullPath, NSWorkspaceIconCreationOptions options)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_setIcon_1forFile_1options_1, image !is null ? image.id_ : null, fullPath !is null ? fullPath.id_ : null,
-                options) !is null;
-    }
-
-    public static NSWorkspace sharedWorkspace ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSWorkspace, OS.sel_sharedWorkspace);
-        return result !is null ? new NSWorkspace(result) : null;
-    }
-
-    public void slideImage (NSImage image, NSPoint fromPoint, NSPoint toPoint)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_slideImage_1from_1to_1, image !is null ? image.id_ : null, fromPoint, toPoint);
-    }
-
-    public bool type (NSString firstTypeName, NSString secondTypeName)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_type_1conformsToType_1, firstTypeName !is null ? firstTypeName.id_ : null,
-                secondTypeName !is null ? secondTypeName.id_ : null) !is null;
-    }
-
-    public NSString typeOfFile (NSString absoluteFilePath, /*NSError** */objc.id** outError)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typeOfFile_1error_1, absoluteFilePath !is null ? absoluteFilePath.id_ : null, outError);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public bool unmountAndEjectDeviceAtPath (NSString path)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_unmountAndEjectDeviceAtPath_1, path !is null ? path.id_ : null) !is null;
-    }
-
-    public bool userDefaultsChanged ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_userDefaultsChanged) !is null;
-    }
+public static NSWorkspace sharedWorkspace() {
+    objc.id result = OS.objc_msgSend(OS.class_NSWorkspace, OS.sel_sharedWorkspace);
+    return result !is null ? new NSWorkspace(result) : null;
+}
 
 }
--- a/dwt/internal/cocoa/NSXMLDTD.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSXMLDTD;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSXMLDTDNode;
-import dwt.internal.cocoa.NSXMLNode;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSXMLDTD : NSXMLNode
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addChild (NSXMLNode child)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addChild_1, child !is null ? child.id_ : null);
-    }
-
-    public NSXMLDTDNode attributeDeclarationForName (NSString name, NSString elementName)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeDeclarationForName_1elementName_1, name !is null ? name.id_ : null,
-                elementName !is null ? elementName.id_ : null);
-        return result !is null ? new NSXMLDTDNode(result) : null;
-    }
-
-    public NSXMLDTDNode elementDeclarationForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_elementDeclarationForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSXMLDTDNode(result) : null;
-    }
-
-    public NSXMLDTDNode entityDeclarationForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_entityDeclarationForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSXMLDTDNode(result) : null;
-    }
-
-    public id initWithContentsOfURL (NSURL url, NSUInteger mask, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1options_1error_1, url !is null ? url.id_ : null, mask, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithData (NSData data, NSUInteger mask, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1options_1error_1, data !is null ? data.id_ : null, mask, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void insertChild (NSXMLNode child, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertChild_1atIndex_1, child !is null ? child.id_ : null, index);
-    }
-
-    public void insertChildren (NSArray children, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertChildren_1atIndex_1, children !is null ? children.id_ : null, index);
-    }
-
-    public NSXMLDTDNode notationDeclarationForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_notationDeclarationForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSXMLDTDNode(result) : null;
-    }
-
-    public static NSXMLDTDNode predefinedEntityDeclarationForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLDTD, OS.sel_predefinedEntityDeclarationForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSXMLDTDNode(result) : null;
-    }
-
-    public NSString publicID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_publicID);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void removeChildAtIndex (NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeChildAtIndex_1, index);
-    }
-
-    public void replaceChildAtIndex (NSUInteger index, NSXMLNode node)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceChildAtIndex_1withNode_1, index, node !is null ? node.id_ : null);
-    }
-
-    public void setChildren (NSArray children)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setChildren_1, children !is null ? children.id_ : null);
-    }
-
-    public void setPublicID (NSString publicID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPublicID_1, publicID !is null ? publicID.id_ : null);
-    }
-
-    public void setSystemID (NSString systemID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSystemID_1, systemID !is null ? systemID.id_ : null);
-    }
-
-    public NSString systemID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_systemID);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSXMLDTDNode.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSXMLDTDNode;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSXMLNode;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-
-
-enum NSXMLDTDNodeKind : NSUInteger
-{
-    NSXMLEntityGeneralKind = 1,
-    NSXMLEntityParsedKind,
-    NSXMLEntityUnparsedKind,
-    NSXMLEntityParameterKind,
-    NSXMLEntityPredefined,
-
-    NSXMLAttributeCDATAKind,
-    NSXMLAttributeIDKind,
-    NSXMLAttributeIDRefKind,
-    NSXMLAttributeIDRefsKind,
-    NSXMLAttributeEntityKind,
-    NSXMLAttributeEntitiesKind,
-    NSXMLAttributeNMTokenKind,
-    NSXMLAttributeNMTokensKind,
-    NSXMLAttributeEnumerationKind,
-    NSXMLAttributeNotationKind,
-
-    NSXMLElementDeclarationUndefinedKind,
-    NSXMLElementDeclarationEmptyKind,
-    NSXMLElementDeclarationAnyKind,
-    NSXMLElementDeclarationMixedKind,
-    NSXMLElementDeclarationElementKind
-}
-
-alias NSXMLDTDNodeKind.NSXMLEntityGeneralKind NSXMLEntityGeneralKind;
-alias NSXMLDTDNodeKind.NSXMLEntityParsedKind NSXMLEntityParsedKind;
-alias NSXMLDTDNodeKind.NSXMLEntityUnparsedKind NSXMLEntityUnparsedKind;
-alias NSXMLDTDNodeKind.NSXMLEntityParameterKind NSXMLEntityParameterKind;
-alias NSXMLDTDNodeKind.NSXMLEntityPredefined NSXMLEntityPredefined;
-
-alias NSXMLDTDNodeKind.NSXMLAttributeCDATAKind NSXMLAttributeCDATAKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeIDKind NSXMLAttributeIDKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeIDRefKind NSXMLAttributeIDRefKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeIDRefsKind NSXMLAttributeIDRefsKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeEntityKind NSXMLAttributeEntityKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeEntitiesKind NSXMLAttributeEntitiesKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeNMTokenKind NSXMLAttributeNMTokenKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeNMTokensKind NSXMLAttributeNMTokensKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeEnumerationKind NSXMLAttributeEnumerationKind;
-alias NSXMLDTDNodeKind.NSXMLAttributeNotationKind NSXMLAttributeNotationKind;
-
-alias NSXMLDTDNodeKind.NSXMLElementDeclarationUndefinedKind NSXMLElementDeclarationUndefinedKind;
-alias NSXMLDTDNodeKind.NSXMLElementDeclarationEmptyKind NSXMLElementDeclarationEmptyKind;
-alias NSXMLDTDNodeKind.NSXMLElementDeclarationAnyKind NSXMLElementDeclarationAnyKind;
-alias NSXMLDTDNodeKind.NSXMLElementDeclarationMixedKind NSXMLElementDeclarationMixedKind;
-alias NSXMLDTDNodeKind.NSXMLElementDeclarationElementKind NSXMLElementDeclarationElementKind;
-
-
-
-public class NSXMLDTDNode : NSXMLNode
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSXMLDTDNodeKind DTDKind ()
-    {
-        return cast(NSXMLDTDNodeKind) OS.objc_msgSend(this.id_, OS.sel_DTDKind);
-    }
-
-    public id initWithXMLString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithXMLString_1, string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public bool isExternal ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isExternal) !is null;
-    }
-
-    public NSString notationName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_notationName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString publicID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_publicID);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setDTDKind (NSXMLDTDNodeKind kind)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDTDKind_1, kind);
-    }
-
-    public void setNotationName (NSString notationName)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNotationName_1, notationName !is null ? notationName.id_ : null);
-    }
-
-    public void setPublicID (NSString publicID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setPublicID_1, publicID !is null ? publicID.id_ : null);
-    }
-
-    public void setSystemID (NSString systemID)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setSystemID_1, systemID !is null ? systemID.id_ : null);
-    }
-
-    public NSString systemID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_systemID);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSXMLDocument.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSXMLDocument;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.NSXMLDTD;
-import dwt.internal.cocoa.NSXMLElement;
-import dwt.internal.cocoa.NSXMLNode;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSXMLDocumentContentKind : NSUInteger
-{
-    NSXMLDocumentXMLKind = 0,
-    NSXMLDocumentXHTMLKind,
-    NSXMLDocumentHTMLKind,
-    NSXMLDocumentTextKind
-}
-
-alias NSXMLDocumentContentKind.NSXMLDocumentXMLKind NSXMLDocumentXMLKind;
-alias NSXMLDocumentContentKind.NSXMLDocumentXHTMLKind NSXMLDocumentXHTMLKind;
-alias NSXMLDocumentContentKind.NSXMLDocumentHTMLKind NSXMLDocumentHTMLKind;
-alias NSXMLDocumentContentKind.NSXMLDocumentTextKind NSXMLDocumentTextKind;
-
-public class NSXMLDocument : NSXMLNode
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public NSXMLDTD DTD ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_DTD);
-        return result !is null ? new NSXMLDTD(result) : null;
-    }
-
-    public NSString MIMEType ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_MIMEType);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSData XMLData ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_XMLData);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public NSData XMLDataWithOptions (NSUInteger options)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_XMLDataWithOptions_1, options);
-        return result !is null ? new NSData(result) : null;
-    }
-
-    public void addChild (NSXMLNode child)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addChild_1, child !is null ? child.id_ : null);
-    }
-
-    public NSString characterEncoding ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_characterEncoding);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSXMLDocumentContentKind documentContentKind ()
-    {
-        return cast(NSXMLDocumentContentKind) OS.objc_msgSend(this.id_, OS.sel_documentContentKind);
-    }
-
-    public id initWithContentsOfURL (NSURL url, NSUInteger mask, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1options_1error_1, url !is null ? url.id_ : null, mask, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithData (NSData data, NSUInteger mask, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1options_1error_1, data !is null ? data.id_ : null, mask, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithRootElement (NSXMLElement element)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRootElement_1, element !is null ? element.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithXMLString (NSString string, NSUInteger mask, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithXMLString_1options_1error_1, string !is null ? string.id_ : null, mask, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void insertChild (NSXMLNode child, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertChild_1atIndex_1, child !is null ? child.id_ : null, index);
-    }
-
-    public void insertChildren (NSArray children, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertChildren_1atIndex_1, children !is null ? children.id_ : null, index);
-    }
-
-    public bool isStandalone ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_isStandalone) !is null;
-    }
-
-    public id objectByApplyingXSLT (NSData xslt, NSDictionary arguments, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectByApplyingXSLT_1arguments_1error_1, xslt !is null ? xslt.id_ : null,
-                arguments !is null ? arguments.id_ : null, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id objectByApplyingXSLTAtURL (NSURL xsltURL, NSDictionary argument, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectByApplyingXSLTAtURL_1arguments_1error_1, xsltURL !is null ? xsltURL.id_ : null,
-                argument !is null ? argument.id_ : null, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id objectByApplyingXSLTString (NSString xslt, NSDictionary arguments, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectByApplyingXSLTString_1arguments_1error_1, xslt !is null ? xslt.id_ : null,
-                arguments !is null ? arguments.id_ : null, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void removeChildAtIndex (NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeChildAtIndex_1, index);
-    }
-
-    public void replaceChildAtIndex (NSUInteger index, NSXMLNode node)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceChildAtIndex_1withNode_1, index, node !is null ? node.id_ : null);
-    }
-
-    public static objc.Class replacementClassForClass (objc.Class cls)
-    {
-        return cast(objc.Class) OS.objc_msgSend(OS.class_NSXMLDocument, OS.sel_replacementClassForClass_1, cls);
-    }
-
-    public NSXMLElement rootElement ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rootElement);
-        return result !is null ? new NSXMLElement(result) : null;
-    }
-
-    public void setCharacterEncoding (NSString encoding)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setCharacterEncoding_1, encoding !is null ? encoding.id_ : null);
-    }
-
-    public void setChildren (NSArray children)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setChildren_1, children !is null ? children.id_ : null);
-    }
-
-    public void setDTD (NSXMLDTD documentTypeDeclaration)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDTD_1, documentTypeDeclaration !is null ? documentTypeDeclaration.id_ : null);
-    }
-
-    public void setDocumentContentKind (NSXMLDocumentContentKind kind)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDocumentContentKind_1, kind);
-    }
-
-    public void setMIMEType (NSString MIMEType)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setMIMEType_1, MIMEType !is null ? MIMEType.id_ : null);
-    }
-
-    public void setRootElement (NSXMLNode root)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setRootElement_1, root !is null ? root.id_ : null);
-    }
-
-    public void setStandalone (bool standalone)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStandalone_1, standalone);
-    }
-
-    public void setVersion (NSString versionn)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setVersion_1, versionn !is null ? versionn.id_ : null);
-    }
-
-    public bool validateAndReturnError (/*NSError** */objc.id** error)
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_validateAndReturnError_1, error) !is null;
-    }
-
-//public NSString version() {
-//  objc.id result = OS.objc_msgSend(this.id_, OS.sel_version);
-//  return result !is null ? new NSString(result) : null;
-//}
-
-}
--- a/dwt/internal/cocoa/NSXMLElement.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSXMLElement;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSXMLNode;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSXMLElement : NSXMLNode
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void addAttribute (NSXMLNode attribute)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addAttribute_1, attribute !is null ? attribute.id_ : null);
-    }
-
-    public void addChild (NSXMLNode child)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addChild_1, child !is null ? child.id_ : null);
-    }
-
-    public void addNamespace (NSXMLNode aNamespace)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_addNamespace_1, aNamespace !is null ? aNamespace.id_ : null);
-    }
-
-    public NSXMLNode attributeForLocalName (NSString localName, NSString URI)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeForLocalName_1URI_1, localName !is null ? localName.id_ : null,
-                URI !is null ? URI.id_ : null);
-        return result !is null ? new NSXMLNode(result) : null;
-    }
-
-    public NSXMLNode attributeForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributeForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSXMLNode(result) : null;
-    }
-
-    public NSArray attributes ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributes);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray elementsForLocalName (NSString localName, NSString URI)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_elementsForLocalName_1URI_1, localName !is null ? localName.id_ : null,
-                URI !is null ? URI.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray elementsForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_elementsForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id initWithName_ (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1, name !is null ? name.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithName_URI_ (NSString name, NSString URI)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1URI_1, name !is null ? name.id_ : null, URI !is null ? URI.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithName_stringValue_ (NSString name, NSString string)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1stringValue_1, name !is null ? name.id_ : null,
-                string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithXMLString (NSString string, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithXMLString_1error_1, string !is null ? string.id_ : null, error);
-        return result !is null ? new id(result) : null;
-    }
-
-    public void insertChild (NSXMLNode child, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertChild_1atIndex_1, child !is null ? child.id_ : null, index);
-    }
-
-    public void insertChildren (NSArray children, NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_insertChildren_1atIndex_1, children !is null ? children.id_ : null, index);
-    }
-
-    public NSXMLNode namespaceForPrefix (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_namespaceForPrefix_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSXMLNode(result) : null;
-    }
-
-    public NSArray namespaces ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_namespaces);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public void normalizeAdjacentTextNodesPreservingCDATA (bool preserve)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_normalizeAdjacentTextNodesPreservingCDATA_1, preserve);
-    }
-
-    public void removeAttributeForName (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeAttributeForName_1, name !is null ? name.id_ : null);
-    }
-
-    public void removeChildAtIndex (NSUInteger index)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeChildAtIndex_1, index);
-    }
-
-    public void removeNamespaceForPrefix (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_removeNamespaceForPrefix_1, name !is null ? name.id_ : null);
-    }
-
-    public void replaceChildAtIndex (NSUInteger index, NSXMLNode node)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_replaceChildAtIndex_1withNode_1, index, node !is null ? node.id_ : null);
-    }
-
-    public NSXMLNode resolveNamespaceForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resolveNamespaceForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSXMLNode(result) : null;
-    }
-
-    public NSString resolvePrefixForNamespaceURI (NSString namespaceURI)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_resolvePrefixForNamespaceURI_1, namespaceURI !is null ? namespaceURI.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setAttributes (NSArray attributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributes_1, attributes !is null ? attributes.id_ : null);
-    }
-
-    public void setAttributesAsDictionary (NSDictionary attributes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setAttributesAsDictionary_1, attributes !is null ? attributes.id_ : null);
-    }
-
-    public void setChildren (NSArray children)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setChildren_1, children !is null ? children.id_ : null);
-    }
-
-    public void setNamespaces (NSArray namespaces)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setNamespaces_1, namespaces !is null ? namespaces.id_ : null);
-    }
-
-}
--- a/dwt/internal/cocoa/NSXMLNode.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSXMLNode;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSArray;
-import dwt.internal.cocoa.NSDictionary;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSXMLDocument;
-import dwt.internal.cocoa.NSXMLElement;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-enum NSXMLNodeKind : NSUInteger
-{
-    NSXMLInvalidKind = 0,
-    NSXMLDocumentKind,
-    NSXMLElementKind,
-    NSXMLAttributeKind,
-    NSXMLNamespaceKind,
-    NSXMLProcessingInstructionKind,
-    NSXMLCommentKind,
-    NSXMLTextKind,
-    NSXMLDTDKind,
-    NSXMLEntityDeclarationKind,
-    NSXMLAttributeDeclarationKind,
-    NSXMLElementDeclarationKind,
-    NSXMLNotationDeclarationKind
-}
-
-alias NSXMLNodeKind.NSXMLInvalidKind NSXMLInvalidKind;
-alias NSXMLNodeKind.NSXMLDocumentKind NSXMLDocumentKind;
-alias NSXMLNodeKind.NSXMLElementKind NSXMLElementKind;
-alias NSXMLNodeKind.NSXMLAttributeKind NSXMLAttributeKind;
-alias NSXMLNodeKind.NSXMLNamespaceKind NSXMLNamespaceKind;
-alias NSXMLNodeKind.NSXMLProcessingInstructionKind NSXMLProcessingInstructionKind;
-alias NSXMLNodeKind.NSXMLCommentKind NSXMLCommentKind;
-alias NSXMLNodeKind.NSXMLTextKind NSXMLTextKind;
-alias NSXMLNodeKind.NSXMLDTDKind NSXMLDTDKind;
-alias NSXMLNodeKind.NSXMLEntityDeclarationKind NSXMLEntityDeclarationKind;
-alias NSXMLNodeKind.NSXMLAttributeDeclarationKind NSXMLAttributeDeclarationKind;
-alias NSXMLNodeKind.NSXMLElementDeclarationKind NSXMLElementDeclarationKind;
-alias NSXMLNodeKind.NSXMLNotationDeclarationKind NSXMLNotationDeclarationKind;
-
-public class NSXMLNode : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public static id DTDNodeWithXMLString (NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_DTDNodeWithXMLString_1, string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString URI ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_URI);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString XMLString ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_XMLString);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString XMLStringWithOptions (NSUInteger options)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_XMLStringWithOptions_1, options);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString XPath ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_XPath);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static id static_attributeWithName_URI_stringValue_ (NSString name, NSString URI, NSString stringValue)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_attributeWithName_1URI_1stringValue_1, name !is null ? name.id_ : null,
-                URI !is null ? URI.id_ : null, stringValue !is null ? stringValue.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_attributeWithName_stringValue_ (NSString name, NSString stringValue)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_attributeWithName_1stringValue_1, name !is null ? name.id_ : null,
-                stringValue !is null ? stringValue.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString canonicalXMLStringPreservingComments (bool comments)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_canonicalXMLStringPreservingComments_1, comments);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSXMLNode childAtIndex (NSUInteger index)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_childAtIndex_1, index);
-        return result is this.id_ ? this : (result !is null ? new NSXMLNode(result) : null);
-    }
-
-    public NSUInteger childCount ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_childCount);
-    }
-
-    public NSArray children ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_children);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public static id commentWithStringValue (NSString stringValue)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_commentWithStringValue_1, stringValue !is null ? stringValue.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSString description ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void detach ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_detach);
-    }
-
-    public static id document ()
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_document);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id documentWithRootElement (NSXMLElement element)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_documentWithRootElement_1, element !is null ? element.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_elementWithName_ (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_elementWithName_1, name !is null ? name.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_elementWithName_URI_ (NSString name, NSString URI)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_elementWithName_1URI_1, name !is null ? name.id_ : null,
-                URI !is null ? URI.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_elementWithName_children_attributes_ (NSString name, NSArray children, NSArray attributes)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_elementWithName_1children_1attributes_1, name !is null ? name.id_ : null,
-                children !is null ? children.id_ : null, attributes !is null ? attributes.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public static id static_elementWithName_stringValue_ (NSString name, NSString string)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_elementWithName_1stringValue_1, name !is null ? name.id_ : null,
-                string !is null ? string.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSUInteger index ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_index);
-    }
-
-    public id initWithKind_ (NSXMLNodeKind kind)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithKind_1, kind);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithKind_options_ (NSXMLNodeKind kind, NSUInteger options)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithKind_1options_1, kind, options);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSXMLNodeKind kind ()
-    {
-        return cast(NSXMLNodeKind) OS.objc_msgSend(this.id_, OS.sel_kind);
-    }
-
-    public NSUInteger level ()
-    {
-        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_level);
-    }
-
-    public NSString localName ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localName);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString localNameForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_localNameForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSString name ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static id namespaceWithName (NSString name, NSString stringValue)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_namespaceWithName_1stringValue_1, name !is null ? name.id_ : null,
-                stringValue !is null ? stringValue.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSXMLNode nextNode ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextNode);
-        return result is this.id_ ? this : (result !is null ? new NSXMLNode(result) : null);
-    }
-
-    public NSXMLNode nextSibling ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextSibling);
-        return result is this.id_ ? this : (result !is null ? new NSXMLNode(result) : null);
-    }
-
-    public NSArray nodesForXPath (NSString xpath, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_nodesForXPath_1error_1, xpath !is null ? xpath.id_ : null, error);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public id objectValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValue);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSArray objectsForXQuery_constants_error_ (NSString xquery, NSDictionary constants, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectsForXQuery_1constants_1error_1, xquery !is null ? xquery.id_ : null,
-                constants !is null ? constants.id_ : null, error);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSArray objectsForXQuery_error_ (NSString xquery, /*NSError** */objc.id** error)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectsForXQuery_1error_1, xquery !is null ? xquery.id_ : null, error);
-        return result !is null ? new NSArray(result) : null;
-    }
-
-    public NSXMLNode parent ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_parent);
-        return result is this.id_ ? this : (result !is null ? new NSXMLNode(result) : null);
-    }
-
-    public static NSXMLNode predefinedNamespaceForPrefix (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_predefinedNamespaceForPrefix_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSXMLNode(result) : null;
-    }
-
-    public NSString prefix ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_prefix);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static NSString prefixForName (NSString name)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_prefixForName_1, name !is null ? name.id_ : null);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public NSXMLNode previousNode ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_previousNode);
-        return result is this.id_ ? this : (result !is null ? new NSXMLNode(result) : null);
-    }
-
-    public NSXMLNode previousSibling ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_previousSibling);
-        return result is this.id_ ? this : (result !is null ? new NSXMLNode(result) : null);
-    }
-
-    public static id processingInstructionWithName (NSString name, NSString stringValue)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_processingInstructionWithName_1stringValue_1, name !is null ? name.id_ : null,
-                stringValue !is null ? stringValue.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSXMLDocument rootDocument ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rootDocument);
-        return result !is null ? new NSXMLDocument(result) : null;
-    }
-
-    public void setName (NSString name)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setName_1, name !is null ? name.id_ : null);
-    }
-
-    public void setObjectValue (id value)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, value !is null ? value.id_ : null);
-    }
-
-    public void setStringValue_ (NSString string)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStringValue_1, string !is null ? string.id_ : null);
-    }
-
-    public void setStringValue_resolvingEntities_ (NSString string, bool resolve)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setStringValue_1resolvingEntities_1, string !is null ? string.id_ : null, resolve);
-    }
-
-    public void setURI (NSString URI)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setURI_1, URI !is null ? URI.id_ : null);
-    }
-
-    public NSString stringValue ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public static id textWithStringValue (NSString stringValue)
-    {
-        objc.id result = OS.objc_msgSend(OS.class_NSXMLNode, OS.sel_textWithStringValue_1, stringValue !is null ? stringValue.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSXMLParser.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
-module dwt.internal.cocoa.NSXMLParser;
-
-import dwt.internal.cocoa.id;
-import dwt.internal.cocoa.NSData;
-import dwt.internal.cocoa.NSError;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSURL;
-import dwt.internal.cocoa.OS;
-import objc = dwt.internal.objc.runtime;
-
-public class NSXMLParser : NSObject
-{
-
-    public this ()
-    {
-        super();
-    }
-
-    public this (objc.id id)
-    {
-        super(id);
-    }
-
-    public void abortParsing ()
-    {
-        OS.objc_msgSend(this.id_, OS.sel_abortParsing);
-    }
-
-    public NSInteger columnNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_columnNumber);
-    }
-
-    public id delegatee ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithContentsOfURL (NSURL url)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public id initWithData (NSData data)
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, data !is null ? data.id_ : null);
-        return result !is null ? new id(result) : null;
-    }
-
-    public NSInteger lineNumber ()
-    {
-        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_lineNumber);
-    }
-
-    public bool parse ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_parse) !is null;
-    }
-
-    public NSError parserError ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_parserError);
-        return result !is null ? new NSError(result) : null;
-    }
-
-    public NSString publicID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_publicID);
-        return result !is null ? new NSString(result) : null;
-    }
-
-    public void setDelegate (id delegatee)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
-    }
-
-    public void setShouldProcessNamespaces (bool shouldProcessNamespaces)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShouldProcessNamespaces_1, shouldProcessNamespaces);
-    }
-
-    public void setShouldReportNamespacePrefixes (bool shouldReportNamespacePrefixes)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShouldReportNamespacePrefixes_1, shouldReportNamespacePrefixes);
-    }
-
-    public void setShouldResolveExternalEntities (bool shouldResolveExternalEntities)
-    {
-        OS.objc_msgSend(this.id_, OS.sel_setShouldResolveExternalEntities_1, shouldResolveExternalEntities);
-    }
-
-    public bool shouldProcessNamespaces ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldProcessNamespaces) !is null;
-    }
-
-    public bool shouldReportNamespacePrefixes ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldReportNamespacePrefixes) !is null;
-    }
-
-    public bool shouldResolveExternalEntities ()
-    {
-        return OS.objc_msgSend(this.id_, OS.sel_shouldResolveExternalEntities) !is null;
-    }
-
-    public NSString systemID ()
-    {
-        objc.id result = OS.objc_msgSend(this.id_, OS.sel_systemID);
-        return result !is null ? new NSString(result) : null;
-    }
-
-}
--- a/dwt/internal/cocoa/NSZone.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Jul 23, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.NSZone;
-
-alias void* NSZone;
\ No newline at end of file
--- a/dwt/internal/cocoa/OS.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/OS.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,17163 +7,4741 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
  *******************************************************************************/
 module dwt.internal.cocoa.OS;
 
-import tango.stdc.string;
+import dwt.dwthelper.utils;
 
-import dwt.dwthelper.utils;
 import dwt.internal.C;
 import dwt.internal.Library;
-import dwt.internal.Platform;
 
-static import dwt.internal.c.carboncore.Gestalt;
-import dwt.internal.c.carboncore.MacTypes;
-static import dwt.internal.c.hiservices.Processes;
-static import dwt.internal.c.qd.Quickdraw;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.NSString;
-static import dwt.internal.objc.appkit.NSAccessibility;
-static import dwt.internal.objc.appkit.NSAttributedString;
-static import dwt.internal.objc.appkit.NSGraphics;
-static import dwt.internal.objc.coregraphics.CGRemoteOperation;
-static import dwt.internal.objc.foundation.NSGeometry;
-static import dwt.internal.objc.foundation.NSHFSFileTypes;
-static import dwt.internal.objc.foundation.NSRunLoop;
-static import dwt.internal.objc.runtime;
-
-//import mambo.io;
+import unistd = tango.stdc.posix.unistd;
+import stdc = tango.stdc.string;
 
-private alias dwt.internal.objc.runtime.objc_object objc_object;
-
-struct ClassData
-{
-    dwt.internal.objc.runtime.id* var;
-    String arg;
-}
+import Carbon = dwt.internal.c.Carbon;
+import custom = dwt.internal.c.custom;
+import dwt.internal.cocoa.CGPoint;
+import dwt.internal.cocoa.CGRect;
+import dwt.internal.cocoa.CGSize;
+import dwt.internal.cocoa.NSAffineTransformStruct;
+import dwt.internal.cocoa.NSInteger;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRange;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
+import dwt.internal.cocoa.NSString;
+import Cocoa = dwt.internal.objc.cocoa.Cocoa;
+import objc = dwt.internal.objc.runtime;
 
-struct SelectorData
-{
-    String* var;
-    String arg;
-}
-
-public class OS : C
-{    
-    private alias dwt.internal.objc.runtime.id id;
-    /*static this ()
-    {
+public class OS : C {
+    /*static this (){
         Library.loadLibrary("swt-pi"); //$NON-NLS-1$
     }*/
-
+    
     public static const int VERSION;
-
-    static this ()
-    {
-        int[1] response;
-        OS.Gestalt(OS.gestaltSystemVersion, response.ptr);
-        VERSION = response[0] & 0xffff;
+    static this () {
+        int [1] response;
+        OS.Gestalt (OS.gestaltSystemVersion, response.ptr);
+        VERSION = response [0] & 0xffff;
+        
+        sel_sendSelection = sel_registerName("sendSelection");
+        sel_sendDoubleSelection = sel_registerName("sendDoubleSelection");
+        sel_sendVerticalSelection = sel_registerName("sendVerticalSelection");
+        sel_sendHorizontalSelection = sel_registerName("sendHorizontalSelection");
+        sel_timerProc_ = sel_registerName("timerProc:");
+        sel_handleNotification_ = sel_registerName("handleNotification:");
         
-        OS.sel_sendSelection = OS.sel_registerName("sendSelection");
-        OS.sel_sendDoubleSelection = OS.sel_registerName("sendDoubleSelection");
-        OS.sel_sendArrowSelection = OS.sel_registerName("sendArrowSelection");
-        OS.sel_sendVerticalSelection = OS.sel_registerName("sendVerticalSelection");
-        OS.sel_sendHorizontalSelection = OS.sel_registerName("sendHorizontalSelection");
-        OS.sel_drawAtPoint_ = OS.sel_registerName("drawAtPoint:");
-        OS.sel_timerProc_1 = OS.sel_registerName("timerProc:");
-
-        foreach (data ; classesData)
-            *data.var = objc_getClass(data.arg);
-            
-        foreach (data ; selectorData)
-            *data.var = sel_registerName(data.arg);
+        class_DOMDocument = objc_getClass("DOMDocument");
+        class_DOMEvent = objc_getClass("DOMEvent");
+        class_DOMKeyboardEvent = objc_getClass("DOMKeyboardEvent");
+        class_DOMMouseEvent = objc_getClass("DOMMouseEvent");
+        class_DOMUIEvent = objc_getClass("DOMUIEvent");
+        class_DOMWheelEvent = objc_getClass("DOMWheelEvent");
+        class_NSActionCell = objc_getClass("NSActionCell");
+        class_NSAffineTransform = objc_getClass("NSAffineTransform");
+        class_NSAlert = objc_getClass("NSAlert");
+        class_NSAppleEventDescriptor = objc_getClass("NSAppleEventDescriptor");
+        class_NSApplication = objc_getClass("NSApplication");
+        class_NSArray = objc_getClass("NSArray");
+        class_NSAttributedString = objc_getClass("NSAttributedString");
+        class_NSAutoreleasePool = objc_getClass("NSAutoreleasePool");
+        class_NSBezierPath = objc_getClass("NSBezierPath");
+        class_NSBitmapImageRep = objc_getClass("NSBitmapImageRep");
+        class_NSBox = objc_getClass("NSBox");
+        class_NSBrowserCell = objc_getClass("NSBrowserCell");
+        class_NSBundle = objc_getClass("NSBundle");
+        class_NSButton = objc_getClass("NSButton");
+        class_NSButtonCell = objc_getClass("NSButtonCell");
+        class_NSCalendarDate = objc_getClass("NSCalendarDate");
+        class_NSCell = objc_getClass("NSCell");
+        class_NSCharacterSet = objc_getClass("NSCharacterSet");
+        class_NSClipView = objc_getClass("NSClipView");
+        class_NSCoder = objc_getClass("NSCoder");
+        class_NSColor = objc_getClass("NSColor");
+        class_NSColorPanel = objc_getClass("NSColorPanel");
+        class_NSColorSpace = objc_getClass("NSColorSpace");
+        class_NSComboBox = objc_getClass("NSComboBox");
+        class_NSControl = objc_getClass("NSControl");
+        class_NSCursor = objc_getClass("NSCursor");
+        class_NSData = objc_getClass("NSData");
+        class_NSDate = objc_getClass("NSDate");
+        class_NSDatePicker = objc_getClass("NSDatePicker");
+        class_NSDictionary = objc_getClass("NSDictionary");
+        class_NSDirectoryEnumerator = objc_getClass("NSDirectoryEnumerator");
+        class_NSEnumerator = objc_getClass("NSEnumerator");
+        class_NSError = objc_getClass("NSError");
+        class_NSEvent = objc_getClass("NSEvent");
+        class_NSFileManager = objc_getClass("NSFileManager");
+        class_NSFont = objc_getClass("NSFont");
+        class_NSFontManager = objc_getClass("NSFontManager");
+        class_NSFontPanel = objc_getClass("NSFontPanel");
+        class_NSFormatter = objc_getClass("NSFormatter");
+        class_NSGradient = objc_getClass("NSGradient");
+        class_NSGraphicsContext = objc_getClass("NSGraphicsContext");
+        class_NSHTTPCookie = objc_getClass("NSHTTPCookie");
+        class_NSHTTPCookieStorage = objc_getClass("NSHTTPCookieStorage");
+        class_NSImage = objc_getClass("NSImage");
+        class_NSImageRep = objc_getClass("NSImageRep");
+        class_NSImageView = objc_getClass("NSImageView");
+        class_NSIndexSet = objc_getClass("NSIndexSet");
+        class_NSInputManager = objc_getClass("NSInputManager");
+        class_NSKeyedArchiver = objc_getClass("NSKeyedArchiver");
+        class_NSKeyedUnarchiver = objc_getClass("NSKeyedUnarchiver");
+        class_NSLayoutManager = objc_getClass("NSLayoutManager");
+        class_NSMenu = objc_getClass("NSMenu");
+        class_NSMenuItem = objc_getClass("NSMenuItem");
+        class_NSMutableArray = objc_getClass("NSMutableArray");
+        class_NSMutableAttributedString = objc_getClass("NSMutableAttributedString");
+        class_NSMutableDictionary = objc_getClass("NSMutableDictionary");
+        class_NSMutableIndexSet = objc_getClass("NSMutableIndexSet");
+        class_NSMutableParagraphStyle = objc_getClass("NSMutableParagraphStyle");
+        class_NSMutableSet = objc_getClass("NSMutableSet");
+        class_NSMutableString = objc_getClass("NSMutableString");
+        class_NSMutableURLRequest = objc_getClass("NSMutableURLRequest");
+        class_NSNotification = objc_getClass("NSNotification");
+        class_NSNotificationCenter = objc_getClass("NSNotificationCenter");
+        class_NSNumber = objc_getClass("NSNumber");
+        class_NSNumberFormatter = objc_getClass("NSNumberFormatter");
+        class_NSObject = objc_getClass("NSObject");
+        class_NSOpenGLContext = objc_getClass("NSOpenGLContext");
+        class_NSOpenGLPixelFormat = objc_getClass("NSOpenGLPixelFormat");
+        class_NSOpenGLView = objc_getClass("NSOpenGLView");
+        class_NSOpenPanel = objc_getClass("NSOpenPanel");
+        class_NSOutlineView = objc_getClass("NSOutlineView");
+        class_NSPanel = objc_getClass("NSPanel");
+        class_NSParagraphStyle = objc_getClass("NSParagraphStyle");
+        class_NSPasteboard = objc_getClass("NSPasteboard");
+        class_NSPopUpButton = objc_getClass("NSPopUpButton");
+        class_NSPrintInfo = objc_getClass("NSPrintInfo");
+        class_NSPrintOperation = objc_getClass("NSPrintOperation");
+        class_NSPrintPanel = objc_getClass("NSPrintPanel");
+        class_NSPrinter = objc_getClass("NSPrinter");
+        class_NSProgressIndicator = objc_getClass("NSProgressIndicator");
+        class_NSResponder = objc_getClass("NSResponder");
+        class_NSRunLoop = objc_getClass("NSRunLoop");
+        class_NSSavePanel = objc_getClass("NSSavePanel");
+        class_NSScreen = objc_getClass("NSScreen");
+        class_NSScrollView = objc_getClass("NSScrollView");
+        class_NSScroller = objc_getClass("NSScroller");
+        class_NSSearchField = objc_getClass("NSSearchField");
+        class_NSSecureTextField = objc_getClass("NSSecureTextField");
+        class_NSSet = objc_getClass("NSSet");
+        class_NSSlider = objc_getClass("NSSlider");
+        class_NSStatusBar = objc_getClass("NSStatusBar");
+        class_NSStatusItem = objc_getClass("NSStatusItem");
+        class_NSStepper = objc_getClass("NSStepper");
+        class_NSString = objc_getClass("NSString");
+        class_NSTabView = objc_getClass("NSTabView");
+        class_NSTabViewItem = objc_getClass("NSTabViewItem");
+        class_NSTableColumn = objc_getClass("NSTableColumn");
+        class_NSTableHeaderCell = objc_getClass("NSTableHeaderCell");
+        class_NSTableHeaderView = objc_getClass("NSTableHeaderView");
+        class_NSTableView = objc_getClass("NSTableView");
+        class_NSText = objc_getClass("NSText");
+        class_NSTextContainer = objc_getClass("NSTextContainer");
+        class_NSTextField = objc_getClass("NSTextField");
+        class_NSTextFieldCell = objc_getClass("NSTextFieldCell");
+        class_NSTextStorage = objc_getClass("NSTextStorage");
+        class_NSTextTab = objc_getClass("NSTextTab");
+        class_NSTextView = objc_getClass("NSTextView");
+        class_NSThread = objc_getClass("NSThread");
+        class_NSTimeZone = objc_getClass("NSTimeZone");
+        class_NSTimer = objc_getClass("NSTimer");
+        class_NSTypesetter = objc_getClass("NSTypesetter");
+        class_NSURL = objc_getClass("NSURL");
+        class_NSURLDownload = objc_getClass("NSURLDownload");
+        class_NSURLRequest = objc_getClass("NSURLRequest");
+        class_NSValue = objc_getClass("NSValue");
+        class_NSView = objc_getClass("NSView");
+        class_NSWindow = objc_getClass("NSWindow");
+        class_NSWorkspace = objc_getClass("NSWorkspace");
+        class_WebDataSource = objc_getClass("WebDataSource");
+        class_WebFrame = objc_getClass("WebFrame");
+        class_WebFrameView = objc_getClass("WebFrameView");
+        class_WebPreferences = objc_getClass("WebPreferences");
+        class_WebView = objc_getClass("WebView");
+        
+        protocol_NSAccessibility = objc_getProtocol("NSAccessibility");
+        protocol_NSAccessibilityAdditions = objc_getProtocol("NSAccessibilityAdditions");
+        protocol_NSApplicationDelegate = objc_getProtocol("NSApplicationDelegate");
+        protocol_NSApplicationNotifications = objc_getProtocol("NSApplicationNotifications");
+        protocol_NSColorPanelResponderMethod = objc_getProtocol("NSColorPanelResponderMethod");
+        protocol_NSComboBoxNotifications = objc_getProtocol("NSComboBoxNotifications");
+        protocol_NSDraggingDestination = objc_getProtocol("NSDraggingDestination");
+        protocol_NSDraggingSource = objc_getProtocol("NSDraggingSource");
+        protocol_NSFontManagerResponderMethod = objc_getProtocol("NSFontManagerResponderMethod");
+        protocol_NSMenuDelegate = objc_getProtocol("NSMenuDelegate");
+        protocol_NSOutlineViewDataSource = objc_getProtocol("NSOutlineViewDataSource");
+        protocol_NSOutlineViewDelegate = objc_getProtocol("NSOutlineViewDelegate");
+        protocol_NSOutlineViewNotifications = objc_getProtocol("NSOutlineViewNotifications");
+        protocol_NSPasteboardOwner = objc_getProtocol("NSPasteboardOwner");
+        protocol_NSTabViewDelegate = objc_getProtocol("NSTabViewDelegate");
+        protocol_NSTableDataSource = objc_getProtocol("NSTableDataSource");
+        protocol_NSTableViewDelegate = objc_getProtocol("NSTableViewDelegate");
+        protocol_NSTableViewNotifications = objc_getProtocol("NSTableViewNotifications");
+        protocol_NSTextDelegate = objc_getProtocol("NSTextDelegate");
+        protocol_NSTextInput = objc_getProtocol("NSTextInput");
+        protocol_NSTextViewDelegate = objc_getProtocol("NSTextViewDelegate");
+        protocol_NSURLDownloadDelegate = objc_getProtocol("NSURLDownloadDelegate");
+        protocol_NSWindowDelegate = objc_getProtocol("NSWindowDelegate");
+        protocol_NSWindowNotifications = objc_getProtocol("NSWindowNotifications");
+        protocol_WebDocumentRepresentation = objc_getProtocol("WebDocumentRepresentation");
+        protocol_WebFrameLoadDelegate = objc_getProtocol("WebFrameLoadDelegate");
+        protocol_WebOpenPanelResultListener = objc_getProtocol("WebOpenPanelResultListener");
+        protocol_WebPolicyDecisionListener = objc_getProtocol("WebPolicyDecisionListener");
+        protocol_WebPolicyDelegate = objc_getProtocol("WebPolicyDelegate");
+        protocol_WebResourceLoadDelegate = objc_getProtocol("WebResourceLoadDelegate");
+        protocol_WebUIDelegate = objc_getProtocol("WebUIDelegate");
         
-        OS.NSDefaultRunLoopMode = new NSString(OS.FuncNSDefaultRunLoopMode());
-        OS.NSBackgroundColorAttributeName = new NSString(OS.FuncNSBackgroundColorAttributeName());
-    }
-    
-    //TODO - don't hard code
-    public static const size_t PTR_SIZEOF = (void*).sizeof;
-    
-    public static const uint gestaltSystemVersion = ('s'<<24) + ('y'<<16) + ('s'<<8) + 'v';
-    public static const short noErr = 0;
-    alias dwt.internal.c.hiservices.Processes.kProcessTransformToForegroundApplication kProcessTransformToForegroundApplication;
-    public static const int kAlertCautionIcon = ('c'<<24) + ('a'<<16) + ('u'<<8) + 't';
-    public static const int kAlertNoteIcon = ('n'<<24) + ('o'<<16) + ('t'<<8) + 'e';
-    public static const int kAlertStopIcon = ('s'<<24) + ('t'<<16) + ('o'<<8) + 'p';
-
-    public static const String sel_sendSelection;
-    public static const String sel_sendDoubleSelection;
-    public static const String sel_sendArrowSelection;
-    public static const String sel_sendVerticalSelection;
-    public static const String sel_sendHorizontalSelection;
-    public static const String sel_drawAtPoint_;
-    public static const String sel_timerProc_1;
-    
-    private static Object[] globalRefs;
-    
-    static Object JNIGetObject (NSInteger globalRef)
-    {
-        return cast(Object)globalRef;
-    }
-    
-    static NSInteger NewGlobalRef (Object object)
-    {
-        return cast(NSInteger) object;
-    }
-    
-    static void DeleteGlobalRef (NSInteger globalRef)
-    {
-        //globalRefs = globalRefs[0 .. remove!(Object)(globalRefs, globalRef - 1)];
-    }
-    
-    static size_t remove (T) (T[] arr, size_t index)
-    {
-        void exch (size_t p1, size_t p2)
-        {
-            T t = arr[p1];
-            arr[p1] = arr[p2];
-            arr[p2] = t;
-        }
-        
-        size_t cnt = 0;
-        
-        for (size_t pos = 0, len = arr.length; pos < len; ++pos)
-        {
-            if (pos == index)
-                ++cnt;
-            
-            else
-                exch(pos, pos - cnt);
-        }
-        
-        return arr.length - cnt;
+        sel_DOMDocument = sel_registerName("DOMDocument");
+        sel_IBeamCursor = sel_registerName("IBeamCursor");
+        sel_TIFFRepresentation = sel_registerName("TIFFRepresentation");
+        sel_URL = sel_registerName("URL");
+        sel_URLFromPasteboard_ = sel_registerName("URLFromPasteboard:");
+        sel_URLWithString_ = sel_registerName("URLWithString:");
+        sel_UTF8String = sel_registerName("UTF8String");
+        sel_absoluteString = sel_registerName("absoluteString");
+        sel_acceptsFirstResponder = sel_registerName("acceptsFirstResponder");
+        sel_accessibilityActionDescription_ = sel_registerName("accessibilityActionDescription:");
+        sel_accessibilityActionNames = sel_registerName("accessibilityActionNames");
+        sel_accessibilityAttributeNames = sel_registerName("accessibilityAttributeNames");
+        sel_accessibilityAttributeValue_ = sel_registerName("accessibilityAttributeValue:");
+        sel_accessibilityAttributeValue_forParameter_ = sel_registerName("accessibilityAttributeValue:forParameter:");
+        sel_accessibilityFocusedUIElement = sel_registerName("accessibilityFocusedUIElement");
+        sel_accessibilityHitTest_ = sel_registerName("accessibilityHitTest:");
+        sel_accessibilityIsAttributeSettable_ = sel_registerName("accessibilityIsAttributeSettable:");
+        sel_accessibilityIsIgnored = sel_registerName("accessibilityIsIgnored");
+        sel_accessibilityParameterizedAttributeNames = sel_registerName("accessibilityParameterizedAttributeNames");
+        sel_accessibilityPerformAction_ = sel_registerName("accessibilityPerformAction:");
+        sel_accessibilitySetOverrideValue_forAttribute_ = sel_registerName("accessibilitySetOverrideValue:forAttribute:");
+        sel_accessibilitySetValue_forAttribute_ = sel_registerName("accessibilitySetValue:forAttribute:");
+        sel_action = sel_registerName("action");
+        sel_activateIgnoringOtherApps_ = sel_registerName("activateIgnoringOtherApps:");
+        sel_addAttribute_value_range_ = sel_registerName("addAttribute:value:range:");
+        sel_addClip = sel_registerName("addClip");
+        sel_addEventListener_listener_useCapture_ = sel_registerName("addEventListener:listener:useCapture:");
+        sel_addIndex_ = sel_registerName("addIndex:");
+        sel_addItem_ = sel_registerName("addItem:");
+        sel_addItemWithObjectValue_ = sel_registerName("addItemWithObjectValue:");
+        sel_addLayoutManager_ = sel_registerName("addLayoutManager:");
+        sel_addObject_ = sel_registerName("addObject:");
+        sel_addObjectsFromArray_ = sel_registerName("addObjectsFromArray:");
+        sel_addObserver_selector_name_object_ = sel_registerName("addObserver:selector:name:object:");
+        sel_addRepresentation_ = sel_registerName("addRepresentation:");
+        sel_addSubview_ = sel_registerName("addSubview:");
+        sel_addSubview_positioned_relativeTo_ = sel_registerName("addSubview:positioned:relativeTo:");
+        sel_addTabStop_ = sel_registerName("addTabStop:");
+        sel_addTabViewItem_ = sel_registerName("addTabViewItem:");
+        sel_addTableColumn_ = sel_registerName("addTableColumn:");
+        sel_addTemporaryAttribute_value_forCharacterRange_ = sel_registerName("addTemporaryAttribute:value:forCharacterRange:");
+        sel_addTextContainer_ = sel_registerName("addTextContainer:");
+        sel_addTypes_owner_ = sel_registerName("addTypes:owner:");
+        sel_alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_ = sel_registerName("alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:");
+        sel_alignment = sel_registerName("alignment");
+        sel_allKeys = sel_registerName("allKeys");
+        sel_alloc = sel_registerName("alloc");
+        sel_allowsFloats = sel_registerName("allowsFloats");
+        sel_alphaComponent = sel_registerName("alphaComponent");
+        sel_alphaValue = sel_registerName("alphaValue");
+        sel_altKey = sel_registerName("altKey");
+        sel_alternateSelectedControlTextColor = sel_registerName("alternateSelectedControlTextColor");
+        sel_alwaysShowsDecimalSeparator = sel_registerName("alwaysShowsDecimalSeparator");
+        sel_appendBezierPath_ = sel_registerName("appendBezierPath:");
+        sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_ = sel_registerName("appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:");
+        sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_ = sel_registerName("appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:");
+        sel_appendBezierPathWithGlyphs_count_inFont_ = sel_registerName("appendBezierPathWithGlyphs:count:inFont:");
+        sel_appendBezierPathWithOvalInRect_ = sel_registerName("appendBezierPathWithOvalInRect:");
+        sel_appendBezierPathWithRect_ = sel_registerName("appendBezierPathWithRect:");
+        sel_appendBezierPathWithRoundedRect_xRadius_yRadius_ = sel_registerName("appendBezierPathWithRoundedRect:xRadius:yRadius:");
+        sel_appendString_ = sel_registerName("appendString:");
+        sel_applicationShouldTerminate_ = sel_registerName("applicationShouldTerminate:");
+        sel_applicationWillFinishLaunching_ = sel_registerName("applicationWillFinishLaunching:");
+        sel_applicationWillResignActive_ = sel_registerName("applicationWillResignActive:");
+        sel_applicationWillTerminate_ = sel_registerName("applicationWillTerminate:");
+        sel_archivedDataWithRootObject_ = sel_registerName("archivedDataWithRootObject:");
+        sel_array = sel_registerName("array");
+        sel_arrayWithCapacity_ = sel_registerName("arrayWithCapacity:");
+        sel_arrayWithObject_ = sel_registerName("arrayWithObject:");
+        sel_arrowCursor = sel_registerName("arrowCursor");
+        sel_ascender = sel_registerName("ascender");
+        sel_attributedSubstringFromRange_ = sel_registerName("attributedSubstringFromRange:");
+        sel_attributesAtIndex_longestEffectiveRange_inRange_ = sel_registerName("attributesAtIndex:longestEffectiveRange:inRange:");
+        sel_autorelease = sel_registerName("autorelease");
+        sel_availableFontFamilies = sel_registerName("availableFontFamilies");
+        sel_availableFonts = sel_registerName("availableFonts");
+        sel_availableMembersOfFontFamily_ = sel_registerName("availableMembersOfFontFamily:");
+        sel_availableTypeFromArray_ = sel_registerName("availableTypeFromArray:");
+        sel_baselineOffsetInLayoutManager_glyphIndex_ = sel_registerName("baselineOffsetInLayoutManager:glyphIndex:");
+        sel_becomeFirstResponder = sel_registerName("becomeFirstResponder");
+        sel_beginDocument = sel_registerName("beginDocument");
+        sel_beginEditing = sel_registerName("beginEditing");
+        sel_beginPageInRect_atPlacement_ = sel_registerName("beginPageInRect:atPlacement:");
+        sel_bestRepresentationForDevice_ = sel_registerName("bestRepresentationForDevice:");
+        sel_bezierPath = sel_registerName("bezierPath");
+        sel_bezierPathByFlatteningPath = sel_registerName("bezierPathByFlatteningPath");
+        sel_bezierPathWithRect_ = sel_registerName("bezierPathWithRect:");
+        sel_bitmapData = sel_registerName("bitmapData");
+        sel_bitsPerPixel = sel_registerName("bitsPerPixel");
+        sel_bitsPerSample = sel_registerName("bitsPerSample");
+        sel_blackColor = sel_registerName("blackColor");
+        sel_blueComponent = sel_registerName("blueComponent");
+        sel_borderWidth = sel_registerName("borderWidth");
+        sel_boundingRectForGlyphRange_inTextContainer_ = sel_registerName("boundingRectForGlyphRange:inTextContainer:");
+        sel_bounds = sel_registerName("bounds");
+        sel_bundleIdentifier = sel_registerName("bundleIdentifier");
+        sel_bundlePath = sel_registerName("bundlePath");
+        sel_bundleWithPath_ = sel_registerName("bundleWithPath:");
+        sel_button = sel_registerName("button");
+        sel_buttonNumber = sel_registerName("buttonNumber");
+        sel_bytes = sel_registerName("bytes");
+        sel_bytesPerPlane = sel_registerName("bytesPerPlane");
+        sel_bytesPerRow = sel_registerName("bytesPerRow");
+        sel_calendarDate = sel_registerName("calendarDate");
+        sel_canBecomeKeyWindow = sel_registerName("canBecomeKeyWindow");
+        sel_canGoBack = sel_registerName("canGoBack");
+        sel_canGoForward = sel_registerName("canGoForward");
+        sel_canShowMIMEType_ = sel_registerName("canShowMIMEType:");
+        sel_cancel = sel_registerName("cancel");
+        sel_cancelTracking = sel_registerName("cancelTracking");
+        sel_cascadeTopLeftFromPoint_ = sel_registerName("cascadeTopLeftFromPoint:");
+        sel_cell = sel_registerName("cell");
+        sel_cellClass = sel_registerName("cellClass");
+        sel_cellSizeForBounds_ = sel_registerName("cellSizeForBounds:");
+        sel_changeColor_ = sel_registerName("changeColor:");
+        sel_changeFont_ = sel_registerName("changeFont:");
+        sel_charCode = sel_registerName("charCode");
+        sel_characterAtIndex_ = sel_registerName("characterAtIndex:");
+        sel_characterIndexForGlyphAtIndex_ = sel_registerName("characterIndexForGlyphAtIndex:");
+        sel_characterIndexForPoint_ = sel_registerName("characterIndexForPoint:");
+        sel_characterIsMember_ = sel_registerName("characterIsMember:");
+        sel_characters = sel_registerName("characters");
+        sel_charactersIgnoringModifiers = sel_registerName("charactersIgnoringModifiers");
+        sel_chooseFilename_ = sel_registerName("chooseFilename:");
+        sel_className = sel_registerName("className");
+        sel_cleanUpOperation = sel_registerName("cleanUpOperation");
+        sel_clearColor = sel_registerName("clearColor");
+        sel_clearCurrentContext = sel_registerName("clearCurrentContext");
+        sel_clearGLContext = sel_registerName("clearGLContext");
+        sel_clickCount = sel_registerName("clickCount");
+        sel_clientX = sel_registerName("clientX");
+        sel_clientY = sel_registerName("clientY");
+        sel_close = sel_registerName("close");
+        sel_closePath = sel_registerName("closePath");
+        sel_code = sel_registerName("code");
+        sel_collapseItem_ = sel_registerName("collapseItem:");
+        sel_color = sel_registerName("color");
+        sel_colorUsingColorSpace_ = sel_registerName("colorUsingColorSpace:");
+        sel_colorUsingColorSpaceName_ = sel_registerName("colorUsingColorSpaceName:");
+        sel_colorWithDeviceRed_green_blue_alpha_ = sel_registerName("colorWithDeviceRed:green:blue:alpha:");
+        sel_colorWithPatternImage_ = sel_registerName("colorWithPatternImage:");
+        sel_columnAtPoint_ = sel_registerName("columnAtPoint:");
+        sel_columnAutoresizingStyle = sel_registerName("columnAutoresizingStyle");
+        sel_columnIndexesInRect_ = sel_registerName("columnIndexesInRect:");
+        sel_columnWithIdentifier_ = sel_registerName("columnWithIdentifier:");
+        sel_comboBoxSelectionDidChange_ = sel_registerName("comboBoxSelectionDidChange:");
+        sel_concat = sel_registerName("concat");
+        sel_conformsToProtocol_ = sel_registerName("conformsToProtocol:");
+        sel_containerSize = sel_registerName("containerSize");
+        sel_containsObject_ = sel_registerName("containsObject:");
+        sel_containsPoint_ = sel_registerName("containsPoint:");
+        sel_contentRect = sel_registerName("contentRect");
+        sel_contentRectForFrameRect_ = sel_registerName("contentRectForFrameRect:");
+        sel_contentSize = sel_registerName("contentSize");
+        sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_ = sel_registerName("contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:");
+        sel_contentView = sel_registerName("contentView");
+        sel_contentViewMargins = sel_registerName("contentViewMargins");
+        sel_context = sel_registerName("context");
+        sel_controlDarkShadowColor = sel_registerName("controlDarkShadowColor");
+        sel_controlHighlightColor = sel_registerName("controlHighlightColor");
+        sel_controlLightHighlightColor = sel_registerName("controlLightHighlightColor");
+        sel_controlPointBounds = sel_registerName("controlPointBounds");
+        sel_controlShadowColor = sel_registerName("controlShadowColor");
+        sel_controlTextColor = sel_registerName("controlTextColor");
+        sel_convertBaseToScreen_ = sel_registerName("convertBaseToScreen:");
+        sel_convertPoint_fromView_ = sel_registerName("convertPoint:fromView:");
+        sel_convertPoint_toView_ = sel_registerName("convertPoint:toView:");
+        sel_convertPointFromBase_ = sel_registerName("convertPointFromBase:");
+        sel_convertPointToBase_ = sel_registerName("convertPointToBase:");
+        sel_convertRect_fromView_ = sel_registerName("convertRect:fromView:");
+        sel_convertRect_toView_ = sel_registerName("convertRect:toView:");
+        sel_convertRectFromBase_ = sel_registerName("convertRectFromBase:");
+        sel_convertRectToBase_ = sel_registerName("convertRectToBase:");
+        sel_convertScreenToBase_ = sel_registerName("convertScreenToBase:");
+        sel_convertSize_fromView_ = sel_registerName("convertSize:fromView:");
+        sel_convertSize_toView_ = sel_registerName("convertSize:toView:");
+        sel_convertSizeFromBase_ = sel_registerName("convertSizeFromBase:");
+        sel_convertSizeToBase_ = sel_registerName("convertSizeToBase:");
+        sel_cookies = sel_registerName("cookies");
+        sel_copy = sel_registerName("copy");
+        sel_copy_ = sel_registerName("copy:");
+        sel_count = sel_registerName("count");
+        sel_createContext = sel_registerName("createContext");
+        sel_createFileAtPath_contents_attributes_ = sel_registerName("createFileAtPath:contents:attributes:");
+        sel_crosshairCursor = sel_registerName("crosshairCursor");
+        sel_ctrlKey = sel_registerName("ctrlKey");
+        sel_currentContext = sel_registerName("currentContext");
+        sel_currentEditor = sel_registerName("currentEditor");
+        sel_currentEvent = sel_registerName("currentEvent");
+        sel_currentInputManager = sel_registerName("currentInputManager");
+        sel_currentPoint = sel_registerName("currentPoint");
+        sel_currentRunLoop = sel_registerName("currentRunLoop");
+        sel_currentThread = sel_registerName("currentThread");
+        sel_curveToPoint_controlPoint1_controlPoint2_ = sel_registerName("curveToPoint:controlPoint1:controlPoint2:");
+        sel_cut_ = sel_registerName("cut:");
+        sel_dataForType_ = sel_registerName("dataForType:");
+        sel_dataSource = sel_registerName("dataSource");
+        sel_dataWithBytes_length_ = sel_registerName("dataWithBytes:length:");
+        sel_dateValue = sel_registerName("dateValue");
+        sel_dateWithCalendarFormat_timeZone_ = sel_registerName("dateWithCalendarFormat:timeZone:");
+        sel_dateWithTimeIntervalSinceNow_ = sel_registerName("dateWithTimeIntervalSinceNow:");
+        sel_dateWithYear_month_day_hour_minute_second_timeZone_ = sel_registerName("dateWithYear:month:day:hour:minute:second:timeZone:");
+        sel_dayOfMonth = sel_registerName("dayOfMonth");
+        sel_decimalDigitCharacterSet = sel_registerName("decimalDigitCharacterSet");
+        sel_decimalSeparator = sel_registerName("decimalSeparator");
+        sel_declareTypes_owner_ = sel_registerName("declareTypes:owner:");
+        sel_defaultCenter = sel_registerName("defaultCenter");
+        sel_defaultFlatness = sel_registerName("defaultFlatness");
+        sel_defaultLineHeightForFont_ = sel_registerName("defaultLineHeightForFont:");
+        sel_defaultManager = sel_registerName("defaultManager");
+        sel_defaultPrinter = sel_registerName("defaultPrinter");
+        sel_defaultTimeZone = sel_registerName("defaultTimeZone");
+        sel_deleteCookie_ = sel_registerName("deleteCookie:");
+        sel_deliverResult = sel_registerName("deliverResult");
+        sel_deltaX = sel_registerName("deltaX");
+        sel_deltaY = sel_registerName("deltaY");
+        sel_depth = sel_registerName("depth");
+        sel_descender = sel_registerName("descender");
+        sel_description = sel_registerName("description");
+        sel_deselectAll_ = sel_registerName("deselectAll:");
+        sel_deselectItemAtIndex_ = sel_registerName("deselectItemAtIndex:");
+        sel_deselectRow_ = sel_registerName("deselectRow:");
+        sel_destroyContext = sel_registerName("destroyContext");
+        sel_detail = sel_registerName("detail");
+        sel_deviceDescription = sel_registerName("deviceDescription");
+        sel_deviceRGBColorSpace = sel_registerName("deviceRGBColorSpace");
+        sel_dictionary = sel_registerName("dictionary");
+        sel_dictionaryWithCapacity_ = sel_registerName("dictionaryWithCapacity:");
+        sel_dictionaryWithObject_forKey_ = sel_registerName("dictionaryWithObject:forKey:");
+        sel_disableCursorRects = sel_registerName("disableCursorRects");
+        sel_disabledControlTextColor = sel_registerName("disabledControlTextColor");
+        sel_displayIfNeeded = sel_registerName("displayIfNeeded");
+        sel_distantFuture = sel_registerName("distantFuture");
+        sel_doCommandBySelector_ = sel_registerName("doCommandBySelector:");
+        sel_documentSource = sel_registerName("documentSource");
+        sel_documentView = sel_registerName("documentView");
+        sel_documentViewShouldHandlePrint = sel_registerName("documentViewShouldHandlePrint");
+        sel_documentVisibleRect = sel_registerName("documentVisibleRect");
+        sel_doubleClickAtIndex_ = sel_registerName("doubleClickAtIndex:");
+        sel_doubleValue = sel_registerName("doubleValue");
+        sel_download = sel_registerName("download");
+        sel_download_decideDestinationWithSuggestedFilename_ = sel_registerName("download:decideDestinationWithSuggestedFilename:");
+        sel_dragImage_at_offset_event_pasteboard_source_slideBack_ = sel_registerName("dragImage:at:offset:event:pasteboard:source:slideBack:");
+        sel_draggedImage = sel_registerName("draggedImage");
+        sel_draggedImage_beganAt_ = sel_registerName("draggedImage:beganAt:");
+        sel_draggedImage_endedAt_operation_ = sel_registerName("draggedImage:endedAt:operation:");
+        sel_draggedImageLocation = sel_registerName("draggedImageLocation");
+        sel_draggingDestinationWindow = sel_registerName("draggingDestinationWindow");
+        sel_draggingEnded_ = sel_registerName("draggingEnded:");
+        sel_draggingEntered_ = sel_registerName("draggingEntered:");
+        sel_draggingExited_ = sel_registerName("draggingExited:");
+        sel_draggingLocation = sel_registerName("draggingLocation");
+        sel_draggingPasteboard = sel_registerName("draggingPasteboard");
+        sel_draggingSequenceNumber = sel_registerName("draggingSequenceNumber");
+        sel_draggingSource = sel_registerName("draggingSource");
+        sel_draggingSourceOperationMask = sel_registerName("draggingSourceOperationMask");
+        sel_draggingSourceOperationMaskForLocal_ = sel_registerName("draggingSourceOperationMaskForLocal:");
+        sel_draggingUpdated_ = sel_registerName("draggingUpdated:");
+        sel_drawAtPoint_ = sel_registerName("drawAtPoint:");
+        sel_drawAtPoint_fromRect_operation_fraction_ = sel_registerName("drawAtPoint:fromRect:operation:fraction:");
+        sel_drawBackgroundForGlyphRange_atPoint_ = sel_registerName("drawBackgroundForGlyphRange:atPoint:");
+        sel_drawFromPoint_toPoint_options_ = sel_registerName("drawFromPoint:toPoint:options:");
+        sel_drawGlyphsForGlyphRange_atPoint_ = sel_registerName("drawGlyphsForGlyphRange:atPoint:");
+        sel_drawInRect_ = sel_registerName("drawInRect:");
+        sel_drawInRect_angle_ = sel_registerName("drawInRect:angle:");
+        sel_drawInRect_fromRect_operation_fraction_ = sel_registerName("drawInRect:fromRect:operation:fraction:");
+        sel_drawInteriorWithFrame_inView_ = sel_registerName("drawInteriorWithFrame:inView:");
+        sel_drawRect_ = sel_registerName("drawRect:");
+        sel_drawSortIndicatorWithFrame_inView_ascending_priority_ = sel_registerName("drawSortIndicatorWithFrame:inView:ascending:priority:");
+        sel_drawStatusBarBackgroundInRect_withHighlight_ = sel_registerName("drawStatusBarBackgroundInRect:withHighlight:");
+        sel_drawingRectForBounds_ = sel_registerName("drawingRectForBounds:");
+        sel_elementAtIndex_associatedPoints_ = sel_registerName("elementAtIndex:associatedPoints:");
+        sel_elementCount = sel_registerName("elementCount");
+        sel_enableFreedObjectCheck_ = sel_registerName("enableFreedObjectCheck:");
+        sel_endDocument = sel_registerName("endDocument");
+        sel_endEditing = sel_registerName("endEditing");
+        sel_endPage = sel_registerName("endPage");
+        sel_enumeratorAtPath_ = sel_registerName("enumeratorAtPath:");
+        sel_expandItem_ = sel_registerName("expandItem:");
+        sel_familyName = sel_registerName("familyName");
+        sel_fieldEditor_forObject_ = sel_registerName("fieldEditor:forObject:");
+        sel_fileURLWithPath_ = sel_registerName("fileURLWithPath:");
+        sel_filename = sel_registerName("filename");
+        sel_filenames = sel_registerName("filenames");
+        sel_fill = sel_registerName("fill");
+        sel_fillRect_ = sel_registerName("fillRect:");
+        sel_finishLaunching = sel_registerName("finishLaunching");
+        sel_firstIndex = sel_registerName("firstIndex");
+        sel_firstRectForCharacterRange_ = sel_registerName("firstRectForCharacterRange:");
+        sel_firstResponder = sel_registerName("firstResponder");
+        sel_flagsChanged_ = sel_registerName("flagsChanged:");
+        sel_flushBuffer = sel_registerName("flushBuffer");
+        sel_flushGraphics = sel_registerName("flushGraphics");
+        sel_font = sel_registerName("font");
+        sel_fontName = sel_registerName("fontName");
+        sel_fontWithName_size_ = sel_registerName("fontWithName:size:");
+        sel_frame = sel_registerName("frame");
+        sel_frameOfCellAtColumn_row_ = sel_registerName("frameOfCellAtColumn:row:");
+        sel_frameRectForContentRect_ = sel_registerName("frameRectForContentRect:");
+        sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_ = sel_registerName("frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:");
+        sel_fullPathForApplication_ = sel_registerName("fullPathForApplication:");
+        sel_generalPasteboard = sel_registerName("generalPasteboard");
+        sel_getBytes_ = sel_registerName("getBytes:");
+        sel_getBytes_length_ = sel_registerName("getBytes:length:");
+        sel_getCharacters_ = sel_registerName("getCharacters:");
+        sel_getCharacters_range_ = sel_registerName("getCharacters:range:");
+        sel_getComponents_ = sel_registerName("getComponents:");
+        sel_getGlyphs_range_ = sel_registerName("getGlyphs:range:");
+        sel_getIndexes_maxCount_inIndexRange_ = sel_registerName("getIndexes:maxCount:inIndexRange:");
+        sel_getInfoForFile_application_type_ = sel_registerName("getInfoForFile:application:type:");
+        sel_glyphIndexForCharacterAtIndex_ = sel_registerName("glyphIndexForCharacterAtIndex:");
+        sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_ = sel_registerName("glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:");
+        sel_glyphRangeForTextContainer_ = sel_registerName("glyphRangeForTextContainer:");
+        sel_goBack = sel_registerName("goBack");
+        sel_goForward = sel_registerName("goForward");
+        sel_graphicsContext = sel_registerName("graphicsContext");
+        sel_graphicsContextWithBitmapImageRep_ = sel_registerName("graphicsContextWithBitmapImageRep:");
+        sel_graphicsContextWithWindow_ = sel_registerName("graphicsContextWithWindow:");
+        sel_greenComponent = sel_registerName("greenComponent");
+        sel_handleEvent_ = sel_registerName("handleEvent:");
+        sel_handleMouseEvent_ = sel_registerName("handleMouseEvent:");
+        sel_hasAlpha = sel_registerName("hasAlpha");
+        sel_hasMarkedText = sel_registerName("hasMarkedText");
+        sel_headerCell = sel_registerName("headerCell");
+        sel_headerRectOfColumn_ = sel_registerName("headerRectOfColumn:");
+        sel_headerView = sel_registerName("headerView");
+        sel_helpRequested_ = sel_registerName("helpRequested:");
+        sel_hide_ = sel_registerName("hide:");
+        sel_hideOtherApplications_ = sel_registerName("hideOtherApplications:");
+        sel_highlightColorInView_ = sel_registerName("highlightColorInView:");
+        sel_highlightSelectionInClipRect_ = sel_registerName("highlightSelectionInClipRect:");
+        sel_hitPart = sel_registerName("hitPart");
+        sel_hitTest_ = sel_registerName("hitTest:");
+        sel_hourOfDay = sel_registerName("hourOfDay");
+        sel_iconForFile_ = sel_registerName("iconForFile:");
+        sel_iconForFileType_ = sel_registerName("iconForFileType:");
+        sel_ignore = sel_registerName("ignore");
+        sel_ignoreModifierKeysWhileDragging = sel_registerName("ignoreModifierKeysWhileDragging");
+        sel_imageInterpolation = sel_registerName("imageInterpolation");
+        sel_imageablePageBounds = sel_registerName("imageablePageBounds");
+        sel_increment = sel_registerName("increment");
+        sel_indentationPerLevel = sel_registerName("indentationPerLevel");
+        sel_indexOfSelectedItem = sel_registerName("indexOfSelectedItem");
+        sel_infoDictionary = sel_registerName("infoDictionary");
+        sel_init = sel_registerName("init");
+        sel_initByReferencingFile_ = sel_registerName("initByReferencingFile:");
+        sel_initListDescriptor = sel_registerName("initListDescriptor");
+        sel_initWithAttributes_ = sel_registerName("initWithAttributes:");
+        sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_ = sel_registerName("initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:");
+        sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_ = sel_registerName("initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:");
+        sel_initWithContainerSize_ = sel_registerName("initWithContainerSize:");
+        sel_initWithContentRect_styleMask_backing_defer_ = sel_registerName("initWithContentRect:styleMask:backing:defer:");
+        sel_initWithContentRect_styleMask_backing_defer_screen_ = sel_registerName("initWithContentRect:styleMask:backing:defer:screen:");
+        sel_initWithData_ = sel_registerName("initWithData:");
+        sel_initWithDictionary_ = sel_registerName("initWithDictionary:");
+        sel_initWithFrame_ = sel_registerName("initWithFrame:");
+        sel_initWithFrame_frameName_groupName_ = sel_registerName("initWithFrame:frameName:groupName:");
+        sel_initWithFrame_pixelFormat_ = sel_registerName("initWithFrame:pixelFormat:");
+        sel_initWithFrame_pullsDown_ = sel_registerName("initWithFrame:pullsDown:");
+        sel_initWithIdentifier_ = sel_registerName("initWithIdentifier:");
+        sel_initWithImage_hotSpot_ = sel_registerName("initWithImage:hotSpot:");
+        sel_initWithIndex_ = sel_registerName("initWithIndex:");
+        sel_initWithIndexesInRange_ = sel_registerName("initWithIndexesInRange:");
+        sel_initWithSize_ = sel_registerName("initWithSize:");
+        sel_initWithStartingColor_endingColor_ = sel_registerName("initWithStartingColor:endingColor:");
+        sel_initWithString_ = sel_registerName("initWithString:");
+        sel_initWithString_attributes_ = sel_registerName("initWithString:attributes:");
+        sel_initWithTitle_ = sel_registerName("initWithTitle:");
+        sel_initWithTitle_action_keyEquivalent_ = sel_registerName("initWithTitle:action:keyEquivalent:");
+        sel_initWithTransform_ = sel_registerName("initWithTransform:");
+        sel_initWithType_location_ = sel_registerName("initWithType:location:");
+        sel_initWithURL_ = sel_registerName("initWithURL:");
+        sel_insertItem_atIndex_ = sel_registerName("insertItem:atIndex:");
+        sel_insertItemWithObjectValue_atIndex_ = sel_registerName("insertItemWithObjectValue:atIndex:");
+        sel_insertTabViewItem_atIndex_ = sel_registerName("insertTabViewItem:atIndex:");
+        sel_insertText_ = sel_registerName("insertText:");
+        sel_intValue = sel_registerName("intValue");
+        sel_intercellSpacing = sel_registerName("intercellSpacing");
+        sel_interpretKeyEvents_ = sel_registerName("interpretKeyEvents:");
+        sel_invalidate = sel_registerName("invalidate");
+        sel_invert = sel_registerName("invert");
+        sel_isEmpty = sel_registerName("isEmpty");
+        sel_isEqual_ = sel_registerName("isEqual:");
+        sel_isEqualTo_ = sel_registerName("isEqualTo:");
+        sel_isEqualToString_ = sel_registerName("isEqualToString:");
+        sel_isFilePackageAtPath_ = sel_registerName("isFilePackageAtPath:");
+        sel_isFlipped = sel_registerName("isFlipped");
+        sel_isHidden = sel_registerName("isHidden");
+        sel_isKeyWindow = sel_registerName("isKeyWindow");
+        sel_isKindOfClass_ = sel_registerName("isKindOfClass:");
+        sel_isMainThread = sel_registerName("isMainThread");
+        sel_isOpaque = sel_registerName("isOpaque");
+        sel_isPlanar = sel_registerName("isPlanar");
+        sel_isRowSelected_ = sel_registerName("isRowSelected:");
+        sel_isRunning = sel_registerName("isRunning");
+        sel_isSessionOnly = sel_registerName("isSessionOnly");
+        sel_isVisible = sel_registerName("isVisible");
+        sel_itemArray = sel_registerName("itemArray");
+        sel_itemAtIndex_ = sel_registerName("itemAtIndex:");
+        sel_itemAtRow_ = sel_registerName("itemAtRow:");
+        sel_itemObjectValueAtIndex_ = sel_registerName("itemObjectValueAtIndex:");
+        sel_itemTitleAtIndex_ = sel_registerName("itemTitleAtIndex:");
+        sel_jobDisposition = sel_registerName("jobDisposition");
+        sel_keyCode = sel_registerName("keyCode");
+        sel_keyDown_ = sel_registerName("keyDown:");
+        sel_keyEquivalent = sel_registerName("keyEquivalent");
+        sel_keyEquivalentModifierMask = sel_registerName("keyEquivalentModifierMask");
+        sel_keyUp_ = sel_registerName("keyUp:");
+        sel_keyWindow = sel_registerName("keyWindow");
+        sel_lastPathComponent = sel_registerName("lastPathComponent");
+        sel_leading = sel_registerName("leading");
+        sel_length = sel_registerName("length");
+        sel_levelForItem_ = sel_registerName("levelForItem:");
+        sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_ = sel_registerName("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:");
+        sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_ = sel_registerName("lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:");
+        sel_lineToPoint_ = sel_registerName("lineToPoint:");
+        sel_loadHTMLString_baseURL_ = sel_registerName("loadHTMLString:baseURL:");
+        sel_loadNibFile_externalNameTable_withZone_ = sel_registerName("loadNibFile:externalNameTable:withZone:");
+        sel_loadRequest_ = sel_registerName("loadRequest:");
+        sel_localizedDescription = sel_registerName("localizedDescription");
+        sel_location = sel_registerName("location");
+        sel_locationForGlyphAtIndex_ = sel_registerName("locationForGlyphAtIndex:");
+        sel_locationInWindow = sel_registerName("locationInWindow");
+        sel_lowercaseString = sel_registerName("lowercaseString");
+        sel_mainFrame = sel_registerName("mainFrame");
+        sel_mainMenu = sel_registerName("mainMenu");
+        sel_mainRunLoop = sel_registerName("mainRunLoop");
+        sel_mainScreen = sel_registerName("mainScreen");
+        sel_makeCurrentContext = sel_registerName("makeCurrentContext");
+        sel_makeFirstResponder_ = sel_registerName("makeFirstResponder:");
+        sel_makeKeyAndOrderFront_ = sel_registerName("makeKeyAndOrderFront:");
+        sel_markedRange = sel_registerName("markedRange");
+        sel_markedTextAttributes = sel_registerName("markedTextAttributes");
+        sel_maxValue = sel_registerName("maxValue");
+        sel_maximum = sel_registerName("maximum");
+        sel_maximumFractionDigits = sel_registerName("maximumFractionDigits");
+        sel_maximumIntegerDigits = sel_registerName("maximumIntegerDigits");
+        sel_menu = sel_registerName("menu");
+        sel_menu_willHighlightItem_ = sel_registerName("menu:willHighlightItem:");
+        sel_menuDidClose_ = sel_registerName("menuDidClose:");
+        sel_menuForEvent_ = sel_registerName("menuForEvent:");
+        sel_menuNeedsUpdate_ = sel_registerName("menuNeedsUpdate:");
+        sel_menuWillOpen_ = sel_registerName("menuWillOpen:");
+        sel_metaKey = sel_registerName("metaKey");
+        sel_minValue = sel_registerName("minValue");
+        sel_minimum = sel_registerName("minimum");
+        sel_minimumSize = sel_registerName("minimumSize");
+        sel_minuteOfHour = sel_registerName("minuteOfHour");
+        sel_modifierFlags = sel_registerName("modifierFlags");
+        sel_monthOfYear = sel_registerName("monthOfYear");
+        sel_mouseDown_ = sel_registerName("mouseDown:");
+        sel_mouseDragged_ = sel_registerName("mouseDragged:");
+        sel_mouseEntered_ = sel_registerName("mouseEntered:");
+        sel_mouseExited_ = sel_registerName("mouseExited:");
+        sel_mouseLocation = sel_registerName("mouseLocation");
+        sel_mouseLocationOutsideOfEventStream = sel_registerName("mouseLocationOutsideOfEventStream");
+        sel_mouseMoved_ = sel_registerName("mouseMoved:");
+        sel_mouseUp_ = sel_registerName("mouseUp:");
+        sel_moveColumn_toColumn_ = sel_registerName("moveColumn:toColumn:");
+        sel_moveToBeginningOfParagraph_ = sel_registerName("moveToBeginningOfParagraph:");
+        sel_moveToEndOfParagraph_ = sel_registerName("moveToEndOfParagraph:");
+        sel_moveToPoint_ = sel_registerName("moveToPoint:");
+        sel_moveUp_ = sel_registerName("moveUp:");
+        sel_mutableString = sel_registerName("mutableString");
+        sel_name = sel_registerName("name");
+        sel_namesOfPromisedFilesDroppedAtDestination_ = sel_registerName("namesOfPromisedFilesDroppedAtDestination:");
+        sel_nextEventMatchingMask_untilDate_inMode_dequeue_ = sel_registerName("nextEventMatchingMask:untilDate:inMode:dequeue:");
+        sel_nextObject = sel_registerName("nextObject");
+        sel_nextWordFromIndex_forward_ = sel_registerName("nextWordFromIndex:forward:");
+        sel_noteNumberOfRowsChanged = sel_registerName("noteNumberOfRowsChanged");
+        sel_numberOfColumns = sel_registerName("numberOfColumns");
+        sel_numberOfComponents = sel_registerName("numberOfComponents");
+        sel_numberOfGlyphs = sel_registerName("numberOfGlyphs");
+        sel_numberOfItems = sel_registerName("numberOfItems");
+        sel_numberOfRows = sel_registerName("numberOfRows");
+        sel_numberOfRowsInTableView_ = sel_registerName("numberOfRowsInTableView:");
+        sel_numberOfSelectedRows = sel_registerName("numberOfSelectedRows");
+        sel_numberOfVisibleItems = sel_registerName("numberOfVisibleItems");
+        sel_numberWithBool_ = sel_registerName("numberWithBool:");
+        sel_numberWithInt_ = sel_registerName("numberWithInt:");
+        sel_numberWithInteger_ = sel_registerName("numberWithInteger:");
+        sel_object = sel_registerName("object");
+        sel_objectAtIndex_ = sel_registerName("objectAtIndex:");
+        sel_objectEnumerator = sel_registerName("objectEnumerator");
+        sel_objectForInfoDictionaryKey_ = sel_registerName("objectForInfoDictionaryKey:");
+        sel_objectForKey_ = sel_registerName("objectForKey:");
+        sel_openFile_withApplication_ = sel_registerName("openFile:withApplication:");
+        sel_openGLContext = sel_registerName("openGLContext");
+        sel_openPanel = sel_registerName("openPanel");
+        sel_openURL_ = sel_registerName("openURL:");
+        sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_ = sel_registerName("openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:");
+        sel_options = sel_registerName("options");
+        sel_orderFront_ = sel_registerName("orderFront:");
+        sel_orderFrontRegardless = sel_registerName("orderFrontRegardless");
+        sel_orderFrontStandardAboutPanel_ = sel_registerName("orderFrontStandardAboutPanel:");
+        sel_orderOut_ = sel_registerName("orderOut:");
+        sel_orderedWindows = sel_registerName("orderedWindows");
+        sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_ = sel_registerName("otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:");
+        sel_otherMouseDown_ = sel_registerName("otherMouseDown:");
+        sel_otherMouseDragged_ = sel_registerName("otherMouseDragged:");
+        sel_otherMouseUp_ = sel_registerName("otherMouseUp:");
+        sel_outlineTableColumn = sel_registerName("outlineTableColumn");
+        sel_outlineView_child_ofItem_ = sel_registerName("outlineView:child:ofItem:");
+        sel_outlineView_didClickTableColumn_ = sel_registerName("outlineView:didClickTableColumn:");
+        sel_outlineView_isItemExpandable_ = sel_registerName("outlineView:isItemExpandable:");
+        sel_outlineView_numberOfChildrenOfItem_ = sel_registerName("outlineView:numberOfChildrenOfItem:");
+        sel_outlineView_objectValueForTableColumn_byItem_ = sel_registerName("outlineView:objectValueForTableColumn:byItem:");
+        sel_outlineView_setObjectValue_forTableColumn_byItem_ = sel_registerName("outlineView:setObjectValue:forTableColumn:byItem:");
+        sel_outlineView_shouldCollapseItem_ = sel_registerName("outlineView:shouldCollapseItem:");
+        sel_outlineView_shouldExpandItem_ = sel_registerName("outlineView:shouldExpandItem:");
+        sel_outlineView_willDisplayCell_forTableColumn_item_ = sel_registerName("outlineView:willDisplayCell:forTableColumn:item:");
+        sel_outlineViewColumnDidMove_ = sel_registerName("outlineViewColumnDidMove:");
+        sel_outlineViewColumnDidResize_ = sel_registerName("outlineViewColumnDidResize:");
+        sel_outlineViewItemDidExpand_ = sel_registerName("outlineViewItemDidExpand:");
+        sel_outlineViewSelectionDidChange_ = sel_registerName("outlineViewSelectionDidChange:");
+        sel_pageDown_ = sel_registerName("pageDown:");
+        sel_pageTitle = sel_registerName("pageTitle");
+        sel_pageUp_ = sel_registerName("pageUp:");
+        sel_panelConvertFont_ = sel_registerName("panelConvertFont:");
+        sel_paperSize = sel_registerName("paperSize");
+        sel_paragraphs = sel_registerName("paragraphs");
+        sel_paste_ = sel_registerName("paste:");
+        sel_pasteboard_provideDataForType_ = sel_registerName("pasteboard:provideDataForType:");
+        sel_pasteboardWithName_ = sel_registerName("pasteboardWithName:");
+        sel_performDragOperation_ = sel_registerName("performDragOperation:");
+        sel_performSelectorOnMainThread_withObject_waitUntilDone_ = sel_registerName("performSelectorOnMainThread:withObject:waitUntilDone:");
+        sel_pixelsHigh = sel_registerName("pixelsHigh");
+        sel_pixelsWide = sel_registerName("pixelsWide");
+        sel_pointSize = sel_registerName("pointSize");
+        sel_pointValue = sel_registerName("pointValue");
+        sel_pointingHandCursor = sel_registerName("pointingHandCursor");
+        sel_popUpContextMenu_withEvent_forView_ = sel_registerName("popUpContextMenu:withEvent:forView:");
+        sel_prependTransform_ = sel_registerName("prependTransform:");
+        sel_preventDefault = sel_registerName("preventDefault");
+        sel_printDocumentView = sel_registerName("printDocumentView");
+        sel_printOperationWithPrintInfo_ = sel_registerName("printOperationWithPrintInfo:");
+        sel_printOperationWithView_printInfo_ = sel_registerName("printOperationWithView:printInfo:");
+        sel_printPanel = sel_registerName("printPanel");
+        sel_printer = sel_registerName("printer");
+        sel_printerNames = sel_registerName("printerNames");
+        sel_printerWithName_ = sel_registerName("printerWithName:");
+        sel_propertyListForType_ = sel_registerName("propertyListForType:");
+        sel_rangeValue = sel_registerName("rangeValue");
+        sel_recentSearches = sel_registerName("recentSearches");
+        sel_rectOfColumn_ = sel_registerName("rectOfColumn:");
+        sel_rectOfRow_ = sel_registerName("rectOfRow:");
+        sel_redComponent = sel_registerName("redComponent");
+        sel_reflectScrolledClipView_ = sel_registerName("reflectScrolledClipView:");
+        sel_registerForDraggedTypes_ = sel_registerName("registerForDraggedTypes:");
+        sel_release = sel_registerName("release");
+        sel_reload_ = sel_registerName("reload:");
+        sel_reloadData = sel_registerName("reloadData");
+        sel_reloadItem_ = sel_registerName("reloadItem:");
+        sel_reloadItem_reloadChildren_ = sel_registerName("reloadItem:reloadChildren:");
+        sel_removeAllItems = sel_registerName("removeAllItems");
+        sel_removeAllPoints = sel_registerName("removeAllPoints");
+        sel_removeFromSuperview = sel_registerName("removeFromSuperview");
+        sel_removeItem_ = sel_registerName("removeItem:");
+        sel_removeItemAtIndex_ = sel_registerName("removeItemAtIndex:");
+        sel_removeItemAtPath_error_ = sel_registerName("removeItemAtPath:error:");
+        sel_removeObject_ = sel_registerName("removeObject:");
+        sel_removeObjectAtIndex_ = sel_registerName("removeObjectAtIndex:");
+        sel_removeObserver_ = sel_registerName("removeObserver:");
+        sel_removeStatusItem_ = sel_registerName("removeStatusItem:");
+        sel_removeTabViewItem_ = sel_registerName("removeTabViewItem:");
+        sel_removeTableColumn_ = sel_registerName("removeTableColumn:");
+        sel_removeTemporaryAttribute_forCharacterRange_ = sel_registerName("removeTemporaryAttribute:forCharacterRange:");
+        sel_replaceCharactersInRange_withString_ = sel_registerName("replaceCharactersInRange:withString:");
+        sel_representation = sel_registerName("representation");
+        sel_request = sel_registerName("request");
+        sel_requestWithURL_ = sel_registerName("requestWithURL:");
+        sel_resignFirstResponder = sel_registerName("resignFirstResponder");
+        sel_resizeDownCursor = sel_registerName("resizeDownCursor");
+        sel_resizeLeftCursor = sel_registerName("resizeLeftCursor");
+        sel_resizeLeftRightCursor = sel_registerName("resizeLeftRightCursor");
+        sel_resizeRightCursor = sel_registerName("resizeRightCursor");
+        sel_resizeUpCursor = sel_registerName("resizeUpCursor");
+        sel_resizeUpDownCursor = sel_registerName("resizeUpDownCursor");
+        sel_resizingMask = sel_registerName("resizingMask");
+        sel_respondsToSelector_ = sel_registerName("respondsToSelector:");
+        sel_restoreGraphicsState = sel_registerName("restoreGraphicsState");
+        sel_retain = sel_registerName("retain");
+        sel_retainCount = sel_registerName("retainCount");
+        sel_rightMouseDown_ = sel_registerName("rightMouseDown:");
+        sel_rightMouseDragged_ = sel_registerName("rightMouseDragged:");
+        sel_rightMouseUp_ = sel_registerName("rightMouseUp:");
+        sel_rotateByDegrees_ = sel_registerName("rotateByDegrees:");
+        sel_rowAtPoint_ = sel_registerName("rowAtPoint:");
+        sel_rowForItem_ = sel_registerName("rowForItem:");
+        sel_rowHeight = sel_registerName("rowHeight");
+        sel_rowsInRect_ = sel_registerName("rowsInRect:");
+        sel_run = sel_registerName("run");
+        sel_runModal = sel_registerName("runModal");
+        sel_runModalForWindow_ = sel_registerName("runModalForWindow:");
+        sel_runModalWithPrintInfo_ = sel_registerName("runModalWithPrintInfo:");
+        sel_runMode_beforeDate_ = sel_registerName("runMode:beforeDate:");
+        sel_runOperation = sel_registerName("runOperation");
+        sel_samplesPerPixel = sel_registerName("samplesPerPixel");
+        sel_saveGraphicsState = sel_registerName("saveGraphicsState");
+        sel_savePanel = sel_registerName("savePanel");
+        sel_scaleXBy_yBy_ = sel_registerName("scaleXBy:yBy:");
+        sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ = sel_registerName("scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:");
+        sel_screen = sel_registerName("screen");
+        sel_screens = sel_registerName("screens");
+        sel_scrollColumnToVisible_ = sel_registerName("scrollColumnToVisible:");
+        sel_scrollRangeToVisible_ = sel_registerName("scrollRangeToVisible:");
+        sel_scrollRectToVisible_ = sel_registerName("scrollRectToVisible:");
+        sel_scrollRowToVisible_ = sel_registerName("scrollRowToVisible:");
+        sel_scrollToPoint_ = sel_registerName("scrollToPoint:");
+        sel_scrollWheel_ = sel_registerName("scrollWheel:");
+        sel_scrollerWidth = sel_registerName("scrollerWidth");
+        sel_secondOfMinute = sel_registerName("secondOfMinute");
+        sel_secondarySelectedControlColor = sel_registerName("secondarySelectedControlColor");
+        sel_selectAll_ = sel_registerName("selectAll:");
+        sel_selectItem_ = sel_registerName("selectItem:");
+        sel_selectItemAtIndex_ = sel_registerName("selectItemAtIndex:");
+        sel_selectRow_byExtendingSelection_ = sel_registerName("selectRow:byExtendingSelection:");
+        sel_selectRowIndexes_byExtendingSelection_ = sel_registerName("selectRowIndexes:byExtendingSelection:");
+        sel_selectTabViewItemAtIndex_ = sel_registerName("selectTabViewItemAtIndex:");
+        sel_selectedControlTextColor = sel_registerName("selectedControlTextColor");
+        sel_selectedRange = sel_registerName("selectedRange");
+        sel_selectedRow = sel_registerName("selectedRow");
+        sel_selectedRowIndexes = sel_registerName("selectedRowIndexes");
+        sel_selectedTabViewItem = sel_registerName("selectedTabViewItem");
+        sel_selectedTextBackgroundColor = sel_registerName("selectedTextBackgroundColor");
+        sel_selectedTextColor = sel_registerName("selectedTextColor");
+        sel_sendAction_to_ = sel_registerName("sendAction:to:");
+        sel_sendEvent_ = sel_registerName("sendEvent:");
+        sel_separatorItem = sel_registerName("separatorItem");
+        sel_set = sel_registerName("set");
+        sel_setAcceptsMouseMovedEvents_ = sel_registerName("setAcceptsMouseMovedEvents:");
+        sel_setAction_ = sel_registerName("setAction:");
+        sel_setAlertStyle_ = sel_registerName("setAlertStyle:");
+        sel_setAlignment_ = sel_registerName("setAlignment:");
+        sel_setAllowsColumnReordering_ = sel_registerName("setAllowsColumnReordering:");
+        sel_setAllowsFloats_ = sel_registerName("setAllowsFloats:");
+        sel_setAllowsMixedState_ = sel_registerName("setAllowsMixedState:");
+        sel_setAllowsMultipleSelection_ = sel_registerName("setAllowsMultipleSelection:");
+        sel_setAlphaValue_ = sel_registerName("setAlphaValue:");
+        sel_setApplicationIconImage_ = sel_registerName("setApplicationIconImage:");
+        sel_setApplicationNameForUserAgent_ = sel_registerName("setApplicationNameForUserAgent:");
+        sel_setAttributedStringValue_ = sel_registerName("setAttributedStringValue:");
+        sel_setAttributedTitle_ = sel_registerName("setAttributedTitle:");
+        sel_setAutoenablesItems_ = sel_registerName("setAutoenablesItems:");
+        sel_setAutohidesScrollers_ = sel_registerName("setAutohidesScrollers:");
+        sel_setAutoresizesOutlineColumn_ = sel_registerName("setAutoresizesOutlineColumn:");
+        sel_setAutoresizesSubviews_ = sel_registerName("setAutoresizesSubviews:");
+        sel_setAutoresizingMask_ = sel_registerName("setAutoresizingMask:");
+        sel_setAutosaveExpandedItems_ = sel_registerName("setAutosaveExpandedItems:");
+        sel_setBackgroundColor_ = sel_registerName("setBackgroundColor:");
+        sel_setBezelStyle_ = sel_registerName("setBezelStyle:");
+        sel_setBorderType_ = sel_registerName("setBorderType:");
+        sel_setBorderWidth_ = sel_registerName("setBorderWidth:");
+        sel_setBordered_ = sel_registerName("setBordered:");
+        sel_setBoxType_ = sel_registerName("setBoxType:");
+        sel_setButtonType_ = sel_registerName("setButtonType:");
+        sel_setCacheMode_ = sel_registerName("setCacheMode:");
+        sel_setCanChooseDirectories_ = sel_registerName("setCanChooseDirectories:");
+        sel_setCanChooseFiles_ = sel_registerName("setCanChooseFiles:");
+        sel_setCellClass_ = sel_registerName("setCellClass:");
+        sel_setClip = sel_registerName("setClip");
+        sel_setColor_ = sel_registerName("setColor:");
+        sel_setColumnAutoresizingStyle_ = sel_registerName("setColumnAutoresizingStyle:");
+        sel_setCompositingOperation_ = sel_registerName("setCompositingOperation:");
+        sel_setContainerSize_ = sel_registerName("setContainerSize:");
+        sel_setContentView_ = sel_registerName("setContentView:");
+        sel_setContentViewMargins_ = sel_registerName("setContentViewMargins:");
+        sel_setCurrentContext_ = sel_registerName("setCurrentContext:");
+        sel_setCurrentOperation_ = sel_registerName("setCurrentOperation:");
+        sel_setData_forType_ = sel_registerName("setData:forType:");
+        sel_setDataCell_ = sel_registerName("setDataCell:");
+        sel_setDataSource_ = sel_registerName("setDataSource:");
+        sel_setDatePickerElements_ = sel_registerName("setDatePickerElements:");
+        sel_setDatePickerStyle_ = sel_registerName("setDatePickerStyle:");
+        sel_setDateValue_ = sel_registerName("setDateValue:");
+        sel_setDefaultFlatness_ = sel_registerName("setDefaultFlatness:");
+        sel_setDefaultTabInterval_ = sel_registerName("setDefaultTabInterval:");
+        sel_setDelegate_ = sel_registerName("setDelegate:");
+        sel_setDestination_allowOverwrite_ = sel_registerName("setDestination:allowOverwrite:");
+        sel_setDirectory_ = sel_registerName("setDirectory:");
+        sel_setDocumentView_ = sel_registerName("setDocumentView:");
+        sel_setDoubleAction_ = sel_registerName("setDoubleAction:");
+        sel_setDoubleValue_ = sel_registerName("setDoubleValue:");
+        sel_setDownloadDelegate_ = sel_registerName("setDownloadDelegate:");
+        sel_setDrawsBackground_ = sel_registerName("setDrawsBackground:");
+        sel_setEditable_ = sel_registerName("setEditable:");
+        sel_setEnabled_ = sel_registerName("setEnabled:");
+        sel_setFill = sel_registerName("setFill");
+        sel_setFireDate_ = sel_registerName("setFireDate:");
+        sel_setFirstLineHeadIndent_ = sel_registerName("setFirstLineHeadIndent:");
+        sel_setFloatValue_knobProportion_ = sel_registerName("setFloatValue:knobProportion:");
+        sel_setFocusRingType_ = sel_registerName("setFocusRingType:");
+        sel_setFont_ = sel_registerName("setFont:");
+        sel_setFormatter_ = sel_registerName("setFormatter:");
+        sel_setFrame_ = sel_registerName("setFrame:");
+        sel_setFrame_display_ = sel_registerName("setFrame:display:");
+        sel_setFrameLoadDelegate_ = sel_registerName("setFrameLoadDelegate:");
+        sel_setFrameOrigin_ = sel_registerName("setFrameOrigin:");
+        sel_setFrameSize_ = sel_registerName("setFrameSize:");
+        sel_setHasHorizontalScroller_ = sel_registerName("setHasHorizontalScroller:");
+        sel_setHasShadow_ = sel_registerName("setHasShadow:");
+        sel_setHasVerticalScroller_ = sel_registerName("setHasVerticalScroller:");
+        sel_setHeaderCell_ = sel_registerName("setHeaderCell:");
+        sel_setHeaderView_ = sel_registerName("setHeaderView:");
+        sel_setHidden_ = sel_registerName("setHidden:");
+        sel_setHiddenUntilMouseMoves_ = sel_registerName("setHiddenUntilMouseMoves:");
+        sel_setHighlightMode_ = sel_registerName("setHighlightMode:");
+        sel_setHighlighted_ = sel_registerName("setHighlighted:");
+        sel_setHorizontalScroller_ = sel_registerName("setHorizontalScroller:");
+        sel_setHorizontallyResizable_ = sel_registerName("setHorizontallyResizable:");
+        sel_setIdentifier_ = sel_registerName("setIdentifier:");
+        sel_setImage_ = sel_registerName("setImage:");
+        sel_setImageAlignment_ = sel_registerName("setImageAlignment:");
+        sel_setImageInterpolation_ = sel_registerName("setImageInterpolation:");
+        sel_setImagePosition_ = sel_registerName("setImagePosition:");
+        sel_setImageScaling_ = sel_registerName("setImageScaling:");
+        sel_setIncrement_ = sel_registerName("setIncrement:");
+        sel_setIndentationPerLevel_ = sel_registerName("setIndentationPerLevel:");
+        sel_setIndeterminate_ = sel_registerName("setIndeterminate:");
+        sel_setJavaEnabled_ = sel_registerName("setJavaEnabled:");
+        sel_setJobDisposition_ = sel_registerName("setJobDisposition:");
+        sel_setJobTitle_ = sel_registerName("setJobTitle:");
+        sel_setKeyEquivalent_ = sel_registerName("setKeyEquivalent:");
+        sel_setKeyEquivalentModifierMask_ = sel_registerName("setKeyEquivalentModifierMask:");
+        sel_setLabel_ = sel_registerName("setLabel:");
+        sel_setLeaf_ = sel_registerName("setLeaf:");
+        sel_setLength_ = sel_registerName("setLength:");
+        sel_setLevel_ = sel_registerName("setLevel:");
+        sel_setLineBreakMode_ = sel_registerName("setLineBreakMode:");
+        sel_setLineCapStyle_ = sel_registerName("setLineCapStyle:");
+        sel_setLineDash_count_phase_ = sel_registerName("setLineDash:count:phase:");
+        sel_setLineFragmentPadding_ = sel_registerName("setLineFragmentPadding:");
+        sel_setLineFragmentRect_forGlyphRange_usedRect_ = sel_registerName("setLineFragmentRect:forGlyphRange:usedRect:");
+        sel_setLineJoinStyle_ = sel_registerName("setLineJoinStyle:");
+        sel_setLineSpacing_ = sel_registerName("setLineSpacing:");
+        sel_setLineWidth_ = sel_registerName("setLineWidth:");
+        sel_setMarkedText_selectedRange_ = sel_registerName("setMarkedText:selectedRange:");
+        sel_setMaxSize_ = sel_registerName("setMaxSize:");
+        sel_setMaxValue_ = sel_registerName("setMaxValue:");
+        sel_setMaximum_ = sel_registerName("setMaximum:");
+        sel_setMaximumFractionDigits_ = sel_registerName("setMaximumFractionDigits:");
+        sel_setMaximumIntegerDigits_ = sel_registerName("setMaximumIntegerDigits:");
+        sel_setMenu_ = sel_registerName("setMenu:");
+        sel_setMinSize_ = sel_registerName("setMinSize:");
+        sel_setMinValue_ = sel_registerName("setMinValue:");
+        sel_setMinWidth_ = sel_registerName("setMinWidth:");
+        sel_setMinimum_ = sel_registerName("setMinimum:");
+        sel_setMinimumFractionDigits_ = sel_registerName("setMinimumFractionDigits:");
+        sel_setMinimumIntegerDigits_ = sel_registerName("setMinimumIntegerDigits:");
+        sel_setMiterLimit_ = sel_registerName("setMiterLimit:");
+        sel_setNeedsDisplay_ = sel_registerName("setNeedsDisplay:");
+        sel_setNeedsDisplayInRect_ = sel_registerName("setNeedsDisplayInRect:");
+        sel_setNumberOfVisibleItems_ = sel_registerName("setNumberOfVisibleItems:");
+        sel_setNumberStyle_ = sel_registerName("setNumberStyle:");
+        sel_setObject_forKey_ = sel_registerName("setObject:forKey:");
+        sel_setOnMouseEntered_ = sel_registerName("setOnMouseEntered:");
+        sel_setOpaque_ = sel_registerName("setOpaque:");
+        sel_setOptions_ = sel_registerName("setOptions:");
+        sel_setOutlineTableColumn_ = sel_registerName("setOutlineTableColumn:");
+        sel_setPanelFont_isMultiple_ = sel_registerName("setPanelFont:isMultiple:");
+        sel_setPartialStringValidationEnabled_ = sel_registerName("setPartialStringValidationEnabled:");
+        sel_setPatternPhase_ = sel_registerName("setPatternPhase:");
+        sel_setPixelFormat_ = sel_registerName("setPixelFormat:");
+        sel_setPolicyDelegate_ = sel_registerName("setPolicyDelegate:");
+        sel_setPrinter_ = sel_registerName("setPrinter:");
+        sel_setPropertyList_forType_ = sel_registerName("setPropertyList:forType:");
+        sel_setPullsDown_ = sel_registerName("setPullsDown:");
+        sel_setReleasedWhenClosed_ = sel_registerName("setReleasedWhenClosed:");
+        sel_setResizingMask_ = sel_registerName("setResizingMask:");
+        sel_setResourceLoadDelegate_ = sel_registerName("setResourceLoadDelegate:");
+        sel_setRichText_ = sel_registerName("setRichText:");
+        sel_setRowHeight_ = sel_registerName("setRowHeight:");
+        sel_setSelectable_ = sel_registerName("setSelectable:");
+        sel_setSelectedRange_ = sel_registerName("setSelectedRange:");
+        sel_setShouldAntialias_ = sel_registerName("setShouldAntialias:");
+        sel_setShowsPrintPanel_ = sel_registerName("setShowsPrintPanel:");
+        sel_setShowsProgressPanel_ = sel_registerName("setShowsProgressPanel:");
+        sel_setSize_ = sel_registerName("setSize:");
+        sel_setState_ = sel_registerName("setState:");
+        sel_setString_ = sel_registerName("setString:");
+        sel_setString_forType_ = sel_registerName("setString:forType:");
+        sel_setStringValue_ = sel_registerName("setStringValue:");
+        sel_setStroke = sel_registerName("setStroke");
+        sel_setSubmenu_ = sel_registerName("setSubmenu:");
+        sel_setTabStops_ = sel_registerName("setTabStops:");
+        sel_setTabViewType_ = sel_registerName("setTabViewType:");
+        sel_setTarget_ = sel_registerName("setTarget:");
+        sel_setTextColor_ = sel_registerName("setTextColor:");
+        sel_setTitle_ = sel_registerName("setTitle:");
+        sel_setTitleFont_ = sel_registerName("setTitleFont:");
+        sel_setTitlePosition_ = sel_registerName("setTitlePosition:");
+        sel_setToolTip_ = sel_registerName("setToolTip:");
+        sel_setTransformStruct_ = sel_registerName("setTransformStruct:");
+        sel_setUIDelegate_ = sel_registerName("setUIDelegate:");
+        sel_setURL_ = sel_registerName("setURL:");
+        sel_setUpPrintOperationDefaultValues = sel_registerName("setUpPrintOperationDefaultValues");
+        sel_setUsesAlternatingRowBackgroundColors_ = sel_registerName("setUsesAlternatingRowBackgroundColors:");
+        sel_setUsesThreadedAnimation_ = sel_registerName("setUsesThreadedAnimation:");
+        sel_setValue_forKey_ = sel_registerName("setValue:forKey:");
+        sel_setValueWraps_ = sel_registerName("setValueWraps:");
+        sel_setVerticalScroller_ = sel_registerName("setVerticalScroller:");
+        sel_setView_ = sel_registerName("setView:");
+        sel_setWidth_ = sel_registerName("setWidth:");
+        sel_setWidthTracksTextView_ = sel_registerName("setWidthTracksTextView:");
+        sel_setWindingRule_ = sel_registerName("setWindingRule:");
+        sel_setWorksWhenModal_ = sel_registerName("setWorksWhenModal:");
+        sel_setWraps_ = sel_registerName("setWraps:");
+        sel_sharedApplication = sel_registerName("sharedApplication");
+        sel_sharedColorPanel = sel_registerName("sharedColorPanel");
+        sel_sharedFontManager = sel_registerName("sharedFontManager");
+        sel_sharedFontPanel = sel_registerName("sharedFontPanel");
+        sel_sharedHTTPCookieStorage = sel_registerName("sharedHTTPCookieStorage");
+        sel_sharedPrintInfo = sel_registerName("sharedPrintInfo");
+        sel_sharedWorkspace = sel_registerName("sharedWorkspace");
+        sel_shiftKey = sel_registerName("shiftKey");
+        sel_size = sel_registerName("size");
+        sel_sizeToFit = sel_registerName("sizeToFit");
+        sel_sizeValue = sel_registerName("sizeValue");
+        sel_skipDescendents = sel_registerName("skipDescendents");
+        sel_smallSystemFontSize = sel_registerName("smallSystemFontSize");
+        sel_sortIndicatorRectForBounds_ = sel_registerName("sortIndicatorRectForBounds:");
+        sel_standardPreferences = sel_registerName("standardPreferences");
+        sel_startAnimation_ = sel_registerName("startAnimation:");
+        sel_state = sel_registerName("state");
+        sel_statusItemWithLength_ = sel_registerName("statusItemWithLength:");
+        sel_stop_ = sel_registerName("stop:");
+        sel_stopLoading_ = sel_registerName("stopLoading:");
+        sel_string = sel_registerName("string");
+        sel_stringByAddingPercentEscapesUsingEncoding_ = sel_registerName("stringByAddingPercentEscapesUsingEncoding:");
+        sel_stringByAppendingPathComponent_ = sel_registerName("stringByAppendingPathComponent:");
+        sel_stringByAppendingString_ = sel_registerName("stringByAppendingString:");
+        sel_stringByDeletingLastPathComponent = sel_registerName("stringByDeletingLastPathComponent");
+        sel_stringByDeletingPathExtension = sel_registerName("stringByDeletingPathExtension");
+        sel_stringByEvaluatingJavaScriptFromString_ = sel_registerName("stringByEvaluatingJavaScriptFromString:");
+        sel_stringByReplacingOccurrencesOfString_withString_ = sel_registerName("stringByReplacingOccurrencesOfString:withString:");
+        sel_stringForObjectValue_ = sel_registerName("stringForObjectValue:");
+        sel_stringForType_ = sel_registerName("stringForType:");
+        sel_stringValue = sel_registerName("stringValue");
+        sel_stringWithCharacters_length_ = sel_registerName("stringWithCharacters:length:");
+        sel_stringWithUTF8String_ = sel_registerName("stringWithUTF8String:");
+        sel_stroke = sel_registerName("stroke");
+        sel_strokeRect_ = sel_registerName("strokeRect:");
+        sel_styleMask = sel_registerName("styleMask");
+        sel_submenu = sel_registerName("submenu");
+        sel_subviews = sel_registerName("subviews");
+        sel_superclass = sel_registerName("superclass");
+        sel_superview = sel_registerName("superview");
+        sel_systemFontOfSize_ = sel_registerName("systemFontOfSize:");
+        sel_systemFontSize = sel_registerName("systemFontSize");
+        sel_systemFontSizeForControlSize_ = sel_registerName("systemFontSizeForControlSize:");
+        sel_systemStatusBar = sel_registerName("systemStatusBar");
+        sel_systemVersion = sel_registerName("systemVersion");
+        sel_tabStopType = sel_registerName("tabStopType");
+        sel_tabStops = sel_registerName("tabStops");
+        sel_tabView_didSelectTabViewItem_ = sel_registerName("tabView:didSelectTabViewItem:");
+        sel_tabView_willSelectTabViewItem_ = sel_registerName("tabView:willSelectTabViewItem:");
+        sel_tabViewItemAtPoint_ = sel_registerName("tabViewItemAtPoint:");
+        sel_tableColumns = sel_registerName("tableColumns");
+        sel_tableView_didClickTableColumn_ = sel_registerName("tableView:didClickTableColumn:");
+        sel_tableView_objectValueForTableColumn_row_ = sel_registerName("tableView:objectValueForTableColumn:row:");
+        sel_tableView_setObjectValue_forTableColumn_row_ = sel_registerName("tableView:setObjectValue:forTableColumn:row:");
+        sel_tableView_shouldEditTableColumn_row_ = sel_registerName("tableView:shouldEditTableColumn:row:");
+        sel_tableView_willDisplayCell_forTableColumn_row_ = sel_registerName("tableView:willDisplayCell:forTableColumn:row:");
+        sel_tableViewColumnDidMove_ = sel_registerName("tableViewColumnDidMove:");
+        sel_tableViewColumnDidResize_ = sel_registerName("tableViewColumnDidResize:");
+        sel_tableViewSelectionDidChange_ = sel_registerName("tableViewSelectionDidChange:");
+        sel_target = sel_registerName("target");
+        sel_terminate_ = sel_registerName("terminate:");
+        sel_textBackgroundColor = sel_registerName("textBackgroundColor");
+        sel_textColor = sel_registerName("textColor");
+        sel_textContainer = sel_registerName("textContainer");
+        sel_textDidChange_ = sel_registerName("textDidChange:");
+        sel_textStorage = sel_registerName("textStorage");
+        sel_textView_clickedOnLink_atIndex_ = sel_registerName("textView:clickedOnLink:atIndex:");
+        sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_ = sel_registerName("textView:willChangeSelectionFromCharacterRange:toCharacterRange:");
+        sel_textViewDidChangeSelection_ = sel_registerName("textViewDidChangeSelection:");
+        sel_threadDictionary = sel_registerName("threadDictionary");
+        sel_tile = sel_registerName("tile");
+        sel_timeZone = sel_registerName("timeZone");
+        sel_title = sel_registerName("title");
+        sel_titleCell = sel_registerName("titleCell");
+        sel_titleOfSelectedItem = sel_registerName("titleOfSelectedItem");
+        sel_titleRectForBounds_ = sel_registerName("titleRectForBounds:");
+        sel_transform = sel_registerName("transform");
+        sel_transformPoint_ = sel_registerName("transformPoint:");
+        sel_transformSize_ = sel_registerName("transformSize:");
+        sel_transformStruct = sel_registerName("transformStruct");
+        sel_transformUsingAffineTransform_ = sel_registerName("transformUsingAffineTransform:");
+        sel_translateXBy_yBy_ = sel_registerName("translateXBy:yBy:");
+        sel_type = sel_registerName("type");
+        sel_types = sel_registerName("types");
+        sel_typesetter = sel_registerName("typesetter");
+        sel_unarchiveObjectWithData_ = sel_registerName("unarchiveObjectWithData:");
+        sel_unhideAllApplications_ = sel_registerName("unhideAllApplications:");
+        sel_unmarkText = sel_registerName("unmarkText");
+        sel_unregisterDraggedTypes = sel_registerName("unregisterDraggedTypes");
+        sel_use = sel_registerName("use");
+        sel_usedRectForTextContainer_ = sel_registerName("usedRectForTextContainer:");
+        sel_userInfo = sel_registerName("userInfo");
+        sel_usesAlternatingRowBackgroundColors = sel_registerName("usesAlternatingRowBackgroundColors");
+        sel_validAttributesForMarkedText = sel_registerName("validAttributesForMarkedText");
+        sel_valueForKey_ = sel_registerName("valueForKey:");
+        sel_valueWithPoint_ = sel_registerName("valueWithPoint:");
+        sel_valueWithRange_ = sel_registerName("valueWithRange:");
+        sel_valueWithRect_ = sel_registerName("valueWithRect:");
+        sel_valueWithSize_ = sel_registerName("valueWithSize:");
+        sel_visibleFrame = sel_registerName("visibleFrame");
+        sel_visibleRect = sel_registerName("visibleRect");
+        sel_wantsPeriodicDraggingUpdates = sel_registerName("wantsPeriodicDraggingUpdates");
+        sel_wantsToHandleMouseEvents = sel_registerName("wantsToHandleMouseEvents");
+        sel_webFrame = sel_registerName("webFrame");
+        sel_webView_contextMenuItemsForElement_defaultMenuItems_ = sel_registerName("webView:contextMenuItemsForElement:defaultMenuItems:");
+        sel_webView_createWebViewWithRequest_ = sel_registerName("webView:createWebViewWithRequest:");
+        sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_ = sel_registerName("webView:decidePolicyForMIMEType:request:frame:decisionListener:");
+        sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_ = sel_registerName("webView:decidePolicyForNavigationAction:request:frame:decisionListener:");
+        sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_ = sel_registerName("webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:");
+        sel_webView_didChangeLocationWithinPageForFrame_ = sel_registerName("webView:didChangeLocationWithinPageForFrame:");
+        sel_webView_didCommitLoadForFrame_ = sel_registerName("webView:didCommitLoadForFrame:");
+        sel_webView_didFailProvisionalLoadWithError_forFrame_ = sel_registerName("webView:didFailProvisionalLoadWithError:forFrame:");
+        sel_webView_didFinishLoadForFrame_ = sel_registerName("webView:didFinishLoadForFrame:");
+        sel_webView_didReceiveTitle_forFrame_ = sel_registerName("webView:didReceiveTitle:forFrame:");
+        sel_webView_didStartProvisionalLoadForFrame_ = sel_registerName("webView:didStartProvisionalLoadForFrame:");
+        sel_webView_identifierForInitialRequest_fromDataSource_ = sel_registerName("webView:identifierForInitialRequest:fromDataSource:");
+        sel_webView_mouseDidMoveOverElement_modifierFlags_ = sel_registerName("webView:mouseDidMoveOverElement:modifierFlags:");
+        sel_webView_printFrameView_ = sel_registerName("webView:printFrameView:");
+        sel_webView_resource_didFailLoadingWithError_fromDataSource_ = sel_registerName("webView:resource:didFailLoadingWithError:fromDataSource:");
+        sel_webView_resource_didFinishLoadingFromDataSource_ = sel_registerName("webView:resource:didFinishLoadingFromDataSource:");
+        sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_ = sel_registerName("webView:resource:willSendRequest:redirectResponse:fromDataSource:");
+        sel_webView_runJavaScriptAlertPanelWithMessage_ = sel_registerName("webView:runJavaScriptAlertPanelWithMessage:");
+        sel_webView_runJavaScriptConfirmPanelWithMessage_ = sel_registerName("webView:runJavaScriptConfirmPanelWithMessage:");
+        sel_webView_runOpenPanelForFileButtonWithResultListener_ = sel_registerName("webView:runOpenPanelForFileButtonWithResultListener:");
+        sel_webView_setFrame_ = sel_registerName("webView:setFrame:");
+        sel_webView_setResizable_ = sel_registerName("webView:setResizable:");
+        sel_webView_setStatusBarVisible_ = sel_registerName("webView:setStatusBarVisible:");
+        sel_webView_setStatusText_ = sel_registerName("webView:setStatusText:");
+        sel_webView_setToolbarsVisible_ = sel_registerName("webView:setToolbarsVisible:");
+        sel_webView_unableToImplementPolicyWithError_frame_ = sel_registerName("webView:unableToImplementPolicyWithError:frame:");
+        sel_webViewClose_ = sel_registerName("webViewClose:");
+        sel_webViewFocus_ = sel_registerName("webViewFocus:");
+        sel_webViewShow_ = sel_registerName("webViewShow:");
+        sel_webViewUnfocus_ = sel_registerName("webViewUnfocus:");
+        sel_wheelDelta = sel_registerName("wheelDelta");
+        sel_width = sel_registerName("width");
+        sel_window = sel_registerName("window");
+        sel_windowBackgroundColor = sel_registerName("windowBackgroundColor");
+        sel_windowDidBecomeKey_ = sel_registerName("windowDidBecomeKey:");
+        sel_windowDidMove_ = sel_registerName("windowDidMove:");
+        sel_windowDidResignKey_ = sel_registerName("windowDidResignKey:");
+        sel_windowDidResize_ = sel_registerName("windowDidResize:");
+        sel_windowFrameColor = sel_registerName("windowFrameColor");
+        sel_windowFrameTextColor = sel_registerName("windowFrameTextColor");
+        sel_windowNumber = sel_registerName("windowNumber");
+        sel_windowShouldClose_ = sel_registerName("windowShouldClose:");
+        sel_windowWillClose_ = sel_registerName("windowWillClose:");
+        sel_windows = sel_registerName("windows");
+        sel_worksWhenModal = sel_registerName("worksWhenModal");
+        sel_wraps = sel_registerName("wraps");
+        sel_writeToPasteboard_ = sel_registerName("writeToPasteboard:");
+        sel_yearOfCommonEra = sel_registerName("yearOfCommonEra");
     }
     
-    alias dwt.internal.c.carboncore.Gestalt.Gestalt Gestalt;
-    alias dwt.internal.c.hiservices.Processes.GetCurrentProcess GetCurrentProcess;
-    alias dwt.internal.c.hiservices.Processes.SetFrontProcess SetFrontProcess;
-    alias dwt.internal.c.hiservices.Processes.TransformProcessType TransformProcessType;
-    alias dwt.internal.objc.foundation.NSGeometry.NSIntersectionRect NSIntersectionRect;
-    alias dwt.internal.objc.coregraphics.CGRemoteOperation.CGWarpMouseCursorPosition CGWarpMouseCursorPosition;
-    
-    /** QuickDraw calls */
-    alias dwt.internal.c.qd.Quickdraw.RegionToRectsProcPtr RegionToRectsProcPtr;
-    alias dwt.internal.c.qd.Quickdraw.RegionToRectsUPP RegionToRectsUPP;
-    alias dwt.internal.c.qd.Quickdraw.NewRgn NewRgn;
-    alias dwt.internal.c.qd.Quickdraw.RectRgn RectRgn;
-    alias dwt.internal.c.qd.Quickdraw.OpenRgn OpenRgn;
-    alias dwt.internal.c.qd.Quickdraw.OffsetRgn OffsetRgn;
-    alias dwt.internal.c.qd.Quickdraw.MoveTo MoveTo;
-    alias dwt.internal.c.qd.Quickdraw.LineTo LineTo;
-    alias dwt.internal.c.qd.Quickdraw.UnionRgn UnionRgn;
-    alias dwt.internal.c.qd.Quickdraw.CloseRgn CloseRgn;
-    alias dwt.internal.c.qd.Quickdraw.DisposeRgn DisposeRgn;
-    alias dwt.internal.c.qd.Quickdraw.PtInRgn PtInRgn;
-    alias dwt.internal.c.qd.Quickdraw.GetRegionBounds GetRegionBounds;
-    alias dwt.internal.c.qd.Quickdraw.SectRgn SectRgn;
-    alias dwt.internal.c.qd.Quickdraw.EmptyRgn EmptyRgn;
-    alias dwt.internal.c.qd.Quickdraw.DiffRgn DiffRgn;
-    alias dwt.internal.c.qd.Quickdraw.RectInRgn RectInRgn;
-    alias dwt.internal.c.qd.Quickdraw.QDRegionToRects QDRegionToRects;
-    alias dwt.internal.c.qd.Quickdraw.CopyRgn CopyRgn;
-    alias dwt.internal.c.qd.Quickdraw.SetRect SetRect;
-    
-    public static const int kQDParseRegionFromTop = (1 << 0);
-    public static const int kQDParseRegionFromBottom = (1 << 1);
-    public static const int kQDParseRegionFromLeft = (1 << 2);
-    public static const int kQDParseRegionFromRight = (1 << 3);
-    public static const int kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft;
-    public static const int kQDRegionToRectsMsgParse = 2;
-    
-    /** objc runtime */
-    static alias dwt.internal.objc.runtime.objc_registerClassPair objc_registerClassPair;
-    alias dwt.internal.objc.runtime.class_addIvar class_addIvar;
-    alias dwt.internal.objc.runtime.class_addMethod class_addMethod;
-    alias dwt.internal.objc.runtime.objc_allocateClassPair objc_allocateClassPair;
-    alias dwt.internal.objc.runtime.objc_getClass objc_getClass;
-    alias dwt.internal.objc.runtime.objc_lookUpClass objc_lookUpClass;
-    alias dwt.internal.objc.runtime.object_getClassName object_getClassName;
-    alias dwt.internal.objc.runtime.object_getInstanceVariable object_getInstanceVariable;
-    alias dwt.internal.objc.runtime.object_setInstanceVariable object_setInstanceVariable;
-    alias dwt.internal.objc.runtime.sel_registerName sel_registerName;
-    alias dwt.internal.objc.runtime.objc_msgSend objc_msgSend;
-    alias dwt.internal.objc.runtime.objc_msgSend_struct objc_msgSend_struct;
-    alias dwt.internal.objc.runtime.objc_msgSend_stret objc_msgSend_stret;
-    alias dwt.internal.objc.runtime.objc_msgSendSuper objc_msgSendSuper;
-    
-    version (X86)
-        alias dwt.internal.objc.runtime.objc_msgSend_fpret objc_msgSend_fpret;
-    
-    alias dwt.internal.objc.runtime.drawRect_CALLBACK drawRect_CALLBACK;
-
-    /** Classes */
-    public static /*const*/ id class_NSScanner;
-    public static /*const*/ id class_NSCIImageRep;
-    public static /*const*/ id class_NSPathControl;
-    public static /*const*/ id class_NSTreeController;
-    public static /*const*/ id class_NSPDFImageRep;
-    public static /*const*/ id class_NSPageLayout;
-    public static /*const*/ id class_NSMetadataQueryAttributeValueTuple;
-    public static /*const*/ id class_NSAppleScript;
-    public static /*const*/ id class_NSGradient;
-    public static /*const*/ id class_NSColorPanel;
-    public static /*const*/ id class_NSPrinter;
-    public static /*const*/ id class_NSCachedURLResponse;
-    public static /*const*/ id class_NSLevelIndicatorCell;
-    public static /*const*/ id class_NSScriptClassDescription;
-    public static /*const*/ id class_NSDistantObjectRequest;
-    public static /*const*/ id class_NSOpenPanel;
-    public static /*const*/ id class_NSOperationQueue;
-    public static /*const*/ id class_NSOpenGLPixelBuffer;
-    public static /*const*/ id class_NSRelativeSpecifier;
-    public static /*const*/ id class_NSTextStorage;
-    public static /*const*/ id class_NSPopUpButtonCell;
-    public static /*const*/ id class_NSTextContainer;
-    public static /*const*/ id class_NSStepperCell;
-    public static /*const*/ id class_NSTextTable;
-    public static /*const*/ id class_NSInvocationOperation;
-    public static /*const*/ id class_NSDeleteCommand;
-    public static /*const*/ id class_NSImageView;
-    public static /*const*/ id class_NSMovieView;
-    public static /*const*/ id class_NSLock;
-    public static /*const*/ id class_NSCoder;
-    public static /*const*/ id class_NSXMLElement;
-    public static /*const*/ id class_NSLayoutManager;
-    public static /*const*/ id class_NSTabView;
-    public static /*const*/ id class_NSSpeechRecognizer;
-    public static /*const*/ id class_NSAttributedString;
-    public static /*const*/ id class_NSProcessInfo;
-    public static /*const*/ id class_NSTextFieldCell;
-    public static /*const*/ id class_NSDate;
-    public static /*const*/ id class_NSMachBootstrapServer;
-    public static /*const*/ id class_NSData;
-    public static /*const*/ id class_NSNumberFormatter;
-    public static /*const*/ id class_NSPositionalSpecifier;
-    public static /*const*/ id class_NSSegmentedControl;
-    public static /*const*/ id class_NSMatrix;
-    public static /*const*/ id class_NSPanel;
-    public static /*const*/ id class_NSPrintInfo;
-    public static /*const*/ id class_NSResponder;
-    public static /*const*/ id class_NSNull;
-    public static /*const*/ id class_NSRunLoop;
-    public static /*const*/ id class_NSMutableAttributedString;
-    public static /*const*/ id class_NSImageCell;
-    public static /*const*/ id class_CIColor;
-    public static /*const*/ id class_NSSegmentedCell;
-    public static /*const*/ id class_NSDocument;
-    public static /*const*/ id class_NSTextTab;
-    public static /*const*/ id class_NSWhoseSpecifier;
-    public static /*const*/ id class_NSMenu;
-    public static /*const*/ id class_NSPopUpButton;
-    public static /*const*/ id class_NSInvocation;
-    public static /*const*/ id class_NSDatePicker;
-    public static /*const*/ id class_NSSliderCell;
-    public static /*const*/ id class_NSURLCache;
-    public static /*const*/ id class_NSSpeechSynthesizer;
-    public static /*const*/ id class_NSBezierPath;
-    public static /*const*/ id class_NSSavePanel;
-    public static /*const*/ id class_NSMetadataQuery;
-    public static /*const*/ id class_NSLogicalTest;
-    public static /*const*/ id class_NSAffineTransform;
-    public static /*const*/ id class_NSTreeNode;
-    public static /*const*/ id class_NSControl;
-    public static /*const*/ id class_NSWindowController;
-    public static /*const*/ id class_NSURLResponse;
-    public static /*const*/ id class_NSFormatter;
-    public static /*const*/ id class_NSAssertionHandler;
-    public static /*const*/ id class_NSPort;
-    public static /*const*/ id class_NSURLProtectionSpace;
-    public static /*const*/ id class_NSPredicate;
-    public static /*const*/ id class_NSIndexSpecifier;
-    public static /*const*/ id class_NSPortMessage;
-    public static /*const*/ id class_NSTypesetter;
-    public static /*const*/ id class_NSCompoundPredicate;
-    public static /*const*/ id class_NSBundle;
-    public static /*const*/ id class_NSSortDescriptor;
-    public static /*const*/ id class_NSFontManager;
-    public static /*const*/ id class_NSProxy;
-    public static /*const*/ id class_NSTextView;
-    public static /*const*/ id class_NSMutableSet;
-    public static /*const*/ id class_NSDatePickerCell;
-    public static /*const*/ id class_NSStatusItem;
-    public static /*const*/ id class_NSDirectoryEnumerator;
-    public static /*const*/ id class_NSPropertyListSerialization;
-    public static /*const*/ id class_NSHost;
-    public static /*const*/ id class_NSPipe;
-    public static /*const*/ id class_NSNibConnector;
-    public static /*const*/ id class_NSDecimalNumber;
-    public static /*const*/ id class_NSMenuView;
-    public static /*const*/ id class_NSMenuItem;
-    public static /*const*/ id class_NSPICTImageRep;
-    public static /*const*/ id class_NSPasteboard;
-    public static /*const*/ id class_NSScriptExecutionContext;
-    public static /*const*/ id class_NSNotificationQueue;
-    public static /*const*/ id class_NSError;
-    public static /*const*/ id class_NSNib;
-    public static /*const*/ id class_NSAppleEventManager;
-    public static /*const*/ id class_NSCondition;
-    public static /*const*/ id class_NSBrowser;
-    public static /*const*/ id class_NSDocumentController;
-    public static /*const*/ id class_NSMethodSignature;
-    public static /*const*/ id class_NSTextList;
-    public static /*const*/ id class_NSURLCredentialStorage;
-    public static /*const*/ id class_NSEvent;
-    public static /*const*/ id class_NSScreen;
-    public static /*const*/ id class_NSMutableCharacterSet;
-    public static /*const*/ id class_NSSecureTextFieldCell;
-    public static /*const*/ id class_NSOpenGLPixelFormat;
-    public static /*const*/ id class_NSInputServer;
-    public static /*const*/ id class_NSNotification;
-    public static /*const*/ id class_NSSpecifierTest;
-    public static /*const*/ id class_NSCustomImageRep;
-    public static /*const*/ id class_NSParagraphStyle;
-    public static /*const*/ id class_NSTableView;
-    public static /*const*/ id class_NSFileWrapper;
-    public static /*const*/ id class_NSNotificationCenter;
-    public static /*const*/ id class_NSMutableString;
-    public static /*const*/ id class_NSFontPanel;
-    public static /*const*/ id class_NSAppleEventDescriptor;
-    public static /*const*/ id class_NSConnection;
-    public static /*const*/ id class_NSURLDownload;
-    public static /*const*/ id class_NSKeyedUnarchiver;
-    public static /*const*/ id class_NSCountedSet;
-    public static /*const*/ id class_NSSlider;
-    public static /*const*/ id class_NSCharacterSet;
-    public static /*const*/ id class_NSDictionary;
-    public static /*const*/ id class_NSOpenGLContext;
-    public static /*const*/ id class_NSCachedImageRep;
-    public static /*const*/ id class_NSURL;
-    public static /*const*/ id class_NSInputStream;
-    public static /*const*/ id class_NSMutableURLRequest;
-    public static /*const*/ id class_NSURLConnection;
-    public static /*const*/ id class_NSPersistentDocument;
-    public static /*const*/ id class_NSClipView;
-    public static /*const*/ id class_NSScriptSuiteRegistry;
-    public static /*const*/ id class_NSStepper;
-    public static /*const*/ id class_NSXMLNode;
-    public static /*const*/ id class_NSHTTPCookie;
-    public static /*const*/ id class_NSMetadataQueryResultGroup;
-    public static /*const*/ id class_NSURLCredential;
-    public static /*const*/ id class_NSHashTable;
-    public static /*const*/ id class_NSColor;
-    public static /*const*/ id class_NSPathComponentCell;
-    public static /*const*/ id class_NSToolbar;
-    public static /*const*/ id class_NSUndoManager;
-    public static /*const*/ id class_NSNibControlConnector;
-    public static /*const*/ id class_NSFontDescriptor;
-    public static /*const*/ id class_NSSpellChecker;
-    public static /*const*/ id class_NSTableColumn;
-    public static /*const*/ id class_NSSpellServer;
-    public static /*const*/ id class_NSAutoreleasePool;
-    public static /*const*/ id class_NSUnarchiver;
-    public static /*const*/ id class_NSColorSpace;
-    public static /*const*/ id class_NSQuickDrawView;
-    public static /*const*/ id class_NSDrawer;
-    public static /*const*/ id class_NSFileHandle;
-    public static /*const*/ id class_NSCalendarDate;
-    public static /*const*/ id class_NSThread;
-    public static /*const*/ id class_NSProtocolChecker;
-    public static /*const*/ id class_NSDateComponents;
-    public static /*const*/ id class_NSAnimationContext;
-    public static /*const*/ id class_NSURLRequest;
-    public static /*const*/ id class_NSViewAnimation;
-    public static /*const*/ id class_NSScriptObjectSpecifier;
-    public static /*const*/ id class_NSCell;
-    public static /*const*/ id class_NSTableHeaderCell;
-    public static /*const*/ id class_NSATSTypesetter;
-    public static /*const*/ id class_NSNetService;
-    public static /*const*/ id class_NSMutableParagraphStyle;
-    public static /*const*/ id class_NSButton;
-    public static /*const*/ id class_NSAnimation;
-    public static /*const*/ id class_NSText;
-    public static /*const*/ id class_NSMapTable;
-    public static /*const*/ id class_NSDictionaryController;
-    public static /*const*/ id class_NSTrackingArea;
-    public static /*const*/ id class_NSURLProtocol;
-    public static /*const*/ id class_NSGlyphInfo;
-    public static /*const*/ id class_NSSocketPortNameServer;
-    public static /*const*/ id class_NSQuitCommand;
-    public static /*const*/ id class_NSDistributedNotificationCenter;
-    public static /*const*/ id class_NSCloseCommand;
-    public static /*const*/ id class_NSPrintOperation;
-    public static /*const*/ id class_NSGraphicsContext;
-    public static /*const*/ id class_NSNumber;
-    public static /*const*/ id class_NSPortCoder;
-    public static /*const*/ id class_NSTextTableBlock;
-    public static /*const*/ id class_NSNibOutletConnector;
-    public static /*const*/ id class_NSLocale;
-    public static /*const*/ id class_NSTableHeaderView;
-    public static /*const*/ id class_NSScriptWhoseTest;
-    public static /*const*/ id class_NSNetServiceBrowser;
-    public static /*const*/ id class_NSConditionLock;
-    public static /*const*/ id class_NSTimeZone;
-    public static /*const*/ id class_NSComparisonPredicate;
-    public static /*const*/ id class_NSScriptCoercionHandler;
-    public static /*const*/ id class_NSFileManager;
-    public static /*const*/ id class_NSPredicateEditorRowTemplate;
-    public static /*const*/ id class_NSString;
-    public static /*const*/ id class_NSToolbarItem;
-    public static /*const*/ id class_NSPointerArray;
-    public static /*const*/ id class_NSURLAuthenticationChallenge;
-    public static /*const*/ id class_NSStatusBar;
-    public static /*const*/ id class_NSTextField;
-    public static /*const*/ id class_NSSecureTextField;
-    public static /*const*/ id class_NSOutputStream;
-    public static /*const*/ id class_NSComboBoxCell;
-    public static /*const*/ id class_NSXMLDTDNode;
-    public static /*const*/ id class_NSMessagePortNameServer;
-    public static /*const*/ id class_NSHTTPCookieStorage;
-    public static /*const*/ id class_NSActionCell;
-    public static /*const*/ id class_NSXMLDocument;
-    public static /*const*/ id class_NSBitmapImageRep;
-    public static /*const*/ id class_NSHTTPURLResponse;
-    public static /*const*/ id class_NSImage;
-    public static /*const*/ id class_NSIndexSet;
-    public static /*const*/ id class_NSRangeSpecifier;
-    public static /*const*/ id class_NSGlyphGenerator;
-    public static /*const*/ id class_NSFormCell;
-    public static /*const*/ id class_NSScroller;
-    public static /*const*/ id class_NSMetadataItem;
-    public static /*const*/ id class_NSStream;
-    public static /*const*/ id class_NSClassDescription;
-    public static /*const*/ id class_NSMutableIndexSet;
-    public static /*const*/ id class_NSView;
-    public static /*const*/ id class_NSUserDefaults;
-    public static /*const*/ id class_NSSetCommand;
-    public static /*const*/ id class_NSPathCell;
-    public static /*const*/ id class_NSMoveCommand;
-    public static /*const*/ id class_NSSplitView;
-    public static /*const*/ id class_NSTextBlock;
-    public static /*const*/ id class_NSTabViewItem;
-    public static /*const*/ id class_NSCollectionViewItem;
-    public static /*const*/ id class_NSValue;
-    public static /*const*/ id class_NSHelpManager;
-    public static /*const*/ id class_NSEnumerator;
-    public static /*const*/ id class_NSDistantObject;
-    public static /*const*/ id class_NSGarbageCollector;
-    public static /*const*/ id class_NSXMLParser;
-    public static /*const*/ id class_NSFont;
-    public static /*const*/ id class_NSAlert;
-    public static /*const*/ id class_NSUniqueIDSpecifier;
-    public static /*const*/ id class_NSOutlineView;
-    public static /*const*/ id class_NSProgressIndicator;
-    public static /*const*/ id class_NSController;
-    public static /*const*/ id class_NSComboBox;
-    public static /*const*/ id class_NSArrayController;
-    public static /*const*/ id class_NSKeyedArchiver;
-    public static /*const*/ id class_NSDecimalNumberHandler;
-    public static /*const*/ id class_NSObject;
-    public static /*const*/ id class_NSNameSpecifier;
-    public static /*const*/ id class_NSUserDefaultsController;
-    public static /*const*/ id class_NSLevelIndicator;
-    public static /*const*/ id class_NSDistributedLock;
-    public static /*const*/ id class_NSTokenFieldCell;
-    public static /*const*/ id class_NSSet;
-    public static /*const*/ id class_NSMutableData;
-    public static /*const*/ id class_NSArray;
-    public static /*const*/ id class_NSExpression;
-    public static /*const*/ id class_NSMenuItemCell;
-    public static /*const*/ id class_NSColorPicker;
-    public static /*const*/ id class_NSForm;
-    public static /*const*/ id class_NSApplication;
-    public static /*const*/ id class_NSInputManager;
-    public static /*const*/ id class_NSPointerFunctions;
-    public static /*const*/ id class_NSRecursiveLock;
-    public static /*const*/ id class_NSBox;
-    public static /*const*/ id class_NSDockTile;
-    public static /*const*/ id class_NSTextAttachment;
-    public static /*const*/ id class_NSIndexPath;
-    public static /*const*/ id class_NSEPSImageRep;
-    public static /*const*/ id class_NSBrowserCell;
-    public static /*const*/ id class_NSValueTransformer;
-    public static /*const*/ id class_CIImage;
-    public static /*const*/ id class_NSMovie;
-    public static /*const*/ id class_NSTimer;
-    public static /*const*/ id class_NSMachPort;
-    public static /*const*/ id class_NSCreateCommand;
-    public static /*const*/ id class_NSPortNameServer;
-    public static /*const*/ id class_NSRulerMarker;
-    public static /*const*/ id class_NSImageRep;
-    public static /*const*/ id class_NSWindow;
-    public static /*const*/ id class_NSColorWell;
-    public static /*const*/ id class_NSSound;
-    public static /*const*/ id class_NSToolbarItemGroup;
-    public static /*const*/ id class_NSRulerView;
-    public static /*const*/ id class_NSWorkspace;
-    public static /*const*/ id class_NSSearchFieldCell;
-    public static /*const*/ id class_NSMutableArray;
-    public static /*const*/ id class_NSRuleEditor;
-    public static /*const*/ id class_NSScriptCommandDescription;
-    public static /*const*/ id class_NSViewController;
-    public static /*const*/ id class_NSPredicateEditor;
-    public static /*const*/ id class_NSCloneCommand;
-    public static /*const*/ id class_NSOpenGLView;
-    public static /*const*/ id class_NSCursor;
-    public static /*const*/ id class_NSSearchField;
-    public static /*const*/ id class_NSXMLDTD;
-    public static /*const*/ id class_NSSocketPort;
-    public static /*const*/ id class_NSObjectController;
-    public static /*const*/ id class_NSScriptCommand;
-    public static /*const*/ id class_NSShadow;
-    public static /*const*/ id class_NSScrollView;
-    public static /*const*/ id class_NSPrintPanel;
-    public static /*const*/ id class_NSURLHandle;
-    public static /*const*/ id class_NSOperation;
-    public static /*const*/ id class_NSMutableDictionary;
-    public static /*const*/ id class_NSException;
-    public static /*const*/ id class_NSButtonCell;
-    public static /*const*/ id class_NSTask;
-    public static /*const*/ id class_NSArchiver;
-    public static /*const*/ id class_NSDateFormatter;
-    public static /*const*/ id class_NSCalendar;
-    public static /*const*/ id class_NSTokenField;
-    public static /*const*/ id class_NSCollectionView;
-    public static /*const*/ id class_NSColorList;
-    public static /*const*/ id class_DOMEvent;
-    public static /*const*/ id class_DOMWheelEvent;
-    public static /*const*/ id class_WebView;
-    public static /*const*/ id class_WebPreferences;
-    public static /*const*/ id class_WebFrameView;
-    
-    private static const ClassData[] classesData = [
-        { &class_NSScanner, "NSScanner" },
-        { &class_NSCIImageRep, "NSCIImageRep" },
-        { &class_NSPathControl, "NSPathControl" },
-        { &class_NSTreeController, "NSTreeController" },
-        { &class_NSPDFImageRep, "NSPDFImageRep" },
-        { &class_NSPageLayout, "NSPageLayout" },
-        { &class_NSMetadataQueryAttributeValueTuple, "NSMetadataQueryAttributeValueTuple" },
-        { &class_NSAppleScript, "NSAppleScript" },
-        { &class_NSGradient, "NSGradient" },
-        { &class_NSColorPanel, "NSColorPanel" },
-        { &class_NSPrinter, "NSPrinter" },
-        { &class_NSCachedURLResponse, "NSCachedURLResponse" },
-        { &class_NSLevelIndicatorCell, "NSLevelIndicatorCell" },
-        { &class_NSScriptClassDescription, "NSScriptClassDescription" },
-        { &class_NSDistantObjectRequest, "NSDistantObjectRequest" },
-        { &class_NSOpenPanel, "NSOpenPanel" },
-        { &class_NSOperationQueue, "NSOperationQueue" },
-        { &class_NSOpenGLPixelBuffer, "NSOpenGLPixelBuffer" },
-        { &class_NSRelativeSpecifier, "NSRelativeSpecifier" },
-        { &class_NSTextStorage, "NSTextStorage" },
-        { &class_NSPopUpButtonCell, "NSPopUpButtonCell" },
-        { &class_NSTextContainer, "NSTextContainer" },
-        { &class_NSStepperCell, "NSStepperCell" },
-        { &class_NSTextTable, "NSTextTable" },
-        { &class_NSInvocationOperation, "NSInvocationOperation" },
-        { &class_NSDeleteCommand, "NSDeleteCommand" },
-        { &class_NSImageView, "NSImageView" },
-        { &class_NSMovieView, "NSMovieView" },
-        { &class_NSLock, "NSLock" },
-        { &class_NSCoder, "NSCoder" },
-        { &class_NSXMLElement, "NSXMLElement" },
-        { &class_NSLayoutManager, "NSLayoutManager" },
-        { &class_NSTabView, "NSTabView" },
-        { &class_NSSpeechRecognizer, "NSSpeechRecognizer" },
-        { &class_NSAttributedString, "NSAttributedString" },
-        { &class_NSProcessInfo, "NSProcessInfo" },
-        { &class_NSTextFieldCell, "NSTextFieldCell" },
-        { &class_NSDate, "NSDate" },
-        { &class_NSMachBootstrapServer, "NSMachBootstrapServer" },
-        { &class_NSData, "NSData" },
-        { &class_NSNumberFormatter, "NSNumberFormatter" },
-        { &class_NSPositionalSpecifier, "NSPositionalSpecifier" },
-        { &class_NSSegmentedControl, "NSSegmentedControl" },
-        { &class_NSMatrix, "NSMatrix" },
-        { &class_NSPanel, "NSPanel" },
-        { &class_NSPrintInfo, "NSPrintInfo" },
-        { &class_NSResponder, "NSResponder" },
-        { &class_NSNull, "NSNull" },
-        { &class_NSRunLoop, "NSRunLoop" },
-        { &class_NSMutableAttributedString, "NSMutableAttributedString" },
-        { &class_NSImageCell, "NSImageCell" },
-        { &class_CIColor, "CIColor" },
-        { &class_NSSegmentedCell, "NSSegmentedCell" },
-        { &class_NSDocument, "NSDocument" },
-        { &class_NSTextTab, "NSTextTab" },
-        { &class_NSWhoseSpecifier, "NSWhoseSpecifier" },
-        { &class_NSMenu, "NSMenu" },
-        { &class_NSPopUpButton, "NSPopUpButton" },
-        { &class_NSInvocation, "NSInvocation" },
-        { &class_NSDatePicker, "NSDatePicker" },
-        { &class_NSSliderCell, "NSSliderCell" },
-        { &class_NSURLCache, "NSURLCache" },
-        { &class_NSSpeechSynthesizer, "NSSpeechSynthesizer" },
-        { &class_NSBezierPath, "NSBezierPath" },
-        { &class_NSSavePanel, "NSSavePanel" },
-        { &class_NSMetadataQuery, "NSMetadataQuery" },
-        { &class_NSLogicalTest, "NSLogicalTest" },
-        { &class_NSAffineTransform, "NSAffineTransform" },
-        { &class_NSTreeNode, "NSTreeNode" },
-        { &class_NSControl, "NSControl" },
-        { &class_NSWindowController, "NSWindowController" },
-        { &class_NSURLResponse, "NSURLResponse" },
-        { &class_NSFormatter, "NSFormatter" },
-        { &class_NSAssertionHandler, "NSAssertionHandler" },
-        { &class_NSPort, "NSPort" },
-        { &class_NSURLProtectionSpace, "NSURLProtectionSpace" },
-        { &class_NSPredicate, "NSPredicate" },
-        { &class_NSIndexSpecifier, "NSIndexSpecifier" },
-        { &class_NSPortMessage, "NSPortMessage" },
-        { &class_NSTypesetter, "NSTypesetter" },
-        { &class_NSCompoundPredicate, "NSCompoundPredicate" },
-        { &class_NSBundle, "NSBundle" },
-        { &class_NSSortDescriptor, "NSSortDescriptor" },
-        { &class_NSFontManager, "NSFontManager" },
-        { &class_NSProxy, "NSProxy" },
-        { &class_NSTextView, "NSTextView" },
-        { &class_NSMutableSet, "NSMutableSet" },
-        { &class_NSDatePickerCell, "NSDatePickerCell" },
-        { &class_NSStatusItem, "NSStatusItem" },
-        { &class_NSDirectoryEnumerator, "NSDirectoryEnumerator" },
-        { &class_NSPropertyListSerialization, "NSPropertyListSerialization" },
-        { &class_NSHost, "NSHost" },
-        { &class_NSPipe, "NSPipe" },
-        { &class_NSNibConnector, "NSNibConnector" },
-        { &class_NSDecimalNumber, "NSDecimalNumber" },
-        { &class_NSMenuView, "NSMenuView" },
-        { &class_NSMenuItem, "NSMenuItem" },
-        { &class_NSPICTImageRep, "NSPICTImageRep" },
-        { &class_NSPasteboard, "NSPasteboard" },
-        { &class_NSScriptExecutionContext, "NSScriptExecutionContext" },
-        { &class_NSNotificationQueue, "NSNotificationQueue" },
-        { &class_NSError, "NSError" },
-        { &class_NSNib, "NSNib" },
-        { &class_NSAppleEventManager, "NSAppleEventManager" },
-        { &class_NSCondition, "NSCondition" },
-        { &class_NSBrowser, "NSBrowser" },
-        { &class_NSDocumentController, "NSDocumentController" },
-        { &class_NSMethodSignature, "NSMethodSignature" },
-        { &class_NSTextList, "NSTextList" },
-        { &class_NSURLCredentialStorage, "NSURLCredentialStorage" },
-        { &class_NSEvent, "NSEvent" },
-        { &class_NSScreen, "NSScreen" },
-        { &class_NSMutableCharacterSet, "NSMutableCharacterSet" },
-        { &class_NSSecureTextFieldCell, "NSSecureTextFieldCell" },
-        { &class_NSOpenGLPixelFormat, "NSOpenGLPixelFormat" },
-        { &class_NSInputServer, "NSInputServer" },
-        { &class_NSNotification, "NSNotification" },
-        { &class_NSSpecifierTest, "NSSpecifierTest" },
-        { &class_NSCustomImageRep, "NSCustomImageRep" },
-        { &class_NSParagraphStyle, "NSParagraphStyle" },
-        { &class_NSTableView, "NSTableView" },
-        { &class_NSFileWrapper, "NSFileWrapper" },
-        { &class_NSNotificationCenter, "NSNotificationCenter" },
-        { &class_NSMutableString, "NSMutableString" },
-        { &class_NSFontPanel, "NSFontPanel" },
-        { &class_NSAppleEventDescriptor, "NSAppleEventDescriptor" },
-        { &class_NSConnection, "NSConnection" },
-        { &class_NSURLDownload, "NSURLDownload" },
-        { &class_NSKeyedUnarchiver, "NSKeyedUnarchiver" },
-        { &class_NSCountedSet, "NSCountedSet" },
-        { &class_NSSlider, "NSSlider" },
-        { &class_NSCharacterSet, "NSCharacterSet" },
-        { &class_NSDictionary, "NSDictionary" },
-        { &class_NSOpenGLContext, "NSOpenGLContext" },
-        { &class_NSCachedImageRep, "NSCachedImageRep" },
-        { &class_NSURL, "NSURL" },
-        { &class_NSInputStream, "NSInputStream" },
-        { &class_NSMutableURLRequest, "NSMutableURLRequest" },
-        { &class_NSURLConnection, "NSURLConnection" },
-        { &class_NSPersistentDocument, "NSPersistentDocument" },
-        { &class_NSClipView, "NSClipView" },
-        { &class_NSScriptSuiteRegistry, "NSScriptSuiteRegistry" },
-        { &class_NSStepper, "NSStepper" },
-        { &class_NSXMLNode, "NSXMLNode" },
-        { &class_NSHTTPCookie, "NSHTTPCookie" },
-        { &class_NSMetadataQueryResultGroup, "NSMetadataQueryResultGroup" },
-        { &class_NSURLCredential, "NSURLCredential" },
-        { &class_NSHashTable, "NSHashTable" },
-        { &class_NSColor, "NSColor" },
-        { &class_NSPathComponentCell, "NSPathComponentCell" },
-        { &class_NSToolbar, "NSToolbar" },
-        { &class_NSUndoManager, "NSUndoManager" },
-        { &class_NSNibControlConnector, "NSNibControlConnector" },
-        { &class_NSFontDescriptor, "NSFontDescriptor" },
-        { &class_NSSpellChecker, "NSSpellChecker" },
-        { &class_NSTableColumn, "NSTableColumn" },
-        { &class_NSSpellServer, "NSSpellServer" },
-        { &class_NSAutoreleasePool, "NSAutoreleasePool" },
-        { &class_NSUnarchiver, "NSUnarchiver" },
-        { &class_NSColorSpace, "NSColorSpace" },
-        { &class_NSQuickDrawView, "NSQuickDrawView" },
-        { &class_NSDrawer, "NSDrawer" },
-        { &class_NSFileHandle, "NSFileHandle" },
-        { &class_NSCalendarDate, "NSCalendarDate" },
-        { &class_NSThread, "NSThread" },
-        { &class_NSProtocolChecker, "NSProtocolChecker" },
-        { &class_NSDateComponents, "NSDateComponents" },
-        { &class_NSAnimationContext, "NSAnimationContext" },
-        { &class_NSURLRequest, "NSURLRequest" },
-        { &class_NSViewAnimation, "NSViewAnimation" },
-        { &class_NSScriptObjectSpecifier, "NSScriptObjectSpecifier" },
-        { &class_NSCell, "NSCell" },
-        { &class_NSTableHeaderCell, "NSTableHeaderCell" },
-        { &class_NSATSTypesetter, "NSATSTypesetter" },
-        { &class_NSNetService, "NSNetService" },
-        { &class_NSMutableParagraphStyle, "NSMutableParagraphStyle" },
-        { &class_NSButton, "NSButton" },
-        { &class_NSAnimation, "NSAnimation" },
-        { &class_NSText, "NSText" },
-        { &class_NSMapTable, "NSMapTable" },
-        { &class_NSDictionaryController, "NSDictionaryController" },
-        { &class_NSTrackingArea, "NSTrackingArea" },
-        { &class_NSURLProtocol, "NSURLProtocol" },
-        { &class_NSGlyphInfo, "NSGlyphInfo" },
-        { &class_NSSocketPortNameServer, "NSSocketPortNameServer" },
-        { &class_NSQuitCommand, "NSQuitCommand" },
-        { &class_NSDistributedNotificationCenter, "NSDistributedNotificationCenter" },
-        { &class_NSCloseCommand, "NSCloseCommand" },
-        { &class_NSPrintOperation, "NSPrintOperation" },
-        { &class_NSGraphicsContext, "NSGraphicsContext" },
-        { &class_NSNumber, "NSNumber" },
-        { &class_NSPortCoder, "NSPortCoder" },
-        { &class_NSTextTableBlock, "NSTextTableBlock" },
-        { &class_NSNibOutletConnector, "NSNibOutletConnector" },
-        { &class_NSLocale, "NSLocale" },
-        { &class_NSTableHeaderView, "NSTableHeaderView" },
-        { &class_NSScriptWhoseTest, "NSScriptWhoseTest" },
-        { &class_NSNetServiceBrowser, "NSNetServiceBrowser" },
-        { &class_NSConditionLock, "NSConditionLock" },
-        { &class_NSTimeZone, "NSTimeZone" },
-        { &class_NSComparisonPredicate, "NSComparisonPredicate" },
-        { &class_NSScriptCoercionHandler, "NSScriptCoercionHandler" },
-        { &class_NSFileManager, "NSFileManager" },
-        { &class_NSPredicateEditorRowTemplate, "NSPredicateEditorRowTemplate" },
-        { &class_NSString, "NSString" },
-        { &class_NSToolbarItem, "NSToolbarItem" },
-        { &class_NSPointerArray, "NSPointerArray" },
-        { &class_NSURLAuthenticationChallenge, "NSURLAuthenticationChallenge" },
-        { &class_NSStatusBar, "NSStatusBar" },
-        { &class_NSTextField, "NSTextField" },
-        { &class_NSSecureTextField, "NSSecureTextField" },
-        { &class_NSOutputStream, "NSOutputStream" },
-        { &class_NSComboBoxCell, "NSComboBoxCell" },
-        { &class_NSXMLDTDNode, "NSXMLDTDNode" },
-        { &class_NSMessagePortNameServer, "NSMessagePortNameServer" },
-        { &class_NSHTTPCookieStorage, "NSHTTPCookieStorage" },
-        { &class_NSActionCell, "NSActionCell" },
-        { &class_NSXMLDocument, "NSXMLDocument" },
-        { &class_NSBitmapImageRep, "NSBitmapImageRep" },
-        { &class_NSHTTPURLResponse, "NSHTTPURLResponse" },
-        { &class_NSImage, "NSImage" },
-        { &class_NSIndexSet, "NSIndexSet" },
-        { &class_NSRangeSpecifier, "NSRangeSpecifier" },
-        { &class_NSGlyphGenerator, "NSGlyphGenerator" },
-        { &class_NSFormCell, "NSFormCell" },
-        { &class_NSScroller, "NSScroller" },
-        { &class_NSMetadataItem, "NSMetadataItem" },
-        { &class_NSStream, "NSStream" },
-        { &class_NSClassDescription, "NSClassDescription" },
-        { &class_NSMutableIndexSet, "NSMutableIndexSet" },
-        { &class_NSView, "NSView" },
-        { &class_NSUserDefaults, "NSUserDefaults" },
-        { &class_NSSetCommand, "NSSetCommand" },
-        { &class_NSPathCell, "NSPathCell" },
-        { &class_NSMoveCommand, "NSMoveCommand" },
-        { &class_NSSplitView, "NSSplitView" },
-        { &class_NSTextBlock, "NSTextBlock" },
-        { &class_NSTabViewItem, "NSTabViewItem" },
-        { &class_NSCollectionViewItem, "NSCollectionViewItem" },
-        { &class_NSValue, "NSValue" },
-        { &class_NSHelpManager, "NSHelpManager" },
-        { &class_NSEnumerator, "NSEnumerator" },
-        { &class_NSDistantObject, "NSDistantObject" },
-        { &class_NSGarbageCollector, "NSGarbageCollector" },
-        { &class_NSXMLParser, "NSXMLParser" },
-        { &class_NSFont, "NSFont" },
-        { &class_NSAlert, "NSAlert" },
-        { &class_NSUniqueIDSpecifier, "NSUniqueIDSpecifier" },
-        { &class_NSOutlineView, "NSOutlineView" },
-        { &class_NSProgressIndicator, "NSProgressIndicator" },
-        { &class_NSController, "NSController" },
-        { &class_NSComboBox, "NSComboBox" },
-        { &class_NSArrayController, "NSArrayController" },
-        { &class_NSKeyedArchiver, "NSKeyedArchiver" },
-        { &class_NSDecimalNumberHandler, "NSDecimalNumberHandler" },
-        { &class_NSObject, "NSObject" },
-        { &class_NSNameSpecifier, "NSNameSpecifier" },
-        { &class_NSUserDefaultsController, "NSUserDefaultsController" },
-        { &class_NSLevelIndicator, "NSLevelIndicator" },
-        { &class_NSDistributedLock, "NSDistributedLock" },
-        { &class_NSTokenFieldCell, "NSTokenFieldCell" },
-        { &class_NSSet, "NSSet" },
-        { &class_NSMutableData, "NSMutableData" },
-        { &class_NSArray, "NSArray" },
-        { &class_NSExpression, "NSExpression" },
-        { &class_NSMenuItemCell, "NSMenuItemCell" },
-        { &class_NSColorPicker, "NSColorPicker" },
-        { &class_NSForm, "NSForm" },
-        { &class_NSApplication, "NSApplication" },
-        { &class_NSInputManager, "NSInputManager" },
-        { &class_NSPointerFunctions, "NSPointerFunctions" },
-        { &class_NSRecursiveLock, "NSRecursiveLock" },
-        { &class_NSBox, "NSBox" },
-        { &class_NSDockTile, "NSDockTile" },
-        { &class_NSTextAttachment, "NSTextAttachment" },
-        { &class_NSIndexPath, "NSIndexPath" },
-        { &class_NSEPSImageRep, "NSEPSImageRep" },
-        { &class_NSBrowserCell, "NSBrowserCell" },
-        { &class_NSValueTransformer, "NSValueTransformer" },
-        { &class_CIImage, "CIImage" },
-        { &class_NSMovie, "NSMovie" },
-        { &class_NSTimer, "NSTimer" },
-        { &class_NSMachPort, "NSMachPort" },
-        { &class_NSCreateCommand, "NSCreateCommand" },
-        { &class_NSPortNameServer, "NSPortNameServer" },
-        { &class_NSRulerMarker, "NSRulerMarker" },
-        { &class_NSImageRep, "NSImageRep" },
-        { &class_NSWindow, "NSWindow" },
-        { &class_NSColorWell, "NSColorWell" },
-        { &class_NSSound, "NSSound" },
-        { &class_NSToolbarItemGroup, "NSToolbarItemGroup" },
-        { &class_NSRulerView, "NSRulerView" },
-        { &class_NSWorkspace, "NSWorkspace" },
-        { &class_NSSearchFieldCell, "NSSearchFieldCell" },
-        { &class_NSMutableArray, "NSMutableArray" },
-        { &class_NSRuleEditor, "NSRuleEditor" },
-        { &class_NSScriptCommandDescription, "NSScriptCommandDescription" },
-        { &class_NSViewController, "NSViewController" },
-        { &class_NSPredicateEditor, "NSPredicateEditor" },
-        { &class_NSCloneCommand, "NSCloneCommand" },
-        { &class_NSOpenGLView, "NSOpenGLView" },
-        { &class_NSCursor, "NSCursor" },
-        { &class_NSSearchField, "NSSearchField" },
-        { &class_NSXMLDTD, "NSXMLDTD" },
-        { &class_NSSocketPort, "NSSocketPort" },
-        { &class_NSObjectController, "NSObjectController" },
-        { &class_NSScriptCommand, "NSScriptCommand" },
-        { &class_NSShadow, "NSShadow" },
-        { &class_NSScrollView, "NSScrollView" },
-        { &class_NSPrintPanel, "NSPrintPanel" },
-        { &class_NSURLHandle, "NSURLHandle" },
-        { &class_NSOperation, "NSOperation" },
-        { &class_NSMutableDictionary, "NSMutableDictionary" },
-        { &class_NSException, "NSException" },
-        { &class_NSButtonCell, "NSButtonCell" },
-        { &class_NSTask, "NSTask" },
-        { &class_NSArchiver, "NSArchiver" },
-        { &class_NSDateFormatter, "NSDateFormatter" },
-        { &class_NSCalendar, "NSCalendar" },
-        { &class_NSTokenField, "NSTokenField" },
-        { &class_NSCollectionView, "NSCollectionView" },
-        { &class_NSColorList, "NSColorList" },
-        { &class_DOMEvent, "DOMEvent" },
-        { &class_DOMWheelEvent, "DOMWheelEvent" },
-        { &class_WebView, "WebView" },
-        { &class_WebPreferences, "WebPreferences" },
-        { &class_WebFrameView, "WebFrameView" },
-    ];
-
-    /** Selectors */
-    public static /*const*/ String sel_inputClientEnabled_1;
-    public static /*const*/ String sel_setVerticalPagination_1;
-    public static /*const*/ String sel_isEqualToHost_1;
-    public static /*const*/ String sel_compare_1;
-    public static /*const*/ String sel_printPanel;
-    public static /*const*/ String sel_unregisterImageRepClass_1;
-    public static /*const*/ String sel_dataWithLength_1;
-    public static /*const*/ String sel_dismissPopUp;
-    public static /*const*/ String sel_substituteFontForFont_1;
-    public static /*const*/ String sel_sendAction_1to_1;
-    public static /*const*/ String sel_rangeOfCharacterFromSet_1options_1range_1;
-    public static /*const*/ String sel_autoupdatingCurrentCalendar;
-    public static /*const*/ String sel_nextDaylightSavingTimeTransitionAfterDate_1;
-    public static /*const*/ String sel_attachmentSizeForGlyphAtIndex_1;
-    public static /*const*/ String sel_shouldCollapseAutoExpandedItemsForDeposited_1;
-    public static /*const*/ String sel_decimalNumberByRoundingAccordingToBehavior_1;
-    public static /*const*/ String sel_scanHexFloat_1;
-    public static /*const*/ String sel_rangesForUserTextChange;
-    public static /*const*/ String sel_indexOfItemWithObjectValue_1;
-    public static /*const*/ String sel_sendsSearchStringImmediately;
-    public static /*const*/ String sel_isTransparent;
-    public static /*const*/ String sel_widthOfColumn_1;
-    public static /*const*/ String sel_calendarFormat;
-    public static /*const*/ String sel_lineBreakByHyphenatingBeforeIndex_1withinRange_1;
-    public static /*const*/ String sel_parentNode;
-    public static /*const*/ String sel_setDrawsOutsideLineFragment_1forGlyphRange_1;
-    public static /*const*/ String sel_negativeSuffix;
-    public static /*const*/ String sel_setFlatness_1;
-    public static /*const*/ String sel_ignoresAlpha;
-    public static /*const*/ String sel_setValue_1type_1forDimension_1;
-    public static /*const*/ String sel_setLayer_1;
-    public static /*const*/ String sel_setActionName_1;
-    public static /*const*/ String sel_setIcon_1;
-    public static /*const*/ String sel_tokenFieldCell_1readFromPasteboard_1;
-    public static /*const*/ String sel_setPropertyList_1forType_1;
-    public static /*const*/ String sel_endModalSession_1;
-    public static /*const*/ String sel_sharedColorPanel;
-    public static /*const*/ String sel_contentSizeForFrameSize_1hasHorizontalScroller_1hasVerticalScroller_1borderType_1;
-    public static /*const*/ String sel_layoutRectForTextBlock_1glyphRange_1;
-    public static /*const*/ String sel_scrollRowToVisible_1;
-    public static /*const*/ String sel_attributedStringForZero;
-    public static /*const*/ String sel_showsInvisibleCharacters;
-    public static /*const*/ String sel_adjustPageWidthNew_1left_1right_1limit_1;
-    public static /*const*/ String sel_client;
-    public static /*const*/ String sel_initWithKey_1ascending_1selector_1;
-    public static /*const*/ String sel_completedString_1;
-    public static /*const*/ String sel_bundleForClass_1;
-    public static /*const*/ String sel_pathControl_1acceptDrop_1;
-    public static /*const*/ String sel_imageRepsWithPasteboard_1;
-    public static /*const*/ String sel_toolTipForSegment_1;
-    public static /*const*/ String sel_suspended;
-    public static /*const*/ String sel_encodeDouble_1forKey_1;
-    public static /*const*/ String sel_setNextState;
-    public static /*const*/ String sel_ignoreWord_1inSpellDocumentWithTag_1;
-    public static /*const*/ String sel_stopMonitoring;
-    public static /*const*/ String sel_initWithTitle_1action_1keyEquivalent_1;
-    public static /*const*/ String sel_setDropRow_1dropOperation_1;
-    public static /*const*/ String sel_contentView;
-    public static /*const*/ String sel_setNilSymbol_1;
-    public static /*const*/ String sel_removePropertyForKey_1inRequest_1;
-    public static /*const*/ String sel_setMarkerLocation_1;
-    public static /*const*/ String sel_resolvedKeyDictionary;
-    public static /*const*/ String sel_enumeratorAtPath_1;
-    public static /*const*/ String sel_decodeObjectForKey_1;
-    public static /*const*/ String sel_loadInForeground;
-    public static /*const*/ String sel_baseSpecifier;
-    public static /*const*/ String sel_isMemberOfClass_1;
-    public static /*const*/ String sel_setMaxVisibleColumns_1;
-    public static /*const*/ String sel_unmountAndEjectDeviceAtPath_1;
-    public static /*const*/ String sel_openTempFile_1;
-    public static /*const*/ String sel_isRowSelected_1;
-    public static /*const*/ String sel_insertItemWithItemIdentifier_1atIndex_1;
-    public static /*const*/ String sel_parserDidEndDocument_1;
-    public static /*const*/ String sel_reverseTransformedValue_1;
-    public static /*const*/ String sel_setTimeStyle_1;
-    public static /*const*/ String sel_initWithContentsOfFile_1usedEncoding_1error_1;
-    public static /*const*/ String sel_endGrouping;
-    public static /*const*/ String sel_initWithProxyHost_1port_1type_1realm_1authenticationMethod_1;
-    public static /*const*/ String sel_tableView_1dataCellForTableColumn_1row_1;
-    public static /*const*/ String sel_convertPoint_1toView_1;
-    public static /*const*/ String sel_setFrame_1display_1animate_1;
-    public static /*const*/ String sel_exceptionDuringOperation_1error_1leftOperand_1rightOperand_1;
-    public static /*const*/ String sel_applicationOpenUntitledFile_1;
-    public static /*const*/ String sel_initWithRootElement_1;
-    public static /*const*/ String sel_setHorizontalScroller_1;
-    public static /*const*/ String sel_finalWritePrintInfo;
-    public static /*const*/ String sel_addItemWithTitle_1;
-    public static /*const*/ String sel_setColor_1;
-    public static /*const*/ String sel_isHostCacheEnabled;
-    public static /*const*/ String sel_controlTextDidChange_1;
-    public static /*const*/ String sel_headerLevel;
-    public static /*const*/ String sel_loadInBackground;
-    public static /*const*/ String sel_setNeedsDisplayForItemAtIndex_1;
-    public static /*const*/ String sel_setCellPrototype_1;
-    public static /*const*/ String sel_enqueueNotification_1postingStyle_1coalesceMask_1forModes_1;
-    public static /*const*/ String sel_minColumnWidth;
-    public static /*const*/ String sel_tableView_1shouldTypeSelectForEvent_1withCurrentSearchString_1;
-    public static /*const*/ String sel_validateValue_1forKey_1error_1;
-    public static /*const*/ String sel_canBeConvertedToEncoding_1;
-    public static /*const*/ String sel_numberOfItems;
-    public static /*const*/ String sel_bestRepresentationForDevice_1;
-    public static /*const*/ String sel_setBorderColor_1forEdge_1;
-    public static /*const*/ String sel_setHorizontalLineScroll_1;
-    public static /*const*/ String sel_sharedHTTPCookieStorage;
-    public static /*const*/ String sel_cachesBezierPath;
-    public static /*const*/ String sel_strokeLineFromPoint_1toPoint_1;
-    public static /*const*/ String sel_preferredBackingLocation;
-    public static /*const*/ String sel_removeRowAtIndex_1;
-    public static /*const*/ String sel_setCurrentTime_1;
-    public static /*const*/ String sel_string;
-    public static /*const*/ String sel_hasVerticalScroller;
-    public static /*const*/ String sel_initWithTimeInterval_1sinceDate_1;
-    public static /*const*/ String sel_showsProgressPanel;
-    public static /*const*/ String sel_setDirectParameter_1;
-    public static /*const*/ String sel_storeCachedResponse_1forRequest_1;
-    public static /*const*/ String sel_textUnfilteredPasteboardTypes;
-    public static /*const*/ String sel_isDragging;
-    public static /*const*/ String sel_tableView_1shouldTrackCell_1forTableColumn_1row_1;
-    public static /*const*/ String sel_dictionaryRepresentation;
-    public static /*const*/ String sel_attributesForExtraLineFragment;
-    public static /*const*/ String sel_getCharacters_1range_1;
-    public static /*const*/ String sel_nibName;
-    public static /*const*/ String sel_initWithURL_1options_1documentAttributes_1error_1;
-    public static /*const*/ String sel_initWithFrame_1mode_1cellClass_1numberOfRows_1numberOfColumns_1;
-    public static /*const*/ String sel_reflectScrolledClipView_1;
-    public static /*const*/ String sel_stringWithContentsOfURL_1usedEncoding_1error_1;
-    public static /*const*/ String sel_displayIfNeededIgnoringOpacity;
-    public static /*const*/ String sel_archiverWillFinish_1;
-    public static /*const*/ String sel_initWithOptions_1;
-    public static /*const*/ String sel_ruleEditor_1numberOfChildrenForCriterion_1withRowType_1;
-    public static /*const*/ String sel_removeColorWithKey_1;
-    public static /*const*/ String sel_setObjectValue_1;
-    public static /*const*/ String sel_graphicsContextWithGraphicsPort_1flipped_1;
-    public static /*const*/ String sel_setMarkedText_1selectedRange_1replacementRange_1;
-    public static /*const*/ String sel_outlineView_1numberOfChildrenOfItem_1;
-    public static /*const*/ String sel_cellFrameAtRow_1column_1;
-    public static /*const*/ String sel_blueColor;
-    public static /*const*/ String sel_selectedTextBackgroundColor;
-    public static /*const*/ String sel_initWithFormat_1locale_1;
-    public static /*const*/ String sel_propertyListForType_1;
-    public static /*const*/ String sel_setConfigurationFromDictionary_1;
-    public static /*const*/ String sel_registerClassDescription_1forClass_1;
-    public static /*const*/ String sel_removeAllItems;
-    public static /*const*/ String sel_setFontPanelFactory_1;
-    public static /*const*/ String sel_didChangeValueForKey_1withSetMutation_1usingObjects_1;
-    public static /*const*/ String sel_CGEvent;
-    public static /*const*/ String sel_disable;
-    public static /*const*/ String sel_setColumnAutoresizingStyle_1;
-    public static /*const*/ String sel_absoluteZ;
-    public static /*const*/ String sel_intForKey_1inTable_1;
-    public static /*const*/ String sel_minFrameWidthWithTitle_1styleMask_1;
-    public static /*const*/ String sel_highlightColor;
-    public static /*const*/ String sel_setRoundingMode_1;
-    public static /*const*/ String sel_didChangeValueForKey_1;
-    public static /*const*/ String sel_setMenuZone_1;
-    public static /*const*/ String sel_updateFromPrintInfo;
-    public static /*const*/ String sel_setSelectedItemIdentifier_1;
-    public static /*const*/ String sel_setReplyTimeout_1;
-    public static /*const*/ String sel_showsFirstResponder;
-    public static /*const*/ String sel_loadNibNamed_1owner_1;
-    public static /*const*/ String sel_setDocument_1;
-    public static /*const*/ String sel_filePosixPermissions;
-    public static /*const*/ String sel_collapseItem_1collapseChildren_1;
-    public static /*const*/ String sel_setCell_1;
-    public static /*const*/ String sel_setHTTPBodyStream_1;
-    public static /*const*/ String sel_updateAttachmentsFromPath_1;
-    public static /*const*/ String sel_updateFontPanel;
-    public static /*const*/ String sel_animationDidStop_1;
-    public static /*const*/ String sel_URL_1resourceDidFailLoadingWithReason_1;
-    public static /*const*/ String sel_defaultBaselineOffsetForFont_1;
-    public static /*const*/ String sel_browser_1shouldShowCellExpansionForRow_1column_1;
-    public static /*const*/ String sel_draggingEnded_1;
-    public static /*const*/ String sel_openURL_1;
-    public static /*const*/ String sel_longLongValue;
-    public static /*const*/ String sel_colorPanel;
-    public static /*const*/ String sel_encodeFloat_1forKey_1;
-    public static /*const*/ String sel_shouldBreakLineByHyphenatingBeforeCharacterAtIndex_1;
-    public static /*const*/ String sel_performSelectorInBackground_1withObject_1;
-    public static /*const*/ String sel_initTextCell_1;
-    public static /*const*/ String sel_classDescription;
-    public static /*const*/ String sel_menuFontOfSize_1;
-    public static /*const*/ String sel_window_1willPositionSheet_1usingRect_1;
-    public static /*const*/ String sel_allowsTypeSelect;
-    public static /*const*/ String sel_attributeWithName_1URI_1stringValue_1;
-    public static /*const*/ String sel_setLinkTextAttributes_1;
-    public static /*const*/ String sel_stringWithFormat_1;
-    public static /*const*/ String sel_initWithTable_1startingRow_1rowSpan_1startingColumn_1columnSpan_1;
-    public static /*const*/ String sel_setShouldProcessNamespaces_1;
-    public static /*const*/ String sel_orderFrontRegardless;
-    public static /*const*/ String sel_setProtocolForProxy_1;
-    public static /*const*/ String sel_bundlePath;
-    public static /*const*/ String sel_isAutoscroll;
-    public static /*const*/ String sel_addConnection_1toRunLoop_1forMode_1;
-    public static /*const*/ String sel_moveWordBackwardAndModifySelection_1;
-    public static /*const*/ String sel_textContainerChangedGeometry_1;
-    public static /*const*/ String sel_conversation;
-    public static /*const*/ String sel_showWindow_1;
-    public static /*const*/ String sel_showGuessPanel_1;
-    public static /*const*/ String sel_setBorderWidth_1;
-    public static /*const*/ String sel_buttons;
-    public static /*const*/ String sel_bitmapRepresentation;
-    public static /*const*/ String sel_nextObject;
-    public static /*const*/ String sel_predicate;
-    public static /*const*/ String sel_verticalPagination;
-    public static /*const*/ String sel_readInBackgroundAndNotify;
-    public static /*const*/ String sel_pixelBufferMipMapLevel;
-    public static /*const*/ String sel_getValue_1;
-    public static /*const*/ String sel_eventID;
-    public static /*const*/ String sel_sortDescriptors;
-    public static /*const*/ String sel_removeObjectAtArrangedObjectIndexPath_1;
-    public static /*const*/ String sel_decodeBytesWithReturnedLength_1;
-    public static /*const*/ String sel_textView_1shouldChangeTextInRange_1replacementString_1;
-    public static /*const*/ String sel_removeCursorRect_1cursor_1;
-    public static /*const*/ String sel_hasPassword;
-    public static /*const*/ String sel_updateWindows;
-    public static /*const*/ String sel_pasteboardWithName_1;
-    public static /*const*/ String sel_writeSelectionToPasteboard_1types_1;
-    public static /*const*/ String sel_setFlipped_1;
-    public static /*const*/ String sel_glyphWithName_1;
-    public static /*const*/ String sel_launchApplication_1showIcon_1autolaunch_1;
-    public static /*const*/ String sel_indexPath;
-    public static /*const*/ String sel_setAttributeDescriptor_1forKeyword_1;
-    public static /*const*/ String sel_removeAllActions;
-    public static /*const*/ String sel_defaultAttachmentScaling;
-    public static /*const*/ String sel_localizedStringWithFormat_1;
-    public static /*const*/ String sel_setAutoscroll_1;
-    public static /*const*/ String sel_heightAdjustLimit;
-    public static /*const*/ String sel_moveUpAndModifySelection_1;
-    public static /*const*/ String sel_visibilityPriority;
-    public static /*const*/ String sel_textView_1clickedOnCell_1inRect_1atIndex_1;
-    public static /*const*/ String sel_archivedDataWithRootObject_1;
-    public static /*const*/ String sel_parser_1foundCDATA_1;
-    public static /*const*/ String sel_setWidth_1ofColumn_1;
-    public static /*const*/ String sel_setHighlightedTableColumn_1;
-    public static /*const*/ String sel_toggle_1;
-    public static /*const*/ String sel_parent;
-    public static /*const*/ String sel_tableView_1shouldSelectRow_1;
-    public static /*const*/ String sel_setWithObject_1;
-    public static /*const*/ String sel_attribute_1atIndex_1effectiveRange_1;
-    public static /*const*/ String sel_columnsInRect_1;
-    public static /*const*/ String sel_setSearchScopes_1;
-    public static /*const*/ String sel_setByAddingObjectsFromArray_1;
-    public static /*const*/ String sel_textViewDidChangeTypingAttributes_1;
-    public static /*const*/ String sel_frameRate;
-    public static /*const*/ String sel_browser_1writeRowsWithIndexes_1inColumn_1toPasteboard_1;
-    public static /*const*/ String sel_errorWithDomain_1code_1userInfo_1;
-    public static /*const*/ String sel_setAlternate_1;
-    public static /*const*/ String sel_currentValue;
-    public static /*const*/ String sel_download_1decideDestinationWithSuggestedFilename_1;
-    public static /*const*/ String sel_setBoxType_1;
-    public static /*const*/ String sel_fileNamesFromRunningOpenPanel;
-    public static /*const*/ String sel_valueWithPointer_1;
-    public static /*const*/ String sel_metadataQuery_1replacementObjectForResultObject_1;
-    public static /*const*/ String sel_editedColumn;
-    public static /*const*/ String sel_cachedResponseForRequest_1;
-    public static /*const*/ String sel_failureReason;
-    public static /*const*/ String sel_constantValue;
-    public static /*const*/ String sel_commandClassName;
-    public static /*const*/ String sel_fileWrapper;
-    public static /*const*/ String sel_setUsesUserKeyEquivalents_1;
-    public static /*const*/ String sel_prototype;
-    public static /*const*/ String sel_clearStartAnimation;
-    public static /*const*/ String sel_setMovableByWindowBackground_1;
-    public static /*const*/ String sel_setDateFormat_1;
-    public static /*const*/ String sel_stringWithContentsOfFile_1usedEncoding_1error_1;
-    public static /*const*/ String sel_toggleAutomaticLinkDetection_1;
-    public static /*const*/ String sel_statusForTable_1;
-    public static /*const*/ String sel_setAllowsColumnSelection_1;
-    public static /*const*/ String sel_lowercaseWord_1;
-    public static /*const*/ String sel_setResolvesAliases_1;
-    public static /*const*/ String sel_appendFormat_1;
-    public static /*const*/ String sel_isAnimating;
-    public static /*const*/ String sel_dateFormat;
-    public static /*const*/ String sel_setMuted_1;
-    public static /*const*/ String sel_drawWithExpansionFrame_1inView_1;
-    public static /*const*/ String sel_copyPath_1toPath_1handler_1;
-    public static /*const*/ String sel_isExplicitlyIncluded;
-    public static /*const*/ String sel_isExtensionHidden;
-    public static /*const*/ String sel_showPackedGlyphs_1length_1glyphRange_1atPoint_1font_1color_1printingAdjustment_1;
-    public static /*const*/ String sel_rulerView_1didRemoveMarker_1;
-    public static /*const*/ String sel_setControlTint_1;
-    public static /*const*/ String sel_isSelectable;
-    public static /*const*/ String sel_initWithMachPort_1;
-    public static /*const*/ String sel_fill;
-    public static /*const*/ String sel_isEnteringProximity;
-    public static /*const*/ String sel_drawingRectForBounds_1;
-    public static /*const*/ String sel_decodeInt32ForKey_1;
-    public static /*const*/ String sel_deltaY;
-    public static /*const*/ String sel_displaysLinkToolTips;
-    public static /*const*/ String sel_moveToEndOfDocument_1;
-    public static /*const*/ String sel_isFirstResponder;
-    public static /*const*/ String sel_receiversSpecifier;
-    public static /*const*/ String sel_canInitWithURL_1;
-    public static /*const*/ String sel_parameterString;
-    public static /*const*/ String sel_isMovable;
-    public static /*const*/ String sel_setAvoidsEmptySelection_1;
-    public static /*const*/ String sel_lockFocusIfCanDrawInContext_1;
-    public static /*const*/ String sel_updateChangeCount_1;
-    public static /*const*/ String sel_rootDocument;
-    public static /*const*/ String sel_superview;
-    public static /*const*/ String sel_resolveNamespaceForName_1;
-    public static /*const*/ String sel_maxNumberOfColumns;
-    public static /*const*/ String sel_setMaxSize_1;
-    public static /*const*/ String sel_completePathIntoString_1caseSensitive_1matchesIntoArray_1filterTypes_1;
-    public static /*const*/ String sel_updateCell_1;
-    public static /*const*/ String sel_setWeek_1;
-    public static /*const*/ String sel_titleRectForBounds_1;
-    public static /*const*/ String sel_rulerView_1willAddMarker_1atLocation_1;
-    public static /*const*/ String sel_message;
-    public static /*const*/ String sel_setContentSize_1;
-    public static /*const*/ String sel_broadcast;
-    public static /*const*/ String sel_isNativeType_1;
-    public static /*const*/ String sel_contentBorderThicknessForEdge_1;
-    public static /*const*/ String sel_keyEquivalentOffset;
-    public static /*const*/ String sel_makeUntitledDocumentOfType_1;
-    public static /*const*/ String sel_windowFrameTextColor;
-    public static /*const*/ String sel_addItemsWithTitles_1;
-    public static /*const*/ String sel_levelForRow_1;
-    public static /*const*/ String sel_dissolveToPoint_1fromRect_1fraction_1;
-    public static /*const*/ String sel_discardCachedImage;
-    public static /*const*/ String sel_rootProxyForConnectionWithRegisteredName_1host_1usingNameServer_1;
-    public static /*const*/ String sel_mouseExited_1;
-    public static /*const*/ String sel_stringWithCString_1;
-    public static /*const*/ String sel_standardUserDefaults;
-    public static /*const*/ String sel_archiver_1didEncodeObject_1;
-    public static /*const*/ String sel_canDraw;
-    public static /*const*/ String sel_shouldDelayWindowOrderingForEvent_1;
-    public static /*const*/ String sel_selectedMenuItemTextColor;
-    public static /*const*/ String sel_attachSubmenuForItemAtIndex_1;
-    public static /*const*/ String sel_condition;
-    public static /*const*/ String sel_setReservedThicknessForAccessoryView_1;
-    public static /*const*/ String sel_replaceObjectsInRange_1withObjectsFromArray_1;
-    public static /*const*/ String sel_placeholderString;
-    public static /*const*/ String sel_setPMSymbol_1;
-    public static /*const*/ String sel_localizedNameOfStringEncoding_1;
-    public static /*const*/ String sel_outlineViewItemWillCollapse_1;
-    public static /*const*/ String sel_localizedKey;
-    public static /*const*/ String sel_whiteColor;
-    public static /*const*/ String sel_viewBoundsChanged_1;
-    public static /*const*/ String sel_vendorDefined;
-    public static /*const*/ String sel_classNameDecodedForArchiveClassName_1;
-    public static /*const*/ String sel_lockDate;
-    public static /*const*/ String sel_twoDigitStartDate;
-    public static /*const*/ String sel_rectOfRow_1;
-    public static /*const*/ String sel_receivePort;
-    public static /*const*/ String sel_decimalNumberByMultiplyingByPowerOf10_1withBehavior_1;
-    public static /*const*/ String sel_isAnyApplicationSpeaking;
-    public static /*const*/ String sel_aeDesc;
-    public static /*const*/ String sel_windowWillBeginSheet_1;
-    public static /*const*/ String sel_accessibilityFocusedUIElement;
-    public static /*const*/ String sel_orderBack_1;
-    public static /*const*/ String sel_scanDecimal_1;
-    public static /*const*/ String sel_transformStruct;
-    public static /*const*/ String sel_fileAttributesToWriteToFile_1ofType_1saveOperation_1;
-    public static /*const*/ String sel_controlCharacterSet;
-    public static /*const*/ String sel_setNextResponder_1;
-    public static /*const*/ String sel_pasteboardChangedOwner_1;
-    public static /*const*/ String sel_canSelectHiddenExtension;
-    public static /*const*/ String sel_attribute_1atIndex_1longestEffectiveRange_1inRange_1;
-    public static /*const*/ String sel_setAutovalidates_1;
-    public static /*const*/ String sel_setAllowsFloats_1;
-    public static /*const*/ String sel_sortDescriptorPrototype;
-    public static /*const*/ String sel_trackKnob_1;
-    public static /*const*/ String sel_comboBox_1indexOfItemWithStringValue_1;
-    public static /*const*/ String sel_setSource_1;
-    public static /*const*/ String sel_contentFilters;
-    public static /*const*/ String sel_dictionaryWithContentsOfFile_1;
-    public static /*const*/ String sel_drawArrow_1highlight_1;
-    public static /*const*/ String sel_handleSaveScriptCommand_1;
-    public static /*const*/ String sel_rangeOfString_1options_1;
-    public static /*const*/ String sel_setPickerMode_1;
-    public static /*const*/ String sel_setStandaloneQuarterSymbols_1;
-    public static /*const*/ String sel_setSize_1;
-    public static /*const*/ String sel_setAllowsUndo_1;
-    public static /*const*/ String sel_edge;
-    public static /*const*/ String sel_stopLoading;
-    public static /*const*/ String sel_fileURLWithPath_1isDirectory_1;
-    public static /*const*/ String sel_userInfo;
-    public static /*const*/ String sel_components_1fromDate_1;
-    public static /*const*/ String sel_dictionary;
-    public static /*const*/ String sel_connection_1didCancelAuthenticationChallenge_1;
-    public static /*const*/ String sel_selectParagraph_1;
-    public static /*const*/ String sel_initWithCapacity_1;
-    public static /*const*/ String sel_initWithObjectSpecifier_1comparisonOperator_1testObject_1;
-    public static /*const*/ String sel_nestingMode;
-    public static /*const*/ String sel_paragraphSpacingBefore;
-    public static /*const*/ String sel_itemChanged_1;
-    public static /*const*/ String sel_setSelectionIndexes_1;
-    public static /*const*/ String sel_open;
-    public static /*const*/ String sel_sendActionOn_1;
-    public static /*const*/ String sel_initWithFireDate_1interval_1target_1selector_1userInfo_1repeats_1;
-    public static /*const*/ String sel_formatterBehavior;
-    public static /*const*/ String sel_fillRect_1;
-    public static /*const*/ String sel_animationCurve;
-    public static /*const*/ String sel_remoteObjects;
-    public static /*const*/ String sel_setSelectionIndexPath_1;
-    public static /*const*/ String sel_availableFontNamesWithTraits_1;
-    public static /*const*/ String sel_convertFont_1toFamily_1;
-    public static /*const*/ String sel_splitView_1resizeSubviewsWithOldSize_1;
-    public static /*const*/ String sel_setSmartInsertDeleteEnabled_1;
-    public static /*const*/ String sel_shouldChangePrintInfo_1;
-    public static /*const*/ String sel_objectBeingTested;
-    public static /*const*/ String sel_selectItemWithObjectValue_1;
-    public static /*const*/ String sel_rightExpressions;
-    public static /*const*/ String sel_unableToSetNilForKey_1;
-    public static /*const*/ String sel_visibleItems;
-    public static /*const*/ String sel_items;
-    public static /*const*/ String sel_templatesWithAttributeKeyPaths_1inEntityDescription_1;
-    public static /*const*/ String sel_setMaximumIntegerDigits_1;
-    public static /*const*/ String sel_scrollRectToVisible_1;
-    public static /*const*/ String sel_disableKeyEquivalentForDefaultButtonCell;
-    public static /*const*/ String sel_objectsForXQuery_1error_1;
-    public static /*const*/ String sel_readToEndOfFileInBackgroundAndNotifyForModes_1;
-    public static /*const*/ String sel_scanHexLongLong_1;
-    public static /*const*/ String sel_ascender;
-    public static /*const*/ String sel_arrangeObjects_1;
-    public static /*const*/ String sel_setNegativeSuffix_1;
-    public static /*const*/ String sel_initWithString_1;
-    public static /*const*/ String sel_initWithName_1data_1;
-    public static /*const*/ String sel_data;
-    public static /*const*/ String sel_encodePortObject_1;
-    public static /*const*/ String sel_becomeFirstResponder;
-    public static /*const*/ String sel_setImage_1forSegment_1;
-    public static /*const*/ String sel_copyRuler_1;
-    public static /*const*/ String sel_appendBezierPathWithGlyphs_1count_1inFont_1;
-    public static /*const*/ String sel_playsSelectionOnly;
-    public static /*const*/ String sel_boundsRectForTextBlock_1glyphRange_1;
-    public static /*const*/ String sel_makeObjectsPerformSelector_1withObject_1;
-    public static /*const*/ String sel_stringByTrimmingCharactersInSet_1;
-    public static /*const*/ String sel_timerWithTimeInterval_1invocation_1repeats_1;
-    public static /*const*/ String sel_viewDidMoveToSuperview;
-    public static /*const*/ String sel_pathCell_1willDisplayOpenPanel_1;
-    public static /*const*/ String sel_pathSeparator;
-    public static /*const*/ String sel_generatesCalendarDates;
-    public static /*const*/ String sel_pressure;
-    public static /*const*/ String sel_sendPort;
-    public static /*const*/ String sel_argumentsRetained;
-    public static /*const*/ String sel_setContainerSpecifier_1;
-    public static /*const*/ String sel_decodeNXColor;
-    public static /*const*/ String sel_orientation;
-    public static /*const*/ String sel_setScriptErrorString_1;
-    public static /*const*/ String sel_makeDocumentWithContentsOfFile_1ofType_1;
-    public static /*const*/ String sel_reason;
-    public static /*const*/ String sel_currentEvent;
-    public static /*const*/ String sel_setOffScreen_1width_1height_1rowbytes_1;
-    public static /*const*/ String sel_invalidateAttributesInRange_1;
-    public static /*const*/ String sel_descriptorWithDescriptorType_1bytes_1length_1;
-    public static /*const*/ String sel_setCredential_1forProtectionSpace_1;
-    public static /*const*/ String sel_fileGroupOwnerAccountName;
-    public static /*const*/ String sel_setColor_1forKey_1;
-    public static /*const*/ String sel_setAutohidesScrollers_1;
-    public static /*const*/ String sel_noteNumberOfRowsChanged;
-    public static /*const*/ String sel_disableCursorRects;
-    public static /*const*/ String sel_setLenient_1;
-    public static /*const*/ String sel_registerUnitWithName_1abbreviation_1unitToPointsConversionFactor_1stepUpCycle_1stepDownCycle_1;
-    public static /*const*/ String sel_standardWindowButton_1;
-    public static /*const*/ String sel_objectForProperty_1error_1;
-    public static /*const*/ String sel_imageRepWithData_1;
-    public static /*const*/ String sel_flushGraphics;
-    public static /*const*/ String sel_setCacheDepthMatchesImageDepth_1;
-    public static /*const*/ String sel_highlightColorInView_1;
-    public static /*const*/ String sel_setBaseSpecifier_1;
-    public static /*const*/ String sel_performFileOperation_1source_1destination_1files_1tag_1;
-    public static /*const*/ String sel_outlineView_1itemForPersistentObject_1;
-    public static /*const*/ String sel_propertyListFromData_1mutabilityOption_1format_1errorDescription_1;
-    public static /*const*/ String sel_setDocumentView_1;
-    public static /*const*/ String sel_drawsOutsideLineFragmentForGlyphAtIndex_1;
-    public static /*const*/ String sel_dragImageForSelectionWithEvent_1origin_1;
-    public static /*const*/ String sel_buttonNumber;
-    public static /*const*/ String sel_advancementForGlyph_1;
-    public static /*const*/ String sel_parser_1validationErrorOccurred_1;
-    public static /*const*/ String sel_reusesColumns;
-    public static /*const*/ String sel_minute;
-    public static /*const*/ String sel_setCanChooseFiles_1;
-    public static /*const*/ String sel_groupingSize;
-    public static /*const*/ String sel_containsAttachments;
-    public static /*const*/ String sel_selectedControlTextColor;
-    public static /*const*/ String sel_initWithMantissa_1exponent_1isNegative_1;
-    public static /*const*/ String sel_initWithVoice_1;
-    public static /*const*/ String sel_setResizingMask_1;
-    public static /*const*/ String sel_setOnMouseExited_1;
-    public static /*const*/ String sel_toggleContinuousSpellChecking_1;
-    public static /*const*/ String sel_allowsCutCopyPaste;
-    public static /*const*/ String sel_endSheet_1;
-    public static /*const*/ String sel_allowsBranchSelection;
-    public static /*const*/ String sel_initWithRequest_1delegate_1;
-    public static /*const*/ String sel_isAtEnd;
-    public static /*const*/ String sel_relativeString;
-    public static /*const*/ String sel_tableView_1willDisplayCell_1forTableColumn_1row_1;
-    public static /*const*/ String sel_resizeSubviewsWithOldSize_1;
-    public static /*const*/ String sel_compoundPredicateType;
-    public static /*const*/ String sel_accessoryControllers;
-    public static /*const*/ String sel_shouldDrawColor;
-    public static /*const*/ String sel_applicationShouldTerminate_1;
-    public static /*const*/ String sel_setTextContainer_1;
-    public static /*const*/ String sel_discardCursorRects;
-    public static /*const*/ String sel_deviceCMYKColorSpace;
-    public static /*const*/ String sel_setDefaultPlaceholder_1forMarker_1withBinding_1;
-    public static /*const*/ String sel_setIsZoomed_1;
-    public static /*const*/ String sel_blueComponent;
-    public static /*const*/ String sel_portWithMachPort_1options_1;
-    public static /*const*/ String sel_restoreGraphicsState;
-    public static /*const*/ String sel_isTemplate;
-    public static /*const*/ String sel_setScanLocation_1;
-    public static /*const*/ String sel_initWithBool_1;
-    public static /*const*/ String sel_initWithSet_1copyItems_1;
-    public static /*const*/ String sel_setPositivePrefix_1;
-    public static /*const*/ String sel_propertyForKeyIfAvailable_1;
-    public static /*const*/ String sel_fileOwnerAccountID;
-    public static /*const*/ String sel_initForIncrementalLoad;
-    public static /*const*/ String sel_cellAttribute_1;
-    public static /*const*/ String sel_baselineLocation;
-    public static /*const*/ String sel_initWithAttributedString_1;
-    public static /*const*/ String sel_showWindows;
-    public static /*const*/ String sel_writeToFile_1atomically_1updateFilenames_1;
-    public static /*const*/ String sel_setCookies_1forURL_1mainDocumentURL_1;
-    public static /*const*/ String sel_unarchiver_1cannotDecodeObjectOfClassName_1originalClasses_1;
-    public static /*const*/ String sel_selectRow_1inColumn_1;
-    public static /*const*/ String sel_dissolveToPoint_1fraction_1;
-    public static /*const*/ String sel_wantsToTrackMouseForEvent_1inRect_1ofView_1atCharacterIndex_1;
-    public static /*const*/ String sel_openURLs_1withAppBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifiers_1;
-    public static /*const*/ String sel_checkForRemovableMedia;
-    public static /*const*/ String sel_setImage_1;
-    public static /*const*/ String sel_isFixedPitch;
-    public static /*const*/ String sel_protocolFamily;
-    public static /*const*/ String sel_protocolCheckerWithTarget_1protocol_1;
-    public static /*const*/ String sel_streamError;
-    public static /*const*/ String sel_replaceBytesInRange_1withBytes_1length_1;
-    public static /*const*/ String sel_canChooseDirectories;
-    public static /*const*/ String sel_classForPortCoder;
-    public static /*const*/ String sel_mainRunLoop;
-    public static /*const*/ String sel_setItemPrototype_1;
-    public static /*const*/ String sel_controlShadowColor;
-    public static /*const*/ String sel_level;
-    public static /*const*/ String sel_setContextHelpModeActive_1;
-    public static /*const*/ String sel_levelForItem_1;
-    public static /*const*/ String sel_setHeightTracksTextView_1;
-    public static /*const*/ String sel_applicationWillTerminate_1;
-    public static /*const*/ String sel_wantsPeriodicDraggingUpdates;
-    public static /*const*/ String sel_createCommandInstance;
-    public static /*const*/ String sel_parser_1foundElementDeclarationWithName_1model_1;
-    public static /*const*/ String sel_window_1shouldPopUpDocumentPathMenu_1;
-    public static /*const*/ String sel_setRepresentedURL_1;
-    public static /*const*/ String sel_outlineView_1didDragTableColumn_1;
-    public static /*const*/ String sel_appendTransform_1;
-    public static /*const*/ String sel_setMIMEType_1;
-    public static /*const*/ String sel_setHeadIndent_1;
-    public static /*const*/ String sel_setConstrainedFrameSize_1;
-    public static /*const*/ String sel_setUsesDataSource_1;
-    public static /*const*/ String sel_replaceBytesInRange_1withBytes_1;
-    public static /*const*/ String sel_rowTypeKeyPath;
-    public static /*const*/ String sel_undoManager;
-    public static /*const*/ String sel_frameCenterRotation;
-    public static /*const*/ String sel_setTextView_1;
-    public static /*const*/ String sel_executeAppleEvent_1error_1;
-    public static /*const*/ String sel_setFormatter_1;
-    public static /*const*/ String sel_scanLocation;
-    public static /*const*/ String sel_scrollsDynamically;
-    public static /*const*/ String sel_setIndentationLevel_1;
-    public static /*const*/ String sel_minimumRangeOfUnit_1;
-    public static /*const*/ String sel_textViewForBeginningOfSelection;
-    public static /*const*/ String sel_tokenFieldCell_1displayStringForRepresentedObject_1;
-    public static /*const*/ String sel_constrainFrameRect_1toScreen_1;
-    public static /*const*/ String sel_getObjectValue_1forString_1range_1error_1;
-    public static /*const*/ String sel_writeFileContents_1;
-    public static /*const*/ String sel_setProgressMarks_1;
-    public static /*const*/ String sel_lastComponentOfFileName;
-    public static /*const*/ String sel_preventWindowOrdering;
-    public static /*const*/ String sel_setDefaultDate_1;
-    public static /*const*/ String sel_submenu;
-    public static /*const*/ String sel_setTXTRecordData_1;
-    public static /*const*/ String sel_bytesPerRow;
-    public static /*const*/ String sel_outlineView_1toolTipForCell_1rect_1tableColumn_1item_1mouseLocation_1;
-    public static /*const*/ String sel_outlineView_1shouldEditTableColumn_1item_1;
-    public static /*const*/ String sel_initWithContainerSize_1;
-    public static /*const*/ String sel_setEvaluationErrorNumber_1;
-    public static /*const*/ String sel_setTopLevelObject_1;
-    public static /*const*/ String sel_dataOfType_1error_1;
-    public static /*const*/ String sel_isSupersetOfSet_1;
-    public static /*const*/ String sel_initWithURL_1cachePolicy_1timeoutInterval_1;
-    public static /*const*/ String sel_setAutosaveExpandedItems_1;
-    public static /*const*/ String sel_rangeValue;
-    public static /*const*/ String sel_indexPathByAddingIndex_1;
-    public static /*const*/ String sel_deleteToMark_1;
-    public static /*const*/ String sel_appleEventCodeForSuite_1;
-    public static /*const*/ String sel_getBytes_1;
-    public static /*const*/ String sel_setMinimumDaysInFirstWeek_1;
-    public static /*const*/ String sel_refusesFirstResponder;
-    public static /*const*/ String sel_setMaxItemSize_1;
-    public static /*const*/ String sel_localizedStringForKey_1value_1table_1;
-    public static /*const*/ String sel_mapTableWithKeyOptions_1valueOptions_1;
-    public static /*const*/ String sel_test;
-    public static /*const*/ String sel_trackScrollButtons_1;
-    public static /*const*/ String sel_PDFRepresentation;
-    public static /*const*/ String sel_setImageFrameStyle_1;
-    public static /*const*/ String sel_encodeClassName_1intoClassName_1;
-    public static /*const*/ String sel_beginPageInRect_1atPlacement_1;
-    public static /*const*/ String sel_setAllowsOtherFileTypes_1;
-    public static /*const*/ String sel_isWordInUserDictionaries_1caseSensitive_1;
-    public static /*const*/ String sel_dispatchRawAppleEvent_1withRawReply_1handlerRefCon_1;
-    public static /*const*/ String sel_isScrollable;
-    public static /*const*/ String sel_numberOfColorStops;
-    public static /*const*/ String sel_unhideAllApplications_1;
-    public static /*const*/ String sel_retainCount;
-    public static /*const*/ String sel_runModalPrintOperation_1delegate_1didRunSelector_1contextInfo_1;
-    public static /*const*/ String sel_update;
-    public static /*const*/ String sel_isRotatedOrScaledFromBase;
-    public static /*const*/ String sel_initWithWindowNibPath_1owner_1;
-    public static /*const*/ String sel_entryType;
-    public static /*const*/ String sel_dictionaryFromTXTRecordData_1;
-    public static /*const*/ String sel_setLineCapStyle_1;
-    public static /*const*/ String sel_setValues_1forParameter_1;
-    public static /*const*/ String sel_numberStyle;
-    public static /*const*/ String sel_disableCollectorForPointer_1;
-    public static /*const*/ String sel_initWithPointerFunctions_1capacity_1;
-    public static /*const*/ String sel_sendEvent_1;
-    public static /*const*/ String sel_removeSelectedObjects_1;
-    public static /*const*/ String sel_serviceConnectionWithName_1rootObject_1usingNameServer_1;
-    public static /*const*/ String sel_decimalNumberByMultiplyingBy_1;
-    public static /*const*/ String sel_shouldChangeTextInRanges_1replacementStrings_1;
-    public static /*const*/ String sel_setResizeIncrements_1;
-    public static /*const*/ String sel_alignLeft_1;
-    public static /*const*/ String sel_launch;
-    public static /*const*/ String sel_executeCommand;
-    public static /*const*/ String sel_setPixelBuffer_1cubeMapFace_1mipMapLevel_1currentVirtualScreen_1;
-    public static /*const*/ String sel_isCachedSeparately;
-    public static /*const*/ String sel_setUsesSignificantDigits_1;
-    public static /*const*/ String sel_countKeyPathForNode_1;
-    public static /*const*/ String sel_setContainerIsRangeContainerObject_1;
-    public static /*const*/ String sel_showsStateColumn;
-    public static /*const*/ String sel_uppercaseString;
-    public static /*const*/ String sel_directoryContentsAtPath_1;
-    public static /*const*/ String sel_titleFont;
-    public static /*const*/ String sel_comparisonPredicateModifier;
-    public static /*const*/ String sel_isMultiThreaded;
-    public static /*const*/ String sel_setGroupingAttributes_1;
-    public static /*const*/ String sel_selectedRowIndexesInColumn_1;
-    public static /*const*/ String sel_isFlushWindowDisabled;
-    public static /*const*/ String sel_setReusesColumns_1;
-    public static /*const*/ String sel_getCString_1maxLength_1;
-    public static /*const*/ String sel_setIndicatorImage_1inTableColumn_1;
-    public static /*const*/ String sel_keyEquivalent;
-    public static /*const*/ String sel_skipDescendents;
-    public static /*const*/ String sel_waitUntilExit;
-    public static /*const*/ String sel_initWithWindowNibName_1owner_1;
-    public static /*const*/ String sel_objectClass;
-    public static /*const*/ String sel_allFrameworks;
-    public static /*const*/ String sel_cellWithTag_1;
-    public static /*const*/ String sel_representationUsingType_1properties_1;
-    public static /*const*/ String sel_textPasteboardTypes;
-    public static /*const*/ String sel_contentViewMargins;
-    public static /*const*/ String sel_canUndo;
-    public static /*const*/ String sel_initWithFormat_1locale_1arguments_1;
-    public static /*const*/ String sel_usableParts;
-    public static /*const*/ String sel_comboBoxSelectionIsChanging_1;
-    public static /*const*/ String sel_raise_1format_1arguments_1;
-    public static /*const*/ String sel_isWindowLoaded;
-    public static /*const*/ String sel_levelIndicatorStyle;
-    public static /*const*/ String sel_localizedFailureReason;
-    public static /*const*/ String sel_characterRangeForGlyphRange_1actualGlyphRange_1;
-    public static /*const*/ String sel_lineNumber;
-    public static /*const*/ String sel_HTTPBody;
-    public static /*const*/ String sel_lineBreakMode;
-    public static /*const*/ String sel_isStopped;
-    public static /*const*/ String sel_canResumeDownloadDecodedWithEncodingMIMEType_1;
-    public static /*const*/ String sel_removeObjectsAtArrangedObjectIndexPaths_1;
-    public static /*const*/ String sel_isHidden;
-    public static /*const*/ String sel_otherMouseDragged_1;
-    public static /*const*/ String sel_headerRectOfColumn_1;
-    public static /*const*/ String sel_hasVerticalRuler;
-    public static /*const*/ String sel_setBottomMargin_1;
-    public static /*const*/ String sel_initWithNotificationCenter_1;
-    public static /*const*/ String sel_addSpeechDictionary_1;
-    public static /*const*/ String sel_setPositiveFormat_1;
-    public static /*const*/ String sel_application_1openTempFile_1;
-    public static /*const*/ String sel_setEntityName_1;
-    public static /*const*/ String sel_setForegroundColor_1;
-    public static /*const*/ String sel_initWithUnsignedLong_1;
-    public static /*const*/ String sel_setWindowsMenu_1;
-    public static /*const*/ String sel_applicationDidUnhide_1;
-    public static /*const*/ String sel_availableData;
-    public static /*const*/ String sel_setVertical_1;
-    public static /*const*/ String sel_disableUpdates;
-    public static /*const*/ String sel_compileAndReturnError_1;
-    public static /*const*/ String sel_containsIndex_1;
-    public static /*const*/ String sel_canSelectPrevious;
-    public static /*const*/ String sel_initWithBytes_1length_1encoding_1;
-    public static /*const*/ String sel_setTextColor_1;
-    public static /*const*/ String sel_stream_1handleEvent_1;
-    public static /*const*/ String sel_setWeekdaySymbols_1;
-    public static /*const*/ String sel_setHiddenUntilMouseMoves_1;
-    public static /*const*/ String sel_orderFrontStandardAboutPanelWithOptions_1;
-    public static /*const*/ String sel_setAttributesAsDictionary_1;
-    public static /*const*/ String sel_rowTypeForRow_1;
-    public static /*const*/ String sel_setRequestTimeout_1;
-    public static /*const*/ String sel_XMLDataWithOptions_1;
-    public static /*const*/ String sel_closedHandCursor;
-    public static /*const*/ String sel_nextSibling;
-    public static /*const*/ String sel_controlTextColor;
-    public static /*const*/ String sel_abbreviationDictionary;
-    public static /*const*/ String sel_archiverDidFinish_1;
-    public static /*const*/ String sel_valueTypeForDimension_1;
-    public static /*const*/ String sel_setCriteriaKeyPath_1;
-    public static /*const*/ String sel_isLessThan_1;
-    public static /*const*/ String sel_processName;
-    public static /*const*/ String sel_frameOfOutlineCellAtRow_1;
-    public static /*const*/ String sel_removeObjectsInArray_1;
-    public static /*const*/ String sel_leftExpression;
-    public static /*const*/ String sel_removeToolTip_1;
-    public static /*const*/ String sel_mutableCopy;
-    public static /*const*/ String sel_directParameter;
-    public static /*const*/ String sel_name;
-    public static /*const*/ String sel_bitsPerPixel;
-    public static /*const*/ String sel_weekday;
-    public static /*const*/ String sel_descendantNodeAtIndexPath_1;
-    public static /*const*/ String sel_setPercentSymbol_1;
-    public static /*const*/ String sel_selectedCell;
-    public static /*const*/ String sel_windowWillClose_1;
-    public static /*const*/ String sel_setDatePickerStyle_1;
-    public static /*const*/ String sel_initWithObjects_1;
-    public static /*const*/ String sel_numberWithInt_1;
-    public static /*const*/ String sel_collection;
-    public static /*const*/ String sel_initWithTarget_1selector_1object_1;
-    public static /*const*/ String sel_insertText_1replacementRange_1;
-    public static /*const*/ String sel_initWithAEDescNoCopy_1;
-    public static /*const*/ String sel_usesGroupingSeparator;
-    public static /*const*/ String sel_pathControl_1shouldDragPathComponentCell_1withPasteboard_1;
-    public static /*const*/ String sel_decimalNumberByAdding_1withBehavior_1;
-    public static /*const*/ String sel_setTextContainer_1forGlyphRange_1;
-    public static /*const*/ String sel_needsToDrawRect_1;
-    public static /*const*/ String sel_activeConversationChanged_1toNewConversation_1;
-    public static /*const*/ String sel_italicAngle;
-    public static /*const*/ String sel_aeteResource_1;
-    public static /*const*/ String sel_noteNewRecentDocumentURL_1;
-    public static /*const*/ String sel_setPageScroll_1;
-    public static /*const*/ String sel_speechSynthesizer_1didFinishSpeaking_1;
-    public static /*const*/ String sel_convertSizeToBase_1;
-    public static /*const*/ String sel_pointerFunctionsWithOptions_1;
-    public static /*const*/ String sel_setHTTPBody_1;
-    public static /*const*/ String sel_itemWithTag_1;
-    public static /*const*/ String sel_spellServer_1checkGrammarInString_1language_1details_1;
-    public static /*const*/ String sel_vendorPointingDeviceType;
-    public static /*const*/ String sel_firstRectForCharacterRange_1;
-    public static /*const*/ String sel_classDescriptionsInSuite_1;
-    public static /*const*/ String sel_setAttachmentSize_1forGlyphRange_1;
-    public static /*const*/ String sel_isEmpty;
-    public static /*const*/ String sel_soundNamed_1;
-    public static /*const*/ String sel_preparedCellAtColumn_1row_1;
-    public static /*const*/ String sel_setLeafKeyPath_1;
-    public static /*const*/ String sel_initWithUnsignedInteger_1;
-    public static /*const*/ String sel_fractionOfDistanceThroughGlyphForPoint_1inTextContainer_1;
-    public static /*const*/ String sel_isFloatingPanel;
-    public static /*const*/ String sel_replaceObjectsAtIndexes_1withObjects_1;
-    public static /*const*/ String sel_getComponents_1;
-    public static /*const*/ String sel_fileType;
-    public static /*const*/ String sel_setShowsBaselineSeparator_1;
-    public static /*const*/ String sel_removeCredential_1forProtectionSpace_1;
-    public static /*const*/ String sel_imageRepWithContentsOfFile_1;
-    public static /*const*/ String sel_predicateWithFormat_1argumentArray_1;
-    public static /*const*/ String sel_positiveSuffix;
-    public static /*const*/ String sel_formatter;
-    public static /*const*/ String sel_setAnimationDelay_1;
-    public static /*const*/ String sel_maxConcurrentOperationCount;
-    public static /*const*/ String sel_childSpecifier;
-    public static /*const*/ String sel_cacheMode;
-    public static /*const*/ String sel_registerForServices;
-    public static /*const*/ String sel_setFirstWeekday_1;
-    public static /*const*/ String sel_rulerViewClass;
-    public static /*const*/ String sel_initialValue;
-    public static /*const*/ String sel_redColor;
-    public static /*const*/ String sel_addDependency_1;
-    public static /*const*/ String sel_pathExtension;
-    public static /*const*/ String sel_fastestEncoding;
-    public static /*const*/ String sel_socketType;
-    public static /*const*/ String sel_setRuleThickness_1;
-    public static /*const*/ String sel_setDTDKind_1;
-    public static /*const*/ String sel_setClass_1forClassName_1;
-    public static /*const*/ String sel_setDocumentCursor_1;
-    public static /*const*/ String sel_extraLineFragmentRect;
-    public static /*const*/ String sel_attributeForName_1;
-    public static /*const*/ String sel_defaultCredentialForProtectionSpace_1;
-    public static /*const*/ String sel_indexOfItemWithTag_1;
-    public static /*const*/ String sel_fontManager_1willIncludeFont_1;
-    public static /*const*/ String sel_scrollRangeToVisible_1;
-    public static /*const*/ String sel_fileTypeFromLastRunSavePanel;
-    public static /*const*/ String sel_collectionView;
-    public static /*const*/ String sel_tabView;
-    public static /*const*/ String sel_commonISOCurrencyCodes;
-    public static /*const*/ String sel_removeFontTrait_1;
-    public static /*const*/ String sel_drawKnob_1;
-    public static /*const*/ String sel_tokenField_1menuForRepresentedObject_1;
-    public static /*const*/ String sel_setFrameUsingName_1;
-    public static /*const*/ String sel_classNameEncodedForTrueClassName_1;
-    public static /*const*/ String sel_windowFrameAutosaveName;
-    public static /*const*/ String sel_characterAtIndex_1;
-    public static /*const*/ String sel_smartInsertAfterStringForString_1replacingRange_1;
-    public static /*const*/ String sel_version;
-    public static /*const*/ String sel_objectsAtIndexes_1;
-    public static /*const*/ String sel_requestIsCacheEquivalent_1toRequest_1;
-    public static /*const*/ String sel_columnOfMatrix_1;
-    public static /*const*/ String sel_isBezeled;
-    public static /*const*/ String sel_setAutosaveName_1;
-    public static /*const*/ String sel_becomeMainWindow;
-    public static /*const*/ String sel_pasteAsRichText_1;
-    public static /*const*/ String sel_isSpeaking;
-    public static /*const*/ String sel_format;
-    public static /*const*/ String sel_volume;
-    public static /*const*/ String sel_setMenu_1;
-    public static /*const*/ String sel_setEra_1;
-    public static /*const*/ String sel_textContainerOrigin;
-    public static /*const*/ String sel_setLocalizesFormat_1;
-    public static /*const*/ String sel_removeIndex_1;
-    public static /*const*/ String sel_gotoPosterFrame_1;
-    public static /*const*/ String sel_validateValue_1forKeyPath_1error_1;
-    public static /*const*/ String sel_initWithCharactersNoCopy_1length_1freeWhenDone_1;
-    public static /*const*/ String sel_initWithLength_1;
-    public static /*const*/ String sel_setAllowsMultipleSelection_1;
-    public static /*const*/ String sel_isRotatedFromBase;
-    public static /*const*/ String sel_beginDocument;
-    public static /*const*/ String sel_initWithContentsOfURL_1usedEncoding_1error_1;
-    public static /*const*/ String sel_showsSuppressionButton;
-    public static /*const*/ String sel_tearOffMenuRepresentation;
-    public static /*const*/ String sel_otherEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1subtype_1data1_1data2_1;
-    public static /*const*/ String sel_imageUnfilteredFileTypes;
-    public static /*const*/ String sel_isGathering;
-    public static /*const*/ String sel_slideImage_1from_1to_1;
-    public static /*const*/ String sel_initWithTCPPort_1;
-    public static /*const*/ String sel_stringByFoldingWithOptions_1locale_1;
-    public static /*const*/ String sel_viewDidUnhide;
-    public static /*const*/ String sel_controlSize;
-    public static /*const*/ String sel_resourceDataUsingCache_1;
-    public static /*const*/ String sel_startWhenAnimation_1reachesProgress_1;
-    public static /*const*/ String sel_registerURLHandleClass_1;
-    public static /*const*/ String sel_indicatorImageInTableColumn_1;
-    public static /*const*/ String sel_decimalNumberByMultiplyingByPowerOf10_1;
-    public static /*const*/ String sel_scrollPoint_1;
-    public static /*const*/ String sel_setValue_1forKeyPath_1;
-    public static /*const*/ String sel_fontDescriptorWithMatrix_1;
-    public static /*const*/ String sel_parser_1foundProcessingInstructionWithTarget_1data_1;
-    public static /*const*/ String sel_interfaceStyle;
-    public static /*const*/ String sel_comboBox_1objectValueForItemAtIndex_1;
-    public static /*const*/ String sel_applicationDidFinishLaunching_1;
-    public static /*const*/ String sel_currentMemoryUsage;
-    public static /*const*/ String sel_altersStateOfSelectedItem;
-    public static /*const*/ String sel_selectedColumn;
-    public static /*const*/ String sel_convertBaseToScreen_1;
-    public static /*const*/ String sel_lineHeightMultiple;
-    public static /*const*/ String sel_CGColorSpace;
-    public static /*const*/ String sel_descriptionInStringsFileFormat;
-    public static /*const*/ String sel_isOutputStackInReverseOrder;
-    public static /*const*/ String sel_takeValue_1forKey_1;
-    public static /*const*/ String sel_stringWithContentsOfFile_1;
-    public static /*const*/ String sel_addItem_1;
-    public static /*const*/ String sel_viewWillMoveToWindow_1;
-    public static /*const*/ String sel_changeFileAttributes_1atPath_1;
-    public static /*const*/ String sel_userFixedPitchFontOfSize_1;
-    public static /*const*/ String sel_selectRowIndexes_1inColumn_1;
-    public static /*const*/ String sel_defaultLineCapStyle;
-    public static /*const*/ String sel_attributedAlternateTitle;
-    public static /*const*/ String sel_fileExistsAtPath_1;
-    public static /*const*/ String sel_textView_1clickedOnLink_1atIndex_1;
-    public static /*const*/ String sel_drawers;
-    public static /*const*/ String sel_outlineView_1shouldSelectTableColumn_1;
-    public static /*const*/ String sel_pointValue;
-    public static /*const*/ String sel_integerValue;
-    public static /*const*/ String sel_modifyFontViaPanel_1;
-    public static /*const*/ String sel_windowTitleForDocumentDisplayName_1;
-    public static /*const*/ String sel_shortWeekdaySymbols;
-    public static /*const*/ String sel_titleOfSelectedItem;
-    public static /*const*/ String sel_setWindowsNeedUpdate_1;
-    public static /*const*/ String sel_stringWithUTF8String_1;
-    public static /*const*/ String sel_transformedValueClass;
-    public static /*const*/ String sel_initWithColorsAndLocations_1;
-    public static /*const*/ String sel_acceptsMouseMovedEvents;
-    public static /*const*/ String sel_toolTipsFontOfSize_1;
-    public static /*const*/ String sel_setTextAttributesForPositiveValues_1;
-    public static /*const*/ String sel_setAlwaysShowsDecimalSeparator_1;
-    public static /*const*/ String sel_setNumberOfColumns_1;
-    public static /*const*/ String sel_moveRightAndModifySelection_1;
-    public static /*const*/ String sel_indexOfItem_1;
-    public static /*const*/ String sel_moveWordRight_1;
-    public static /*const*/ String sel_numberWithUnsignedLongLong_1;
-    public static /*const*/ String sel_initWithAuthenticationChallenge_1sender_1;
-    public static /*const*/ String sel_panelConvertFont_1;
-    public static /*const*/ String sel_temporaryAttribute_1atCharacterIndex_1effectiveRange_1;
-    public static /*const*/ String sel_intersectHashTable_1;
-    public static /*const*/ String sel_positionOfGlyph_1precededByGlyph_1isNominal_1;
-    public static /*const*/ String sel_setLocalizedKeyTable_1;
-    public static /*const*/ String sel_fileManager_1shouldLinkItemAtPath_1toPath_1;
-    public static /*const*/ String sel_setScriptErrorNumber_1;
-    public static /*const*/ String sel_initWithLocaleIdentifier_1;
-    public static /*const*/ String sel_toolTip;
-    public static /*const*/ String sel_alternateMnemonic;
-    public static /*const*/ String sel_setChannelMapping_1;
-    public static /*const*/ String sel_setLocalizedKey_1;
-    public static /*const*/ String sel_selector;
-    public static /*const*/ String sel_setCurrencyGroupingSeparator_1;
-    public static /*const*/ String sel_initWithKeyOptions_1valueOptions_1capacity_1;
-    public static /*const*/ String sel_setStandaloneMonthSymbols_1;
-    public static /*const*/ String sel_physicalMemory;
-    public static /*const*/ String sel_parse;
-    public static /*const*/ String sel_defaultTypesetterBehavior;
-    public static /*const*/ String sel_setRulerVisible_1;
-    public static /*const*/ String sel_resizeDownCursor;
-    public static /*const*/ String sel_getBoundingRects_1forGlyphs_1count_1;
-    public static /*const*/ String sel_openPanel;
-    public static /*const*/ String sel_setEntryWidth_1;
-    public static /*const*/ String sel_insertChildren_1atIndex_1;
-    public static /*const*/ String sel_selectNext_1;
-    public static /*const*/ String sel_paragraphGlyphRange;
-    public static /*const*/ String sel_animations;
-    public static /*const*/ String sel_setMarkers_1;
-    public static /*const*/ String sel_raise;
-    public static /*const*/ String sel_menuZone;
-    public static /*const*/ String sel_weekdaySymbols;
-    public static /*const*/ String sel_setHTTPMethod_1;
-    public static /*const*/ String sel_placeholderAttributedString;
-    public static /*const*/ String sel_filenameExtension_1isValidForType_1;
-    public static /*const*/ String sel_initWithReceivePort_1sendPort_1;
-    public static /*const*/ String sel_setContextHelp_1forObject_1;
-    public static /*const*/ String sel_archiveRootObject_1toFile_1;
-    public static /*const*/ String sel_setAnimations_1;
-    public static /*const*/ String sel_locationOfPrintRect_1;
-    public static /*const*/ String sel_setInterfaceStyle_1;
-    public static /*const*/ String sel_startMonitoring;
-    public static /*const*/ String sel_presentError_1modalForWindow_1delegate_1didPresentSelector_1contextInfo_1;
-    public static /*const*/ String sel_windowFrameColor;
-    public static /*const*/ String sel_paragraphSpacing;
-    public static /*const*/ String sel_fileAttributes;
-    public static /*const*/ String sel_setDisplayedCommandsTitle_1;
-    public static /*const*/ String sel_preflightAndReturnError_1;
-    public static /*const*/ String sel_setObservationInfo_1;
-    public static /*const*/ String sel_currentCommand;
-    public static /*const*/ String sel_processInfo;
-    public static /*const*/ String sel_appendString_1;
-    public static /*const*/ String sel_setShowsHelp_1;
-    public static /*const*/ String sel_datePickerStyle;
-    public static /*const*/ String sel_addFileWrapper_1;
-    public static /*const*/ String sel_bitmapImageRepForCachingDisplayInRect_1;
-    public static /*const*/ String sel_initWithFileAtPath_1;
-    public static /*const*/ String sel_cellClass;
-    public static /*const*/ String sel_imageRepsWithContentsOfFile_1;
-    public static /*const*/ String sel_localizedScannerWithString_1;
-    public static /*const*/ String sel_isExpandable_1;
-    public static /*const*/ String sel_isLoaded;
-    public static /*const*/ String sel_browser_1acceptDrop_1atRow_1column_1dropOperation_1;
-    public static /*const*/ String sel_panel_1directoryDidChange_1;
-    public static /*const*/ String sel_publicID;
-    public static /*const*/ String sel_contentMaxSize;
-    public static /*const*/ String sel_menuDidClose_1;
-    public static /*const*/ String sel_setPrinter_1;
-    public static /*const*/ String sel_keywordForDescriptorAtIndex_1;
-    public static /*const*/ String sel_notANumberSymbol;
-    public static /*const*/ String sel_minimumLineHeight;
-    public static /*const*/ String sel_setContentBorderThickness_1forEdge_1;
-    public static /*const*/ String sel_titleFrameOfColumn_1;
-    public static /*const*/ String sel_dateValue;
-    public static /*const*/ String sel_numberOfRows;
-    public static /*const*/ String sel_isReadableFileAtPath_1;
-    public static /*const*/ String sel_canInsertChild;
-    public static /*const*/ String sel_stringByReplacingOccurrencesOfString_1withString_1options_1range_1;
-    public static /*const*/ String sel_ok_1;
-    public static /*const*/ String sel_hourOfDay;
-    public static /*const*/ String sel_paragraphRangeForRange_1;
-    public static /*const*/ String sel_focusStack;
-    public static /*const*/ String sel_setUsesThreadedAnimation_1;
-    public static /*const*/ String sel_dataForType_1;
-    public static /*const*/ String sel_isByref;
-    public static /*const*/ String sel_initWithResponse_1data_1userInfo_1storagePolicy_1;
-    public static /*const*/ String sel_initWithSerializedRepresentation_1;
-    public static /*const*/ String sel_openDocument_1;
-    public static /*const*/ String sel_translateRectsNeedingDisplayInRect_1by_1;
-    public static /*const*/ String sel_highlightsBy;
-    public static /*const*/ String sel_openHandCursor;
-    public static /*const*/ String sel_lineFragmentRectForProposedRect_1remainingRect_1;
-    public static /*const*/ String sel_selectedNodes;
-    public static /*const*/ String sel_replaceObjectAtIndex_1withObject_1;
-    public static /*const*/ String sel_indexOfItemAtPoint_1;
-    public static /*const*/ String sel_setCriteria_1andDisplayValues_1forRowAtIndex_1;
-    public static /*const*/ String sel_textStorage_1edited_1range_1changeInLength_1invalidatedRange_1;
-    public static /*const*/ String sel_synchronizeWindowTitleWithDocumentName;
-    public static /*const*/ String sel_fileHandleWithNullDevice;
-    public static /*const*/ String sel_descriptorWithTypeCode_1;
-    public static /*const*/ String sel_initWithDocFormat_1documentAttributes_1;
-    public static /*const*/ String sel_setAutoresizingMask_1;
-    public static /*const*/ String sel_methodReturnLength;
-    public static /*const*/ String sel_recentDocumentURLs;
-    public static /*const*/ String sel_setCurrentDirectoryPath_1;
-    public static /*const*/ String sel_characterSetWithRange_1;
-    public static /*const*/ String sel_resizeUpCursor;
-    public static /*const*/ String sel_rect;
-    public static /*const*/ String sel_removeCharactersInRange_1;
-    public static /*const*/ String sel_performSelectorOnMainThread_1withObject_1waitUntilDone_1;
-    public static /*const*/ String sel_elementAtIndex_1associatedPoints_1;
-    public static /*const*/ String sel_dataForKey_1;
-    public static /*const*/ String sel_defaultDepthLimit;
-    public static /*const*/ String sel_rulersVisible;
-    public static /*const*/ String sel_generalPasteboard;
-    public static /*const*/ String sel_setAllowsTickMarkValuesOnly_1;
-    public static /*const*/ String sel_stateImageOffset;
-    public static /*const*/ String sel_isBordered;
-    public static /*const*/ String sel_insertPointer_1atIndex_1;
-    public static /*const*/ String sel_keyForFileWrapper_1;
-    public static /*const*/ String sel_renewGState;
-    public static /*const*/ String sel_autovalidates;
-    public static /*const*/ String sel_localizedNameForFamily_1face_1;
-    public static /*const*/ String sel_setAltIncrementValue_1;
-    public static /*const*/ String sel_sortUsingFunction_1context_1;
-    public static /*const*/ String sel_fileNameExtensionWasHiddenInLastRunSavePanel;
-    public static /*const*/ String sel_endSheet_1returnCode_1;
-    public static /*const*/ String sel_insertObjects_1atIndexes_1;
-    public static /*const*/ String sel_standaloneMonthSymbols;
-    public static /*const*/ String sel_prefersAllColumnUserResizing;
-    public static /*const*/ String sel_separatesColumns;
-    public static /*const*/ String sel_moveToBeginningOfDocument_1;
-    public static /*const*/ String sel_objectZone;
-    public static /*const*/ String sel_initWithURL_1MIMEType_1expectedContentLength_1textEncodingName_1;
-    public static /*const*/ String sel_gotoEnd_1;
-    public static /*const*/ String sel_superscriptRange_1;
-    public static /*const*/ String sel_readInBackgroundAndNotifyForModes_1;
-    public static /*const*/ String sel_initWithObjects_1forKeys_1;
-    public static /*const*/ String sel_cancel;
-    public static /*const*/ String sel_suiteName;
-    public static /*const*/ String sel_sortedArrayUsingFunction_1context_1hint_1;
-    public static /*const*/ String sel_countWordsInString_1language_1;
-    public static /*const*/ String sel_prepareWithInvocationTarget_1;
-    public static /*const*/ String sel_statusItemWithLength_1;
-    public static /*const*/ String sel_tableView_1shouldEditTableColumn_1row_1;
-    public static /*const*/ String sel_appendBezierPathWithRect_1;
-    public static /*const*/ String sel_scrollColumnsRightBy_1;
-    public static /*const*/ String sel_negativeInfinitySymbol;
-    public static /*const*/ String sel_firstLineHeadIndent;
-    public static /*const*/ String sel_generateGlyphsForGlyphStorage_1desiredNumberOfCharacters_1glyphIndex_1characterIndex_1;
-    public static /*const*/ String sel_dateWithTimeIntervalSinceReferenceDate_1;
-    public static /*const*/ String sel_menu_1updateItem_1atIndex_1shouldCancel_1;
-    public static /*const*/ String sel_connection_1willSendRequest_1redirectResponse_1;
-    public static /*const*/ String sel_attemptRecoveryFromError_1optionIndex_1delegate_1didRecoverSelector_1contextInfo_1;
-    public static /*const*/ String sel_cursorUpdate_1;
-    public static /*const*/ String sel_initWithMachPort_1options_1;
-    public static /*const*/ String sel_applyFontTraits_1range_1;
-    public static /*const*/ String sel_noteHeightOfRowsWithIndexesChanged_1;
-    public static /*const*/ String sel_orderFrontTablePanel_1;
-    public static /*const*/ String sel_arrayWithObjects_1;
-    public static /*const*/ String sel_enableFlushWindow;
-    public static /*const*/ String sel_minimum;
-    public static /*const*/ String sel_stopListening;
-    public static /*const*/ String sel_endParagraph;
-    public static /*const*/ String sel_sharingType;
-    public static /*const*/ String sel_backgroundLayoutEnabled;
-    public static /*const*/ String sel_yellowColor;
-    public static /*const*/ String sel_columnIndexesInRect_1;
-    public static /*const*/ String sel_compositingOperation;
-    public static /*const*/ String sel_stopModalWithCode_1;
-    public static /*const*/ String sel_smallSystemFontSize;
-    public static /*const*/ String sel_nonretainedObjectValue;
-    public static /*const*/ String sel_encodeBytes_1length_1forKey_1;
-    public static /*const*/ String sel_objectValues;
-    public static /*const*/ String sel_destroyContext;
-    public static /*const*/ String sel_setFileModificationDate_1;
-    public static /*const*/ String sel_rightMouseDragged_1;
-    public static /*const*/ String sel_systemStatusBar;
-    public static /*const*/ String sel_executableArchitectures;
-    public static /*const*/ String sel_recentSearches;
-    public static /*const*/ String sel_getWhite_1alpha_1;
-    public static /*const*/ String sel_readDataToEndOfFile;
-    public static /*const*/ String sel_setHour_1;
-    public static /*const*/ String sel_titleBarFontOfSize_1;
-    public static /*const*/ String sel_canDragRowsWithIndexes_1atPoint_1;
-    public static /*const*/ String sel_acceptsArrowKeys;
-    public static /*const*/ String sel_availableColorLists;
-    public static /*const*/ String sel_setUsesLazyFetching_1;
-    public static /*const*/ String sel_convertAttributes_1;
-    public static /*const*/ String sel_isWritableFileAtPath_1;
-    public static /*const*/ String sel_timerWithTimeInterval_1target_1selector_1userInfo_1repeats_1;
-    public static /*const*/ String sel_windowDidChangeScreen_1;
-    public static /*const*/ String sel_insertTextContainer_1atIndex_1;
-    public static /*const*/ String sel_weightOfFont_1;
-    public static /*const*/ String sel_temporaryAttributesAtCharacterIndex_1longestEffectiveRange_1inRange_1;
-    public static /*const*/ String sel_trackWithEvent_1;
-    public static /*const*/ String sel_selectRowIndexes_1byExtendingSelection_1;
-    public static /*const*/ String sel_charactersToBeSkipped;
-    public static /*const*/ String sel_names;
-    public static /*const*/ String sel_setAllowsCutCopyPaste_1;
-    public static /*const*/ String sel_setDuration_1;
-    public static /*const*/ String sel_sleepForTimeInterval_1;
-    public static /*const*/ String sel_removeChildAtIndex_1;
-    public static /*const*/ String sel_tokenFieldCell_1writeRepresentedObjects_1toPasteboard_1;
-    public static /*const*/ String sel_backgroundStyle;
-    public static /*const*/ String sel_open_1;
-    public static /*const*/ String sel_indexGreaterThanOrEqualToIndex_1;
-    public static /*const*/ String sel_isAbsolutePath;
-    public static /*const*/ String sel_paletteLabel;
-    public static /*const*/ String sel_setQuarterSymbols_1;
-    public static /*const*/ String sel_suppressionButton;
-    public static /*const*/ String sel_undo;
-    public static /*const*/ String sel_rangeOfString_1options_1range_1locale_1;
-    public static /*const*/ String sel_localizedName_1locale_1;
-    public static /*const*/ String sel_setTableView_1;
-    public static /*const*/ String sel_isExecutableFileAtPath_1;
-    public static /*const*/ String sel_standaloneQuarterSymbols;
-    public static /*const*/ String sel_textView_1shouldSetSpellingState_1range_1;
-    public static /*const*/ String sel_newObject;
-    public static /*const*/ String sel_setDocumentEdited_1;
-    public static /*const*/ String sel_setRelativePosition_1;
-    public static /*const*/ String sel_allConnections;
-    public static /*const*/ String sel_isLessThanOrEqualTo_1;
-    public static /*const*/ String sel_attributeWithName_1stringValue_1;
-    public static /*const*/ String sel_floatForKey_1;
-    public static /*const*/ String sel_initWithDomain_1type_1name_1port_1;
-    public static /*const*/ String sel_setShadowOffset_1;
-    public static /*const*/ String sel_tabViewItems;
-    public static /*const*/ String sel_appleEventCodeForReturnType;
-    public static /*const*/ String sel_createFileAtPath_1contents_1attributes_1;
-    public static /*const*/ String sel_ruleEditor_1predicatePartsForCriterion_1withDisplayValue_1inRow_1;
-    public static /*const*/ String sel_evaluateWithObject_1;
-    public static /*const*/ String sel_pathComponents;
-    public static /*const*/ String sel_setTarget_1;
-    public static /*const*/ String sel_fileCreationDate;
-    public static /*const*/ String sel_port;
-    public static /*const*/ String sel_publish;
-    public static /*const*/ String sel_downloadDidFinish_1;
-    public static /*const*/ String sel_endEditing_1;
-    public static /*const*/ String sel_expectedResourceDataSize;
-    public static /*const*/ String sel_paddingCharacter;
-    public static /*const*/ String sel_convertPoint_1fromView_1;
-    public static /*const*/ String sel_setIntValue_1;
-    public static /*const*/ String sel_appendBezierPathWithArcFromPoint_1toPoint_1radius_1;
-    public static /*const*/ String sel_currentFontAction;
-    public static /*const*/ String sel_expressionForFunction_1arguments_1;
-    public static /*const*/ String sel_minimumDaysInFirstWeek;
-    public static /*const*/ String sel_setDeletesFileUponFailure_1;
-    public static /*const*/ String sel_pageCount;
-    public static /*const*/ String sel_imageAlignment;
-    public static /*const*/ String sel_URLProtocol_1didCancelAuthenticationChallenge_1;
-    public static /*const*/ String sel_localizedPaperName;
-    public static /*const*/ String sel_setAllowsBranchSelection_1;
-    public static /*const*/ String sel_symbolicLinkDestination;
-    public static /*const*/ String sel_prepareSavePanel_1;
-    public static /*const*/ String sel_enableMultipleThreads;
-    public static /*const*/ String sel_configurePersistentStoreCoordinatorForURL_1ofType_1modelConfiguration_1storeOptions_1error_1;
-    public static /*const*/ String sel_backgroundLoadDidFailWithReason_1;
-    public static /*const*/ String sel_copyAttributesFromContext_1withMask_1;
-    public static /*const*/ String sel_isVertical;
-    public static /*const*/ String sel_wait;
-    public static /*const*/ String sel_firstObjectCommonWithArray_1;
-    public static /*const*/ String sel_hideOtherApplications_1;
-    public static /*const*/ String sel_startSpeakingString_1;
-    public static /*const*/ String sel_makeKeyAndOrderFront_1;
-    public static /*const*/ String sel_drawCellAtIndex_1;
-    public static /*const*/ String sel_headerToolTip;
-    public static /*const*/ String sel_readRTFDFromFile_1;
-    public static /*const*/ String sel_knownTimeZoneNames;
-    public static /*const*/ String sel_toOneRelationshipKeys;
-    public static /*const*/ String sel_replyTimeout;
-    public static /*const*/ String sel_setDelegate_1;
-    public static /*const*/ String sel_initWithTarget_1protocol_1;
-    public static /*const*/ String sel_setShowsPrintPanel_1;
-    public static /*const*/ String sel_trackingNumber;
-    public static /*const*/ String sel_initWithDecimal_1;
-    public static /*const*/ String sel_proxyWithTarget_1connection_1;
-    public static /*const*/ String sel_setCompositingFilter_1;
-    public static /*const*/ String sel_systemFontSizeForControlSize_1;
-    public static /*const*/ String sel_registerDefaults_1;
-    public static /*const*/ String sel_veryShortStandaloneMonthSymbols;
-    public static /*const*/ String sel_setPlusSign_1;
-    public static /*const*/ String sel_colorRenderingIntent;
-    public static /*const*/ String sel_thicknessRequiredInRuler;
-    public static /*const*/ String sel_setAlertStyle_1;
-    public static /*const*/ String sel_searchScopes;
-    public static /*const*/ String sel_tag;
-    public static /*const*/ String sel_autosavingDelay;
-    public static /*const*/ String sel_setDateStyle_1;
-    public static /*const*/ String sel_setIcon_1forFile_1options_1;
-    public static /*const*/ String sel_internationalCurrencySymbol;
-    public static /*const*/ String sel_netService_1didUpdateTXTRecordData_1;
-    public static /*const*/ String sel_setOnMouseEntered_1;
-    public static /*const*/ String sel_setTextBaseWritingDirection_1;
-    public static /*const*/ String sel_startSpecifier;
-    public static /*const*/ String sel_setExcludedFromWindowsMenu_1;
-    public static /*const*/ String sel_operatingSystemName;
-    public static /*const*/ String sel_isConcurrent;
-    public static /*const*/ String sel_enableRelease_1;
-    public static /*const*/ String sel_getValues_1forAttribute_1forVirtualScreen_1;
-    public static /*const*/ String sel_interrupt;
-    public static /*const*/ String sel_whiteComponent;
-    public static /*const*/ String sel_keyEquivalentRectForBounds_1;
-    public static /*const*/ String sel_numberOfVisibleColumns;
-    public static /*const*/ String sel_windowNibName;
-    public static /*const*/ String sel_parser_1foundIgnorableWhitespace_1;
-    public static /*const*/ String sel_menuItemCellForItemAtIndex_1;
-    public static /*const*/ String sel_addTrackingArea_1;
-    public static /*const*/ String sel_arrangedObjects;
-    public static /*const*/ String sel_timeStyle;
-    public static /*const*/ String sel_indexPathWithIndexes_1length_1;
-    public static /*const*/ String sel_addNamespace_1;
-    public static /*const*/ String sel_setDisplayValuesKeyPath_1;
-    public static /*const*/ String sel_notificationBatchingInterval;
-    public static /*const*/ String sel_MIMEType;
-    public static /*const*/ String sel_drawerWillClose_1;
-    public static /*const*/ String sel_sortedArrayHint;
-    public static /*const*/ String sel_shortQuarterSymbols;
-    public static /*const*/ String sel_usesAlternatingRowBackgroundColors;
-    public static /*const*/ String sel_colorWithKey_1;
-    public static /*const*/ String sel_rangeForUserCompletion;
-    public static /*const*/ String sel_boolValue;
-    public static /*const*/ String sel_autosaveName;
-    public static /*const*/ String sel_childWindows;
-    public static /*const*/ String sel_mapTableWithStrongToWeakObjects;
-    public static /*const*/ String sel_unhide;
-    public static /*const*/ String sel_setRowClass_1;
-    public static /*const*/ String sel_endSubelementIndex;
-    public static /*const*/ String sel_preferredLocalizations;
-    public static /*const*/ String sel_fileSystemChanged;
-    public static /*const*/ String sel_secondOfMinute;
-    public static /*const*/ String sel_scrollWheel_1;
-    public static /*const*/ String sel_characterIndexForGlyphAtIndex_1;
-    public static /*const*/ String sel_drawRepresentation_1inRect_1;
-    public static /*const*/ String sel_setByAddingObject_1;
-    public static /*const*/ String sel_rotateByAngle_1;
-    public static /*const*/ String sel_allValues;
-    public static /*const*/ String sel_addItemWithObjectValue_1;
-    public static /*const*/ String sel_tabViewItemAtIndex_1;
-    public static /*const*/ String sel_servicePortWithName_1;
-    public static /*const*/ String sel_multiplier;
-    public static /*const*/ String sel_setSelectionGranularity_1;
-    public static /*const*/ String sel_setViewsNeedDisplay_1;
-    public static /*const*/ String sel_object;
-    public static /*const*/ String sel_writeFileWrapper_1;
-    public static /*const*/ String sel_authenticationMethod;
-    public static /*const*/ String sel_frameLength;
-    public static /*const*/ String sel_nextNode;
-    public static /*const*/ String sel_characterSetWithCharactersInString_1;
-    public static /*const*/ String sel_messageText;
-    public static /*const*/ String sel_setArguments_1;
-    public static /*const*/ String sel_getBytes_1length_1;
-    public static /*const*/ String sel_setDropItem_1dropChildIndex_1;
-    public static /*const*/ String sel_expressionForVariable_1;
-    public static /*const*/ String sel_rectPreservedDuringLiveResize;
-    public static /*const*/ String sel_isMuted;
-    public static /*const*/ String sel_allowsColumnResizing;
-    public static /*const*/ String sel_readFileWrapper;
-    public static /*const*/ String sel_undoNestedGroup;
-    public static /*const*/ String sel_setIncludedKeys_1;
-    public static /*const*/ String sel_textWithStringValue_1;
-    public static /*const*/ String sel_ruleEditorRowsDidChange_1;
-    public static /*const*/ String sel_handleMouseEvent_1;
-    public static /*const*/ String sel_browser_1canDragRowsWithIndexes_1inColumn_1withEvent_1;
-    public static /*const*/ String sel_drawPageBorderWithSize_1;
-    public static /*const*/ String sel_valueWithBytes_1objCType_1;
-    public static /*const*/ String sel_subpathsAtPath_1;
-    public static /*const*/ String sel_mnemonicLocation;
-    public static /*const*/ String sel_dockTile;
-    public static /*const*/ String sel_setFirstLineHeadIndent_1;
-    public static /*const*/ String sel_isAutomaticQuoteSubstitutionEnabled;
-    public static /*const*/ String sel_allowsReverseTransformation;
-    public static /*const*/ String sel_moveNodes_1toIndexPath_1;
-    public static /*const*/ String sel_seekToFileOffset_1;
-    public static /*const*/ String sel_scriptingBeginsWith_1;
-    public static /*const*/ String sel_setInformativeText_1;
-    public static /*const*/ String sel_initWithIndexSet_1;
-    public static /*const*/ String sel_write_1maxLength_1;
-    public static /*const*/ String sel_canInitWithRequest_1;
-    public static /*const*/ String sel_enqueueNotification_1postingStyle_1;
-    public static /*const*/ String sel_setShouldResolveExternalEntities_1;
-    public static /*const*/ String sel_usesFindPanel;
-    public static /*const*/ String sel_perMillSymbol;
-    public static /*const*/ String sel_setClearsFilterPredicateOnInsertion_1;
-    public static /*const*/ String sel_currentLocale;
-    public static /*const*/ String sel_pasteboardByFilteringData_1ofType_1;
-    public static /*const*/ String sel_isSheet;
-    public static /*const*/ String sel_hasWritablePropertyForKey_1;
-    public static /*const*/ String sel_drawDividerInRect_1;
-    public static /*const*/ String sel_sharedUserDefaultsController;
-    public static /*const*/ String sel_preferredFontNames;
-    public static /*const*/ String sel_menuBarFontOfSize_1;
-    public static /*const*/ String sel_sharedColorPanelExists;
-    public static /*const*/ String sel_reshape;
-    public static /*const*/ String sel_initWithLong_1;
-    public static /*const*/ String sel_reservedThicknessForAccessoryView;
-    public static /*const*/ String sel_setTitleCell_1;
-    public static /*const*/ String sel_sharedSpellCheckerExists;
-    public static /*const*/ String sel_locationForSubmenu_1;
-    public static /*const*/ String sel_nodesForXPath_1error_1;
-    public static /*const*/ String sel_setHasVerticalRuler_1;
-    public static /*const*/ String sel_controlHighlightColor;
-    public static /*const*/ String sel_rowSpan;
-    public static /*const*/ String sel_decodeObject;
-    public static /*const*/ String sel_fileHandleForReadingAtPath_1;
-    public static /*const*/ String sel_didLoadBytes_1loadComplete_1;
-    public static /*const*/ String sel_renewRows_1columns_1;
-    public static /*const*/ String sel_performKeyEquivalent_1;
-    public static /*const*/ String sel_windowDidResignKey_1;
-    public static /*const*/ String sel_typeForKey_1;
-    public static /*const*/ String sel_selectedObjects;
-    public static /*const*/ String sel_defaultPrinter;
-    public static /*const*/ String sel_colorWithPatternImage_1;
-    public static /*const*/ String sel_setAttributedAlternateTitle_1;
-    public static /*const*/ String sel_setValue_1forKey_1;
-    public static /*const*/ String sel_drawInteriorWithFrame_1inView_1;
-    public static /*const*/ String sel_copy_1;
-    public static /*const*/ String sel_scanString_1intoString_1;
-    public static /*const*/ String sel_fileManager_1shouldProceedAfterError_1;
-    public static /*const*/ String sel_fileManager_1shouldRemoveItemAtPath_1;
-    public static /*const*/ String sel_removeSavedColumnsWithAutosaveName_1;
-    public static /*const*/ String sel_numberWithUnsignedInteger_1;
-    public static /*const*/ String sel_rulerMarkersForTextView_1paragraphStyle_1ruler_1;
-    public static /*const*/ String sel_layoutRectForTextBlock_1atIndex_1effectiveRange_1;
-    public static /*const*/ String sel_maxPossiblePositionOfDividerAtIndex_1;
-    public static /*const*/ String sel_removePort_1forMode_1;
-    public static /*const*/ String sel_drawHashMarksAndLabelsInRect_1;
-    public static /*const*/ String sel_control_1textView_1doCommandBySelector_1;
-    public static /*const*/ String sel_getLineFragmentRect_1usedRect_1remainingRect_1forStartingGlyphAtIndex_1proposedRect_1lineSpacing_1paragraphSpacingBefore_1paragraphSpacingAfter_1;
-    public static /*const*/ String sel_textContainerInset;
-    public static /*const*/ String sel_positionsForCompositeSequence_1numberOfGlyphs_1pointArray_1;
-    public static /*const*/ String sel_stringByAppendingPathComponent_1;
-    public static /*const*/ String sel_application_1printFiles_1;
-    public static /*const*/ String sel_scanInt_1;
-    public static /*const*/ String sel_operators;
-    public static /*const*/ String sel_fireDate;
-    public static /*const*/ String sel_isExternal;
-    public static /*const*/ String sel_setImagePosition_1;
-    public static /*const*/ String sel_predicateWithFormat_1arguments_1;
-    public static /*const*/ String sel_stopSpeaking;
-    public static /*const*/ String sel_contentWidthValueType;
-    public static /*const*/ String sel_paddingPosition;
-    public static /*const*/ String sel_removeLastObject;
-    public static /*const*/ String sel_stringByReplacingCharactersInRange_1withString_1;
-    public static /*const*/ String sel_pointerValue;
-    public static /*const*/ String sel_setTruncatesLastVisibleLine_1;
-    public static /*const*/ String sel_URLHandleResourceDidBeginLoading_1;
-    public static /*const*/ String sel_valueForKeyPath_1;
-    public static /*const*/ String sel_setPeriodicDelay_1interval_1;
-    public static /*const*/ String sel_imageRepWithCIImage_1;
-    public static /*const*/ String sel_wantsNotificationForMarkedText;
-    public static /*const*/ String sel_rectForPart_1;
-    public static /*const*/ String sel_setWeekday_1;
-    public static /*const*/ String sel_streamStatus;
-    public static /*const*/ String sel_containsPoint_1;
-    public static /*const*/ String sel_underlineThickness;
-    public static /*const*/ String sel_allObjects;
-    public static /*const*/ String sel_characters;
-    public static /*const*/ String sel_outlineViewSelectionIsChanging_1;
-    public static /*const*/ String sel_netServiceBrowser_1didNotSearch_1;
-    public static /*const*/ String sel_poolCountHighWaterMark;
-    public static /*const*/ String sel_setColorSpaceName_1;
-    public static /*const*/ String sel_graphicsPort;
-    public static /*const*/ String sel_fontDescriptorWithName_1matrix_1;
-    public static /*const*/ String sel_setSelectable_1;
-    public static /*const*/ String sel_scriptErrorOffendingObjectDescriptor;
-    public static /*const*/ String sel_resizingMask;
-    public static /*const*/ String sel_canHandleRequest_1;
-    public static /*const*/ String sel_imageRepWithPasteboard_1;
-    public static /*const*/ String sel_stopQuery;
-    public static /*const*/ String sel_dataWithBytes_1length_1;
-    public static /*const*/ String sel_setCachesBezierPath_1;
-    public static /*const*/ String sel_arrayForKey_1;
-    public static /*const*/ String sel_cell;
-    public static /*const*/ String sel_dealloc;
-    public static /*const*/ String sel_constrainScrollPoint_1;
-    public static /*const*/ String sel_printSettings;
-    public static /*const*/ String sel_autoresizesOutlineColumn;
-    public static /*const*/ String sel_setFont_1range_1;
-    public static /*const*/ String sel_limitDateForMode_1;
-    public static /*const*/ String sel_stroke;
-    public static /*const*/ String sel_parser_1parseErrorOccurred_1;
-    public static /*const*/ String sel_sendsActionOnEndEditing;
-    public static /*const*/ String sel_toggleGrammarChecking_1;
-    public static /*const*/ String sel_acceptsBinary;
-    public static /*const*/ String sel_indexLessThanIndex_1;
-    public static /*const*/ String sel_setCollapsesBorders_1;
-    public static /*const*/ String sel_setTimeoutInterval_1;
-    public static /*const*/ String sel_setNeedsDisplayInRect_1avoidAdditionalLayout_1;
-    public static /*const*/ String sel_encodeWithCoder_1;
-    public static /*const*/ String sel_compositeToPoint_1operation_1;
-    public static /*const*/ String sel_textView_1doubleClickedOnCell_1inRect_1atIndex_1;
-    public static /*const*/ String sel_setAlternateTitleWithMnemonic_1;
-    public static /*const*/ String sel_minimumSignificantDigits;
-    public static /*const*/ String sel_stackSize;
-    public static /*const*/ String sel_setLayoutManager_1;
-    public static /*const*/ String sel_image_1didLoadRepresentationHeader_1;
-    public static /*const*/ String sel_depth;
-    public static /*const*/ String sel_setTypesetter_1;
-    public static /*const*/ String sel_isSessionOnly;
-    public static /*const*/ String sel_performFindPanelAction_1;
-    public static /*const*/ String sel_fileManager_1shouldProceedAfterError_1removingItemAtPath_1;
-    public static /*const*/ String sel_paperSize;
-    public static /*const*/ String sel_changeColor_1;
-    public static /*const*/ String sel_unarchiverDidFinish_1;
-    public static /*const*/ String sel_initWithObjectsAndKeys_1;
-    public static /*const*/ String sel_notationDeclarationForName_1;
-    public static /*const*/ String sel_maximumSignificantDigits;
-    public static /*const*/ String sel_receivesCredentialSecurely;
-    public static /*const*/ String sel_setObjectBeingTested_1;
-    public static /*const*/ String sel_cacheDepthMatchesImageDepth;
-    public static /*const*/ String sel_hasPropertyForKey_1;
-    public static /*const*/ String sel_draggingDestinationWindow;
-    public static /*const*/ String sel_typeCodeValue;
-    public static /*const*/ String sel_portForName_1;
-    public static /*const*/ String sel_getCString_1maxLength_1encoding_1;
-    public static /*const*/ String sel_attributedString;
-    public static /*const*/ String sel_fileExistsAtPath_1isDirectory_1;
-    public static /*const*/ String sel_updateRuler;
-    public static /*const*/ String sel_print_1;
-    public static /*const*/ String sel_setFrameSize_1;
-    public static /*const*/ String sel_dataFromPropertyList_1format_1errorDescription_1;
-    public static /*const*/ String sel_initWithContentsOfURL_1ofType_1;
-    public static /*const*/ String sel_replaceValueAtIndex_1inPropertyWithKey_1withValue_1;
-    public static /*const*/ String sel_formIntersectionWithCharacterSet_1;
-    public static /*const*/ String sel_renderingMode;
-    public static /*const*/ String sel_viewsNeedDisplay;
-    public static /*const*/ String sel_lineFragmentRectForProposedRect_1sweepDirection_1movementDirection_1remainingRect_1;
-    public static /*const*/ String sel_rulerAccessoryViewForTextView_1paragraphStyle_1ruler_1enabled_1;
-    public static /*const*/ String sel_initWithArray_1copyItems_1;
-    public static /*const*/ String sel_ensureLayoutForGlyphRange_1;
-    public static /*const*/ String sel_availableLocaleIdentifiers;
-    public static /*const*/ String sel_viewDidHide;
-    public static /*const*/ String sel_setShouldReportNamespacePrefixes_1;
-    public static /*const*/ String sel_runToolbarCustomizationPalette_1;
-    public static /*const*/ String sel_roundingBehavior;
-    public static /*const*/ String sel_expressionForEvaluatedObject;
-    public static /*const*/ String sel_rulerView_1handleMouseDown_1;
-    public static /*const*/ String sel_scanCharactersFromSet_1intoString_1;
-    public static /*const*/ String sel_applicationDidChangeScreenParameters_1;
-    public static /*const*/ String sel_textView_1clickedOnCell_1inRect_1;
-    public static /*const*/ String sel_decodeDoubleForKey_1;
-    public static /*const*/ String sel_URLHandle_1resourceDidFailLoadingWithReason_1;
-    public static /*const*/ String sel_setCountKeyPath_1;
-    public static /*const*/ String sel_showContextHelpForObject_1locationHint_1;
-    public static /*const*/ String sel_setData_1forType_1;
-    public static /*const*/ String sel_setPixel_1atX_1y_1;
-    public static /*const*/ String sel_setReceiversSpecifier_1;
-    public static /*const*/ String sel_postNotificationName_1object_1userInfo_1;
-    public static /*const*/ String sel_rowForItem_1;
-    public static /*const*/ String sel_fetch_1;
-    public static /*const*/ String sel_propertyList_1isValidForFormat_1;
-    public static /*const*/ String sel_configureAsServer;
-    public static /*const*/ String sel_setAllowsColumnReordering_1;
-    public static /*const*/ String sel_charValue;
-    public static /*const*/ String sel_setInsertionClassDescription_1;
-    public static /*const*/ String sel_cyanColor;
-    public static /*const*/ String sel_lockWhenCondition_1;
-    public static /*const*/ String sel_cacheImageInRect_1;
-    public static /*const*/ String sel_keyboardFocusIndicatorColor;
-    public static /*const*/ String sel_hasUndoManager;
-    public static /*const*/ String sel_drawInBezierPath_1relativeCenterPosition_1;
-    public static /*const*/ String sel_decimalNumberByAdding_1;
-    public static /*const*/ String sel_initWithDescriptorType_1data_1;
-    public static /*const*/ String sel_isUndoing;
-    public static /*const*/ String sel_boolForKey_1;
-    public static /*const*/ String sel_localizedCatalogNameComponent;
-    public static /*const*/ String sel_representations;
-    public static /*const*/ String sel_expressionValueWithObject_1context_1;
-    public static /*const*/ String sel_viewWillMoveToSuperview_1;
-    public static /*const*/ String sel_alphaValue;
-    public static /*const*/ String sel_learnWord_1;
-    public static /*const*/ String sel_releaseGlobally;
-    public static /*const*/ String sel_defaultCompletionDelay;
-    public static /*const*/ String sel_control_1textShouldEndEditing_1;
-    public static /*const*/ String sel_alertWithMessageText_1defaultButton_1alternateButton_1otherButton_1informativeTextWithFormat_1;
-    public static /*const*/ String sel_control_1textShouldBeginEditing_1;
-    public static /*const*/ String sel_sizeMode;
-    public static /*const*/ String sel_representedURL;
-    public static /*const*/ String sel_fileHFSCreatorCode;
-    public static /*const*/ String sel_removeDependency_1;
-    public static /*const*/ String sel_parentForItem_1;
-    public static /*const*/ String sel_adjustPageHeightNew_1top_1bottom_1limit_1;
-    public static /*const*/ String sel_showPanels;
-    public static /*const*/ String sel_alwaysUsesMultipleValuesMarker;
-    public static /*const*/ String sel_setUpFieldEditorAttributes_1;
-    public static /*const*/ String sel_comboBoxCell_1completedString_1;
-    public static /*const*/ String sel_null;
-    public static /*const*/ String sel_setTextAttributesForNil_1;
-    public static /*const*/ String sel_currencyGroupingSeparator;
-    public static /*const*/ String sel_toolbarSelectableItemIdentifiers_1;
-    public static /*const*/ String sel_size;
-    public static /*const*/ String sel_fileModificationDate;
-    public static /*const*/ String sel_timestamp;
-    public static /*const*/ String sel_canonicalRequestForRequest_1;
-    public static /*const*/ String sel_moveBackwardAndModifySelection_1;
-    public static /*const*/ String sel_frameOfColumn_1;
-    public static /*const*/ String sel_setRefusesFirstResponder_1;
-    public static /*const*/ String sel_hasDynamicDepthLimit;
-    public static /*const*/ String sel_decodeIntForKey_1;
-    public static /*const*/ String sel_autoupdatingCurrentLocale;
-    public static /*const*/ String sel_transformBezierPath_1;
-    public static /*const*/ String sel_registerPort_1name_1nameServerPortNumber_1;
-    public static /*const*/ String sel_contentWidth;
-    public static /*const*/ String sel_noteUserDefaultsChanged;
-    public static /*const*/ String sel_orangeColor;
-    public static /*const*/ String sel_lastItem;
-    public static /*const*/ String sel_setButtonType_1;
-    public static /*const*/ String sel_initWithContentsOfURL_1ofType_1error_1;
-    public static /*const*/ String sel_rowTemplates;
-    public static /*const*/ String sel_setEnabled_1forSegment_1;
-    public static /*const*/ String sel_avoidsEmptySelection;
-    public static /*const*/ String sel_encodeInt_1forKey_1;
-    public static /*const*/ String sel_dictionaryWithValuesForKeys_1;
-    public static /*const*/ String sel_start_1;
-    public static /*const*/ String sel_sortUsingDescriptors_1;
-    public static /*const*/ String sel_currentParagraphStyle;
-    public static /*const*/ String sel_treeNodeWithRepresentedObject_1;
-    public static /*const*/ String sel_tableColumnWithIdentifier_1;
-    public static /*const*/ String sel_attributedTitle;
-    public static /*const*/ String sel_setEntryType_1;
-    public static /*const*/ String sel_pixelFormat;
-    public static /*const*/ String sel_temporaryAttribute_1atCharacterIndex_1longestEffectiveRange_1inRange_1;
-    public static /*const*/ String sel_treatsFilePackagesAsDirectories;
-    public static /*const*/ String sel_glyphAtIndex_1;
-    public static /*const*/ String sel_titleWidth_1;
-    public static /*const*/ String sel_setWords_1;
-    public static /*const*/ String sel_glyphIndexForPoint_1inTextContainer_1;
-    public static /*const*/ String sel_alternateSelectedControlColor;
-    public static /*const*/ String sel_sizeToCells;
-    public static /*const*/ String sel_flushWindow;
-    public static /*const*/ String sel_URLAtIndex_1effectiveRange_1;
-    public static /*const*/ String sel_isSimpleRectangularTextContainer;
-    public static /*const*/ String sel_dragImageForRowsWithIndexes_1tableColumns_1event_1offset_1;
-    public static /*const*/ String sel_takeDoubleValueFrom_1;
-    public static /*const*/ String sel_selectItem_1;
-    public static /*const*/ String sel_isMultiple;
-    public static /*const*/ String sel_arrangeInFront_1;
-    public static /*const*/ String sel_defaultFocusRingType;
-    public static /*const*/ String sel_componentsSeparatedByString_1;
-    public static /*const*/ String sel_calendar;
-    public static /*const*/ String sel_openFile_1withApplication_1;
-    public static /*const*/ String sel_moveWordBackward_1;
-    public static /*const*/ String sel_getCharacters_1;
-    public static /*const*/ String sel_initWithInt_1;
-    public static /*const*/ String sel_initWithReceivePort_1sendPort_1components_1;
-    public static /*const*/ String sel_setBool_1forKey_1;
-    public static /*const*/ String sel_keyPathsForValuesAffectingValueForKey_1;
-    public static /*const*/ String sel_saveDocumentTo_1;
-    public static /*const*/ String sel_knobRectFlipped_1;
-    public static /*const*/ String sel_isEqualToAttributedString_1;
-    public static /*const*/ String sel_indexOfResult_1;
-    public static /*const*/ String sel_attributesForVoice_1;
-    public static /*const*/ String sel_encodeConditionalObject_1;
-    public static /*const*/ String sel_pixelBufferCubeMapFace;
-    public static /*const*/ String sel_index;
-    public static /*const*/ String sel_transactionID;
-    public static /*const*/ String sel_displayRectIgnoringOpacity_1;
-    public static /*const*/ String sel_setKeyboardFocusRingNeedsDisplayInRect_1;
-    public static /*const*/ String sel_invalidateLayoutForCharacterRange_1isSoft_1actualCharacterRange_1;
-    public static /*const*/ String sel_contentsEqualAtPath_1andPath_1;
-    public static /*const*/ String sel_cancelOperation_1;
-    public static /*const*/ String sel_accessibilityAttributeValue_1;
-    public static /*const*/ String sel_windowNibPath;
-    public static /*const*/ String sel_saveToFile_1saveOperation_1delegate_1didSaveSelector_1contextInfo_1;
-    public static /*const*/ String sel_setMixedStateImage_1;
-    public static /*const*/ String sel_predicateWithFormat_1;
-    public static /*const*/ String sel_initWithSendPort_1receivePort_1components_1;
-    public static /*const*/ String sel_setRecentsAutosaveName_1;
-    public static /*const*/ String sel_autosavesConfiguration;
-    public static /*const*/ String sel_setSubitems_1;
-    public static /*const*/ String sel_setPathStyle_1;
-    public static /*const*/ String sel_startAnimation_1;
-    public static /*const*/ String sel_bezierPath;
-    public static /*const*/ String sel_archiver_1willEncodeObject_1;
-    public static /*const*/ String sel_acceptInputForMode_1beforeDate_1;
-    public static /*const*/ String sel_setTearOffMenuRepresentation_1;
-    public static /*const*/ String sel_writableTypes;
-    public static /*const*/ String sel_domain;
-    public static /*const*/ String sel_removeDocument_1;
-    public static /*const*/ String sel_showsBaselineSeparator;
-    public static /*const*/ String sel_dragImageForRows_1event_1dragImageOffset_1;
-    public static /*const*/ String sel_table;
-    public static /*const*/ String sel_initRegularFileWithContents_1;
-    public static /*const*/ String sel_add_1;
-    public static /*const*/ String sel_stateImageWidth;
-    public static /*const*/ String sel_URLProtocol_1didReceiveAuthenticationChallenge_1;
-    public static /*const*/ String sel_imageAndTitleWidth;
-    public static /*const*/ String sel_trackingAreas;
-    public static /*const*/ String sel_initRecordDescriptor;
-    public static /*const*/ String sel_itemIdentifier;
-    public static /*const*/ String sel_doubleClickAtIndex_1;
-    public static /*const*/ String sel_fixesAttributesLazily;
-    public static /*const*/ String sel_netServiceBrowserWillSearch_1;
-    public static /*const*/ String sel_textureInternalFormat;
-    public static /*const*/ String sel_valueWithSize_1;
-    public static /*const*/ String sel_setVerticalScroller_1;
-    public static /*const*/ String sel_absolutePathForAppBundleWithIdentifier_1;
-    public static /*const*/ String sel_contentMinSize;
-    public static /*const*/ String sel_persistentDomainForName_1;
-    public static /*const*/ String sel_cellAtIndex_1;
-    public static /*const*/ String sel_setWithArray_1;
-    public static /*const*/ String sel_resetCursorRects;
-    public static /*const*/ String sel_imageRepClassForFileType_1;
-    public static /*const*/ String sel_setContainerIsObjectBeingTested_1;
-    public static /*const*/ String sel_removeProgressMark_1;
-    public static /*const*/ String sel_hitTestForEvent_1inRect_1ofView_1;
-    public static /*const*/ String sel_listDescriptor;
-    public static /*const*/ String sel_rangeOfUnit_1startDate_1interval_1forDate_1;
-    public static /*const*/ String sel_checkSpaceForParts;
-    public static /*const*/ String sel_availableVoices;
-    public static /*const*/ String sel_PMPrintSettings;
-    public static /*const*/ String sel_nonBaseCharacterSet;
-    public static /*const*/ String sel_launchedTaskWithLaunchPath_1arguments_1;
-    public static /*const*/ String sel_clearCurrentContext;
-    public static /*const*/ String sel_applicationWillUpdate_1;
-    public static /*const*/ String sel_addFontTrait_1;
-    public static /*const*/ String sel_arrayByAddingObjectsFromArray_1;
-    public static /*const*/ String sel_abortParsing;
-    public static /*const*/ String sel_subviews;
-    public static /*const*/ String sel_initWithContainerClassDescription_1containerSpecifier_1key_1uniqueID_1;
-    public static /*const*/ String sel_acceptableDragTypes;
-    public static /*const*/ String sel_managedObjectContext;
-    public static /*const*/ String sel_resizeWithMagnification_1;
-    public static /*const*/ String sel_setUsesFindPanel_1;
-    public static /*const*/ String sel_application_1printFiles_1withSettings_1showPrintPanels_1;
-    public static /*const*/ String sel_loadAndReturnError_1;
-    public static /*const*/ String sel_initWithLeftExpressions_1rightExpressions_1modifier_1operators_1options_1;
-    public static /*const*/ String sel_addSelectionIndexes_1;
-    public static /*const*/ String sel_initWithBitmapDataPlanes_1pixelsWide_1pixelsHigh_1bitsPerSample_1samplesPerPixel_1hasAlpha_1isPlanar_1colorSpaceName_1bitmapFormat_1bytesPerRow_1bitsPerPixel_1;
-    public static /*const*/ String sel_initToFileAtPath_1append_1;
-    public static /*const*/ String sel_currencyDecimalSeparator;
-    public static /*const*/ String sel_expansionFrameWithFrame_1inView_1;
-    public static /*const*/ String sel_HTTPShouldHandleCookies;
-    public static /*const*/ String sel_rearrangeObjects;
-    public static /*const*/ String sel_graphicsContextWithWindow_1;
-    public static /*const*/ String sel_stringWithCapacity_1;
-    public static /*const*/ String sel_results;
-    public static /*const*/ String sel_loadFileWrapperRepresentation_1ofType_1;
-    public static /*const*/ String sel_secondsFromGMTForDate_1;
-    public static /*const*/ String sel_clearStopAnimation;
-    public static /*const*/ String sel_numberWithShort_1;
-    public static /*const*/ String sel_setHorizontallyCentered_1;
-    public static /*const*/ String sel_setNeedsDisplayInRect_1;
-    public static /*const*/ String sel_objectDidBeginEditing_1;
-    public static /*const*/ String sel_rightMouseDown_1;
-    public static /*const*/ String sel_data2;
-    public static /*const*/ String sel_initWithCalendarIdentifier_1;
-    public static /*const*/ String sel_containsValueForKey_1;
-    public static /*const*/ String sel_result;
-    public static /*const*/ String sel_printDocument_1;
-    public static /*const*/ String sel_addSuiteNamed_1;
-    public static /*const*/ String sel_deleteCookie_1;
-    public static /*const*/ String sel_isLocationRequiredToCreateForKey_1;
-    public static /*const*/ String sel_saveGraphicsState;
-    public static /*const*/ String sel_getInfoForFile_1application_1type_1;
-    public static /*const*/ String sel_HTTPBodyStream;
-    public static /*const*/ String sel_accessibilityParameterizedAttributeNames;
-    public static /*const*/ String sel_objectForKey_1;
-    public static /*const*/ String sel_classForArchiver;
-    public static /*const*/ String sel_allBundles;
-    public static /*const*/ String sel_rangeOfComposedCharacterSequenceAtIndex_1;
-    public static /*const*/ String sel_allowsDuplicatesInToolbar;
-    public static /*const*/ String sel_speechSynthesizer_1didEncounterSyncMessage_1;
-    public static /*const*/ String sel_performSelector_1withObject_1afterDelay_1inModes_1;
-    public static /*const*/ String sel_setScalesWhenResized_1;
-    public static /*const*/ String sel_fileWrappers;
-    public static /*const*/ String sel_setSubmenu_1;
-    public static /*const*/ String sel_setSendsSearchStringImmediately_1;
-    public static /*const*/ String sel_movieUnfilteredPasteboardTypes;
-    public static /*const*/ String sel_browser_1willDisplayCell_1atRow_1column_1;
-    public static /*const*/ String sel_valueOfAttribute_1forResultAtIndex_1;
-    public static /*const*/ String sel_rightExpression;
-    public static /*const*/ String sel_moveNode_1toIndexPath_1;
-    public static /*const*/ String sel_insertionKey;
-    public static /*const*/ String sel_columnsAutosaveName;
-    public static /*const*/ String sel_connection_1didReceiveResponse_1;
-    public static /*const*/ String sel_delegate;
-    public static /*const*/ String sel_valueForHTTPHeaderField_1;
-    public static /*const*/ String sel_requiredThickness;
-    public static /*const*/ String sel_selectedCells;
-    public static /*const*/ String sel_setResizable_1;
-    public static /*const*/ String sel_resizeRightCursor;
-    public static /*const*/ String sel_arrayWithContentsOfURL_1;
-    public static /*const*/ String sel_setEchosBullets_1;
-    public static /*const*/ String sel_outlineViewItemDidCollapse_1;
-    public static /*const*/ String sel_mutableSetValueForKey_1;
-    public static /*const*/ String sel_initWithObjects_1forKeys_1count_1;
-    public static /*const*/ String sel_canBeDisabled;
-    public static /*const*/ String sel_selectTabViewItemWithIdentifier_1;
-    public static /*const*/ String sel_setLongEraSymbols_1;
-    public static /*const*/ String sel_displayRect_1;
-    public static /*const*/ String sel_initRemoteWithProtocolFamily_1socketType_1protocol_1address_1;
-    public static /*const*/ String sel_setQueuePriority_1;
-    public static /*const*/ String sel_initWithFileDescriptor_1closeOnDealloc_1;
-    public static /*const*/ String sel_comboBoxWillDismiss_1;
-    public static /*const*/ String sel_setMatchesOnMultipleResolution_1;
-    public static /*const*/ String sel_connection;
-    public static /*const*/ String sel_includedKeys;
-    public static /*const*/ String sel_writeToURL_1options_1error_1;
-    public static /*const*/ String sel_activeProcessorCount;
-    public static /*const*/ String sel_countByEnumeratingWithState_1objects_1count_1;
-    public static /*const*/ String sel_setTransformStruct_1;
-    public static /*const*/ String sel_setVeryShortWeekdaySymbols_1;
-    public static /*const*/ String sel_markerLocation;
-    public static /*const*/ String sel_widthForLayer_1edge_1;
-    public static /*const*/ String sel_transform;
-    public static /*const*/ String sel_addSelectionIndexPaths_1;
-    public static /*const*/ String sel_removeRequestMode_1;
-    public static /*const*/ String sel_indexOfObject_1inRange_1;
-    public static /*const*/ String sel_awakeAfterUsingCoder_1;
-    public static /*const*/ String sel_setKnobProportion_1;
-    public static /*const*/ String sel_setAllowsUserCustomization_1;
-    public static /*const*/ String sel_setCurrentOperation_1;
-    public static /*const*/ String sel_outlineView_1isGroupItem_1;
-    public static /*const*/ String sel_deleteGlyphsInRange_1;
-    public static /*const*/ String sel_setSelectedObjects_1;
-    public static /*const*/ String sel_pathComponentCellAtPoint_1withFrame_1inView_1;
-    public static /*const*/ String sel_outlineView_1acceptDrop_1item_1childIndex_1;
-    public static /*const*/ String sel_setBackgroundColor_1;
-    public static /*const*/ String sel_canSelectNext;
-    public static /*const*/ String sel_encodeRect_1forKey_1;
-    public static /*const*/ String sel_resetCursorRect_1inView_1;
-    public static /*const*/ String sel_resumeData;
-    public static /*const*/ String sel_levelsOfUndo;
-    public static /*const*/ String sel_objectIsForcedForKey_1;
-    public static /*const*/ String sel_minSize;
-    public static /*const*/ String sel_indentationPerLevel;
-    public static /*const*/ String sel_browserColumnConfigurationDidChange_1;
-    public static /*const*/ String sel_startAnimation;
-    public static /*const*/ String sel_outlineView_1namesOfPromisedFilesDroppedAtDestination_1forDraggedItems_1;
-    public static /*const*/ String sel_setAlignment_1range_1;
-    public static /*const*/ String sel_zeroSymbol;
-    public static /*const*/ String sel_draggedImage_1beganAt_1;
-    public static /*const*/ String sel_buttonMask;
-    public static /*const*/ String sel_frame;
-    public static /*const*/ String sel_markers;
-    public static /*const*/ String sel_initWithObjects_1count_1;
-    public static /*const*/ String sel_unload;
-    public static /*const*/ String sel_initForReadingWithData_1;
-    public static /*const*/ String sel_year;
-    public static /*const*/ String sel_ruleEditor_1child_1forCriterion_1withRowType_1;
-    public static /*const*/ String sel_dayOfMonth;
-    public static /*const*/ String sel_colorUsingColorSpaceName_1;
-    public static /*const*/ String sel_registerCoercer_1selector_1toConvertFromClass_1toClass_1;
-    public static /*const*/ String sel_removeObject_1inRange_1;
-    public static /*const*/ String sel_setFrameFromString_1;
-    public static /*const*/ String sel_canAdd;
-    public static /*const*/ String sel_era;
-    public static /*const*/ String sel_expressionForSubquery_1usingIteratorVariable_1predicate_1;
-    public static /*const*/ String sel_setAMSymbol_1;
-    public static /*const*/ String sel_groupedResults;
-    public static /*const*/ String sel_attributedStringValue;
-    public static /*const*/ String sel_enclosingScrollView;
-    public static /*const*/ String sel_isEqualToNumber_1;
-    public static /*const*/ String sel_mainBundle;
-    public static /*const*/ String sel_textContainerForGlyphAtIndex_1effectiveRange_1;
-    public static /*const*/ String sel_setUsesGroupingSeparator_1;
-    public static /*const*/ String sel_pointerAtIndex_1;
-    public static /*const*/ String sel_arrowsPosition;
-    public static /*const*/ String sel_panel_1compareFilename_1with_1caseSensitive_1;
-    public static /*const*/ String sel_drawSeparatorItemWithFrame_1inView_1;
-    public static /*const*/ String sel_objectsByEvaluatingWithContainers_1;
-    public static /*const*/ String sel_textTabForGlyphLocation_1writingDirection_1maxLocation_1;
-    public static /*const*/ String sel_fontDescriptor;
-    public static /*const*/ String sel_validAttributesForMarkedText;
-    public static /*const*/ String sel_scriptingEndsWith_1;
-    public static /*const*/ String sel_scrollViaScroller_1;
-    public static /*const*/ String sel_setAlwaysUsesMultipleValuesMarker_1;
-    public static /*const*/ String sel_attributeKeys;
-    public static /*const*/ String sel_darkGrayColor;
-    public static /*const*/ String sel_setExtensionHidden_1;
-    public static /*const*/ String sel_drawInRect_1withAttributes_1;
-    public static /*const*/ String sel_selectTabViewItemAtIndex_1;
-    public static /*const*/ String sel_contentRectForFrameRect_1;
-    public static /*const*/ String sel_setParagraphSpacingBefore_1;
-    public static /*const*/ String sel_minDate;
-    public static /*const*/ String sel_isARepeat;
-    public static /*const*/ String sel_selectedTabViewItem;
-    public static /*const*/ String sel_minusHashTable_1;
-    public static /*const*/ String sel_preferredLocalizationsFromArray_1forPreferences_1;
-    public static /*const*/ String sel_setTextBlocks_1;
-    public static /*const*/ String sel_writePrintInfo;
-    public static /*const*/ String sel_paperName;
-    public static /*const*/ String sel_pauseSpeakingAtBoundary_1;
-    public static /*const*/ String sel_markedTextAbandoned_1;
-    public static /*const*/ String sel_setTitled_1;
-    public static /*const*/ String sel_hidesOnDeactivate;
-    public static /*const*/ String sel_selectedRange;
-    public static /*const*/ String sel_reportException_1;
-    public static /*const*/ String sel_drawBezelWithFrame_1inView_1;
-    public static /*const*/ String sel_relativeMoveToPoint_1;
-    public static /*const*/ String sel_printingAdjustmentInLayoutManager_1forNominallySpacedGlyphRange_1packedGlyphs_1count_1;
-    public static /*const*/ String sel_longValue;
-    public static /*const*/ String sel_setMaxNumberOfColumns_1;
-    public static /*const*/ String sel_textView_1draggedCell_1inRect_1event_1atIndex_1;
-    public static /*const*/ String sel_isRemovable;
-    public static /*const*/ String sel_handleCloseScriptCommand_1;
-    public static /*const*/ String sel_layoutManager_1shouldUseTemporaryAttributes_1forDrawingToScreen_1atCharacterIndex_1effectiveRange_1;
-    public static /*const*/ String sel_expressionForKeyPath_1;
-    public static /*const*/ String sel_bezierPathWithOvalInRect_1;
-    public static /*const*/ String sel_deselectSelectedCell;
-    public static /*const*/ String sel_defaultSubcontainerAttributeKey;
-    public static /*const*/ String sel_yank_1;
-    public static /*const*/ String sel_changeSpelling_1;
-    public static /*const*/ String sel_totalAutoreleasedObjects;
-    public static /*const*/ String sel_loops;
-    public static /*const*/ String sel_boundsRectForTextBlock_1atIndex_1effectiveRange_1;
-    public static /*const*/ String sel_resignMainWindow;
-    public static /*const*/ String sel_availableLanguages;
-    public static /*const*/ String sel_initWithMarkerFormat_1options_1;
-    public static /*const*/ String sel_runInNewThread;
-    public static /*const*/ String sel_tableView_1selectionIndexesForProposedSelection_1;
-    public static /*const*/ String sel_fetchWithRequest_1merge_1error_1;
-    public static /*const*/ String sel_endSubelementIdentifier;
-    public static /*const*/ String sel_implementationClassName;
-    public static /*const*/ String sel_eventNumber;
-    public static /*const*/ String sel_requestTimeout;
-    public static /*const*/ String sel_boldSystemFontOfSize_1;
-    public static /*const*/ String sel_setPixelsWide_1;
-    public static /*const*/ String sel_labelForSegment_1;
-    public static /*const*/ String sel_setAlternateTitle_1;
-    public static /*const*/ String sel_shouldBreakLineByWordBeforeCharacterAtIndex_1;
-    public static /*const*/ String sel_lockFocusIfCanDraw;
-    public static /*const*/ String sel_setFormat_1;
-    public static /*const*/ String sel_setSegmentCount_1;
-    public static /*const*/ String sel_accessInstanceVariablesDirectly;
-    public static /*const*/ String sel_comboBox_1completedString_1;
-    public static /*const*/ String sel_moveToBeginningOfParagraph_1;
-    public static /*const*/ String sel_defaultParagraphStyle;
-    public static /*const*/ String sel_availableTypeFromArray_1;
-    public static /*const*/ String sel_setGregorianStartDate_1;
-    public static /*const*/ String sel_dateWithTimeIntervalSince1970_1;
-    public static /*const*/ String sel_imagePasteboardTypes;
-    public static /*const*/ String sel_laterDate_1;
-    public static /*const*/ String sel_setBounds_1;
-    public static /*const*/ String sel_HTTPMethod;
-    public static /*const*/ String sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1bidiLevels_1;
-    public static /*const*/ String sel_rectArrayForCharacterRange_1withinSelectedCharacterRange_1inTextContainer_1rectCount_1;
-    public static /*const*/ String sel_drawGridInClipRect_1;
-    public static /*const*/ String sel_isStarted;
-    public static /*const*/ String sel_descriptorType;
-    public static /*const*/ String sel_ISOCurrencyCodes;
-    public static /*const*/ String sel_resetCancelButtonCell;
-    public static /*const*/ String sel_positiveInfinitySymbol;
-    public static /*const*/ String sel_sendsActionOnArrowKeys;
-    public static /*const*/ String sel_delete_1;
-    public static /*const*/ String sel_toolbarWillAddItem_1;
-    public static /*const*/ String sel_updateCellInside_1;
-    public static /*const*/ String sel_inputClientResignActive_1;
-    public static /*const*/ String sel_initWithEventClass_1eventID_1targetDescriptor_1returnID_1transactionID_1;
-    public static /*const*/ String sel_decimalNumberByDividingBy_1withBehavior_1;
-    public static /*const*/ String sel_spellServer_1suggestCompletionsForPartialWordRange_1inString_1language_1;
-    public static /*const*/ String sel_arrayWithObjects_1count_1;
-    public static /*const*/ String sel_connectionWithRegisteredName_1host_1;
-    public static /*const*/ String sel_initWithFormat_1;
-    public static /*const*/ String sel_sharedURLCache;
-    public static /*const*/ String sel_edited_1range_1changeInLength_1;
-    public static /*const*/ String sel_prepareContent;
-    public static /*const*/ String sel_stringWithCString_1encoding_1;
-    public static /*const*/ String sel_postNotificationName_1object_1userInfo_1deliverImmediately_1;
-    public static /*const*/ String sel_coerceToDescriptorType_1;
-    public static /*const*/ String sel_selectionIndex;
-    public static /*const*/ String sel_setContentMaxSize_1;
-    public static /*const*/ String sel_setColor_1atX_1y_1;
-    public static /*const*/ String sel_graphicsContext;
-    public static /*const*/ String sel_hostWithName_1;
-    public static /*const*/ String sel_toggleRuler_1;
-    public static /*const*/ String sel_glyphInfoWithGlyph_1forFont_1baseString_1;
-    public static /*const*/ String sel_panel_1willExpand_1;
-    public static /*const*/ String sel_selectText_1;
-    public static /*const*/ String sel_setShortMonthSymbols_1;
-    public static /*const*/ String sel_setBorderType_1;
-    public static /*const*/ String sel_rangeOfString_1;
-    public static /*const*/ String sel_invalidateGlyphsOnLayoutInvalidationForGlyphRange_1;
-    public static /*const*/ String sel_availableMembersOfFontFamily_1;
-    public static /*const*/ String sel_XPath;
-    public static /*const*/ String sel_contentsOfDirectoryAtPath_1error_1;
-    public static /*const*/ String sel_newItemForRepresentedObject_1;
-    public static /*const*/ String sel_setMatrixClass_1;
-    public static /*const*/ String sel_compositeToPoint_1operation_1fraction_1;
-    public static /*const*/ String sel_setHorizontallyResizable_1;
-    public static /*const*/ String sel_mapTableWithStrongToStrongObjects;
-    public static /*const*/ String sel_colorSpaceModel;
-    public static /*const*/ String sel_setCriticalValue_1;
-    public static /*const*/ String sel_allowsToolTipsWhenApplicationIsInactive;
-    public static /*const*/ String sel_transformUsingAffineTransform_1;
-    public static /*const*/ String sel_initWithInvocation_1;
-    public static /*const*/ String sel_containerClassDescription;
-    public static /*const*/ String sel_parser_1resolveExternalEntityName_1systemID_1;
-    public static /*const*/ String sel_mouseLocationOutsideOfEventStream;
-    public static /*const*/ String sel_detach;
-    public static /*const*/ String sel_setPickerMask_1;
-    public static /*const*/ String sel_tokenStyle;
-    public static /*const*/ String sel_setOptions_1;
-    public static /*const*/ String sel_PDFOperationWithView_1insideRect_1toPath_1printInfo_1;
-    public static /*const*/ String sel_parser_1didStartElement_1namespaceURI_1qualifiedName_1attributes_1;
-    public static /*const*/ String sel_availableFontNamesMatchingFontDescriptor_1;
-    public static /*const*/ String sel_relativePath;
-    public static /*const*/ String sel_moveWordForwardAndModifySelection_1;
-    public static /*const*/ String sel_currentTime;
-    public static /*const*/ String sel_slideDraggedImageTo_1;
-    public static /*const*/ String sel_application_1printFile_1;
-    public static /*const*/ String sel_punctuationCharacterSet;
-    public static /*const*/ String sel_allKeysForObject_1;
-    public static /*const*/ String sel_pathStyle;
-    public static /*const*/ String sel_allowsEditingTextAttributes;
-    public static /*const*/ String sel_lineSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1;
-    public static /*const*/ String sel_initWithContentsOfMappedFile_1;
-    public static /*const*/ String sel_initWithFrame_1pullsDown_1;
-    public static /*const*/ String sel_setView_1;
-    public static /*const*/ String sel_outlineViewSelectionDidChange_1;
-    public static /*const*/ String sel_widthValueTypeForLayer_1edge_1;
-    public static /*const*/ String sel_dateWithTimeIntervalSinceNow_1;
-    public static /*const*/ String sel_display;
-    public static /*const*/ String sel_setRoundingBehavior_1;
-    public static /*const*/ String sel_valueWithPoint_1;
-    public static /*const*/ String sel_tickMarkValueAtIndex_1;
-    public static /*const*/ String sel_addColumnWithCells_1;
-    public static /*const*/ String sel_exposeBinding_1;
-    public static /*const*/ String sel_weekdayOrdinal;
-    public static /*const*/ String sel_canAddChild;
-    public static /*const*/ String sel_hitTest_1;
-    public static /*const*/ String sel_nibBundle;
-    public static /*const*/ String sel_resumeExecutionWithResult_1;
-    public static /*const*/ String sel_setMonthSymbols_1;
-    public static /*const*/ String sel_hitPart;
-    public static /*const*/ String sel_download_1didCancelAuthenticationChallenge_1;
-    public static /*const*/ String sel_descriptionWithCalendarFormat_1;
-    public static /*const*/ String sel_setProtocolSpecificInformation_1;
-    public static /*const*/ String sel_tokenField_1shouldAddObjects_1atIndex_1;
-    public static /*const*/ String sel_popUpContextMenu_1withEvent_1forView_1;
-    public static /*const*/ String sel_stopPeriodicEvents;
-    public static /*const*/ String sel_setDTD_1;
-    public static /*const*/ String sel_glyphAtIndex_1isValidIndex_1;
-    public static /*const*/ String sel_encodeSize_1;
-    public static /*const*/ String sel_windowForSheet;
-    public static /*const*/ String sel_displayMode;
-    public static /*const*/ String sel_revertDocumentToSaved_1;
-    public static /*const*/ String sel_tableView_1objectValueForTableColumn_1row_1;
-    public static /*const*/ String sel_setBackingType_1;
-    public static /*const*/ String sel_scanUpToCharactersFromSet_1intoString_1;
-    public static /*const*/ String sel_nextValidKeyView;
-    public static /*const*/ String sel_arrayWithObject_1;
-    public static /*const*/ String sel_flushBuffer;
-    public static /*const*/ String sel_hasValidObjectValue;
-    public static /*const*/ String sel_numberWithUnsignedLong_1;
-    public static /*const*/ String sel_collectExhaustively;
-    public static /*const*/ String sel_setImageInterpolation_1;
-    public static /*const*/ String sel_setSystemID_1;
-    public static /*const*/ String sel_setCornerView_1;
-    public static /*const*/ String sel_initWithDouble_1;
-    public static /*const*/ String sel_sortedArrayUsingDescriptors_1;
-    public static /*const*/ String sel_removeTextContainerAtIndex_1;
-    public static /*const*/ String sel_whitespaceCharacterSet;
-    public static /*const*/ String sel_classDescriptionForClass_1;
-    public static /*const*/ String sel_setAttributedString_1;
-    public static /*const*/ String sel_setPixelsHigh_1;
-    public static /*const*/ String sel_setDynamicDepthLimit_1;
-    public static /*const*/ String sel_sharedApplication;
-    public static /*const*/ String sel_sound_1didFinishPlaying_1;
-    public static /*const*/ String sel_defaultBehavior;
-    public static /*const*/ String sel_beginSheetForDirectory_1file_1types_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1;
-    public static /*const*/ String sel_orderFrontFontPanel_1;
-    public static /*const*/ String sel_searchForBrowsableDomains;
-    public static /*const*/ String sel_toggleAutomaticQuoteSubstitution_1;
-    public static /*const*/ String sel_textView_1willChangeSelectionFromCharacterRanges_1toCharacterRanges_1;
-    public static /*const*/ String sel_alignRight_1;
-    public static /*const*/ String sel_getBytes_1maxLength_1usedLength_1encoding_1options_1range_1remainingRange_1;
-    public static /*const*/ String sel_keyPointerFunctions;
-    public static /*const*/ String sel_mouseDownFlags;
-    public static /*const*/ String sel_expandItem_1;
-    public static /*const*/ String sel_bezierPathWithRect_1;
-    public static /*const*/ String sel_setGradientType_1;
-    public static /*const*/ String sel_alphanumericCharacterSet;
-    public static /*const*/ String sel_deleteWordForward_1;
-    public static /*const*/ String sel_cStringUsingEncoding_1;
-    public static /*const*/ String sel_storedValueForKey_1;
-    public static /*const*/ String sel_fileSize;
-    public static /*const*/ String sel_elementWithName_1URI_1;
-    public static /*const*/ String sel_pointSize;
-    public static /*const*/ String sel_veryShortMonthSymbols;
-    public static /*const*/ String sel_transformSize_1;
-    public static /*const*/ String sel_titleWidth;
-    public static /*const*/ String sel_setTextContainerInset_1;
-    public static /*const*/ String sel_supportedWindowDepths;
-    public static /*const*/ String sel_appleEvent;
-    public static /*const*/ String sel_valueClassForBinding_1;
-    public static /*const*/ String sel_setFullScreen;
-    public static /*const*/ String sel_encodeObject_1forKey_1;
-    public static /*const*/ String sel_setSpellingState_1range_1;
-    public static /*const*/ String sel_greenComponent;
-    public static /*const*/ String sel_textBackgroundColor;
-    public static /*const*/ String sel_currentEditor;
-    public static /*const*/ String sel_attachedSheet;
-    public static /*const*/ String sel_new;
-    public static /*const*/ String sel_setChildren_1;
-    public static /*const*/ String sel_options;
-    public static /*const*/ String sel_setObjectClass_1;
-    public static /*const*/ String sel_borderWidth;
-    public static /*const*/ String sel_secondarySelectedControlColor;
-    public static /*const*/ String sel_scrollItemAtIndexToVisible_1;
-    public static /*const*/ String sel_wantsLayer;
-    public static /*const*/ String sel_setPath_1;
-    public static /*const*/ String sel_setKeys_1triggerChangeNotificationsForDependentKey_1;
-    public static /*const*/ String sel_verticalAlignment;
-    public static /*const*/ String sel_selectionGranularity;
-    public static /*const*/ String sel_minimumIntegerDigits;
-    public static /*const*/ String sel_canCreateDirectories;
-    public static /*const*/ String sel_fixAttributesInRange_1;
-    public static /*const*/ String sel_URLWithString_1;
-    public static /*const*/ String sel_setFrameFromContentFrame_1;
-    public static /*const*/ String sel_setFillColor_1;
-    public static /*const*/ String sel_dictionaryWithCapacity_1;
-    public static /*const*/ String sel_updateFromPath_1;
-    public static /*const*/ String sel_netServiceDidResolveAddress_1;
-    public static /*const*/ String sel_usesLazyFetching;
-    public static /*const*/ String sel_setMenuBarVisible_1;
-    public static /*const*/ String sel_windowDidBecomeKey_1;
-    public static /*const*/ String sel_menuChanged_1;
-    public static /*const*/ String sel_itemObjectValueAtIndex_1;
-    public static /*const*/ String sel_setClassName_1forClass_1;
-    public static /*const*/ String sel_setShowsToolbarButton_1;
-    public static /*const*/ String sel_plusSign;
-    public static /*const*/ String sel_sharedSpellChecker;
-    public static /*const*/ String sel_getNumberOfRows_1columns_1;
-    public static /*const*/ String sel_valueTransformerNames;
-    public static /*const*/ String sel_interpolatedColorAtLocation_1;
-    public static /*const*/ String sel_updateSpellingPanelWithMisspelledWord_1;
-    public static /*const*/ String sel_yellowComponent;
-    public static /*const*/ String sel_acceptsFirstResponder;
-    public static /*const*/ String sel_valueWithRect_1;
-    public static /*const*/ String sel_frameOfCellAtColumn_1row_1;
-    public static /*const*/ String sel_makeWindowsPerform_1inOrder_1;
-    public static /*const*/ String sel_lastIndex;
-    public static /*const*/ String sel_initWithCharacters_1length_1;
-    public static /*const*/ String sel_initWithIdentifier_1;
-    public static /*const*/ String sel_proxyWithLocal_1connection_1;
-    public static /*const*/ String sel_scrollColumnToVisible_1;
-    public static /*const*/ String sel_descriptor;
-    public static /*const*/ String sel_ISOCountryCodes;
-    public static /*const*/ String sel_setStandardInput_1;
-    public static /*const*/ String sel_getAdvancements_1forGlyphs_1count_1;
-    public static /*const*/ String sel_displayColumn_1;
-    public static /*const*/ String sel_setAltersStateOfSelectedItem_1;
-    public static /*const*/ String sel_setFrameRotation_1;
-    public static /*const*/ String sel_clickedOnLink_1atIndex_1;
-    public static /*const*/ String sel_addAttribute_1;
-    public static /*const*/ String sel_readPrintInfo;
-    public static /*const*/ String sel_setCurrentContext_1;
-    public static /*const*/ String sel_setVerticalLineScroll_1;
-    public static /*const*/ String sel_commands;
-    public static /*const*/ String sel_setNamespaces_1;
-    public static /*const*/ String sel_removeEntryAtIndex_1;
-    public static /*const*/ String sel_setAllowsColumnResizing_1;
-    public static /*const*/ String sel_colorWithDeviceCyan_1magenta_1yellow_1black_1alpha_1;
-    public static /*const*/ String sel_textView_1shouldChangeTypingAttributes_1toAttributes_1;
-    public static /*const*/ String sel_usesFeedbackWindow;
-    public static /*const*/ String sel_setCookie_1;
-    public static /*const*/ String sel_keyWindow;
-    public static /*const*/ String sel_headIndent;
-    public static /*const*/ String sel_removeObjectIdenticalTo_1inRange_1;
-    public static /*const*/ String sel_applicationWillUnhide_1;
-    public static /*const*/ String sel_currentPage;
-    public static /*const*/ String sel_setOffStateImage_1;
-    public static /*const*/ String sel_addRowWithCells_1;
-    public static /*const*/ String sel_setInterlineSpacing_1;
-    public static /*const*/ String sel_imageFileTypes;
-    public static /*const*/ String sel_setArray_1;
-    public static /*const*/ String sel_addLayoutManager_1;
-    public static /*const*/ String sel_outputStreamToFileAtPath_1append_1;
-    public static /*const*/ String sel_registeredDraggedTypes;
-    public static /*const*/ String sel_colorWithCalibratedRed_1green_1blue_1alpha_1;
-    public static /*const*/ String sel_invalidateClassDescriptionCache;
-    public static /*const*/ String sel_URLProtocolDidFinishLoading_1;
-    public static /*const*/ String sel_didChangeArrangementCriteria;
-    public static /*const*/ String sel_ICCProfileData;
-    public static /*const*/ String sel_availableResourceData;
-    public static /*const*/ String sel_glyphIndexForPoint_1inTextContainer_1fractionOfDistanceThroughGlyph_1;
-    public static /*const*/ String sel_moveToEndOfParagraph_1;
-    public static /*const*/ String sel_enterFullScreenMode_1withOptions_1;
-    public static /*const*/ String sel_fieldEditor_1forObject_1;
-    public static /*const*/ String sel_setTreatsFilePackagesAsDirectories_1;
-    public static /*const*/ String sel_setLevelIndicatorStyle_1;
-    public static /*const*/ String sel_minimumDecimalNumber;
-    public static /*const*/ String sel_hasSpaceAvailable;
-    public static /*const*/ String sel_widthOfString_1;
-    public static /*const*/ String sel_setLocale_1;
-    public static /*const*/ String sel_setPreferredEdge_1;
-    public static /*const*/ String sel_setRichText_1;
-    public static /*const*/ String sel_rangesForUserCharacterAttributeChange;
-    public static /*const*/ String sel_rectForPage_1;
-    public static /*const*/ String sel_rowHeight;
-    public static /*const*/ String sel_windowDidChangeScreenProfile_1;
-    public static /*const*/ String sel_setCachePolicy_1;
-    public static /*const*/ String sel_parser_1didEndMappingPrefix_1;
-    public static /*const*/ String sel_cleanUpAfterDragOperation;
-    public static /*const*/ String sel_browser_1typeSelectStringForRow_1inColumn_1;
-    public static /*const*/ String sel_canInitWithPasteboard_1;
-    public static /*const*/ String sel_startListening;
-    public static /*const*/ String sel_setExcludedKeys_1;
-    public static /*const*/ String sel_readFromFile_1ofType_1;
-    public static /*const*/ String sel_setReservedThicknessForMarkers_1;
-    public static /*const*/ String sel_windowRef;
-    public static /*const*/ String sel_browser_1selectRow_1inColumn_1;
-    public static /*const*/ String sel_isOpaque;
-    public static /*const*/ String sel_fontDescriptorWithFamily_1;
-    public static /*const*/ String sel_itemTitleAtIndex_1;
-    public static /*const*/ String sel_boundingBox;
-    public static /*const*/ String sel_moveColumn_1toColumn_1;
-    public static /*const*/ String sel_badgeLabel;
-    public static /*const*/ String sel_outline_1;
-    public static /*const*/ String sel_characterIndexForInsertionAtPoint_1;
-    public static /*const*/ String sel_URLHandleClassForURL_1;
-    public static /*const*/ String sel_selectKeyViewFollowingView_1;
-    public static /*const*/ String sel_fullPathForApplication_1;
-    public static /*const*/ String sel_outlineView_1willDisplayOutlineCell_1forTableColumn_1item_1;
-    public static /*const*/ String sel_encodePropertyList_1;
-    public static /*const*/ String sel_generatesDecimalNumbers;
-    public static /*const*/ String sel_appendAttributedString_1;
-    public static /*const*/ String sel_persistentDomainNames;
-    public static /*const*/ String sel_setUserFont_1;
-    public static /*const*/ String sel_initWithProperties_1;
-    public static /*const*/ String sel_loadResourceDataNotifyingClient_1usingCache_1;
-    public static /*const*/ String sel_closeFile;
-    public static /*const*/ String sel_allHeaderFields;
-    public static /*const*/ String sel_unlearnWord_1;
-    public static /*const*/ String sel_drawsCellBackground;
-    public static /*const*/ String sel_PICTRepresentation;
-    public static /*const*/ String sel_imageScaling;
-    public static /*const*/ String sel_scanUpToString_1intoString_1;
-    public static /*const*/ String sel_scrollBarColor;
-    public static /*const*/ String sel_initWithDelegate_1name_1;
-    public static /*const*/ String sel_setDateValue_1;
-    public static /*const*/ String sel_dividerStyle;
-    public static /*const*/ String sel_scrollPageDown_1;
-    public static /*const*/ String sel_removeLayoutManager_1;
-    public static /*const*/ String sel_textAttributesForNegativeValues;
-    public static /*const*/ String sel_attachment;
-    public static /*const*/ String sel_reset;
-    public static /*const*/ String sel_initWithAttributes_1;
-    public static /*const*/ String sel_allowsMixedState;
-    public static /*const*/ String sel_addPort_1forMode_1;
-    public static /*const*/ String sel_windowDidDeminiaturize_1;
-    public static /*const*/ String sel_setRowHeight_1;
-    public static /*const*/ String sel_setGraphicsState_1;
-    public static /*const*/ String sel_replaceCharactersInRange_1withAttributedString_1;
-    public static /*const*/ String sel_setAttributedStringValue_1;
-    public static /*const*/ String sel_criteriaKeyPath;
-    public static /*const*/ String sel_standardInput;
-    public static /*const*/ String sel_isFontAvailable_1;
-    public static /*const*/ String sel_setAllowsTypeSelect_1;
-    public static /*const*/ String sel_portWithMachPort_1;
-    public static /*const*/ String sel_panel_1isValidFilename_1;
-    public static /*const*/ String sel_imageablePageBounds;
-    public static /*const*/ String sel_notificationWithName_1object_1;
-    public static /*const*/ String sel_sharedFontPanelExists;
-    public static /*const*/ String sel_blackColor;
-    public static /*const*/ String sel_removeDescriptorAtIndex_1;
-    public static /*const*/ String sel_dataUsingEncoding_1allowLossyConversion_1;
-    public static /*const*/ String sel_propertyForKey_1inRequest_1;
-    public static /*const*/ String sel_setHeaderLevel_1;
-    public static /*const*/ String sel_jobTitle;
-    public static /*const*/ String sel_removePersistentDomainForName_1;
-    public static /*const*/ String sel_contentResizeIncrements;
-    public static /*const*/ String sel_textFileTypes;
-    public static /*const*/ String sel_setAction_1;
-    public static /*const*/ String sel_knobProportion;
-    public static /*const*/ String sel_numberOfArguments;
-    public static /*const*/ String sel_setScrollsDynamically_1;
-    public static /*const*/ String sel_setTextColor_1range_1;
-    public static /*const*/ String sel_setBoundsSize_1;
-    public static /*const*/ String sel_setVolume_1;
-    public static /*const*/ String sel_windowControllers;
-    public static /*const*/ String sel_insertAttributedString_1atIndex_1;
-    public static /*const*/ String sel_eventWithEventRef_1;
-    public static /*const*/ String sel_initByReferencingFile_1;
-    public static /*const*/ String sel_fire;
-    public static /*const*/ String sel_writeToPasteboard_1;
-    public static /*const*/ String sel_connectionForProxy;
-    public static /*const*/ String sel_outlineView_1mouseDownInHeaderOfTableColumn_1;
-    public static /*const*/ String sel_mutableArrayValueForKeyPath_1;
-    public static /*const*/ String sel_validRequestorForSendType_1returnType_1;
-    public static /*const*/ String sel_isRichText;
-    public static /*const*/ String sel_moveWordLeft_1;
-    public static /*const*/ String sel_indexSetWithIndex_1;
-    public static /*const*/ String sel_setContextMenuRepresentation_1;
-    public static /*const*/ String sel_updateTrackingAreas;
-    public static /*const*/ String sel_defaultCollector;
-    public static /*const*/ String sel_orderedIndex;
-    public static /*const*/ String sel_relativeCurveToPoint_1controlPoint1_1controlPoint2_1;
-    public static /*const*/ String sel_setShowsApplicationBadge_1;
-    public static /*const*/ String sel_setValue_1;
-    public static /*const*/ String sel_attributeDeclarationForName_1elementName_1;
-    public static /*const*/ String sel_setWidth_1type_1forLayer_1;
-    public static /*const*/ String sel_decodePoint;
-    public static /*const*/ String sel_makeWindowControllers;
-    public static /*const*/ String sel_userFontOfSize_1;
-    public static /*const*/ String sel_dependencies;
-    public static /*const*/ String sel_setAttributes_1;
-    public static /*const*/ String sel_setFrameCenterRotation_1;
-    public static /*const*/ String sel_nilSymbol;
-    public static /*const*/ String sel_scalesWhenResized;
-    public static /*const*/ String sel_setMinusSign_1;
-    public static /*const*/ String sel_predicateOperatorType;
-    public static /*const*/ String sel_replyWithException_1;
-    public static /*const*/ String sel_fileName;
-    public static /*const*/ String sel_indexPathByRemovingLastIndex;
-    public static /*const*/ String sel_openHelpAnchor_1inBook_1;
-    public static /*const*/ String sel_initWithBytes_1objCType_1;
-    public static /*const*/ String sel_removeObject_1;
-    public static /*const*/ String sel_colorNameComponent;
-    public static /*const*/ String sel_setCellBackgroundColor_1;
-    public static /*const*/ String sel_getLineDash_1count_1phase_1;
-    public static /*const*/ String sel_scriptingContains_1;
-    public static /*const*/ String sel_setDefaultWindingRule_1;
-    public static /*const*/ String sel_outputStreamToBuffer_1capacity_1;
-    public static /*const*/ String sel_defaultButtonTitle;
-    public static /*const*/ String sel_draggingSourceOperationMask;
-    public static /*const*/ String sel_textDidChange_1;
-    public static /*const*/ String sel_drawSheetBorderWithSize_1;
-    public static /*const*/ String sel_integerForKey_1;
-    public static /*const*/ String sel_setDefaultNameServerPortNumber_1;
-    public static /*const*/ String sel_previousNode;
-    public static /*const*/ String sel_trackingArea;
-    public static /*const*/ String sel_highlightWithLevel_1;
-    public static /*const*/ String sel_trackMouse_1inRect_1ofView_1atCharacterIndex_1untilMouseUp_1;
-    public static /*const*/ String sel_signatureWithObjCTypes_1;
-    public static /*const*/ String sel_saveToURL_1ofType_1forSaveOperation_1error_1;
-    public static /*const*/ String sel_dataWithBytesNoCopy_1length_1freeWhenDone_1;
-    public static /*const*/ String sel_encodeInteger_1forKey_1;
-    public static /*const*/ String sel_removeFromSuperview;
-    public static /*const*/ String sel_dataWithBytesNoCopy_1length_1;
-    public static /*const*/ String sel_initWithIndexesInRange_1;
-    public static /*const*/ String sel_initWithKeyPointerFunctions_1valuePointerFunctions_1capacity_1;
-    public static /*const*/ String sel_tilt;
-    public static /*const*/ String sel_setHidden_1;
-    public static /*const*/ String sel_setMenuFormRepresentation_1;
-    public static /*const*/ String sel_setCanChooseDirectories_1;
-    public static /*const*/ String sel_usedRectForTextContainer_1;
-    public static /*const*/ String sel_allowsColumnSelection;
-    public static /*const*/ String sel_orderOut_1;
-    public static /*const*/ String sel_filterUsingPredicate_1;
-    public static /*const*/ String sel_setTest_1;
-    public static /*const*/ String sel_setAllowedTypes_1;
-    public static /*const*/ String sel_registerForDraggedTypes_1;
-    public static /*const*/ String sel_objectEnumerator;
-    public static /*const*/ String sel_setWindowController_1;
-    public static /*const*/ String sel_setDestination_1;
-    public static /*const*/ String sel_addRepresentation_1;
-    public static /*const*/ String sel_isEqual_1;
-    public static /*const*/ String sel_glyphRangeForTextContainer_1;
-    public static /*const*/ String sel_setStandaloneWeekdaySymbols_1;
-    public static /*const*/ String sel_setIgnoresAlpha_1;
-    public static /*const*/ String sel_drawBarInside_1flipped_1;
-    public static /*const*/ String sel_doesNotRecognizeSelector_1;
-    public static /*const*/ String sel_windowDidResignMain_1;
-    public static /*const*/ String sel_scrollItemAtIndexToTop_1;
-    public static /*const*/ String sel_makePreviousSegmentKey;
-    public static /*const*/ String sel_download_1shouldDecodeSourceDataOfMIMEType_1;
-    public static /*const*/ String sel_compareObject_1toObject_1;
-    public static /*const*/ String sel_widthTracksTextView;
-    public static /*const*/ String sel_subpredicates;
-    public static /*const*/ String sel_relativeLineToPoint_1;
-    public static /*const*/ String sel_gridStyleMask;
-    public static /*const*/ String sel_initWithCString_1;
-    public static /*const*/ String sel_imageScalingForSegment_1;
-    public static /*const*/ String sel_editWithFrame_1inView_1editor_1delegate_1event_1;
-    public static /*const*/ String sel_glyphPacking;
-    public static /*const*/ String sel_resolveWithTimeout_1;
-    public static /*const*/ String sel_hasEditedDocuments;
-    public static /*const*/ String sel_getLineFragmentRect_1usedRect_1forParagraphSeparatorGlyphRange_1atProposedOrigin_1;
-    public static /*const*/ String sel_autosaveDocumentWithDelegate_1didAutosaveSelector_1contextInfo_1;
-    public static /*const*/ String sel_readSelectionFromPasteboard_1type_1;
-    public static /*const*/ String sel_spellServer_1suggestGuessesForWord_1inLanguage_1;
-    public static /*const*/ String sel_initWithTimeIntervalSinceNow_1;
-    public static /*const*/ String sel_setMaxWidth_1;
-    public static /*const*/ String sel_userDefaultsChanged;
-    public static /*const*/ String sel_setWidth_1;
-    public static /*const*/ String sel_setPrintPanel_1;
-    public static /*const*/ String sel_setCurrentPage_1;
-    public static /*const*/ String sel_resizeIncrements;
-    public static /*const*/ String sel_selectWithFrame_1inView_1editor_1delegate_1start_1length_1;
-    public static /*const*/ String sel_sRGBColorSpace;
-    public static /*const*/ String sel_scriptErrorExpectedTypeDescriptor;
-    public static /*const*/ String sel_setHasHorizontalRuler_1;
-    public static /*const*/ String sel_initialFirstResponder;
-    public static /*const*/ String sel_stringForObjectValue_1;
-    public static /*const*/ String sel_pageRange;
-    public static /*const*/ String sel_printOperationWithView_1;
-    public static /*const*/ String sel_initWithFrame_1pixelFormat_1;
-    public static /*const*/ String sel_fileWrapperOfType_1error_1;
-    public static /*const*/ String sel_doesContain_1;
-    public static /*const*/ String sel_mutableSetValueForKeyPath_1;
-    public static /*const*/ String sel_initWithURL_1cached_1;
-    public static /*const*/ String sel_controlAlternatingRowBackgroundColors;
-    public static /*const*/ String sel_pathComponentCellClass;
-    public static /*const*/ String sel_arrayWithCapacity_1;
-    public static /*const*/ String sel_types;
-    public static /*const*/ String sel_setPrintInfo_1;
-    public static /*const*/ String sel_indexOfTabViewItemWithIdentifier_1;
-    public static /*const*/ String sel_isEnabled;
-    public static /*const*/ String sel_setHeaderView_1;
-    public static /*const*/ String sel_accessibilityHitTest_1;
-    public static /*const*/ String sel_removeMarker_1;
-    public static /*const*/ String sel_showContextHelp_1;
-    public static /*const*/ String sel_selectsInsertedObjects;
-    public static /*const*/ String sel_selectedRowInColumn_1;
-    public static /*const*/ String sel_noteNewRecentDocument_1;
-    public static /*const*/ String sel_setAttachment_1;
-    public static /*const*/ String sel_localeIdentifier;
-    public static /*const*/ String sel_scrollLineUp_1;
-    public static /*const*/ String sel_setCalendarFormat_1;
-    public static /*const*/ String sel_setAssociatedPoints_1atIndex_1;
-    public static /*const*/ String sel_resourceData;
-    public static /*const*/ String sel_setVeryShortStandaloneMonthSymbols_1;
-    public static /*const*/ String sel_windowDidUpdate_1;
-    public static /*const*/ String sel_moveLeft_1;
-    public static /*const*/ String sel_showsBorderOnlyWhileMouseInside;
-    public static /*const*/ String sel_valueForKey_1;
-    public static /*const*/ String sel_setContentResizeIncrements_1;
-    public static /*const*/ String sel_drain;
-    public static /*const*/ String sel_concat;
-    public static /*const*/ String sel_scrollerWidthForControlSize_1;
-    public static /*const*/ String sel_insertItemWithTitle_1action_1keyEquivalent_1atIndex_1;
-    public static /*const*/ String sel_doubleValue;
-    public static /*const*/ String sel_dividerThickness;
-    public static /*const*/ String sel_rowAtPoint_1;
-    public static /*const*/ String sel_updateWindowsItem_1;
-    public static /*const*/ String sel_calendarDate;
-    public static /*const*/ String sel_fixAttachmentAttributeInRange_1;
-    public static /*const*/ String sel_mapTableWithWeakToWeakObjects;
-    public static /*const*/ String sel_setClip;
-    public static /*const*/ String sel_evaluationErrorNumber;
-    public static /*const*/ String sel_revertToSavedFromURL_1ofType_1;
-    public static /*const*/ String sel_autorecalculatesContentBorderThicknessForEdge_1;
-    public static /*const*/ String sel_lineToPoint_1;
-    public static /*const*/ String sel_insertionReplaces;
-    public static /*const*/ String sel_smallestEncoding;
-    public static /*const*/ String sel_elementAtIndex_1;
-    public static /*const*/ String sel_getReturnValue_1;
-    public static /*const*/ String sel_regularFileContents;
-    public static /*const*/ String sel_recache;
-    public static /*const*/ String sel_setTextAttributesForNegativeInfinity_1;
-    public static /*const*/ String sel_horizontalRulerView;
-    public static /*const*/ String sel_initToMemory;
-    public static /*const*/ String sel_shouldCreateUI;
-    public static /*const*/ String sel_scheme;
-    public static /*const*/ String sel_raiseBaseline_1;
-    public static /*const*/ String sel_initWithArray_1;
-    public static /*const*/ String sel_displayNameForKey_1value_1;
-    public static /*const*/ String sel_centerScanRect_1;
-    public static /*const*/ String sel_memoryCapacity;
-    public static /*const*/ String sel_setBackgroundLayoutEnabled_1;
-    public static /*const*/ String sel_machPort;
-    public static /*const*/ String sel_selectedFont;
-    public static /*const*/ String sel_tableColumns;
-    public static /*const*/ String sel_removeObjectAtIndex_1;
-    public static /*const*/ String sel_insertNewButtonImage_1in_1;
-    public static /*const*/ String sel_stringWithContentsOfURL_1encoding_1error_1;
-    public static /*const*/ String sel_menuChangedMessagesEnabled;
-    public static /*const*/ String sel_initWithShort_1;
-    public static /*const*/ String sel_setColorRenderingIntent_1;
-    public static /*const*/ String sel_descriptionWithCalendarFormat_1locale_1;
-    public static /*const*/ String sel_resourceSpecifier;
-    public static /*const*/ String sel_pasteboardByFilteringFile_1;
-    public static /*const*/ String sel_dragColor_1withEvent_1fromView_1;
-    public static /*const*/ String sel_setStroke;
-    public static /*const*/ String sel_isControllerVisible;
-    public static /*const*/ String sel_putCell_1atRow_1column_1;
-    public static /*const*/ String sel_firstIndex;
-    public static /*const*/ String sel_setFontManagerFactory_1;
-    public static /*const*/ String sel_exponentSymbol;
-    public static /*const*/ String sel_stringValue;
-    public static /*const*/ String sel_getObjects_1range_1;
-    public static /*const*/ String sel_scriptingProperties;
-    public static /*const*/ String sel_query;
-    public static /*const*/ String sel_eventClass;
-    public static /*const*/ String sel_dateWithNaturalLanguageString_1;
-    public static /*const*/ String sel_datePickerMode;
-    public static /*const*/ String sel_setAlternateMnemonicLocation_1;
-    public static /*const*/ String sel_stringByDeletingLastPathComponent;
-    public static /*const*/ String sel_encodeObject_1;
-    public static /*const*/ String sel_unarchiveObjectWithData_1;
-    public static /*const*/ String sel_destination;
-    public static /*const*/ String sel_ensureLayoutForCharacterRange_1;
-    public static /*const*/ String sel_tabView_1didSelectTabViewItem_1;
-    public static /*const*/ String sel_removeContextHelpForObject_1;
-    public static /*const*/ String sel_ensureGlyphsForCharacterRange_1;
-    public static /*const*/ String sel_setMinimumFractionDigits_1;
-    public static /*const*/ String sel_boundsRotation;
-    public static /*const*/ String sel_invalidateDisplayForGlyphRange_1;
-    public static /*const*/ String sel_rectForBlock_1layoutAtPoint_1inRect_1textContainer_1characterRange_1;
-    public static /*const*/ String sel_pasteFont_1;
-    public static /*const*/ String sel_backgroundColor;
-    public static /*const*/ String sel_stringFromNumber_1;
-    public static /*const*/ String sel_expiresDate;
-    public static /*const*/ String sel_initWithWindowRef_1;
-    public static /*const*/ String sel_toggleToolbarShown_1;
-    public static /*const*/ String sel_outlineViewItemDidExpand_1;
-    public static /*const*/ String sel_TIFFRepresentationOfImageRepsInArray_1usingCompression_1factor_1;
-    public static /*const*/ String sel_variable;
-    public static /*const*/ String sel_objectsForKeys_1notFoundMarker_1;
-    public static /*const*/ String sel_controlColor;
-    public static /*const*/ String sel_unarchiverWillFinish_1;
-    public static /*const*/ String sel_proposedCredential;
-    public static /*const*/ String sel_isPaneSplitter;
-    public static /*const*/ String sel_endUndoGrouping;
-    public static /*const*/ String sel_setFrameRate_1;
-    public static /*const*/ String sel_completionDelay;
-    public static /*const*/ String sel_setUserFixedPitchFont_1;
-    public static /*const*/ String sel_isIndeterminate;
-    public static /*const*/ String sel_menuItem;
-    public static /*const*/ String sel_setNumberStyle_1;
-    public static /*const*/ String sel_takeIntegerValueFrom_1;
-    public static /*const*/ String sel_setIndentationMarkerFollowsCell_1;
-    public static /*const*/ String sel_tile;
-    public static /*const*/ String sel_cancelButtonRectForBounds_1;
-    public static /*const*/ String sel_deselectRow_1;
-    public static /*const*/ String sel_setMouseCoalescingEnabled_1;
-    public static /*const*/ String sel_removeWindowController_1;
-    public static /*const*/ String sel_warningValue;
-    public static /*const*/ String sel_isVerticallyResizable;
-    public static /*const*/ String sel_defaultFetchRequest;
-    public static /*const*/ String sel_netServiceWillResolve_1;
-    public static /*const*/ String sel_addProgressMark_1;
-    public static /*const*/ String sel_recentsAutosaveName;
-    public static /*const*/ String sel_commitEditing;
-    public static /*const*/ String sel_attributesOfItemAtPath_1error_1;
-    public static /*const*/ String sel_download_1willSendRequest_1redirectResponse_1;
-    public static /*const*/ String sel_canBeCompressedUsing_1;
-    public static /*const*/ String sel_strokeRect_1;
-    public static /*const*/ String sel_descriptionWithLocale_1indent_1;
-    public static /*const*/ String sel_applicationDockMenu_1;
-    public static /*const*/ String sel_initWithCString_1length_1;
-    public static /*const*/ String sel_runPageLayout_1;
-    public static /*const*/ String sel_toolbar_1itemForItemIdentifier_1willBeInsertedIntoToolbar_1;
-    public static /*const*/ String sel_setSelectsInsertedObjects_1;
-    public static /*const*/ String sel_alternateSelectedControlTextColor;
-    public static /*const*/ String sel_isValidGlyphIndex_1;
-    public static /*const*/ String sel_stringForKey_1inTable_1;
-    public static /*const*/ String sel_cellSizeForBounds_1;
-    public static /*const*/ String sel_beginSheetForDirectory_1file_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1;
-    public static /*const*/ String sel_invalidateLayoutForCharacterRange_1actualCharacterRange_1;
-    public static /*const*/ String sel_initAsTearOff;
-    public static /*const*/ String sel_allowsOtherFileTypes;
-    public static /*const*/ String sel_mouseMoved_1;
-    public static /*const*/ String sel_deleteCharactersInRange_1;
-    public static /*const*/ String sel_setTitleFont_1;
-    public static /*const*/ String sel_showsApplicationBadge;
-    public static /*const*/ String sel_initWithLeftExpression_1rightExpression_1modifier_1type_1options_1;
-    public static /*const*/ String sel_distantPast;
-    public static /*const*/ String sel_isReady;
-    public static /*const*/ String sel_draggedImage_1movedTo_1;
-    public static /*const*/ String sel_resetTotalAutoreleasedObjects;
-    public static /*const*/ String sel_setGlyphGenerator_1;
-    public static /*const*/ String sel_groupsByEvent;
-    public static /*const*/ String sel_shortMonthSymbols;
-    public static /*const*/ String sel_setDescriptor_1forKeyword_1;
-    public static /*const*/ String sel_description;
-    public static /*const*/ String sel_replaceOccurrencesOfString_1withString_1options_1range_1;
-    public static /*const*/ String sel_boundsRectForContentRect_1inRect_1textContainer_1characterRange_1;
-    public static /*const*/ String sel_authenticationDataForComponents_1;
-    public static /*const*/ String sel_isExecuting;
-    public static /*const*/ String sel_branchImage;
-    public static /*const*/ String sel_decodeRectForKey_1;
-    public static /*const*/ String sel_rectValue;
-    public static /*const*/ String sel_setFrameTopLeftPoint_1;
-    public static /*const*/ String sel_initWithFileDescriptor_1;
-    public static /*const*/ String sel_removePointerAtIndex_1;
-    public static /*const*/ String sel_executeAndReturnError_1;
-    public static /*const*/ String sel_changeCaseOfLetter_1;
-    public static /*const*/ String sel_appendBezierPathWithArcWithCenter_1radius_1startAngle_1endAngle_1clockwise_1;
-    public static /*const*/ String sel_insertNewlineIgnoringFieldEditor_1;
-    public static /*const*/ String sel_attributeDescriptorForKeyword_1;
-    public static /*const*/ String sel_decimalNumberWithMantissa_1exponent_1isNegative_1;
-    public static /*const*/ String sel_activeConversationWillChange_1fromOldConversation_1;
-    public static /*const*/ String sel_layoutAlgorithm;
-    public static /*const*/ String sel_itemNumberInTextList_1atIndex_1;
-    public static /*const*/ String sel_initWithImage_1hotSpot_1;
-    public static /*const*/ String sel_setStackSize_1;
-    public static /*const*/ String sel_matrixInColumn_1;
-    public static /*const*/ String sel_performSelector_1withObject_1;
-    public static /*const*/ String sel_setSound_1;
-    public static /*const*/ String sel_accessibilityPerformAction_1;
-    public static /*const*/ String sel_comment;
-    public static /*const*/ String sel_rangeOfNominallySpacedGlyphsContainingIndex_1;
-    public static /*const*/ String sel_showAttachmentCell_1inRect_1characterIndex_1;
-    public static /*const*/ String sel_isDisplayedWhenStopped;
-    public static /*const*/ String sel_addCollection_1options_1;
-    public static /*const*/ String sel_drawInRect_1angle_1;
-    public static /*const*/ String sel_initWithFrame_1mode_1prototype_1numberOfRows_1numberOfColumns_1;
-    public static /*const*/ String sel_sharedCredentialStorage;
-    public static /*const*/ String sel_colorWithDeviceWhite_1alpha_1;
-    public static /*const*/ String sel_setMainDocumentURL_1;
-    public static /*const*/ String sel_interpretKeyEvents_1;
-    public static /*const*/ String sel_readFromData_1ofType_1error_1;
-    public static /*const*/ String sel_tokenFieldCell_1menuForRepresentedObject_1;
-    public static /*const*/ String sel_setEventHandler_1andSelector_1forEventClass_1andEventID_1;
-    public static /*const*/ String sel_addAttribute_1value_1range_1;
-    public static /*const*/ String sel_outlineView_1writeItems_1toPasteboard_1;
-    public static /*const*/ String sel_initWithCString_1encoding_1;
-    public static /*const*/ String sel_setTypesetterBehavior_1;
-    public static /*const*/ String sel_removeObjectAtArrangedObjectIndex_1;
-    public static /*const*/ String sel_redo;
-    public static /*const*/ String sel_addMarker_1;
-    public static /*const*/ String sel_backgroundColors;
-    public static /*const*/ String sel_leafKeyPath;
-    public static /*const*/ String sel_setMinimumIntegerDigits_1;
-    public static /*const*/ String sel_waitForDataInBackgroundAndNotify;
-    public static /*const*/ String sel_setPreservesContentDuringLiveResize_1;
-    public static /*const*/ String sel_setRootElement_1;
-    public static /*const*/ String sel_dataWithEPSInsideRect_1;
-    public static /*const*/ String sel_valuesForKeys_1;
-    public static /*const*/ String sel_imageOrigin;
-    public static /*const*/ String sel_writePDFInsideRect_1toPasteboard_1;
-    public static /*const*/ String sel_sortIndicatorRectForBounds_1;
-    public static /*const*/ String sel_predefinedNamespaceForPrefix_1;
-    public static /*const*/ String sel_viewWillStartLiveResize;
-    public static /*const*/ String sel_becomeKeyWindow;
-    public static /*const*/ String sel_isHighlighted;
-    public static /*const*/ String sel_initWithPickerMask_1colorPanel_1;
-    public static /*const*/ String sel_systemFontOfSize_1;
-    public static /*const*/ String sel_decimalNumberBySubtracting_1withBehavior_1;
-    public static /*const*/ String sel_hide_1;
-    public static /*const*/ String sel_resetSearchButtonCell;
-    public static /*const*/ String sel_runModalForDirectory_1file_1types_1;
-    public static /*const*/ String sel_pathForImageResource_1;
-    public static /*const*/ String sel_setFilterPredicate_1;
-    public static /*const*/ String sel_validateEditing;
-    public static /*const*/ String sel_makeDocumentForURL_1withContentsOfURL_1ofType_1error_1;
-    public static /*const*/ String sel_localizedCompare_1;
-    public static /*const*/ String sel_sharedWorkspace;
-    public static /*const*/ String sel_deliverResult;
-    public static /*const*/ String sel_aspectRatio;
-    public static /*const*/ String sel_keyEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1characters_1charactersIgnoringModifiers_1isARepeat_1keyCode_1;
-    public static /*const*/ String sel_soundUnfilteredPasteboardTypes;
-    public static /*const*/ String sel_dateByAddingComponents_1toDate_1options_1;
-    public static /*const*/ String sel_indentationMarkerFollowsCell;
-    public static /*const*/ String sel_typesetter;
-    public static /*const*/ String sel_childCount;
-    public static /*const*/ String sel_borderRect;
-    public static /*const*/ String sel_setPageOrder_1;
-    public static /*const*/ String sel_currentThread;
-    public static /*const*/ String sel_textViewDidChangeSelection_1;
-    public static /*const*/ String sel_setBaseWritingDirection_1;
-    public static /*const*/ String sel_attributedSubStringForProposedRange_1actualRange_1;
-    public static /*const*/ String sel_pop;
-    public static /*const*/ String sel_animator;
-    public static /*const*/ String sel_allowsEmptySelection;
-    public static /*const*/ String sel_scriptingIsGreaterThanOrEqualTo_1;
-    public static /*const*/ String sel_numberOfSelectedRows;
-    public static /*const*/ String sel_imageDidNotDraw_1inRect_1;
-    public static /*const*/ String sel_topLevelObject;
-    public static /*const*/ String sel_openDocumentWithContentsOfURL_1display_1;
-    public static /*const*/ String sel_valueListAttributes;
-    public static /*const*/ String sel_enableFreedObjectCheck_1;
-    public static /*const*/ String sel_moveForward_1;
-    public static /*const*/ String sel_setSendsActionOnArrowKeys_1;
-    public static /*const*/ String sel_versionForClassName_1;
-    public static /*const*/ String sel_coerceValue_1forKey_1;
-    public static /*const*/ String sel_operatingSystem;
-    public static /*const*/ String sel_characterEncoding;
-    public static /*const*/ String sel_blendedColorWithFraction_1ofColor_1;
-    public static /*const*/ String sel_panel_1userEnteredFilename_1confirmed_1;
-    public static /*const*/ String sel_addSelectedObjects_1;
-    public static /*const*/ String sel_pointingDeviceID;
-    public static /*const*/ String sel_children;
-    public static /*const*/ String sel_takeObjectValueFrom_1;
-    public static /*const*/ String sel_indexSet;
-    public static /*const*/ String sel_setMovie_1;
-    public static /*const*/ String sel_setKeyEquivalentModifierMask_1;
-    public static /*const*/ String sel_allowsKeyedCoding;
-    public static /*const*/ String sel_rotateByDegrees_1;
-    public static /*const*/ String sel_compoundTypes;
-    public static /*const*/ String sel_setShortStandaloneWeekdaySymbols_1;
-    public static /*const*/ String sel_removeWindowsItem_1;
-    public static /*const*/ String sel_stringArrayForKey_1;
-    public static /*const*/ String sel_outlineView_1typeSelectStringForTableColumn_1item_1;
-    public static /*const*/ String sel_initWithWindow_1;
-    public static /*const*/ String sel_accessibilityIsAttributeSettable_1;
-    public static /*const*/ String sel_rangeForUserCharacterAttributeChange;
-    public static /*const*/ String sel_setCalendar_1;
-    public static /*const*/ String sel_beginEditing;
-    public static /*const*/ String sel_enableUpdates;
-    public static /*const*/ String sel_setPrefersAllColumnUserResizing_1;
-    public static /*const*/ String sel_isTornOff;
-    public static /*const*/ String sel_checkSpellingOfString_1startingAt_1;
-    public static /*const*/ String sel_drawPackedGlyphs_1atPoint_1;
-    public static /*const*/ String sel_graphicsContextWithAttributes_1;
-    public static /*const*/ String sel_textView_1completions_1forPartialWordRange_1indexOfSelectedItem_1;
-    public static /*const*/ String sel_outlineView_1shouldExpandItem_1;
-    public static /*const*/ String sel_isInFullScreenMode;
-    public static /*const*/ String sel_userKeyEquivalent;
-    public static /*const*/ String sel_menuBarHeight;
-    public static /*const*/ String sel_initWithSize_1depth_1separate_1alpha_1;
-    public static /*const*/ String sel_criticalValue;
-    public static /*const*/ String sel_tableView_1didClickTableColumn_1;
-    public static /*const*/ String sel_addChildWindow_1ordered_1;
-    public static /*const*/ String sel_autoscroll_1;
-    public static /*const*/ String sel_infoDictionary;
-    public static /*const*/ String sel_printOperationWithSettings_1error_1;
-    public static /*const*/ String sel_translateOriginToPoint_1;
-    public static /*const*/ String sel_takeStoredValue_1forKey_1;
-    public static /*const*/ String sel_mouseUp_1;
-    public static /*const*/ String sel_setNotationName_1;
-    public static /*const*/ String sel_setArgument_1atIndex_1;
-    public static /*const*/ String sel_setSelectedAttributes_1isMultiple_1;
-    public static /*const*/ String sel_dayOfCommonEra;
-    public static /*const*/ String sel_greenColor;
-    public static /*const*/ String sel_initWithProtocolFamily_1socketType_1protocol_1address_1;
-    public static /*const*/ String sel_setAttachmentCell_1;
-    public static /*const*/ String sel_previousFailureCount;
-    public static /*const*/ String sel_currentOperation;
-    public static /*const*/ String sel_tokenField_1completionsForSubString_1indexOfToken_1indexOfSelectedItem_1;
-    public static /*const*/ String sel_positionOfGlyph_1struckOverGlyph_1metricsExist_1;
-    public static /*const*/ String sel_setMarkedTextAttributes_1;
-    public static /*const*/ String sel_validateToolbarItem_1;
-    public static /*const*/ String sel_startingColumn;
-    public static /*const*/ String sel_setSelectedRanges_1;
-    public static /*const*/ String sel_addItemWithTitle_1action_1keyEquivalent_1;
-    public static /*const*/ String sel_postNotificationName_1object_1;
-    public static /*const*/ String sel_replacementObjectForKeyedArchiver_1;
-    public static /*const*/ String sel_deletesFileUponFailure;
-    public static /*const*/ String sel_speechRecognizer_1didRecognizeCommand_1;
-    public static /*const*/ String sel_columnSpan;
-    public static /*const*/ String sel_animationBlockingMode;
-    public static /*const*/ String sel_drawParts;
-    public static /*const*/ String sel_style;
-    public static /*const*/ String sel_makeUntitledDocumentOfType_1error_1;
-    public static /*const*/ String sel_filteredArrayUsingPredicate_1;
-    public static /*const*/ String sel_wantsDefaultClipping;
-    public static /*const*/ String sel_one;
-    public static /*const*/ String sel_persistentStoreTypeForFileType_1;
-    public static /*const*/ String sel_pixelsHigh;
-    public static /*const*/ String sel_rulerView_1shouldMoveMarker_1;
-    public static /*const*/ String sel_sizeWithAttributes_1;
-    public static /*const*/ String sel_drawTitleOfColumn_1inRect_1;
-    public static /*const*/ String sel_setLevelsOfUndo_1;
-    public static /*const*/ String sel_invoke;
-    public static /*const*/ String sel_keyEnumerator;
-    public static /*const*/ String sel_convertFont_1toSize_1;
-    public static /*const*/ String sel_mouseExited_1withFrame_1inView_1;
-    public static /*const*/ String sel_widthAdjustLimit;
-    public static /*const*/ String sel_animationResizeTime_1;
-    public static /*const*/ String sel_ensureLayoutForBoundingRect_1inTextContainer_1;
-    public static /*const*/ String sel_initWithExpressionType_1;
-    public static /*const*/ String sel_numberWithUnsignedChar_1;
-    public static /*const*/ String sel_directory;
-    public static /*const*/ String sel_address;
-    public static /*const*/ String sel_defaultPixelFormat;
-    public static /*const*/ String sel_deleteBackwardByDecomposingPreviousCharacter_1;
-    public static /*const*/ String sel_clickCount;
-    public static /*const*/ String sel_trackMarker_1withMouseEvent_1;
-    public static /*const*/ String sel_URL_1resourceDataDidBecomeAvailable_1;
-    public static /*const*/ String sel_outlineView_1setObjectValue_1forTableColumn_1byItem_1;
-    public static /*const*/ String sel_insert_1;
-    public static /*const*/ String sel_methodForSelector_1;
-    public static /*const*/ String sel_insertGlyph_1atGlyphIndex_1characterIndex_1;
-    public static /*const*/ String sel_readFromFileWrapper_1ofType_1error_1;
-    public static /*const*/ String sel_selectedControlColor;
-    public static /*const*/ String sel_selectedRow;
-    public static /*const*/ String sel_control_1isValidObject_1;
-    public static /*const*/ String sel_setUniqueID_1;
-    public static /*const*/ String sel_initWithName_1fromFile_1;
-    public static /*const*/ String sel_sizeOfLabel_1;
-    public static /*const*/ String sel_credentialsForProtectionSpace_1;
-    public static /*const*/ String sel_anyObject;
-    public static /*const*/ String sel_runLoopModesForAnimating;
-    public static /*const*/ String sel_setSortDescriptors_1;
-    public static /*const*/ String sel_convertSize_1toView_1;
-    public static /*const*/ String sel_setLineFragmentRect_1forGlyphRange_1usedRect_1;
-    public static /*const*/ String sel_discardEditing;
-    public static /*const*/ String sel_isAutodisplay;
-    public static /*const*/ String sel_matchesOnMultipleResolution;
-    public static /*const*/ String sel_multipleThreadsEnabled;
-    public static /*const*/ String sel_positionOfGlyph_1forCharacter_1struckOverRect_1;
-    public static /*const*/ String sel_boundsRectForBlock_1contentRect_1inRect_1textContainer_1characterRange_1;
-    public static /*const*/ String sel_outlineView_1objectValueForTableColumn_1byItem_1;
-    public static /*const*/ String sel_transformPoint_1;
-    public static /*const*/ String sel_createClassDescription;
-    public static /*const*/ String sel_inputStreamWithFileAtPath_1;
-    public static /*const*/ String sel_menuForEvent_1inRect_1ofView_1;
-    public static /*const*/ String sel_setRowTypeKeyPath_1;
-    public static /*const*/ String sel_infoForBinding_1;
-    public static /*const*/ String sel_setDataRetained_1;
-    public static /*const*/ String sel_revertToContentsOfURL_1ofType_1error_1;
-    public static /*const*/ String sel_currentControlTint;
-    public static /*const*/ String sel_selection;
-    public static /*const*/ String sel_array;
-    public static /*const*/ String sel_setStyle_1;
-    public static /*const*/ String sel_setPredicate_1;
-    public static /*const*/ String sel_endEditing;
-    public static /*const*/ String sel_doClick_1;
-    public static /*const*/ String sel_toManyRelationshipKeys;
-    public static /*const*/ String sel_selectedKnobColor;
-    public static /*const*/ String sel_setOrderedIndex_1;
-    public static /*const*/ String sel_initWithSet_1;
-    public static /*const*/ String sel_drawSelector;
-    public static /*const*/ String sel_requestWithURL_1;
-    public static /*const*/ String sel_imageNamed_1;
-    public static /*const*/ String sel_hyphenationFactorForGlyphAtIndex_1;
-    public static /*const*/ String sel_miniwindowTitle;
-    public static /*const*/ String sel_isFileURL;
-    public static /*const*/ String sel_selectedSegment;
-    public static /*const*/ String sel_applicationDidResignActive_1;
-    public static /*const*/ String sel_initWithString_1calendarFormat_1;
-    public static /*const*/ String sel_initWithProtectionSpace_1proposedCredential_1previousFailureCount_1failureResponse_1error_1sender_1;
-    public static /*const*/ String sel_menuHasKeyEquivalent_1forEvent_1target_1action_1;
-    public static /*const*/ String sel_minPossiblePositionOfDividerAtIndex_1;
-    public static /*const*/ String sel_abbreviationForDate_1;
-    public static /*const*/ String sel_absoluteX;
-    public static /*const*/ String sel_scriptErrorNumber;
-    public static /*const*/ String sel_previousValidKeyView;
-    public static /*const*/ String sel_valueWithRange_1;
-    public static /*const*/ String sel_initWithDefaults_1initialValues_1;
-    public static /*const*/ String sel_initNotTestWithTest_1;
-    public static /*const*/ String sel_abortModal;
-    public static /*const*/ String sel_isSuspended;
-    public static /*const*/ String sel_isFilePackageAtPath_1;
-    public static /*const*/ String sel_useCredential_1forAuthenticationChallenge_1;
-    public static /*const*/ String sel_draggingSequenceNumber;
-    public static /*const*/ String sel_lastColumn;
-    public static /*const*/ String sel_distantFuture;
-    public static /*const*/ String sel_download_1didReceiveResponse_1;
-    public static /*const*/ String sel_textTransform;
-    public static /*const*/ String sel_hasHorizontalScroller;
-    public static /*const*/ String sel_shadowBlurRadius;
-    public static /*const*/ String sel_pointingDeviceType;
-    public static /*const*/ String sel_setMenuView_1;
-    public static /*const*/ String sel_setWindingRule_1;
-    public static /*const*/ String sel_imageForSegment_1;
-    public static /*const*/ String sel_bytes;
-    public static /*const*/ String sel_propertyListFromStringsFileFormat;
-    public static /*const*/ String sel_setParagraphStyle_1;
-    public static /*const*/ String sel_highlightMode;
-    public static /*const*/ String sel_voice;
-    public static /*const*/ String sel_hostName;
-    public static /*const*/ String sel_removeAccessoryController_1;
-    public static /*const*/ String sel_rowsInRect_1;
-    public static /*const*/ String sel_registerImageRepClass_1;
-    public static /*const*/ String sel_value_1withObjCType_1;
-    public static /*const*/ String sel_enclosingMenuItem;
-    public static /*const*/ String sel_exposedBindings;
-    public static /*const*/ String sel_setSharedScriptSuiteRegistry_1;
-    public static /*const*/ String sel_readablePasteboardTypes;
-    public static /*const*/ String sel_drawViewBackgroundInRect_1;
-    public static /*const*/ String sel_setDataCell_1;
-    public static /*const*/ String sel_dataRepresentationOfType_1;
-    public static /*const*/ String sel_setOrientation_1;
-    public static /*const*/ String sel_setFileWrapper_1;
-    public static /*const*/ String sel_runModalOpenPanel_1forTypes_1;
-    public static /*const*/ String sel_adjustSubviews;
-    public static /*const*/ String sel_setCurrencyDecimalSeparator_1;
-    public static /*const*/ String sel_needsDisplay;
-    public static /*const*/ String sel_insertValue_1atIndex_1inPropertyWithKey_1;
-    public static /*const*/ String sel_setTextStorage_1;
-    public static /*const*/ String sel_isAlternate;
-    public static /*const*/ String sel_setOutputFormat_1;
-    public static /*const*/ String sel_comboBoxWillPopUp_1;
-    public static /*const*/ String sel_insertChild_1;
-    public static /*const*/ String sel_initWithCommandDescription_1;
-    public static /*const*/ String sel_setLineDash_1count_1phase_1;
-    public static /*const*/ String sel_setHardInvalidation_1forGlyphRange_1;
-    public static /*const*/ String sel_setAllowsToolTipsWhenApplicationIsInactive_1;
-    public static /*const*/ String sel_tableView_1namesOfPromisedFilesDroppedAtDestination_1forDraggedRowsWithIndexes_1;
-    public static /*const*/ String sel_highlightedItemIndex;
-    public static /*const*/ String sel_trailingOffset;
-    public static /*const*/ String sel_layer;
-    public static /*const*/ String sel_isDeletableFileAtPath_1;
-    public static /*const*/ String sel_textUnfilteredTypes;
-    public static /*const*/ String sel_gregorianStartDate;
-    public static /*const*/ String sel_isDocumentEdited;
-    public static /*const*/ String sel_colorWithCalibratedWhite_1alpha_1;
-    public static /*const*/ String sel_shouldRunSavePanelWithAccessoryView;
-    public static /*const*/ String sel_finishEncoding;
-    public static /*const*/ String sel_setKeyCell_1;
-    public static /*const*/ String sel_isPartialStringValid_1newEditingString_1errorDescription_1;
-    public static /*const*/ String sel_setRangeContainerObject_1;
-    public static /*const*/ String sel_typeOfFile_1error_1;
-    public static /*const*/ String sel_disappearingItemCursor;
-    public static /*const*/ String sel_textureMaxMipMapLevel;
-    public static /*const*/ String sel_setEraSymbols_1;
-    public static /*const*/ String sel_setBordered_1;
-    public static /*const*/ String sel_precomposedStringWithCanonicalMapping;
-    public static /*const*/ String sel_setEnabled_1;
-    public static /*const*/ String sel_setChildrenKeyPath_1;
-    public static /*const*/ String sel_applicationDidBecomeActive_1;
-    public static /*const*/ String sel_setCancelButtonCell_1;
-    public static /*const*/ String sel_backgroundFilters;
-    public static /*const*/ String sel_indexOfCellWithTag_1;
-    public static /*const*/ String sel_UTF8String;
-    public static /*const*/ String sel_horizontalPagination;
-    public static /*const*/ String sel_allowedInputSourceLocales;
-    public static /*const*/ String sel_toolbar;
-    public static /*const*/ String sel_setGeneratesDecimalNumbers_1;
-    public static /*const*/ String sel_highlight_1withFrame_1inView_1;
-    public static /*const*/ String sel_rotation;
-    public static /*const*/ String sel_colorForControlTint_1;
-    public static /*const*/ String sel_mutableString;
-    public static /*const*/ String sel_shadowWithLevel_1;
-    public static /*const*/ String sel_frameRectForContentRect_1styleMask_1;
-    public static /*const*/ String sel_numberOfColorComponents;
-    public static /*const*/ String sel_alternateImage;
-    public static /*const*/ String sel_initWithString_1relativeToURL_1;
-    public static /*const*/ String sel_pageOrder;
-    public static /*const*/ String sel_cancel_1;
-    public static /*const*/ String sel_declareTypes_1owner_1;
-    public static /*const*/ String sel_lastObject;
-    public static /*const*/ String sel_type_1conformsToType_1;
-    public static /*const*/ String sel_mutableArrayValueForKey_1;
-    public static /*const*/ String sel_initWithName_1host_1;
-    public static /*const*/ String sel_keyEquivalentWidth;
-    public static /*const*/ String sel_modifier;
-    public static /*const*/ String sel_setPerMillSymbol_1;
-    public static /*const*/ String sel_setToolbar_1;
-    public static /*const*/ String sel_changeAttributes_1;
-    public static /*const*/ String sel_removeItemWithTitle_1;
-    public static /*const*/ String sel_setAspectRatio_1;
-    public static /*const*/ String sel_undoManagerForTextView_1;
-    public static /*const*/ String sel_clickedPathComponentCell;
-    public static /*const*/ String sel_commentWithStringValue_1;
-    public static /*const*/ String sel_initWithContainerSpecifier_1key_1;
-    public static /*const*/ String sel_windowWillReturnUndoManager_1;
-    public static /*const*/ String sel_imageAndTitleOffset;
-    public static /*const*/ String sel_initialize;
-    public static /*const*/ String sel_truncatesLastVisibleLine;
-    public static /*const*/ String sel_setExponentSymbol_1;
-    public static /*const*/ String sel_setCurrentProgress_1;
-    public static /*const*/ String sel_initWithContentsOfFile_1options_1error_1;
-    public static /*const*/ String sel_titleCell;
-    public static /*const*/ String sel_setCurrencySymbol_1;
-    public static /*const*/ String sel_usesScreenFonts;
-    public static /*const*/ String sel_propertyList;
-    public static /*const*/ String sel_subgroups;
-    public static /*const*/ String sel_setFloatValue_1knobProportion_1;
-    public static /*const*/ String sel_componentsJoinedByString_1;
-    public static /*const*/ String sel_initWithICCProfileData_1;
-    public static /*const*/ String sel_setNextKeyView_1;
-    public static /*const*/ String sel_setAnimationCurve_1;
-    public static /*const*/ String sel_tokenFieldCell_1completionsForSubString_1indexOfToken_1indexOfSelectedItem_1;
-    public static /*const*/ String sel_takeValuesFromDictionary_1;
-    public static /*const*/ String sel_imageRepClassForPasteboardType_1;
-    public static /*const*/ String sel_setPlaybackDeviceIdentifier_1;
-    public static /*const*/ String sel_globallyUniqueString;
-    public static /*const*/ String sel_setLineWidth_1;
-    public static /*const*/ String sel_selectedColumnIndexes;
-    public static /*const*/ String sel_addWindowsItem_1title_1filename_1;
-    public static /*const*/ String sel_truncateFileAtOffset_1;
-    public static /*const*/ String sel_setStandardOutput_1;
-    public static /*const*/ String sel_encodeInt32_1forKey_1;
-    public static /*const*/ String sel_baselineDeltaForCharacterAtIndex_1;
-    public static /*const*/ String sel_setValueWraps_1;
-    public static /*const*/ String sel_addOperation_1;
-    public static /*const*/ String sel_resignKeyWindow;
-    public static /*const*/ String sel_insertNewline_1;
-    public static /*const*/ String sel_saveFrameUsingName_1;
-    public static /*const*/ String sel_setWithObjects_1;
-    public static /*const*/ String sel_indexOfItemWithTarget_1andAction_1;
-    public static /*const*/ String sel_processEditing;
-    public static /*const*/ String sel_removeValueAtIndex_1fromPropertyWithKey_1;
-    public static /*const*/ String sel_setShouldCascadeWindows_1;
-    public static /*const*/ String sel_stepBack_1;
-    public static /*const*/ String sel_lockWhenCondition_1beforeDate_1;
-    public static /*const*/ String sel_realm;
-    public static /*const*/ String sel_appendBezierPathWithPackedGlyphs_1;
-    public static /*const*/ String sel_inputStreamWithData_1;
-    public static /*const*/ String sel_clickedRow;
-    public static /*const*/ String sel_animationShouldStart_1;
-    public static /*const*/ String sel_appleEventCodeForKey_1;
-    public static /*const*/ String sel_sendAction_1to_1forAllCells_1;
-    public static /*const*/ String sel_writableTypesForSaveOperation_1;
-    public static /*const*/ String sel_drawWellInside_1;
-    public static /*const*/ String sel_intersectsSet_1;
-    public static /*const*/ String sel_runOperationModalForWindow_1delegate_1didRunSelector_1contextInfo_1;
-    public static /*const*/ String sel_setAllowsEmptySelection_1;
-    public static /*const*/ String sel_tighteningFactorForTruncation;
-    public static /*const*/ String sel_insertDescriptor_1atIndex_1;
-    public static /*const*/ String sel_setDefaultBehavior_1;
-    public static /*const*/ String sel_allowsFloats;
-    public static /*const*/ String sel_representedObject;
-    public static /*const*/ String sel_isFlipped;
-    public static /*const*/ String sel_rectOfColumn_1;
-    public static /*const*/ String sel_setFrame_1display_1;
-    public static /*const*/ String sel_setTextAttributesForPositiveInfinity_1;
-    public static /*const*/ String sel_textUnfilteredFileTypes;
-    public static /*const*/ String sel_bezierPathByFlatteningPath;
-    public static /*const*/ String sel_week;
-    public static /*const*/ String sel_takeIntValueFrom_1;
-    public static /*const*/ String sel_setWantsNotificationForMarkedText_1;
-    public static /*const*/ String sel_stringByPaddingToLength_1withString_1startingAtIndex_1;
-    public static /*const*/ String sel_stopModal;
-    public static /*const*/ String sel_veryShortWeekdaySymbols;
-    public static /*const*/ String sel_user;
-    public static /*const*/ String sel_animation_1didReachProgressMark_1;
-    public static /*const*/ String sel_fontWithName_1size_1;
-    public static /*const*/ String sel_selectWord_1;
-    public static /*const*/ String sel_initWithDuration_1animationCurve_1;
-    public static /*const*/ String sel_afmDictionary;
-    public static /*const*/ String sel_canChooseFiles;
-    public static /*const*/ String sel_defaultLineWidth;
-    public static /*const*/ String sel_childAtIndex_1;
-    public static /*const*/ String sel_pathForResource_1ofType_1inDirectory_1;
-    public static /*const*/ String sel_outlineView_1heightOfRowByItem_1;
-    public static /*const*/ String sel_PMSymbol;
-    public static /*const*/ String sel_setBackgroundStyle_1;
-    public static /*const*/ String sel_decimalSeparator;
-    public static /*const*/ String sel_knobThickness;
-    public static /*const*/ String sel_request;
-    public static /*const*/ String sel_indicesOfObjectsByEvaluatingWithContainer_1count_1;
-    public static /*const*/ String sel_objectByApplyingXSLTString_1arguments_1error_1;
-    public static /*const*/ String sel_colorizeByMappingGray_1toColor_1blackMapping_1whiteMapping_1;
-    public static /*const*/ String sel_minusSet_1;
-    public static /*const*/ String sel_setAutomaticallyRearrangesObjects_1;
-    public static /*const*/ String sel_fixFontAttributeInRange_1;
-    public static /*const*/ String sel_frameRotation;
-    public static /*const*/ String sel_addObserver_1forKeyPath_1options_1context_1;
-    public static /*const*/ String sel_collectionNames;
-    public static /*const*/ String sel_titleOfColumn_1;
-    public static /*const*/ String sel_characterIdentifier;
-    public static /*const*/ String sel_setPanelFont_1isMultiple_1;
-    public static /*const*/ String sel_ruleThickness;
-    public static /*const*/ String sel_customSelector;
-    public static /*const*/ String sel_startSpeakingString_1toURL_1;
-    public static /*const*/ String sel_language;
-    public static /*const*/ String sel_draggedImage_1endedAt_1operation_1;
-    public static /*const*/ String sel_removeSelectionIndexPaths_1;
-    public static /*const*/ String sel_TIFFRepresentationOfImageRepsInArray_1;
-    public static /*const*/ String sel_setSet_1;
-    public static /*const*/ String sel_stringWithCString_1length_1;
-    public static /*const*/ String sel_objectsByEvaluatingSpecifier;
-    public static /*const*/ String sel_subarrayWithRange_1;
-    public static /*const*/ String sel_collectIfNeeded;
-    public static /*const*/ String sel_pathWithComponents_1;
-    public static /*const*/ String sel_autoreleasedObjectCount;
-    public static /*const*/ String sel_addCharactersInString_1;
-    public static /*const*/ String sel_setTemplate_1;
-    public static /*const*/ String sel_indexOfObjectIdenticalTo_1;
-    public static /*const*/ String sel_setRepresentation;
-    public static /*const*/ String sel_URLResourceDidFinishLoading_1;
-    public static /*const*/ String sel_type;
-    public static /*const*/ String sel_setMarkedText_1selectedRange_1;
-    public static /*const*/ String sel_dictionaryWithObjects_1forKeys_1;
-    public static /*const*/ String sel_wantsToDelayTextChangeNotifications;
-    public static /*const*/ String sel_setCompletes_1;
-    public static /*const*/ String sel_releaseGState;
-    public static /*const*/ String sel_descriptorWithEnumCode_1;
-    public static /*const*/ String sel_label;
-    public static /*const*/ String sel_run;
-    public static /*const*/ String sel_hasHorizontalRuler;
-    public static /*const*/ String sel_rowClass;
-    public static /*const*/ String sel_automaticRearrangementKeyPaths;
-    public static /*const*/ String sel_fileManager_1shouldProceedAfterError_1movingItemAtPath_1toPath_1;
-    public static /*const*/ String sel_writeToURL_1atomically_1encoding_1error_1;
-    public static /*const*/ String sel_deviceID;
-    public static /*const*/ String sel_descriptorWithInt32_1;
-    public static /*const*/ String sel_encodeInt64_1forKey_1;
-    public static /*const*/ String sel_insertEntry_1atIndex_1;
-    public static /*const*/ String sel_leftMargin;
-    public static /*const*/ String sel_setKeyEquivalentFont_1size_1;
-    public static /*const*/ String sel_colorWithDeviceHue_1saturation_1brightness_1alpha_1;
-    public static /*const*/ String sel_nextState;
-    public static /*const*/ String sel_scanHexInt_1;
-    public static /*const*/ String sel_lineSpacing;
-    public static /*const*/ String sel_textureTarget;
-    public static /*const*/ String sel_miniaturize_1;
-    public static /*const*/ String sel_browser_1namesOfPromisedFilesDroppedAtDestination_1forDraggedRowsWithIndexes_1inColumn_1;
-    public static /*const*/ String sel_localizedNameForTIFFCompressionType_1;
-    public static /*const*/ String sel_acceptConnectionInBackgroundAndNotifyForModes_1;
-    public static /*const*/ String sel_setCanBecomeVisibleWithoutLogin_1;
-    public static /*const*/ String sel_dictionaryWithObjectsAndKeys_1;
-    public static /*const*/ String sel_ensureGlyphsForGlyphRange_1;
-    public static /*const*/ String sel_indexOfTickMarkAtPoint_1;
-    public static /*const*/ String sel_dayOfWeek;
-    public static /*const*/ String sel_glyphRangeForCharacterRange_1actualCharacterRange_1;
-    public static /*const*/ String sel_enableCollectorForPointer_1;
-    public static /*const*/ String sel_rulerView_1willMoveMarker_1toLocation_1;
-    public static /*const*/ String sel_comboBoxCell_1objectValueForItemAtIndex_1;
-    public static /*const*/ String sel_setValidateSize_1;
-    public static /*const*/ String sel_controlTint;
-    public static /*const*/ String sel_deselectItemAtIndex_1;
-    public static /*const*/ String sel_defaultWindingRule;
-    public static /*const*/ String sel_setMaxValue_1;
-    public static /*const*/ String sel_longEraSymbols;
-    public static /*const*/ String sel_canRedo;
-    public static /*const*/ String sel_arguments;
-    public static /*const*/ String sel_windows;
-    public static /*const*/ String sel_downloadDidBegin_1;
-    public static /*const*/ String sel_pasteboard_1provideDataForType_1;
-    public static /*const*/ String sel_length;
-    public static /*const*/ String sel_imagePosition;
-    public static /*const*/ String sel_setAllowedFileTypes_1;
-    public static /*const*/ String sel_moveForwardAndModifySelection_1;
-    public static /*const*/ String sel_filename;
-    public static /*const*/ String sel_mountedLocalVolumePaths;
-    public static /*const*/ String sel_sharedFontManager;
-    public static /*const*/ String sel_dictionaryWithObjects_1forKeys_1count_1;
-    public static /*const*/ String sel_transpose_1;
-    public static /*const*/ String sel_drawTitleWithFrame_1inView_1;
-    public static /*const*/ String sel_worksWhenModal;
-    public static /*const*/ String sel_registerClassDescription_1;
-    public static /*const*/ String sel_setAllowsTruncatedLabels_1;
-    public static /*const*/ String sel_bezierPathWithRoundedRect_1xRadius_1yRadius_1;
-    public static /*const*/ String sel_prefix;
-    public static /*const*/ String sel_usesStrongWriteBarrier;
-    public static /*const*/ String sel_argumentNames;
-    public static /*const*/ String sel_setCaseSensitive_1;
-    public static /*const*/ String sel_outlineView_1didClickTableColumn_1;
-    public static /*const*/ String sel_textDidBeginEditing_1;
-    public static /*const*/ String sel_visibleRect;
-    public static /*const*/ String sel_isSubviewCollapsed_1;
-    public static /*const*/ String sel_completionsForPartialWordRange_1indexOfSelectedItem_1;
-    public static /*const*/ String sel_setMinDate_1;
-    public static /*const*/ String sel_colorFromPasteboard_1;
-    public static /*const*/ String sel_instanceMethodSignatureForSelector_1;
-    public static /*const*/ String sel_makeCellAtRow_1column_1;
-    public static /*const*/ String sel_pasteAsPlainText_1;
-    public static /*const*/ String sel_willRemoveSubview_1;
-    public static /*const*/ String sel_beginSheet_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1;
-    public static /*const*/ String sel_notificationCenterForType_1;
-    public static /*const*/ String sel_isDaylightSavingTimeForDate_1;
-    public static /*const*/ String sel_load;
-    public static /*const*/ String sel_menuForSegment_1;
-    public static /*const*/ String sel_scheduledTimerWithTimeInterval_1invocation_1repeats_1;
-    public static /*const*/ String sel_unregisterClass_1;
-    public static /*const*/ String sel_setByAddingObjectsFromSet_1;
-    public static /*const*/ String sel_setDepthLimit_1;
-    public static /*const*/ String sel_setVeryShortMonthSymbols_1;
-    public static /*const*/ String sel_writeToURL_1ofType_1forSaveOperation_1originalContentsURL_1error_1;
-    public static /*const*/ String sel_directoryAttributes;
-    public static /*const*/ String sel_otherMouseDown_1;
-    public static /*const*/ String sel_unhideWithoutActivation;
-    public static /*const*/ String sel_initWithContainerClassDescription_1containerSpecifier_1key_1startSpecifier_1endSpecifier_1;
-    public static /*const*/ String sel_setHasHorizontalScroller_1;
-    public static /*const*/ String sel_trackMouse_1adding_1;
-    public static /*const*/ String sel_substituteGlyphsInRange_1withGlyphs_1;
-    public static /*const*/ String sel_drawCell_1;
-    public static /*const*/ String sel_currentCursor;
-    public static /*const*/ String sel_maxSize;
-    public static /*const*/ String sel_cookiesWithResponseHeaderFields_1forURL_1;
-    public static /*const*/ String sel_isBycopy;
-    public static /*const*/ String sel_addCursorRect_1cursor_1;
-    public static /*const*/ String sel_accessibilityActionNames;
-    public static /*const*/ String sel_openDocumentWithContentsOfURL_1display_1error_1;
-    public static /*const*/ String sel_templateViews;
-    public static /*const*/ String sel_keyPath;
-    public static /*const*/ String sel_minValue;
-    public static /*const*/ String sel_setImageDimsWhenDisabled_1;
-    public static /*const*/ String sel_appendData_1;
-    public static /*const*/ String sel_netServiceBrowser_1didFindDomain_1moreComing_1;
-    public static /*const*/ String sel_initWithDescriptorType_1bytes_1length_1;
-    public static /*const*/ String sel_hasReadablePropertyForKey_1;
-    public static /*const*/ String sel_stopWhenAnimation_1reachesProgress_1;
-    public static /*const*/ String sel_setWorksWhenModal_1;
-    public static /*const*/ String sel_localizedInputManagerName;
-    public static /*const*/ String sel_knobColor;
-    public static /*const*/ String sel_screens;
-    public static /*const*/ String sel_deminiaturize_1;
-    public static /*const*/ String sel_bundleIdentifier;
-    public static /*const*/ String sel_setLoopMode_1;
-    public static /*const*/ String sel_expandItem_1expandChildren_1;
-    public static /*const*/ String sel_dataWithContentsOfFile_1options_1error_1;
-    public static /*const*/ String sel_lineBreakBeforeIndex_1withinRange_1;
-    public static /*const*/ String sel_fileOwnerAccountName;
-    public static /*const*/ String sel_insertColumn_1withCells_1;
-    public static /*const*/ String sel_windowLevel;
-    public static /*const*/ String sel_setGrammarCheckingEnabled_1;
-    public static /*const*/ String sel_shortStandaloneWeekdaySymbols;
-    public static /*const*/ String sel_push;
-    public static /*const*/ String sel_initWithContentsOfFile_1ofType_1;
-    public static /*const*/ String sel_removePortForName_1;
-    public static /*const*/ String sel_setMaximumRecents_1;
-    public static /*const*/ String sel_supermenu;
-    public static /*const*/ String sel_setWidth_1type_1forLayer_1edge_1;
-    public static /*const*/ String sel_itemRemoved_1;
-    public static /*const*/ String sel_initWithBytesNoCopy_1length_1;
-    public static /*const*/ String sel_printer;
-    public static /*const*/ String sel_compact;
-    public static /*const*/ String sel_setDefaultLineWidth_1;
-    public static /*const*/ String sel_CGLPixelFormatObj;
-    public static /*const*/ String sel_initWithDictionary_1copyItems_1;
-    public static /*const*/ String sel_tableView_1didDragTableColumn_1;
-    public static /*const*/ String sel_formattingStringsFilename;
-    public static /*const*/ String sel_setScrollView_1;
-    public static /*const*/ String sel_value;
-    public static /*const*/ String sel_editedMask;
-    public static /*const*/ String sel_ruleEditor_1displayValueForCriterion_1inRow_1;
-    public static /*const*/ String sel_leading;
-    public static /*const*/ String sel_titleRect;
-    public static /*const*/ String sel_setColumnsAutosaveName_1;
-    public static /*const*/ String sel_stop_1;
-    public static /*const*/ String sel_titleColor;
-    public static /*const*/ String sel_initWithContainerClassDescription_1containerSpecifier_1key_1test_1;
-    public static /*const*/ String sel_bytesPerPlane;
-    public static /*const*/ String sel_pageScroll;
-    public static /*const*/ String sel_groupingAttributes;
-    public static /*const*/ String sel_setAutomaticLinkDetectionEnabled_1;
-    public static /*const*/ String sel_tableView_1mouseDownInHeaderOfTableColumn_1;
-    public static /*const*/ String sel_representationOfImageRepsInArray_1usingType_1properties_1;
-    public static /*const*/ String sel_attributeRuns;
-    public static /*const*/ String sel_decodeRect;
-    public static /*const*/ String sel_drawerDidOpen_1;
-    public static /*const*/ String sel_scrollerWidth;
-    public static /*const*/ String sel_defaultMenu;
-    public static /*const*/ String sel_URLProtocol_1didLoadData_1;
-    public static /*const*/ String sel_allKeys;
-    public static /*const*/ String sel_startPeriodicEventsAfterDelay_1withPeriod_1;
-    public static /*const*/ String sel_tableViewSelectionDidChange_1;
-    public static /*const*/ String sel_setStandalone_1;
-    public static /*const*/ String sel_makeMainWindow;
-    public static /*const*/ String sel_moveLeftAndModifySelection_1;
-    public static /*const*/ String sel_pasteboardWithUniqueName;
-    public static /*const*/ String sel_fileSystemFileNumber;
-    public static /*const*/ String sel_jobDisposition;
-    public static /*const*/ String sel_setCurrentVirtualScreen_1;
-    public static /*const*/ String sel_setHasThousandSeparators_1;
-    public static /*const*/ String sel_alternateMnemonicLocation;
-    public static /*const*/ String sel_characterSetWithBitmapRepresentation_1;
-    public static /*const*/ String sel_startLoading;
-    public static /*const*/ String sel_member_1;
-    public static /*const*/ String sel_setSelectedFont_1isMultiple_1;
-    public static /*const*/ String sel_monthOfYear;
-    public static /*const*/ String sel_restoreCachedImage;
-    public static /*const*/ String sel_image_1didLoadPartOfRepresentation_1withValidRows_1;
-    public static /*const*/ String sel_mouseEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1clickCount_1pressure_1;
-    public static /*const*/ String sel_setInternationalCurrencySymbol_1;
-    public static /*const*/ String sel_mainThread;
-    public static /*const*/ String sel_lineCapStyle;
-    public static /*const*/ String sel_setDefaultParagraphStyle_1;
-    public static /*const*/ String sel_cellFrameForTextContainer_1proposedLineFragment_1glyphPosition_1characterIndex_1;
-    public static /*const*/ String sel_resolveInstanceMethod_1;
-    public static /*const*/ String sel_illegalCharacterSet;
-    public static /*const*/ String sel_setKnobThickness_1;
-    public static /*const*/ String sel_runModalPageLayoutWithPrintInfo_1;
-    public static /*const*/ String sel_popUpContextMenu_1withEvent_1forView_1withFont_1;
-    public static /*const*/ String sel_modalWindow;
-    public static /*const*/ String sel_autorelease;
-    public static /*const*/ String sel_draggingEntered_1;
-    public static /*const*/ String sel_allowsTruncatedLabels;
-    public static /*const*/ String sel_fileDescriptor;
-    public static /*const*/ String sel_ISOLanguageCodes;
-    public static /*const*/ String sel_onStateImage;
-    public static /*const*/ String sel_imageFrameStyle;
-    public static /*const*/ String sel_setFloatValue_1;
-    public static /*const*/ String sel_initWithColors_1atLocations_1colorSpace_1;
-    public static /*const*/ String sel_descriptorWithString_1;
-    public static /*const*/ String sel_setPoolCountHighWaterMark_1;
-    public static /*const*/ String sel_veryShortStandaloneWeekdaySymbols;
-    public static /*const*/ String sel_addTypes_1owner_1;
-    public static /*const*/ String sel_numberWithLongLong_1;
-    public static /*const*/ String sel_setDay_1;
-    public static /*const*/ String sel_initWithHTML_1documentAttributes_1;
-    public static /*const*/ String sel_replaceSubview_1with_1;
-    public static /*const*/ String sel_makeObjectsPerformSelector_1;
-    public static /*const*/ String sel_setRunLoopModes_1;
-    public static /*const*/ String sel_getFileSystemRepresentation_1maxLength_1;
-    public static /*const*/ String sel_scale;
-    public static /*const*/ String sel_draggedImageLocation;
-    public static /*const*/ String sel_setFocusStack_1;
-    public static /*const*/ String sel_isReadOnlyKey_1;
-    public static /*const*/ String sel_shadowOffset;
-    public static /*const*/ String sel_URLHandleUsingCache_1;
-    public static /*const*/ String sel_isWellFormed;
-    public static /*const*/ String sel_tokenField_1editingStringForRepresentedObject_1;
-    public static /*const*/ String sel_setGroupsByEvent_1;
-    public static /*const*/ String sel_parser_1foundComment_1;
-    public static /*const*/ String sel_initWithHTML_1baseURL_1documentAttributes_1;
-    public static /*const*/ String sel_uppercaseWord_1;
-    public static /*const*/ String sel_testPart_1;
-    public static /*const*/ String sel_dataSource;
-    public static /*const*/ String sel_lineRangeForRange_1;
-    public static /*const*/ String sel_hostWithAddress_1;
-    public static /*const*/ String sel_removeRunLoop_1;
-    public static /*const*/ String sel_fileHandleWithStandardInput;
-    public static /*const*/ String sel_itemArray;
-    public static /*const*/ String sel_rectOfPathComponentCell_1withFrame_1inView_1;
-    public static /*const*/ String sel_TIFFRepresentation;
-    public static /*const*/ String sel_archiver_1willReplaceObject_1withObject_1;
-    public static /*const*/ String sel_currentVirtualScreen;
-    public static /*const*/ String sel_gridColor;
-    public static /*const*/ String sel_boundingRectForGlyph_1;
-    public static /*const*/ String sel_setDataSource_1;
-    public static /*const*/ String sel_setDefaultLineJoinStyle_1;
-    public static /*const*/ String sel_textBlocks;
-    public static /*const*/ String sel_drawerDidClose_1;
-    public static /*const*/ String sel_valueWithName_1inPropertyWithKey_1;
-    public static /*const*/ String sel_managedObjectModel;
-    public static /*const*/ String sel_outlineView_1persistentObjectForItem_1;
-    public static /*const*/ String sel_setSelectedRange_1;
-    public static /*const*/ String sel_magentaComponent;
-    public static /*const*/ String sel_setIncrement_1;
-    public static /*const*/ String sel_editingStringForObjectValue_1;
-    public static /*const*/ String sel_addClip;
-    public static /*const*/ String sel_setSelectionIndex_1;
-    public static /*const*/ String sel_replyAppleEventForSuspensionID_1;
-    public static /*const*/ String sel_URLProtocol_1didFailWithError_1;
-    public static /*const*/ String sel_ignoresMouseEvents;
-    public static /*const*/ String sel_dateWithNaturalLanguageString_1locale_1;
-    public static /*const*/ String sel_recordDescriptor;
-    public static /*const*/ String sel_makeCurrentContext;
-    public static /*const*/ String sel_excludedKeys;
-    public static /*const*/ String sel_fileManager_1shouldProceedAfterError_1linkingItemAtPath_1toPath_1;
-    public static /*const*/ String sel_set;
-    public static /*const*/ String sel_mainScreen;
-    public static /*const*/ String sel_setVersion_1;
-    public static /*const*/ String sel_displayRectIgnoringOpacity_1inContext_1;
-    public static /*const*/ String sel_setNumberOfTickMarks_1;
-    public static /*const*/ String sel_showsHelp;
-    public static /*const*/ String sel_takeColorFrom_1;
-    public static /*const*/ String sel_horizontalPageScroll;
-    public static /*const*/ String sel_pointingHandCursor;
-    public static /*const*/ String sel_vendorID;
-    public static /*const*/ String sel_setSelectedRanges_1affinity_1stillSelecting_1;
-    public static /*const*/ String sel_setHTTPShouldHandleCookies_1;
-    public static /*const*/ String sel_initWithType_1location_1;
-    public static /*const*/ String sel_stringByResolvingSymlinksInPath;
-    public static /*const*/ String sel_tryLock;
-    public static /*const*/ String sel_convertSizeFromBase_1;
-    public static /*const*/ String sel_setCacheMode_1;
-    public static /*const*/ String sel_entityName;
-    public static /*const*/ String sel_takeFloatValueFrom_1;
-    public static /*const*/ String sel_showsStateBy;
-    public static /*const*/ String sel_highlightedItem;
-    public static /*const*/ String sel_superclassDescription;
-    public static /*const*/ String sel_flagsChanged_1;
-    public static /*const*/ String sel_alloc;
-    public static /*const*/ String sel_setDisplaysWhenScreenProfileChanges_1;
-    public static /*const*/ String sel_CIImage;
-    public static /*const*/ String sel_setSupermenu_1;
-    public static /*const*/ String sel_setSharedURLCache_1;
-    public static /*const*/ String sel_pathCell_1willPopUpMenu_1;
-    public static /*const*/ String sel_setAttributes_1ofItemAtPath_1error_1;
-    public static /*const*/ String sel_tableView_1typeSelectStringForTableColumn_1row_1;
-    public static /*const*/ String sel_moveWordLeftAndModifySelection_1;
-    public static /*const*/ String sel_whitespaceAndNewlineCharacterSet;
-    public static /*const*/ String sel_pathControl_1validateDrop_1;
-    public static /*const*/ String sel_createCommandInstanceWithZone_1;
-    public static /*const*/ String sel_configurationDictionary;
-    public static /*const*/ String sel_classFallbacksForKeyedArchiver;
-    public static /*const*/ String sel_DTDKind;
-    public static /*const*/ String sel_initWithPath_1documentAttributes_1;
-    public static /*const*/ String sel_addObjectsFromArray_1;
-    public static /*const*/ String sel_tokenField_1displayStringForRepresentedObject_1;
-    public static /*const*/ String sel_firstVisibleColumn;
-    public static /*const*/ String sel_gradientType;
-    public static /*const*/ String sel_familyName;
-    public static /*const*/ String sel_uniqueID;
-    public static /*const*/ String sel_setFormatterBehavior_1;
-    public static /*const*/ String sel_tokenFieldCell_1hasMenuForRepresentedObject_1;
-    public static /*const*/ String sel_fileManager_1shouldCopyItemAtPath_1toPath_1;
-    public static /*const*/ String sel_keySpecifier;
-    public static /*const*/ String sel_copyItemAtPath_1toPath_1error_1;
-    public static /*const*/ String sel_setLength_1;
-    public static /*const*/ String sel_reloadItem_1;
-    public static /*const*/ String sel_removeObjectsAtArrangedObjectIndexes_1;
-    public static /*const*/ String sel_setVisibilityPriority_1;
-    public static /*const*/ String sel_insertItemWithObjectValue_1atIndex_1;
-    public static /*const*/ String sel_searchButtonCell;
-    public static /*const*/ String sel_getCString_1maxLength_1range_1remainingRange_1;
-    public static /*const*/ String sel_outlineView_1child_1ofItem_1;
-    public static /*const*/ String sel_numberOfComponents;
-    public static /*const*/ String sel_isKindOfClass_1;
-    public static /*const*/ String sel_processorCount;
-    public static /*const*/ String sel_lineJoinStyle;
-    public static /*const*/ String sel_collectionBehavior;
-    public static /*const*/ String sel_setApplicationIconImage_1;
-    public static /*const*/ String sel_setLaunchPath_1;
-    public static /*const*/ String sel_initFileURLWithPath_1;
-    public static /*const*/ String sel_selectItemAtIndex_1;
-    public static /*const*/ String sel_IBeamCursor;
-    public static /*const*/ String sel_isColor;
-    public static /*const*/ String sel_cancelAuthenticationChallenge_1;
-    public static /*const*/ String sel_echosBullets;
-    public static /*const*/ String sel_setHasUndoManager_1;
-    public static /*const*/ String sel_RTFDFileWrapperFromRange_1documentAttributes_1;
-    public static /*const*/ String sel_highlightCell_1atRow_1column_1;
-    public static /*const*/ String sel_currentHost;
-    public static /*const*/ String sel_setURI_1;
-    public static /*const*/ String sel_suiteNames;
-    public static /*const*/ String sel_genericGrayColorSpace;
-    public static /*const*/ String sel_volatileDomainForName_1;
-    public static /*const*/ String sel_tokenizingCharacterSet;
-    public static /*const*/ String sel_initWithXMLString_1;
-    public static /*const*/ String sel_function;
-    public static /*const*/ String sel_sizeForMagnification_1;
-    public static /*const*/ String sel_commitEditingWithDelegate_1didCommitSelector_1contextInfo_1;
-    public static /*const*/ String sel_writeToFile_1;
-    public static /*const*/ String sel_displayIfNeededInRect_1;
-    public static /*const*/ String sel_optionDescriptionsForBinding_1;
-    public static /*const*/ String sel_initWithSize_1;
-    public static /*const*/ String sel_cornerView;
-    public static /*const*/ String sel_redoActionName;
-    public static /*const*/ String sel_setLocation_1forStartOfGlyphRange_1;
-    public static /*const*/ String sel_setAllowedInputSourceLocales_1;
-    public static /*const*/ String sel_convertRect_1toView_1;
-    public static /*const*/ String sel_preferredFilenameExtensionForType_1;
-    public static /*const*/ String sel_tableView_1writeRows_1toPasteboard_1;
-    public static /*const*/ String sel_rootObject;
-    public static /*const*/ String sel_isEqualToHashTable_1;
-    public static /*const*/ String sel_indent_1;
-    public static /*const*/ String sel_removeIndexesInRange_1;
-    public static /*const*/ String sel_numberWithBool_1;
-    public static /*const*/ String sel_setPersistentDomain_1forName_1;
-    public static /*const*/ String sel_netServiceBrowser_1didRemoveService_1moreComing_1;
-    public static /*const*/ String sel_timeZoneWithName_1data_1;
-    public static /*const*/ String sel_drawImage_1withFrame_1inView_1;
-    public static /*const*/ String sel_buttonToolTip;
-    public static /*const*/ String sel_enableCursorRects;
-    public static /*const*/ String sel_rulerAttributesInRange_1;
-    public static /*const*/ String sel_setMemoryCapacity_1;
-    public static /*const*/ String sel_isSeparatorItem;
-    public static /*const*/ String sel_save_1;
-    public static /*const*/ String sel_documentView;
-    public static /*const*/ String sel_setHostCacheEnabled_1;
-    public static /*const*/ String sel_setDatePickerElements_1;
-    public static /*const*/ String sel_mixedStateImage;
-    public static /*const*/ String sel_setAcceptsMouseMovedEvents_1;
-    public static /*const*/ String sel_numberOfTabViewItems;
-    public static /*const*/ String sel_portForName_1host_1nameServerPortNumber_1;
-    public static /*const*/ String sel_printerWithName_1domain_1includeUnavailable_1;
-    public static /*const*/ String sel_insertObjects_1atArrangedObjectIndexPaths_1;
-    public static /*const*/ String sel_browser_1shouldTypeSelectForEvent_1withCurrentSearchString_1;
-    public static /*const*/ String sel_defaultTabInterval;
-    public static /*const*/ String sel_initWithTitle_1;
-    public static /*const*/ String sel_timeZoneForSecondsFromGMT_1;
-    public static /*const*/ String sel_initWithPasteboard_1;
-    public static /*const*/ String sel_subscriptRange_1;
-    public static /*const*/ String sel_highlightColorWithFrame_1inView_1;
-    public static /*const*/ String sel_didChangeText;
-    public static /*const*/ String sel_storagePolicy;
-    public static /*const*/ String sel_respondsToSelector_1;
-    public static /*const*/ String sel_namesOfPromisedFilesDroppedAtDestination_1;
-    public static /*const*/ String sel_unsignedShortValue;
-    public static /*const*/ String sel_setZeroSymbol_1;
-    public static /*const*/ String sel_resourcePath;
-    public static /*const*/ String sel_markerFormat;
-    public static /*const*/ String sel_hotSpot;
-    public static /*const*/ String sel_imageUnfilteredPasteboardTypes;
-    public static /*const*/ String sel_editedRange;
-    public static /*const*/ String sel_setMenuChangedMessagesEnabled_1;
-    public static /*const*/ String sel_tailIndent;
-    public static /*const*/ String sel_release;
-    public static /*const*/ String sel_readFromURL_1options_1documentAttributes_1;
-    public static /*const*/ String sel_underlinePosition;
-    public static /*const*/ String sel_setMinItemSize_1;
-    public static /*const*/ String sel_initWithImage_1foregroundColorHint_1backgroundColorHint_1hotSpot_1;
-    public static /*const*/ String sel_setPlaceholderString_1;
-    public static /*const*/ String sel_createDirectoryAtPath_1withIntermediateDirectories_1attributes_1error_1;
-    public static /*const*/ String sel_setDefaultTabInterval_1;
-    public static /*const*/ String sel_invertedSet;
-    public static /*const*/ String sel_iconForFile_1;
-    public static /*const*/ String sel_modifyFont_1;
-    public static /*const*/ String sel_setProcessName_1;
-    public static /*const*/ String sel_addObserver_1toObjectsAtIndexes_1forKeyPath_1options_1context_1;
-    public static /*const*/ String sel_resolve;
-    public static /*const*/ String sel_namespaces;
-    public static /*const*/ String sel_drawInBezierPath_1angle_1;
-    public static /*const*/ String sel_setPixelFormat_1;
-    public static /*const*/ String sel_resizeUpDownCursor;
-    public static /*const*/ String sel_daylightSavingTimeOffsetForDate_1;
-    public static /*const*/ String sel_setCanSpawnSeparateThread_1;
-    public static /*const*/ String sel_setTitleBaseWritingDirection_1;
-    public static /*const*/ String sel_subscript_1;
-    public static /*const*/ String sel_URL;
-    public static /*const*/ String sel_headerColor;
-    public static /*const*/ String sel_stringByAddingPercentEscapesUsingEncoding_1;
-    public static /*const*/ String sel_draggingExited_1;
-    public static /*const*/ String sel_ignoreModifierKeysWhileDragging;
-    public static /*const*/ String sel_componentsToDisplayForPath_1;
-    public static /*const*/ String sel_glyphRangeForBoundingRectWithoutAdditionalLayout_1inTextContainer_1;
-    public static /*const*/ String sel_removeTrackingRect_1;
-    public static /*const*/ String sel_handlePrintScriptCommand_1;
-    public static /*const*/ String sel_viewDidMoveToWindow;
-    public static /*const*/ String sel_allocateGState;
-    public static /*const*/ String sel_availableStringEncodings;
-    public static /*const*/ String sel_instantiateNibWithExternalNameTable_1;
-    public static /*const*/ String sel_setWeekdayOrdinal_1;
-    public static /*const*/ String sel_setWithCapacity_1;
-    public static /*const*/ String sel_setCurrentAppleEventAndReplyEventWithSuspensionID_1;
-    public static /*const*/ String sel_convertFont_1toNotHaveTrait_1;
-    public static /*const*/ String sel_performSelector_1withObject_1withObject_1;
-    public static /*const*/ String sel_removeIndexes_1;
-    public static /*const*/ String sel_objectSpecifierWithDescriptor_1;
-    public static /*const*/ String sel_objectValue;
-    public static /*const*/ String sel_timeZone;
-    public static /*const*/ String sel_viewSizeChanged_1;
-    public static /*const*/ String sel_clearDrawable;
-    public static /*const*/ String sel_parentRowForRow_1;
-    public static /*const*/ String sel_trackingMode;
-    public static /*const*/ String sel_selectedRanges;
-    public static /*const*/ String sel_suspendExecution;
-    public static /*const*/ String sel_setDefaultPrinter_1;
-    public static /*const*/ String sel_loadDataRepresentation_1ofType_1;
-    public static /*const*/ String sel_closestTickMarkValueToValue_1;
-    public static /*const*/ String sel_removeFromRunLoop_1forMode_1;
-    public static /*const*/ String sel_cancelUserAttentionRequest_1;
-    public static /*const*/ String sel_dictionaryWithObject_1forKey_1;
-    public static /*const*/ String sel_isDataRetained;
-    public static /*const*/ String sel_setLoops_1;
-    public static /*const*/ String sel_hashTableWithWeakObjects;
-    public static /*const*/ String sel_documentForURL_1;
-    public static /*const*/ String sel_removeRepresentation_1;
-    public static /*const*/ String sel_keyClassDescription;
-    public static /*const*/ String sel_noResponderFor_1;
-    public static /*const*/ String sel_setBidiLevels_1forGlyphRange_1;
-    public static /*const*/ String sel_cancelIncrementalLoad;
-    public static /*const*/ String sel_highlightedBranchImage;
-    public static /*const*/ String sel_setAttributedStringForZero_1;
-    public static /*const*/ String sel_drawAtPoint_1fromRect_1operation_1fraction_1;
-    public static /*const*/ String sel_fileHFSTypeCode;
-    public static /*const*/ String sel_maximumRecents;
-    public static /*const*/ String sel_useFont_1;
-    public static /*const*/ String sel_selectKeyViewPrecedingView_1;
-    public static /*const*/ String sel_attributedStringForNil;
-    public static /*const*/ String sel_isGrammarCheckingEnabled;
-    public static /*const*/ String sel_owner;
-    public static /*const*/ String sel_searchForServicesOfType_1inDomain_1;
-    public static /*const*/ String sel_frameAutosaveName;
-    public static /*const*/ String sel_setCommands_1;
-    public static /*const*/ String sel_URLResourceDidCancelLoading_1;
-    public static /*const*/ String sel_uniqueSpellDocumentTag;
-    public static /*const*/ String sel_needsToBeUpdatedFromPath_1;
-    public static /*const*/ String sel_bounds;
-    public static /*const*/ String sel_contextHelpForKey_1;
-    public static /*const*/ String sel_setSendsActionOnEndEditing_1;
-    public static /*const*/ String sel_scanDouble_1;
-    public static /*const*/ String sel_download_1willResumeWithResponse_1fromByte_1;
-    public static /*const*/ String sel_drawFromCenter_1radius_1toCenter_1radius_1options_1;
-    public static /*const*/ String sel_defaultFlatness;
-    public static /*const*/ String sel_keepBackupFile;
-    public static /*const*/ String sel_willChangeValueForKey_1;
-    public static /*const*/ String sel_initWithDateFormat_1allowNaturalLanguage_1;
-    public static /*const*/ String sel_textView_1writablePasteboardTypesForCell_1atIndex_1;
-    public static /*const*/ String sel_getTIFFCompressionTypes_1count_1;
-    public static /*const*/ String sel_decodePropertyList;
-    public static /*const*/ String sel_saveDocumentWithDelegate_1didSaveSelector_1contextInfo_1;
-    public static /*const*/ String sel_encodePoint_1;
-    public static /*const*/ String sel_selectRow_1byExtendingSelection_1;
-    public static /*const*/ String sel_preservesContentDuringLiveResize;
-    public static /*const*/ String sel_registerUndoWithTarget_1selector_1object_1;
-    public static /*const*/ String sel_removeCollection_1;
-    public static /*const*/ String sel_nextEventMatchingMask_1;
-    public static /*const*/ String sel_getObjects_1andKeys_1;
-    public static /*const*/ String sel_EPSRepresentation;
-    public static /*const*/ String sel_isModalPanel;
-    public static /*const*/ String sel_statusCode;
-    public static /*const*/ String sel_setCopiesOnScroll_1;
-    public static /*const*/ String sel_setHorizontalPagination_1;
-    public static /*const*/ String sel_removeAllIndexes;
-    public static /*const*/ String sel_download_1didFailWithError_1;
-    public static /*const*/ String sel_modifierFlags;
-    public static /*const*/ String sel_draggedColumn;
-    public static /*const*/ String sel_initWithUser_1;
-    public static /*const*/ String sel_setLayoutRect_1forTextBlock_1glyphRange_1;
-    public static /*const*/ String sel_selectionAffinity;
-    public static /*const*/ String sel_beginParagraph;
-    public static /*const*/ String sel_runModalForTypes_1;
-    public static /*const*/ String sel_reloadCriteria;
-    public static /*const*/ String sel_PDFOperationWithView_1insideRect_1toData_1printInfo_1;
-    public static /*const*/ String sel_cellAtRow_1column_1;
-    public static /*const*/ String sel_selectColumn_1byExtendingSelection_1;
-    public static /*const*/ String sel_addresses;
-    public static /*const*/ String sel_setCanBeVisibleOnAllSpaces_1;
-    public static /*const*/ String sel_bundleForSuite_1;
-    public static /*const*/ String sel_stringWithCharacters_1length_1;
-    public static /*const*/ String sel_dataWithContentsOfURL_1options_1error_1;
-    public static /*const*/ String sel_isExpanded;
-    public static /*const*/ String sel_rectForLayoutAtPoint_1inRect_1textContainer_1characterRange_1;
-    public static /*const*/ String sel_initWithXMLString_1options_1error_1;
-    public static /*const*/ String sel_datePickerCell_1validateProposedDateValue_1timeInterval_1;
-    public static /*const*/ String sel_replaceCharactersInRange_1withRTFD_1;
-    public static /*const*/ String sel_setNeedsDisplay_1;
-    public static /*const*/ String sel_tableViewColumnDidMove_1;
-    public static /*const*/ String sel_printOperationWithView_1printInfo_1;
-    public static /*const*/ String sel_parserDidStartDocument_1;
-    public static /*const*/ String sel_privateFrameworksPath;
-    public static /*const*/ String sel_informativeText;
-    public static /*const*/ String sel_attributesAtIndex_1effectiveRange_1;
-    public static /*const*/ String sel_rectArrayForGlyphRange_1withinSelectedGlyphRange_1inTextContainer_1rectCount_1;
-    public static /*const*/ String sel_swapWithMark_1;
-    public static /*const*/ String sel_setDrawsGrid_1;
-    public static /*const*/ String sel_highlight_1;
-    public static /*const*/ String sel_maximumLineHeight;
-    public static /*const*/ String sel_phonemesFromText_1;
-    public static /*const*/ String sel_convertSize_1fromView_1;
-    public static /*const*/ String sel_setProperty_1withValue_1;
-    public static /*const*/ String sel_cookieAcceptPolicy;
-    public static /*const*/ String sel_hasThousandSeparators;
-    public static /*const*/ String sel_setTighteningFactorForTruncation_1;
-    public static /*const*/ String sel_contextMenuRepresentation;
-    public static /*const*/ String sel_precomposedStringWithCompatibilityMapping;
-    public static /*const*/ String sel_threadDictionary;
-    public static /*const*/ String sel_redoMenuTitleForUndoActionName_1;
-    public static /*const*/ String sel_setNumberOfVisibleItems_1;
-    public static /*const*/ String sel_preferredLanguages;
-    public static /*const*/ String sel_mouseDraggedOnCharacterIndex_1atCoordinate_1withModifier_1client_1;
-    public static /*const*/ String sel_setMultiplier_1;
-    public static /*const*/ String sel_sortedArrayUsingSelector_1;
-    public static /*const*/ String sel_drawInRect_1;
-    public static /*const*/ String sel_reversedSortDescriptor;
-    public static /*const*/ String sel_setIdentifier_1;
-    public static /*const*/ String sel_systemLocale;
-    public static /*const*/ String sel_rulerView_1didMoveMarker_1;
-    public static /*const*/ String sel_serviceConnectionWithName_1rootObject_1;
-    public static /*const*/ String sel_mouseDownCanMoveWindow;
-    public static /*const*/ String sel_setMode_1;
-    public static /*const*/ String sel_rectOfTickMarkAtIndex_1;
-    public static /*const*/ String sel_rangeOfCharacterFromSet_1;
-    public static /*const*/ String sel_pageUp_1;
-    public static /*const*/ String sel_sendsWholeSearchString;
-    public static /*const*/ String sel_selectColumnIndexes_1byExtendingSelection_1;
-    public static /*const*/ String sel_localizedCaseInsensitiveCompare_1;
-    public static /*const*/ String sel_isEqualToString_1;
-    public static /*const*/ String sel_invalidateHashMarks;
-    public static /*const*/ String sel_setInitialKey_1;
-    public static /*const*/ String sel_setDividerStyle_1;
-    public static /*const*/ String sel_expressionForMinusSet_1with_1;
-    public static /*const*/ String sel_netService_1didNotPublish_1;
-    public static /*const*/ String sel_evaluatedReceivers;
-    public static /*const*/ String sel_removeTabViewItem_1;
-    public static /*const*/ String sel_initWithContainerClassDescription_1containerSpecifier_1key_1index_1;
-    public static /*const*/ String sel_predicateWithLeftExpression_1rightExpression_1customSelector_1;
-    public static /*const*/ String sel_brownColor;
-    public static /*const*/ String sel_leafKeyPathForNode_1;
-    public static /*const*/ String sel_drawBackgroundForGlyphRange_1atPoint_1;
-    public static /*const*/ String sel_rulerView_1willSetClientView_1;
-    public static /*const*/ String sel_className;
-    public static /*const*/ String sel_runMode_1beforeDate_1;
-    public static /*const*/ String sel_applicationShouldTerminateAfterLastWindowClosed_1;
-    public static /*const*/ String sel_newDocument_1;
-    public static /*const*/ String sel_arrayByAddingObject_1;
-    public static /*const*/ String sel_savePanel;
-    public static /*const*/ String sel_prefersTrackingUntilMouseUp;
-    public static /*const*/ String sel_setLocations_1startingGlyphIndexes_1count_1forGlyphRange_1;
-    public static /*const*/ String sel_setListensInForegroundOnly_1;
-    public static /*const*/ String sel_initWithUnsignedShort_1;
-    public static /*const*/ String sel_letterCharacterSet;
-    public static /*const*/ String sel_listensInForegroundOnly;
-    public static /*const*/ String sel_menu_1willHighlightItem_1;
-    public static /*const*/ String sel_charactersIgnoringModifiers;
-    public static /*const*/ String sel_insertionContainer;
-    public static /*const*/ String sel_searchButtonRectForBounds_1;
-    public static /*const*/ String sel_accessibilitySetValue_1forAttribute_1;
-    public static /*const*/ String sel_setPathSeparator_1;
-    public static /*const*/ String sel_applicationWillResignActive_1;
-    public static /*const*/ String sel_scriptingIsLessThanOrEqualTo_1;
-    public static /*const*/ String sel_decodeValuesOfObjCTypes_1;
-    public static /*const*/ String sel_setIntercellSpacing_1;
-    public static /*const*/ String sel_sharedSystemTypesetterForBehavior_1;
-    public static /*const*/ String sel_drawFromPoint_1toPoint_1options_1;
-    public static /*const*/ String sel_windowDidMove_1;
-    public static /*const*/ String sel_setVisible_1;
-    public static /*const*/ String sel_credentialWithUser_1password_1persistence_1;
-    public static /*const*/ String sel_decomposedStringWithCanonicalMapping;
-    public static /*const*/ String sel_openFile_1withApplication_1andDeactivate_1;
-    public static /*const*/ String sel_convertRectToBase_1;
-    public static /*const*/ String sel_outputStreamToMemory;
-    public static /*const*/ String sel_autorepeat;
-    public static /*const*/ String sel_servicesMenu;
-    public static /*const*/ String sel_beginGrouping;
-    public static /*const*/ String sel_setNilValueForKey_1;
-    public static /*const*/ String sel_usesFontLeading;
-    public static /*const*/ String sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1;
-    public static /*const*/ String sel_takeStringValueFrom_1;
-    public static /*const*/ String sel_fontDescriptorByAddingAttributes_1;
-    public static /*const*/ String sel_startTrackingAt_1inView_1;
-    public static /*const*/ String sel_application_1delegateHandlesKey_1;
-    public static /*const*/ String sel_stringByExpandingTildeInPath;
-    public static /*const*/ String sel_menu;
-    public static /*const*/ String sel_setMinute_1;
-    public static /*const*/ String sel_startSubelementIdentifier;
-    public static /*const*/ String sel_waitForDataInBackgroundAndNotifyForModes_1;
-    public static /*const*/ String sel_removeCachedResponseForRequest_1;
-    public static /*const*/ String sel_attributeForLocalName_1URI_1;
-    public static /*const*/ String sel_saveDocumentAs_1;
-    public static /*const*/ String sel_containerIsObjectBeingTested;
-    public static /*const*/ String sel_mouseDownOnCharacterIndex_1atCoordinate_1withModifier_1client_1;
-    public static /*const*/ String sel_setPosition_1ofDividerAtIndex_1;
-    public static /*const*/ String sel_terminationStatus;
-    public static /*const*/ String sel_imageWidth;
-    public static /*const*/ String sel_accessoryView;
-    public static /*const*/ String sel_outlineView_1shouldTrackCell_1forTableColumn_1item_1;
-    public static /*const*/ String sel_initWithLevelIndicatorStyle_1;
-    public static /*const*/ String sel_deltaX;
-    public static /*const*/ String sel_valueForUndefinedKey_1;
-    public static /*const*/ String sel_mainDocumentURL;
-    public static /*const*/ String sel_position;
-    public static /*const*/ String sel_animates;
-    public static /*const*/ String sel_addTabViewItem_1;
-    public static /*const*/ String sel_unlockFocus;
-    public static /*const*/ String sel_download_1didCreateDestination_1;
-    public static /*const*/ String sel_defaults;
-    public static /*const*/ String sel_viewWillDraw;
-    public static /*const*/ String sel_findApplications;
-    public static /*const*/ String sel_unbind_1;
-    public static /*const*/ String sel_positionOfGlyph_1withRelation_1toBaseGlyph_1totalAdvancement_1metricsExist_1;
-    public static /*const*/ String sel_isGreaterThan_1;
-    public static /*const*/ String sel_dataWithPDFInsideRect_1;
-    public static /*const*/ String sel_setAttributedTitle_1;
-    public static /*const*/ String sel_expressionType;
-    public static /*const*/ String sel_tokenFieldCell_1shouldAddObjects_1atIndex_1;
-    public static /*const*/ String sel_removeEventHandlerForEventClass_1andEventID_1;
-    public static /*const*/ String sel_postNotification_1;
-    public static /*const*/ String sel_indexOfTabViewItem_1;
-    public static /*const*/ String sel_outlineView_1shouldSelectItem_1;
-    public static /*const*/ String sel_setSegmentStyle_1;
-    public static /*const*/ String sel_stateImageRectForBounds_1;
-    public static /*const*/ String sel_setContentAspectRatio_1;
-    public static /*const*/ String sel_instantiateNibWithOwner_1topLevelObjects_1;
-    public static /*const*/ String sel_setPrototype_1;
-    public static /*const*/ String sel_allowsMultipleSelection;
-    public static /*const*/ String sel_setRecentSearches_1;
-    public static /*const*/ String sel_setTypingAttributes_1;
-    public static /*const*/ String sel_observeValueForKeyPath_1ofObject_1change_1context_1;
-    public static /*const*/ String sel_performDragOperation_1;
-    public static /*const*/ String sel_processingInstructionWithName_1stringValue_1;
-    public static /*const*/ String sel_initWithKind_1options_1;
-    public static /*const*/ String sel_instancesRespondToSelector_1;
-    public static /*const*/ String sel_keyEquivalentFont;
-    public static /*const*/ String sel_calendarIdentifier;
-    public static /*const*/ String sel_source;
-    public static /*const*/ String sel_shouldBeTreatedAsInkEvent_1;
-    public static /*const*/ String sel_queuePriority;
-    public static /*const*/ String sel_autoresizesAllColumnsToFit;
-    public static /*const*/ String sel_outlineView_1shouldCollapseItem_1;
-    public static /*const*/ String sel_dragImage_1at_1offset_1event_1pasteboard_1source_1slideBack_1;
-    public static /*const*/ String sel_sender;
-    public static /*const*/ String sel_numberOfColumns;
-    public static /*const*/ String sel_indexPathWithIndex_1;
-    public static /*const*/ String sel_setPreferredFontNames_1;
-    public static /*const*/ String sel_windowDidEndSheet_1;
-    public static /*const*/ String sel_capHeight;
-    public static /*const*/ String sel_matchingFontDescriptorWithMandatoryKeys_1;
-    public static /*const*/ String sel_finalize;
-    public static /*const*/ String sel_prepareForDragOperation_1;
-    public static /*const*/ String sel_setCellAttribute_1to_1;
-    public static /*const*/ String sel_metadataQuery_1replacementValueForAttribute_1value_1;
-    public static /*const*/ String sel_hueComponent;
-    public static /*const*/ String sel_maxValue;
-    public static /*const*/ String sel_soundUnfilteredTypes;
-    public static /*const*/ String sel_setFileAttributes_1;
-    public static /*const*/ String sel_valueLists;
-    public static /*const*/ String sel_breakLock;
-    public static /*const*/ String sel_selectCellWithTag_1;
-    public static /*const*/ String sel_setMovable_1;
-    public static /*const*/ String sel_synchronizeFile;
-    public static /*const*/ String sel_setVerticallyResizable_1;
-    public static /*const*/ String sel_setButtonBordered_1;
-    public static /*const*/ String sel_useOptimizedDrawing_1;
-    public static /*const*/ String sel_tryLockWhenCondition_1;
-    public static /*const*/ String sel_textContainer;
-    public static /*const*/ String sel_setValueListAttributes_1;
-    public static /*const*/ String sel_rangeOfCharacterFromSet_1options_1;
-    public static /*const*/ String sel_dragFile_1fromRect_1slideBack_1event_1;
-    public static /*const*/ String sel_tickMarkPosition;
-    public static /*const*/ String sel_addRunLoop_1;
-    public static /*const*/ String sel_dataWithCapacity_1;
-    public static /*const*/ String sel_removeVolatileDomainForName_1;
-    public static /*const*/ String sel_signal;
-    public static /*const*/ String sel_progressMarks;
-    public static /*const*/ String sel_unhide_1;
-    public static /*const*/ String sel_provideNewButtonImage;
-    public static /*const*/ String sel_connectionWithRegisteredName_1host_1usingNameServer_1;
-    public static /*const*/ String sel_localizesFormat;
-    public static /*const*/ String sel_lineScroll;
-    public static /*const*/ String sel_initDirectoryWithFileWrappers_1;
-    public static /*const*/ String sel_wantsToInterpretAllKeystrokes;
-    public static /*const*/ String sel_convertPointToBase_1;
-    public static /*const*/ String sel_keyWithAppleEventCode_1;
-    public static /*const*/ String sel_loadSuiteWithDictionary_1fromBundle_1;
-    public static /*const*/ String sel_automaticallyPreparesContent;
-    public static /*const*/ String sel_cornerRadius;
-    public static /*const*/ String sel_sharedScriptExecutionContext;
-    public static /*const*/ String sel_setPoolCountHighWaterResolution_1;
-    public static /*const*/ String sel_appendBezierPath_1;
-    public static /*const*/ String sel_appleEventClassCode;
-    public static /*const*/ String sel_initTextCell_1pullsDown_1;
-    public static /*const*/ String sel_numberOfTickMarks;
-    public static /*const*/ String sel_setIndependentConversationQueueing_1;
-    public static /*const*/ String sel_extendPowerOffBy_1;
-    public static /*const*/ String sel_isCollecting;
-    public static /*const*/ String sel_canInsert;
-    public static /*const*/ String sel_valuePointerFunctions;
-    public static /*const*/ String sel_sizeValue;
-    public static /*const*/ String sel_openOnEdge_1;
-    public static /*const*/ String sel_rectOfItemAtIndex_1;
-    public static /*const*/ String sel_booleanForKey_1inTable_1;
-    public static /*const*/ String sel_showHelp_1;
-    public static /*const*/ String sel_heightTracksTextView;
-    public static /*const*/ String sel_hasTitleBar;
-    public static /*const*/ String sel_setViewAnimations_1;
-    public static /*const*/ String sel_updateSpellingPanelWithGrammarString_1detail_1;
-    public static /*const*/ String sel_showsToolbarButton;
-    public static /*const*/ String sel_environment;
-    public static /*const*/ String sel_matchesAppleEventCode_1;
-    public static /*const*/ String sel_hasPrefix_1;
-    public static /*const*/ String sel_hasUnappliedChanges;
-    public static /*const*/ String sel_setName_1;
-    public static /*const*/ String sel_isMovableByWindowBackground;
-    public static /*const*/ String sel_printerNames;
-    public static /*const*/ String sel_initWithDictionary_1;
-    public static /*const*/ String sel_stringByStandardizingPath;
-    public static /*const*/ String sel_usesUserKeyEquivalents;
-    public static /*const*/ String sel_drawStateImageWithFrame_1inView_1;
-    public static /*const*/ String sel_openUntitledDocumentAndDisplay_1error_1;
-    public static /*const*/ String sel_lastVisibleColumn;
-    public static /*const*/ String sel_paste_1;
-    public static /*const*/ String sel_indexOfItemWithRepresentedObject_1;
-    public static /*const*/ String sel_supportsCommand_1;
-    public static /*const*/ String sel_scrollPageUp_1;
-    public static /*const*/ String sel_draggedImage_1endedAt_1deposited_1;
-    public static /*const*/ String sel_setPositiveInfinitySymbol_1;
-    public static /*const*/ String sel_noteFileSystemChanged_1;
-    public static /*const*/ String sel_moveRight_1;
-    public static /*const*/ String sel_arrowPosition;
-    public static /*const*/ String sel_setMenuRepresentation_1;
-    public static /*const*/ String sel_endLoadInBackground;
-    public static /*const*/ String sel_smartInsertBeforeStringForString_1replacingRange_1;
-    public static /*const*/ String sel_openUntitledDocumentOfType_1display_1;
-    public static /*const*/ String sel_scriptingValueForSpecifier_1;
-    public static /*const*/ String sel_setShowsSuppressionButton_1;
-    public static /*const*/ String sel_resizeLeftCursor;
-    public static /*const*/ String sel_setDefaultCredential_1forProtectionSpace_1;
-    public static /*const*/ String sel_systemTabletID;
-    public static /*const*/ String sel_unlock;
-    public static /*const*/ String sel_mostCompatibleStringEncoding;
-    public static /*const*/ String sel_glyphName;
-    public static /*const*/ String sel_center;
-    public static /*const*/ String sel_setJobTitle_1;
-    public static /*const*/ String sel_cancelButtonCell;
-    public static /*const*/ String sel_namespaceForPrefix_1;
-    public static /*const*/ String sel_browserWillScroll_1;
-    public static /*const*/ String sel_initWithCompoundTypes_1;
-    public static /*const*/ String sel_setPaddingCharacter_1;
-    public static /*const*/ String sel_image_1willLoadRepresentation_1;
-    public static /*const*/ String sel_pasteRuler_1;
-    public static /*const*/ String sel_drawGlyphsForGlyphRange_1atPoint_1;
-    public static /*const*/ String sel_PMPrintSession;
-    public static /*const*/ String sel_setDefaultButtonCell_1;
-    public static /*const*/ String sel_printerTypes;
-    public static /*const*/ String sel_findString_1inBook_1;
-    public static /*const*/ String sel_executablePath;
-    public static /*const*/ String sel_components_1fromDate_1toDate_1options_1;
-    public static /*const*/ String sel_displayValuesForRow_1;
-    public static /*const*/ String sel_pageLayout;
-    public static /*const*/ String sel_resizeFlags;
-    public static /*const*/ String sel_DTDNodeWithXMLString_1;
-    public static /*const*/ String sel_replyToOpenOrPrint_1;
-    public static /*const*/ String sel_insertTab_1;
-    public static /*const*/ String sel_documents;
-    public static /*const*/ String sel_tagForSegment_1;
-    public static /*const*/ String sel_initForURL_1withContentsOfURL_1ofType_1error_1;
-    public static /*const*/ String sel_initWithRoundingMode_1scale_1raiseOnExactness_1raiseOnOverflow_1raiseOnUnderflow_1raiseOnDivideByZero_1;
-    public static /*const*/ String sel_addIndexes_1;
-    public static /*const*/ String sel_setAttributeRuns_1;
-    public static /*const*/ String sel_splitView_1additionalEffectiveRectOfDividerAtIndex_1;
-    public static /*const*/ String sel_writeSelectionToPasteboard_1type_1;
-    public static /*const*/ String sel_day;
-    public static /*const*/ String sel_numberOfRowsInTableView_1;
-    public static /*const*/ String sel_insertCompletion_1forPartialWordRange_1movement_1isFinal_1;
-    public static /*const*/ String sel_notPredicateWithSubpredicate_1;
-    public static /*const*/ String sel_rootProxyForConnectionWithRegisteredName_1host_1;
-    public static /*const*/ String sel_stopSpeakingAtBoundary_1;
-    public static /*const*/ String sel_pathsMatchingExtensions_1;
-    public static /*const*/ String sel_caseInsensitiveCompare_1;
-    public static /*const*/ String sel_labelFontOfSize_1;
-    public static /*const*/ String sel_createDirectoryAtPath_1attributes_1;
-    public static /*const*/ String sel_initListDescriptor;
-    public static /*const*/ String sel_setParagraphSpacing_1;
-    public static /*const*/ String sel_getColor_1location_1atIndex_1;
-    public static /*const*/ String sel_pointerArrayWithOptions_1;
-    public static /*const*/ String sel_guessesForWord_1;
-    public static /*const*/ String sel_searchTextRectForBounds_1;
-    public static /*const*/ String sel_allowsColumnReordering;
-    public static /*const*/ String sel_isMainThread;
-    public static /*const*/ String sel_accessibilityAttributeNames;
-    public static /*const*/ String sel_saveOptions;
-    public static /*const*/ String sel_setAutomaticallyPreparesContent_1;
-    public static /*const*/ String sel_setGridColor_1;
-    public static /*const*/ String sel_textAttributesForNegativeInfinity;
-    public static /*const*/ String sel_decimalDigitCharacterSet;
-    public static /*const*/ String sel_removeObserver_1name_1object_1;
-    public static /*const*/ String sel_columnContentWidthForColumnWidth_1;
-    public static /*const*/ String sel_wraps;
-    public static /*const*/ String sel_getIndexes_1maxCount_1inIndexRange_1;
-    public static /*const*/ String sel_doubleAction;
-    public static /*const*/ String sel_layoutParagraphAtPoint_1;
-    public static /*const*/ String sel_cacheDisplayInRect_1toBitmapImageRep_1;
-    public static /*const*/ String sel_setUsesItemFromMenu_1;
-    public static /*const*/ String sel_parserError;
-    public static /*const*/ String sel_numberOfMajorTickMarks;
-    public static /*const*/ String sel_changeFont_1;
-    public static /*const*/ String sel_displaysWhenScreenProfileChanges;
-    public static /*const*/ String sel_titleBaseWritingDirection;
-    public static /*const*/ String sel_columnAtPoint_1;
-    public static /*const*/ String sel_setAppliesImmediately_1;
-    public static /*const*/ String sel_addAccessoryController_1;
-    public static /*const*/ String sel_setEditable_1;
-    public static /*const*/ String sel_moveRulerlineFromLocation_1toLocation_1;
-    public static /*const*/ String sel_runModal;
-    public static /*const*/ String sel_selectionShouldChangeInTableView_1;
-    public static /*const*/ String sel_dragSelectionWithEvent_1offset_1slideBack_1;
-    public static /*const*/ String sel_rootProxy;
-    public static /*const*/ String sel_brightnessComponent;
-    public static /*const*/ String sel_setLabel_1forSegment_1;
-    public static /*const*/ String sel_copy;
-    public static /*const*/ String sel_helpRequested_1;
-    public static /*const*/ String sel_setThreadPriority_1;
-    public static /*const*/ String sel_minContentSize;
-    public static /*const*/ String sel_setShowsProgressPanel_1;
-    public static /*const*/ String sel_setMessageText_1;
-    public static /*const*/ String sel_setLayoutAlgorithm_1;
-    public static /*const*/ String sel_setInContext_1;
-    public static /*const*/ String sel_resultCount;
-    public static /*const*/ String sel_usesDataSource;
-    public static /*const*/ String sel_textLists;
-    public static /*const*/ String sel_setSelectedRange_1affinity_1stillSelecting_1;
-    public static /*const*/ String sel_shouldResolveExternalEntities;
-    public static /*const*/ String sel_clientView;
-    public static /*const*/ String sel_styleMask;
-    public static /*const*/ String sel_setCurrencyCode_1;
-    public static /*const*/ String sel_methodReturnType;
-    public static /*const*/ String sel_dataUsingEncoding_1;
-    public static /*const*/ String sel_removeTabStop_1;
-    public static /*const*/ String sel_reloadItem_1reloadChildren_1;
-    public static /*const*/ String sel_ancestorSharedWithView_1;
-    public static /*const*/ String sel_indexLessThanOrEqualToIndex_1;
-    public static /*const*/ String sel_removeAllActionsWithTarget_1;
-    public static /*const*/ String sel_subtype;
-    public static /*const*/ String sel_imageRectForPaper_1;
-    public static /*const*/ String sel_initWithWindow_1rect_1;
-    public static /*const*/ String sel_enable;
-    public static /*const*/ String sel_scanInteger_1;
-    public static /*const*/ String sel_initWithContentsOfURL_1encoding_1error_1;
-    public static /*const*/ String sel_removeObjectIdenticalTo_1;
-    public static /*const*/ String sel_createTexture_1fromView_1internalFormat_1;
-    public static /*const*/ String sel_decimalNumberByRaisingToPower_1withBehavior_1;
-    public static /*const*/ String sel_appendBezierPathWithArcWithCenter_1radius_1startAngle_1endAngle_1;
-    public static /*const*/ String sel_fontPanel_1;
-    public static /*const*/ String sel_predicateWithSubpredicates_1;
-    public static /*const*/ String sel_layoutGlyphsInLayoutManager_1startingAtGlyphIndex_1maxNumberOfLineFragments_1nextGlyphIndex_1;
-    public static /*const*/ String sel_attributes;
-    public static /*const*/ String sel_EPSOperationWithView_1insideRect_1toData_1;
-    public static /*const*/ String sel_listOptions;
-    public static /*const*/ String sel_windowWillLoad;
-    public static /*const*/ String sel_alwaysShowsDecimalSeparator;
-    public static /*const*/ String sel_replyToApplicationShouldTerminate_1;
-    public static /*const*/ String sel_setThousandSeparator_1;
-    public static /*const*/ String sel_insertObject_1atArrangedObjectIndexPath_1;
-    public static /*const*/ String sel_cleanUpOperation;
-    public static /*const*/ String sel_trackMouse_1inRect_1ofView_1untilMouseUp_1;
-    public static /*const*/ String sel_replaceLayoutManager_1;
-    public static /*const*/ String sel_isPartialStringValid_1proposedSelectedRange_1originalString_1originalSelectedRange_1errorDescription_1;
-    public static /*const*/ String sel_setNegativeFormat_1;
-    public static /*const*/ String sel_copyFont_1;
-    public static /*const*/ String sel_outlineView_1sortDescriptorsDidChange_1;
-    public static /*const*/ String sel_stringWithString_1;
-    public static /*const*/ String sel_valueWithUniqueID_1inPropertyWithKey_1;
-    public static /*const*/ String sel_setHighlightsBy_1;
-    public static /*const*/ String sel_setContinuousSpellCheckingEnabled_1;
-    public static /*const*/ String sel_isMouseCoalescingEnabled;
-    public static /*const*/ String sel_numberOfSelectedColumns;
-    public static /*const*/ String sel_spellServer_1findMisspelledWordInString_1language_1wordCount_1countOnly_1;
-    public static /*const*/ String sel_PMPageFormat;
-    public static /*const*/ String sel_insertText_1client_1;
-    public static /*const*/ String sel_numberWithFloat_1;
-    public static /*const*/ String sel_compositeToPoint_1fromRect_1operation_1;
-    public static /*const*/ String sel_numberOfPlanes;
-    public static /*const*/ String sel_childrenKeyPath;
-    public static /*const*/ String sel_countForObject_1;
-    public static /*const*/ String sel_fontWithName_1matrix_1;
-    public static /*const*/ String sel_toolbarAllowedItemIdentifiers_1;
-    public static /*const*/ String sel_makeDocumentWithContentsOfURL_1ofType_1;
-    public static /*const*/ String sel_initWithHTML_1options_1documentAttributes_1;
-    public static /*const*/ String sel_fileSystemRepresentation;
-    public static /*const*/ String sel_viewAnimations;
-    public static /*const*/ String sel_tabletProximity_1;
-    public static /*const*/ String sel_replacementClassForClass_1;
-    public static /*const*/ String sel_columnWidthForColumnContentWidth_1;
-    public static /*const*/ String sel_undoMenuItemTitle;
-    public static /*const*/ String sel_expressionForAggregate_1;
-    public static /*const*/ String sel_useStoredAccessor;
-    public static /*const*/ String sel_ensureAttributesAreFixedInRange_1;
-    public static /*const*/ String sel_stringForType_1;
-    public static /*const*/ String sel_setLeaf_1;
-    public static /*const*/ String sel_URLFromPasteboard_1;
-    public static /*const*/ String sel_initWithURL_1byReference_1;
-    public static /*const*/ String sel_readToEndOfFileInBackgroundAndNotify;
-    public static /*const*/ String sel_application_1openFileWithoutUI_1;
-    public static /*const*/ String sel_performClick_1;
-    public static /*const*/ String sel_completes;
-    public static /*const*/ String sel_setRulersVisible_1;
-    public static /*const*/ String sel_minimumSize;
-    public static /*const*/ String sel_setProperty_1forKey_1inRequest_1;
-    public static /*const*/ String sel_isCopyingOperation;
-    public static /*const*/ String sel_allowsTickMarkValuesOnly;
-    public static /*const*/ String sel_insertGlyphs_1length_1forStartingGlyphAtIndex_1characterIndex_1;
-    public static /*const*/ String sel_convertFont_1;
-    public static /*const*/ String sel_setNegativePrefix_1;
-    public static /*const*/ String sel_dispatch;
-    public static /*const*/ String sel_makeNewConnection_1sender_1;
-    public static /*const*/ String sel_writeToFile_1atomically_1encoding_1error_1;
-    public static /*const*/ String sel_isHiddenOrHasHiddenAncestor;
-    public static /*const*/ String sel_endEditingFor_1;
-    public static /*const*/ String sel_acceptConnectionInBackgroundAndNotify;
-    public static /*const*/ String sel_setValue_1forHTTPHeaderField_1;
-    public static /*const*/ String sel_intersectSet_1;
-    public static /*const*/ String sel_tabView_1shouldSelectTabViewItem_1;
-    public static /*const*/ String sel_mouseDragged_1;
-    public static /*const*/ String sel_dataFromRange_1documentAttributes_1error_1;
-    public static /*const*/ String sel_sharedFrameworksPath;
-    public static /*const*/ String sel_tableView_1writeRowsWithIndexes_1toPasteboard_1;
-    public static /*const*/ String sel_setWindowFrameForAttachingToRect_1onScreen_1preferredEdge_1popUpSelectedItem_1;
-    public static /*const*/ String sel_valueAtIndex_1inPropertyWithKey_1;
-    public static /*const*/ String sel_setDisplaysLinkToolTips_1;
-    public static /*const*/ String sel_removeObserver_1forKeyPath_1;
-    public static /*const*/ String sel_hasAlpha;
-    public static /*const*/ String sel_scrollCellToVisibleAtRow_1column_1;
-    public static /*const*/ String sel_activateIgnoringOtherApps_1;
-    public static /*const*/ String sel_getArgumentTypeAtIndex_1;
-    public static /*const*/ String sel_textShouldEndEditing_1;
-    public static /*const*/ String sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1;
-    public static /*const*/ String sel_timeIntervalSince1970;
-    public static /*const*/ String sel_decimalNumberBySubtracting_1;
-    public static /*const*/ String sel_sendBeforeDate_1;
-    public static /*const*/ String sel_autohidesScrollers;
-    public static /*const*/ String sel_controlPointBounds;
-    public static /*const*/ String sel_setMinimumSignificantDigits_1;
-    public static /*const*/ String sel_setDestination_1allowOverwrite_1;
-    public static /*const*/ String sel_setTransparent_1;
-    public static /*const*/ String sel_decodeArrayOfObjCType_1count_1at_1;
-    public static /*const*/ String sel_isMiniaturized;
-    public static /*const*/ String sel_setAlignment_1;
-    public static /*const*/ String sel_setCornerRadius_1;
-    public static /*const*/ String sel_foregroundColor;
-    public static /*const*/ String sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1;
-    public static /*const*/ String sel_attributedSubStringFromRange_1;
-    public static /*const*/ String sel_isSubsetOfSet_1;
-    public static /*const*/ String sel_iconForFileType_1;
-    public static /*const*/ String sel_readFromURL_1ofType_1;
-    public static /*const*/ String sel_decodeBytesForKey_1returnedLength_1;
-    public static /*const*/ String sel_parser_1foundInternalEntityDeclarationWithName_1value_1;
-    public static /*const*/ String sel_commonPrefixWithString_1options_1;
-    public static /*const*/ String sel_tableView_1setObjectValue_1forTableColumn_1row_1;
-    public static /*const*/ String sel_fileWrapperRepresentationOfType_1;
-    public static /*const*/ String sel_representedFilename;
-    public static /*const*/ String sel_eventWithCGEvent_1;
-    public static /*const*/ String sel_setFileURL_1;
-    public static /*const*/ String sel_loadWindow;
-    public static /*const*/ String sel_defaultLineJoinStyle;
-    public static /*const*/ String sel_backingLocation;
-    public static /*const*/ String sel_matrix;
-    public static /*const*/ String sel_isEqualToTimeZone_1;
-    public static /*const*/ String sel_statistics;
-    public static /*const*/ String sel_launchAppWithBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifier_1;
-    public static /*const*/ String sel_isHorizontal;
-    public static /*const*/ String sel_launchPath;
-    public static /*const*/ String sel_setTextAlignment_1;
-    public static /*const*/ String sel_initWithBitmapDataPlanes_1pixelsWide_1pixelsHigh_1bitsPerSample_1samplesPerPixel_1hasAlpha_1isPlanar_1colorSpaceName_1bytesPerRow_1bitsPerPixel_1;
-    public static /*const*/ String sel_setPatternPhase_1;
-    public static /*const*/ String sel_mouseEntered_1withFrame_1inView_1;
-    public static /*const*/ String sel_matchingFontDescriptorsWithMandatoryKeys_1;
-    public static /*const*/ String sel_objectDidEndEditing_1;
-    public static /*const*/ String sel_setMaximum_1;
-    public static /*const*/ String sel_initWithIndexes_1length_1;
-    public static /*const*/ String sel_tableView_1shouldShowCellExpansionForTableColumn_1row_1;
-    public static /*const*/ String sel_moveToPoint_1;
-    public static /*const*/ String sel_setGridStyleMask_1;
-    public static /*const*/ String sel_firstUnlaidGlyphIndex;
-    public static /*const*/ String sel_isProxy;
-    public static /*const*/ String sel_takeValue_1forKeyPath_1;
-    public static /*const*/ String sel_drawCellAtRow_1column_1;
-    public static /*const*/ String sel_setRulerViewClass_1;
-    public static /*const*/ String sel_objectByApplyingXSLT_1arguments_1error_1;
-    public static /*const*/ String sel_setArrowPosition_1;
-    public static /*const*/ String sel_setCharacterIndex_1forGlyphAtIndex_1;
-    public static /*const*/ String sel_willChangeValueForKey_1withSetMutation_1usingObjects_1;
-    public static /*const*/ String sel_setVerticalRulerView_1;
-    public static /*const*/ String sel_suspendCurrentAppleEvent;
-    public static /*const*/ String sel_drawStatusBarBackgroundInRect_1withHighlight_1;
-    public static /*const*/ String sel_performClickWithFrame_1inView_1;
-    public static /*const*/ String sel_coveredCharacterSet;
-    public static /*const*/ String sel_browser_1numberOfRowsInColumn_1;
-    public static /*const*/ String sel_isLike_1;
-    public static /*const*/ String sel_blackComponent;
-    public static /*const*/ String sel_appendBezierPathWithGlyph_1inFont_1;
-    public static /*const*/ String sel_validateMenuItem_1;
-    public static /*const*/ String sel_isEqualToIndexSet_1;
-    public static /*const*/ String sel_setBezelStyle_1;
-    public static /*const*/ String sel_scaleUnitSquareToSize_1;
-    public static /*const*/ String sel_setStartSubelementIndex_1;
-    public static /*const*/ String sel_frameOfInsideOfColumn_1;
-    public static /*const*/ String sel_setBlocksOtherRecognizers_1;
-    public static /*const*/ String sel_setMinSize_1;
-    public static /*const*/ String sel_setEndSubelementIndex_1;
-    public static /*const*/ String sel_cStringLength;
-    public static /*const*/ String sel_writeWithBackupToFile_1ofType_1saveOperation_1;
-    public static /*const*/ String sel_setDefaultButtonTitle_1;
-    public static /*const*/ String sel_setMinContentSize_1;
-    public static /*const*/ String sel_setFormattingDictionary_1;
-    public static /*const*/ String sel_boundingRectForFont;
-    public static /*const*/ String sel_postsBoundsChangedNotifications;
-    public static /*const*/ String sel_setParagraphs_1;
-    public static /*const*/ String sel_setShowsControlCharacters_1;
-    public static /*const*/ String sel_writeSafelyToURL_1ofType_1forSaveOperation_1error_1;
-    public static /*const*/ String sel_controlLightHighlightColor;
-    public static /*const*/ String sel_objectSpecifier;
-    public static /*const*/ String sel_dictionaryWithContentsOfURL_1;
-    public static /*const*/ String sel_performSelector_1onThread_1withObject_1waitUntilDone_1modes_1;
-    public static /*const*/ String sel_setJobStyleHint_1;
-    public static /*const*/ String sel_sortedArrayUsingFunction_1context_1;
-    public static /*const*/ String sel_setBoundsRect_1forTextBlock_1glyphRange_1;
-    public static /*const*/ String sel_hasShadow;
-    public static /*const*/ String sel_windowShouldClose_1;
-    public static /*const*/ String sel_defaultTokenizingCharacterSet;
-    public static /*const*/ String sel_isRulerVisible;
-    public static /*const*/ String sel_setSubrowsKeyPath_1;
-    public static /*const*/ String sel_animationDelay;
-    public static /*const*/ String sel_selectAll_1;
-    public static /*const*/ String sel_parser_1foundNotationDeclarationWithName_1publicID_1systemID_1;
-    public static /*const*/ String sel_readSelectionFromPasteboard_1;
-    public static /*const*/ String sel_validateAndReturnError_1;
-    public static /*const*/ String sel_setScriptErrorOffendingObjectDescriptor_1;
-    public static /*const*/ String sel_makeKeyWindow;
-    public static /*const*/ String sel_itemAtIndex_1;
-    public static /*const*/ String sel_objectAtIndex_1;
-    public static /*const*/ String sel_protectionSpace;
-    public static /*const*/ String sel_getCString_1;
-    public static /*const*/ String sel_initSymbolicLinkWithDestination_1;
-    public static /*const*/ String sel_daylightSavingTimeOffset;
-    public static /*const*/ String sel_rangeOfTextList_1atIndex_1;
-    public static /*const*/ String sel_currentDirectory;
-    public static /*const*/ String sel_windowControllerDidLoadNib_1;
-    public static /*const*/ String sel_setGroupingSize_1;
-    public static /*const*/ String sel_subitems;
-    public static /*const*/ String sel_initWithFileWrapper_1;
-    public static /*const*/ String sel_documentVisibleRect;
-    public static /*const*/ String sel_setCount_1;
-    public static /*const*/ String sel_setScriptErrorExpectedTypeDescriptor_1;
-    public static /*const*/ String sel_setReleasedWhenClosed_1;
-    public static /*const*/ String sel_imageUnfilteredTypes;
-    public static /*const*/ String sel_writeToFile_1options_1error_1;
-    public static /*const*/ String sel_controlContentFontOfSize_1;
-    public static /*const*/ String sel_insertRow_1withCells_1;
-    public static /*const*/ String sel_temporaryAttributesAtCharacterIndex_1effectiveRange_1;
-    public static /*const*/ String sel_stepForward_1;
-    public static /*const*/ String sel_convertScreenToBase_1;
-    public static /*const*/ String sel_printerWithType_1;
-    public static /*const*/ String sel_setSliderType_1;
-    public static /*const*/ String sel_applicationShouldHandleReopen_1hasVisibleWindows_1;
-    public static /*const*/ String sel_selectedTextAttributes;
-    public static /*const*/ String sel_setStandardError_1;
-    public static /*const*/ String sel_drawRect_1;
-    public static /*const*/ String sel_URLs;
-    public static /*const*/ String sel_animationForKey_1;
-    public static /*const*/ String sel_setSubviews_1;
-    public static /*const*/ String sel_setString_1;
-    public static /*const*/ String sel_openFile_1fromImage_1at_1inView_1;
-    public static /*const*/ String sel_draggedImage;
-    public static /*const*/ String sel_numberOfGlyphs;
-    public static /*const*/ String sel_itemAtRow_1;
-    public static /*const*/ String sel_drawKnob;
-    public static /*const*/ String sel_imageRepsWithData_1;
-    public static /*const*/ String sel_dragOperationForDraggingInfo_1type_1;
-    public static /*const*/ String sel_initWithRTF_1documentAttributes_1;
-    public static /*const*/ String sel_pathsForResourcesOfType_1inDirectory_1;
-    public static /*const*/ String sel_fontName;
-    public static /*const*/ String sel_layoutManagers;
-    public static /*const*/ String sel_error;
-    public static /*const*/ String sel_parentWindow;
-    public static /*const*/ String sel_registerClass_1;
-    public static /*const*/ String sel_hideOtherApplications;
-    public static /*const*/ String sel_alphaComponent;
-    public static /*const*/ String sel_setPrefersColorMatch_1;
-    public static /*const*/ String sel_stopAnimation_1;
-    public static /*const*/ String sel_glyphIndexForCharacterAtIndex_1;
-    public static /*const*/ String sel_rulerView_1shouldAddMarker_1;
-    public static /*const*/ String sel_initWithFrame_1;
-    public static /*const*/ String sel_init;
-    public static /*const*/ String sel_selectedColumnEnumerator;
-    public static /*const*/ String sel_viewWithTag_1;
-    public static /*const*/ String sel_classForKeyedUnarchiver;
-    public static /*const*/ String sel_addRow_1;
-    public static /*const*/ String sel_contextHelpForObject_1;
-    public static /*const*/ String sel_server;
-    public static /*const*/ String sel_colorUsingColorSpaceName_1device_1;
-    public static /*const*/ String sel_valueTransformerForName_1;
-    public static /*const*/ String sel_soundUnfilteredFileTypes;
-    public static /*const*/ String sel_setSelectedTextAttributes_1;
-    public static /*const*/ String sel_setLeadingOffset_1;
-    public static /*const*/ String sel_scrollToPoint_1;
-    public static /*const*/ String sel_lastPathComponent;
-    public static /*const*/ String sel_lossyCString;
-    public static /*const*/ String sel_registerServicesMenuSendTypes_1returnTypes_1;
-    public static /*const*/ String sel_keyDown_1;
-    public static /*const*/ String sel_setWidthTracksTextView_1;
-    public static /*const*/ String sel_incrementBy_1;
-    public static /*const*/ String sel_moveWordForward_1;
-    public static /*const*/ String sel_dataWithContentsOfMappedFile_1;
-    public static /*const*/ String sel_socket;
-    public static /*const*/ String sel_EPSOperationWithView_1insideRect_1toData_1printInfo_1;
-    public static /*const*/ String sel_width;
-    public static /*const*/ String sel_capabilityMask;
-    public static /*const*/ String sel_setBezeled_1;
-    public static /*const*/ String sel_currentMode;
-    public static /*const*/ String sel_sliderType;
-    public static /*const*/ String sel_fileIsAppendOnly;
-    public static /*const*/ String sel_isAutomaticLinkDetectionEnabled;
-    public static /*const*/ String sel_setBoundsOrigin_1;
-    public static /*const*/ String sel_selectionHighlightStyle;
-    public static /*const*/ String sel_registerName_1;
-    public static /*const*/ String sel_moveWordRightAndModifySelection_1;
-    public static /*const*/ String sel_setCharacters_1;
-    public static /*const*/ String sel_setWordFieldStringValue_1;
-    public static /*const*/ String sel_reverseObjectEnumerator;
-    public static /*const*/ String sel_encodeByrefObject_1;
-    public static /*const*/ String sel_defaultDecimalNumberHandler;
-    public static /*const*/ String sel_isEntryAcceptable_1;
-    public static /*const*/ String sel_orderWindow_1relativeTo_1;
-    public static /*const*/ String sel_writablePasteboardTypes;
-    public static /*const*/ String sel_addTrackingRect_1owner_1userData_1assumeInside_1;
-    public static /*const*/ String sel_setPathComponentCells_1;
-    public static /*const*/ String sel_timeZoneWithName_1;
-    public static /*const*/ String sel_setAutosaveTableColumns_1;
-    public static /*const*/ String sel_orPredicateWithSubpredicates_1;
-    public static /*const*/ String sel_isEqualToDictionary_1;
-    public static /*const*/ String sel_bottomMargin;
-    public static /*const*/ String sel_initWithYear_1month_1day_1hour_1minute_1second_1timeZone_1;
-    public static /*const*/ String sel_scrollColumnsLeftBy_1;
-    public static /*const*/ String sel_initWithContentsOfURL_1error_1;
-    public static /*const*/ String sel_setTabViewType_1;
-    public static /*const*/ String sel_initWithFloat_1;
-    public static /*const*/ String sel_attributedStringForObjectValue_1withDefaultAttributes_1;
-    public static /*const*/ String sel_sharedGlyphGenerator;
-    public static /*const*/ String sel_maximumRangeOfUnit_1;
-    public static /*const*/ String sel_docFormatFromRange_1documentAttributes_1;
-    public static /*const*/ String sel_initWithBitmapImageRep_1;
-    public static /*const*/ String sel_mnemonic;
-    public static /*const*/ String sel_prefersColorMatch;
-    public static /*const*/ String sel_fileSystemAttributesAtPath_1;
-    public static /*const*/ String sel_rotateByRadians_1;
-    public static /*const*/ String sel_createConversationForConnection_1;
-    public static /*const*/ String sel_setWindow_1;
-    public static /*const*/ String sel_addFontDescriptors_1toCollection_1;
-    public static /*const*/ String sel_setMark_1;
-    public static /*const*/ String sel_terminate;
-    public static /*const*/ String sel_setTickMarkPosition_1;
-    public static /*const*/ String sel_setIgnoresMouseEvents_1;
-    public static /*const*/ String sel_pointerArrayWithStrongObjects;
-    public static /*const*/ String sel_intersectsHashTable_1;
-    public static /*const*/ String sel_initWithTransform_1;
-    public static /*const*/ String sel_deviceRGBColorSpace;
-    public static /*const*/ String sel_currentDiskUsage;
-    public static /*const*/ String sel_writeToFile_1ofType_1;
-    public static /*const*/ String sel_unionSet_1;
-    public static /*const*/ String sel_bitmapFormat;
-    public static /*const*/ String sel_moveItemAtPath_1toPath_1error_1;
-    public static /*const*/ String sel_tableView;
-    public static /*const*/ String sel_performSelectorOnMainThread_1withObject_1waitUntilDone_1modes_1;
-    public static /*const*/ String sel_initAndTestWithTests_1;
-    public static /*const*/ String sel_setVerticalMotionCanBeginDrag_1;
-    public static /*const*/ String sel_documentClassNames;
-    public static /*const*/ String sel_setShadow_1;
-    public static /*const*/ String sel_beginLineWithGlyphAtIndex_1;
-    public static /*const*/ String sel_predicateWithSubstitutionVariables_1;
-    public static /*const*/ String sel_EPSOperationWithView_1insideRect_1toPath_1printInfo_1;
-    public static /*const*/ String sel_startSubelementIndex;
-    public static /*const*/ String sel_sleepUntilDate_1;
-    public static /*const*/ String sel_menuForEvent_1;
-    public static /*const*/ String sel_disabledControlTextColor;
-    public static /*const*/ String sel_addRegularFileWithContents_1preferredFilename_1;
-    public static /*const*/ String sel_setTakesTitleFromPreviousColumn_1;
-    public static /*const*/ String sel_removeSelectionIndexes_1;
-    public static /*const*/ String sel_resizedColumn;
-    public static /*const*/ String sel_host;
-    public static /*const*/ String sel_setDefaultAttachmentScaling_1;
-    public static /*const*/ String sel_boundingRectWithSize_1options_1;
-    public static /*const*/ String sel_magentaColor;
-    public static /*const*/ String sel_performDefaultImplementation;
-    public static /*const*/ String sel_getPeriodicDelay_1interval_1;
-    public static /*const*/ String sel_RTFFromRange_1;
-    public static /*const*/ String sel_setStringValue_1;
-    public static /*const*/ String sel_setPaletteLabel_1;
-    public static /*const*/ String sel_years_1months_1days_1hours_1minutes_1seconds_1sinceDate_1;
-    public static /*const*/ String sel_initWithFormat_1arguments_1;
-    public static /*const*/ String sel_firstUnlaidCharacterIndex;
-    public static /*const*/ String sel_panelSelectionDidChange_1;
-    public static /*const*/ String sel_typesFilterableTo_1;
-    public static /*const*/ String sel_selectPreviousTabViewItem_1;
-    public static /*const*/ String sel_URLProtocol_1didReceiveResponse_1cacheStoragePolicy_1;
-    public static /*const*/ String sel_loadView;
-    public static /*const*/ String sel_setPositiveSuffix_1;
-    public static /*const*/ String sel_setSizeMode_1;
-    public static /*const*/ String sel_addValue_1forHTTPHeaderField_1;
-    public static /*const*/ String sel_replacementObjectForPortCoder_1;
-    public static /*const*/ String sel_cycleToNextInputLanguage_1;
-    public static /*const*/ String sel_setContentMinSize_1;
-    public static /*const*/ String sel_convertWeight_1ofFont_1;
-    public static /*const*/ String sel_code;
-    public static /*const*/ String sel_TIFFRepresentationUsingCompression_1factor_1;
-    public static /*const*/ String sel_setSelector_1;
-    public static /*const*/ String sel_URLHandleResourceDidCancelLoading_1;
-    public static /*const*/ String sel_setTag_1forSegment_1;
-    public static /*const*/ String sel_viewFrameChanged_1;
-    public static /*const*/ String sel_attachmentCell;
-    public static /*const*/ String sel_removeStatusItem_1;
-    public static /*const*/ String sel_pathForAuxiliaryExecutable_1;
-    public static /*const*/ String sel_fileURL;
-    public static /*const*/ String sel_drawerShouldOpen_1;
-    public static /*const*/ String sel_initForWritingWithMutableData_1;
-    public static /*const*/ String sel_content;
-    public static /*const*/ String sel_addSubview_1;
-    public static /*const*/ String sel_stringByReplacingOccurrencesOfString_1withString_1;
-    public static /*const*/ String sel_stringWithFileSystemRepresentation_1length_1;
-    public static /*const*/ String sel_isVerticallyCentered;
-    public static /*const*/ String sel_setVerticallyCentered_1;
-    public static /*const*/ String sel_selectPrevious_1;
-    public static /*const*/ String sel_addTemporaryAttributes_1forCharacterRange_1;
-    public static /*const*/ String sel_tabState;
-    public static /*const*/ String sel_defaultQueue;
-    public static /*const*/ String sel_showsControlCharacters;
-    public static /*const*/ String sel_indexOfObject_1;
-    public static /*const*/ String sel_shadow;
-    public static /*const*/ String sel_fontMenu_1;
-    public static /*const*/ String sel_movePath_1toPath_1handler_1;
-    public static /*const*/ String sel_setDictionary_1;
-    public static /*const*/ String sel_verticalLineScroll;
-    public static /*const*/ String sel_showsAlpha;
-    public static /*const*/ String sel_removeObserver_1;
-    public static /*const*/ String sel_isFieldEditor;
-    public static /*const*/ String sel_fileHandleForWriting;
-    public static /*const*/ String sel_contentsAtPath_1;
-    public static /*const*/ String sel_writeProperty_1forKey_1;
-    public static /*const*/ String sel_drawWithRect_1options_1attributes_1;
-    public static /*const*/ String sel_initWithName_1;
-    public static /*const*/ String sel_getFileSystemInfoForPath_1isRemovable_1isWritable_1isUnmountable_1description_1type_1;
-    public static /*const*/ String sel_setOpenGLContext_1;
-    public static /*const*/ String sel_hasSubmenu;
-    public static /*const*/ String sel_rangeOfTextTable_1atIndex_1;
-    public static /*const*/ String sel_connection_1willCacheResponse_1;
-    public static /*const*/ String sel_automaticallyRearrangesObjects;
-    public static /*const*/ String sel_registerCommandDescription_1;
-    public static /*const*/ String sel_indexOfSelectedItem;
-    public static /*const*/ String sel_underline_1;
-    public static /*const*/ String sel_beginModalSessionForWindow_1relativeToWindow_1;
-    public static /*const*/ String sel_initWithData_1options_1documentAttributes_1error_1;
-    public static /*const*/ String sel_revert_1;
-    public static /*const*/ String sel_displayableSubpredicatesOfPredicate_1;
-    public static /*const*/ String sel_dataWithData_1;
-    public static /*const*/ String sel_scaleXBy_1yBy_1;
-    public static /*const*/ String sel_decodeBoolForKey_1;
-    public static /*const*/ String sel_itemTitles;
-    public static /*const*/ String sel_removeFontDescriptor_1fromCollection_1;
-    public static /*const*/ String sel_isContinuousSpellCheckingEnabled;
-    public static /*const*/ String sel_paragraphSpacingBeforeGlyphAtIndex_1withProposedLineFragmentRect_1;
-    public static /*const*/ String sel_ignoreSpelling_1;
-    public static /*const*/ String sel_crosshairCursor;
-    public static /*const*/ String sel_setSelected_1;
-    public static /*const*/ String sel_RTFDFromRange_1;
-    public static /*const*/ String sel_setCanSelectHiddenExtension_1;
-    public static /*const*/ String sel_setNestingMode_1;
-    public static /*const*/ String sel_addItemsWithObjectValues_1;
-    public static /*const*/ String sel_setContentFilters_1;
-    public static /*const*/ String sel_setAutorepeat_1;
-    public static /*const*/ String sel_resizeWithOldSuperviewSize_1;
-    public static /*const*/ String sel_areCursorRectsEnabled;
-    public static /*const*/ String sel_browser_1selectCellWithString_1inColumn_1;
-    public static /*const*/ String sel_setLastColumn_1;
-    public static /*const*/ String sel_isContextHelpModeActive;
-    public static /*const*/ String sel_setTitleColor_1;
-    public static /*const*/ String sel_initWithBytes_1length_1;
-    public static /*const*/ String sel_animation_1valueForProgress_1;
-    public static /*const*/ String sel_fillColor;
-    public static /*const*/ String sel_completionsForPartialWordRange_1inString_1language_1inSpellDocumentWithTag_1;
-    public static /*const*/ String sel_typeForContentsOfURL_1error_1;
-    public static /*const*/ String sel_setShowPanels_1;
-    public static /*const*/ String sel_outlineView_1dataCellForTableColumn_1item_1;
-    public static /*const*/ String sel_setLineJoinStyle_1;
-    public static /*const*/ String sel_cancelPerformSelectorsWithTarget_1;
-    public static /*const*/ String sel_nextDaylightSavingTimeTransition;
-    public static /*const*/ String sel_setEndSubelementIdentifier_1;
-    public static /*const*/ String sel_channelMapping;
-    public static /*const*/ String sel_setTitle_1ofColumn_1;
-    public static /*const*/ String sel_setHeaderToolTip_1;
-    public static /*const*/ String sel_initWithChar_1;
-    public static /*const*/ String sel_shouldReportNamespacePrefixes;
-    public static /*const*/ String sel_decomposedStringWithCompatibilityMapping;
-    public static /*const*/ String sel_undoActionName;
-    public static /*const*/ String sel_attachColorList_1;
-    public static /*const*/ String sel_cancelPreviousPerformRequestsWithTarget_1;
-    public static /*const*/ String sel_addToolTipRect_1owner_1userData_1;
-    public static /*const*/ String sel_isOptionalArgumentWithName_1;
-    public static /*const*/ String sel_fileHandleForReading;
-    public static /*const*/ String sel_removeConnection_1fromRunLoop_1forMode_1;
-    public static /*const*/ String sel_controlTextDidBeginEditing_1;
-    public static /*const*/ String sel_closePath;
-    public static /*const*/ String sel_isPlaying;
-    public static /*const*/ String sel_matrixClass;
-    public static /*const*/ String sel_doCommandBySelector_1client_1;
-    public static /*const*/ String sel_appendBytes_1length_1;
-    public static /*const*/ String sel_lightGrayColor;
-    public static /*const*/ String sel_menuRepresentation;
-    public static /*const*/ String sel_dateWithString_1calendarFormat_1;
-    public static /*const*/ String sel_decodeClassName_1asClassName_1;
-    public static /*const*/ String sel_deleteToBeginningOfParagraph_1;
-    public static /*const*/ String sel_runModalForDirectory_1file_1;
-    public static /*const*/ String sel_inverseForRelationshipKey_1;
-    public static /*const*/ String sel_cancelLoadInBackground;
-    public static /*const*/ String sel_setLeftMargin_1;
-    public static /*const*/ String sel_tabStopType;
-    public static /*const*/ String sel_replaceCharactersInRange_1withRTF_1;
-    public static /*const*/ String sel_drawInRect_1fromRect_1operation_1fraction_1;
-    public static /*const*/ String sel_sound;
-    public static /*const*/ String sel_localizedRecoverySuggestion;
-    public static /*const*/ String sel_getInputStream_1outputStream_1;
-    public static /*const*/ String sel_defaultType;
-    public static /*const*/ String sel_sharedFontPanel;
-    public static /*const*/ String sel_fixParagraphStyleAttributeInRange_1;
-    public static /*const*/ String sel_textColor;
-    public static /*const*/ String sel_noteFileSystemChanged;
-    public static /*const*/ String sel_setObject_1forKey_1;
-    public static /*const*/ String sel_drawAtPoint_1;
-    public static /*const*/ String sel_tableView_1shouldSelectTableColumn_1;
-    public static /*const*/ String sel_deleteWordBackward_1;
-    public static /*const*/ String sel_pipe;
-    public static /*const*/ String sel_resetStandardUserDefaults;
-    public static /*const*/ String sel_orderFrontSpacingPanel_1;
-    public static /*const*/ String sel_setUsesFontPanel_1;
-    public static /*const*/ String sel_saveToURL_1ofType_1forSaveOperation_1delegate_1didSaveSelector_1contextInfo_1;
-    public static /*const*/ String sel_linkPath_1toPath_1handler_1;
-    public static /*const*/ String sel_addTimeInterval_1;
-    public static /*const*/ String sel_formattingDictionary;
-    public static /*const*/ String sel_ignoresMultiClick;
-    public static /*const*/ String sel_encodeValuesOfObjCTypes_1;
-    public static /*const*/ String sel_indexAtPosition_1;
-    public static /*const*/ String sel_autoresizesSubviews;
-    public static /*const*/ String sel_takesTitleFromPreviousColumn;
-    public static /*const*/ String sel_titlePosition;
-    public static /*const*/ String sel_currentAppleEvent;
-    public static /*const*/ String sel_valueForDimension_1;
-    public static /*const*/ String sel_printDocumentWithSettings_1showPrintPanel_1delegate_1didPrintSelector_1contextInfo_1;
-    public static /*const*/ String sel_isZoomable;
-    public static /*const*/ String sel_setNeedsDisplay;
-    public static /*const*/ String sel_initWithColors_1;
-    public static /*const*/ String sel_isSubclassOfClass_1;
-    public static /*const*/ String sel_adobeRGB1998ColorSpace;
-    public static /*const*/ String sel_textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1;
-    public static /*const*/ String sel_useAllLigatures_1;
-    public static /*const*/ String sel_setFrameUsingName_1force_1;
-    public static /*const*/ String sel_percentSymbol;
-    public static /*const*/ String sel_addRepresentations_1;
-    public static /*const*/ String sel_writeEPSInsideRect_1toPasteboard_1;
-    public static /*const*/ String sel_systemFontSize;
-    public static /*const*/ String sel_canRemoveAllRows;
-    public static /*const*/ String sel_endLineWithGlyphRange_1;
-    public static /*const*/ String sel_maxItemSize;
-    public static /*const*/ String sel_setImageScaling_1forSegment_1;
-    public static /*const*/ String sel_reloadDefaultFontFamilies;
-    public static /*const*/ String sel_removeRow_1;
-    public static /*const*/ String sel_contentSize;
-    public static /*const*/ String sel_setValueTransformer_1forName_1;
-    public static /*const*/ String sel_defaultCStringEncoding;
-    public static /*const*/ String sel_setMaxNumberOfRows_1;
-    public static /*const*/ String sel_continueWithoutCredentialForAuthenticationChallenge_1;
-    public static /*const*/ String sel_encodeArrayOfObjCType_1count_1at_1;
-    public static /*const*/ String sel_tabStops;
-    public static /*const*/ String sel_altIncrementValue;
-    public static /*const*/ String sel_removeAttribute_1range_1;
-    public static /*const*/ String sel_rightExpressionAttributeType;
-    public static /*const*/ String sel_setAutoresizesAllColumnsToFit_1;
-    public static /*const*/ String sel_removeAllToolTips;
-    public static /*const*/ String sel_setNotANumberSymbol_1;
-    public static /*const*/ String sel_setMinWidth_1;
-    public static /*const*/ String sel_setDefaultTimeZone_1;
-    public static /*const*/ String sel_setTabStops_1;
-    public static /*const*/ String sel_textView_1draggedCell_1inRect_1event_1;
-    public static /*const*/ String sel_PDFOperationWithView_1insideRect_1toData_1;
-    public static /*const*/ String sel_outlineView_1selectionIndexesForProposedSelection_1;
-    public static /*const*/ String sel_initWithContentsOfURL_1;
-    public static /*const*/ String sel_setBidiProcessingEnabled_1;
-    public static /*const*/ String sel_selectToMark_1;
-    public static /*const*/ String sel_newlineCharacterSet;
-    public static /*const*/ String sel_accessibilitySetOverrideValue_1forAttribute_1;
-    public static /*const*/ String sel_setPostsFrameChangedNotifications_1;
-    public static /*const*/ String sel_cellPrototype;
-    public static /*const*/ String sel_unmarkText;
-    public static /*const*/ String sel_displayValuesKeyPath;
-    public static /*const*/ String sel_orderFrontStylesPanel_1;
-    public static /*const*/ String sel_getBuffer_1length_1;
-    public static /*const*/ String sel_calcDrawInfo_1;
-    public static /*const*/ String sel_initWithUTF8String_1;
-    public static /*const*/ String sel_deselectAllCells;
-    public static /*const*/ String sel_checkGrammarOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1details_1;
-    public static /*const*/ String sel_poolCountHighWaterResolution;
-    public static /*const*/ String sel_canInitWithData_1;
-    public static /*const*/ String sel_setHasVerticalScroller_1;
-    public static /*const*/ String sel_flushHostCache;
-    public static /*const*/ String sel_toolbarDefaultItemIdentifiers_1;
-    public static /*const*/ String sel_setSearchButtonCell_1;
-    public static /*const*/ String sel_defaultButtonCell;
-    public static /*const*/ String sel_sizeLastColumnToFit;
-    public static /*const*/ String sel_addColumn;
-    public static /*const*/ String sel_failureResponse;
-    public static /*const*/ String sel_insertTabIgnoringFieldEditor_1;
-    public static /*const*/ String sel_locationForGlyphAtIndex_1;
-    public static /*const*/ String sel_insertContainerBreak_1;
-    public static /*const*/ String sel_setAutosizesCells_1;
-    public static /*const*/ String sel_isEditable;
-    public static /*const*/ String sel_path;
-    public static /*const*/ String sel_setStringValue_1resolvingEntities_1;
-    public static /*const*/ String sel_readFileContentsType_1toFile_1;
-    public static /*const*/ String sel_fileExtensionHidden;
-    public static /*const*/ String sel_setTextureImageToPixelBuffer_1colorBuffer_1;
-    public static /*const*/ String sel_setFilename_1;
-    public static /*const*/ String sel_callStackReturnAddresses;
-    public static /*const*/ String sel_blocksOtherRecognizers;
-    public static /*const*/ String sel_pixelBuffer;
-    public static /*const*/ String sel_initWithStartingColor_1endingColor_1;
-    public static /*const*/ String sel_indexOfObjectIdenticalTo_1inRange_1;
-    public static /*const*/ String sel_duration;
-    public static /*const*/ String sel_matchForPredicate_1;
-    public static /*const*/ String sel_windowDidMiniaturize_1;
-    public static /*const*/ String sel_drawWithFrame_1inView_1characterIndex_1layoutManager_1;
-    public static /*const*/ String sel_setTwoDigitStartDate_1;
-    public static /*const*/ String sel_selectTextAtRow_1column_1;
-    public static /*const*/ String sel_splitView_1shouldHideDividerAtIndex_1;
-    public static /*const*/ String sel_isExcludedFromWindowsMenu;
-    public static /*const*/ String sel_earlierDate_1;
-    public static /*const*/ String sel_initWithLeftExpressions_1rightExpressionAttributeType_1modifier_1operators_1options_1;
-    public static /*const*/ String sel_minItemSize;
-    public static /*const*/ String sel_setSearchMenuTemplate_1;
-    public static /*const*/ String sel_rightMouseUp_1;
-    public static /*const*/ String sel_stopSpeaking_1;
-    public static /*const*/ String sel_getObjectValue_1forString_1errorDescription_1;
-    public static /*const*/ String sel_unarchiver_1didDecodeObject_1;
-    public static /*const*/ String sel_endSpecifier;
-    public static /*const*/ String sel_ascending;
-    public static /*const*/ String sel_sharedCoercionHandler;
-    public static /*const*/ String sel_textAttributesForPositiveInfinity;
-    public static /*const*/ String sel_isEqualToData_1;
-    public static /*const*/ String sel_setHighlightMode_1;
-    public static /*const*/ String sel_valueWithNonretainedObject_1;
-    public static /*const*/ String sel_textAttributesForNotANumber;
-    public static /*const*/ String sel_getCFRunLoop;
-    public static /*const*/ String sel_invalidateGlyphsForCharacterRange_1changeInLength_1actualCharacterRange_1;
-    public static /*const*/ String sel_cachedResponse;
-    public static /*const*/ String sel_containerIsRangeContainerObject;
-    public static /*const*/ String sel_setLanguage_1;
-    public static /*const*/ String sel_loadNibFile_1externalNameTable_1withZone_1;
-    public static /*const*/ String sel_offsetInFile;
-    public static /*const*/ String sel_initWithRulerView_1markerLocation_1image_1imageOrigin_1;
-    public static /*const*/ String sel_commandDescriptionWithAppleEventClass_1andAppleEventCode_1;
-    public static /*const*/ String sel_detachDrawingThread_1toTarget_1withObject_1;
-    public static /*const*/ String sel_outlineView_1shouldShowCellExpansionForTableColumn_1item_1;
-    public static /*const*/ String sel_catalogNameComponent;
-    public static /*const*/ String sel_monthSymbols;
-    public static /*const*/ String sel_invalidateShadow;
-    public static /*const*/ String sel_waitUntilDate_1;
-    public static /*const*/ String sel_languageLevel;
-    public static /*const*/ String sel_XMLData;
-    public static /*const*/ String sel_textView_1shouldChangeTextInRanges_1replacementStrings_1;
-    public static /*const*/ String sel_initWithPointerFunctions_1;
-    public static /*const*/ String sel_initWithTextureTarget_1textureInternalFormat_1textureMaxMipMapLevel_1pixelsWide_1pixelsHigh_1;
-    public static /*const*/ String sel_classForClassName_1;
-    public static /*const*/ String sel_decodeInt64ForKey_1;
-    public static /*const*/ String sel_stringWithSavedFrame;
-    public static /*const*/ String sel_writeRTFDToFile_1atomically_1;
-    public static /*const*/ String sel_initWithLocal_1connection_1;
-    public static /*const*/ String sel_sendBeforeDate_1msgid_1components_1from_1reserved_1;
-    public static /*const*/ String sel_playsEveryFrame;
-    public static /*const*/ String sel_prependTransform_1;
-    public static /*const*/ String sel_setUsesWeakReadAndWriteBarriers_1;
-    public static /*const*/ String sel_isContinuous;
-    public static /*const*/ String sel_andPredicateWithSubpredicates_1;
-    public static /*const*/ String sel_cookieWithProperties_1;
-    public static /*const*/ String sel_builtInPlugInsPath;
-    public static /*const*/ String sel_performSelector_1onThread_1withObject_1waitUntilDone_1;
-    public static /*const*/ String sel_sharedDocumentController;
-    public static /*const*/ String sel_setNeedsSizing_1;
-    public static /*const*/ String sel_selectorForCommand_1;
-    public static /*const*/ String sel_displayIfNeededInRectIgnoringOpacity_1;
-    public static /*const*/ String sel_draggingPasteboard;
-    public static /*const*/ String sel_unscriptRange_1;
-    public static /*const*/ String sel_launchApplication_1;
-    public static /*const*/ String sel_inputClientBecomeActive_1;
-    public static /*const*/ String sel_getFirstUnlaidCharacterIndex_1glyphIndex_1;
-    public static /*const*/ String sel_initWithContentsOfURL_1options_1error_1;
-    public static /*const*/ String sel_createSymbolicLinkAtPath_1withDestinationPath_1error_1;
-    public static /*const*/ String sel_accessibilityAttributeValue_1forParameter_1;
-    public static /*const*/ String sel_setPlaceholderAttributedString_1;
-    public static /*const*/ String sel_initWithIndex_1;
-    public static /*const*/ String sel_readFromURL_1ofType_1error_1;
-    public static /*const*/ String sel_preferredFilename;
-    public static /*const*/ String sel_smartInsertDeleteEnabled;
-    public static /*const*/ String sel_horizontalLineScroll;
-    public static /*const*/ String sel_doDoubleClick_1;
-    public static /*const*/ String sel_fontDescriptorWithFace_1;
-    public static /*const*/ String sel_pointerArrayWithPointerFunctions_1;
-    public static /*const*/ String sel_defaultDate;
-    public static /*const*/ String sel_typesetterBehavior;
-    public static /*const*/ String sel_setAllowsNonContiguousLayout_1;
-    public static /*const*/ String sel_control_1didFailToFormatString_1errorDescription_1;
-    public static /*const*/ String sel_isBaseFont;
-    public static /*const*/ String sel_removeDescriptorWithKeyword_1;
-    public static /*const*/ String sel_substringFromIndex_1;
-    public static /*const*/ String sel_componentsFromLocaleIdentifier_1;
-    public static /*const*/ String sel_setUsesFeedbackWindow_1;
-    public static /*const*/ String sel_setAnimates_1;
-    public static /*const*/ String sel_initWithDomain_1code_1userInfo_1;
-    public static /*const*/ String sel_setContentView_1;
-    public static /*const*/ String sel_allowedFileTypes;
-    public static /*const*/ String sel_leftExpressions;
-    public static /*const*/ String sel_isStandalone;
-    public static /*const*/ String sel_floatForKey_1inTable_1;
-    public static /*const*/ String sel_notANumber;
-    public static /*const*/ String sel_updateFromPMPrintSettings;
-    public static /*const*/ String sel_wantsToTrackMouse;
-    public static /*const*/ String sel_initWithName_1reason_1userInfo_1;
-    public static /*const*/ String sel_prepareOpenGL;
-    public static /*const*/ String sel_setAttributedStringForNil_1;
-    public static /*const*/ String sel_sizeToFit;
-    public static /*const*/ String sel_setSortDescriptorPrototype_1;
-    public static /*const*/ String sel_canHide;
-    public static /*const*/ String sel_replacementObjectForArchiver_1;
-    public static /*const*/ String sel_purpleColor;
-    public static /*const*/ String sel_setProperty_1forKey_1;
-    public static /*const*/ String sel_separatorItem;
-    public static /*const*/ String sel_loadedCellAtRow_1column_1;
-    public static /*const*/ String sel_containerSpecifier;
-    public static /*const*/ String sel_draggingSourceOperationMaskForLocal_1;
-    public static /*const*/ String sel_willPresentError_1;
-    public static /*const*/ String sel_strikethroughGlyphRange_1strikethroughType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1;
-    public static /*const*/ String sel_elementWithName_1stringValue_1;
-    public static /*const*/ String sel_unsignedCharValue;
-    public static /*const*/ String sel_rangeOfComposedCharacterSequencesForRange_1;
-    public static /*const*/ String sel_activate_1;
-    public static /*const*/ String sel_controlView;
-    public static /*const*/ String sel_cachePolicy;
-    public static /*const*/ String sel_fontAttributesInRange_1;
-    public static /*const*/ String sel_setPreservesSelection_1;
-    public static /*const*/ String sel_unscript_1;
-    public static /*const*/ String sel_deltaZ;
-    public static /*const*/ String sel_connection_1handleRequest_1;
-    public static /*const*/ String sel_caseSensitive;
-    public static /*const*/ String sel_tabViewItemAtPoint_1;
-    public static /*const*/ String sel_setTextAttributesForNegativeValues_1;
-    public static /*const*/ String sel_underlineGlyphRange_1underlineType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1;
-    public static /*const*/ String sel_classForCoder;
-    public static /*const*/ String sel_setContent_1;
-    public static /*const*/ String sel_getLineStart_1end_1contentsEnd_1forRange_1;
-    public static /*const*/ String sel_removeRowsAtIndexes_1includeSubrows_1;
-    public static /*const*/ String sel_tokenFieldCell_1styleForRepresentedObject_1;
-    public static /*const*/ String sel_setToolTip_1;
-    public static /*const*/ String sel_titleHeight;
-    public static /*const*/ String sel_setShowsStateBy_1;
-    public static /*const*/ String sel_URLWithString_1relativeToURL_1;
-    public static /*const*/ String sel_fileSystemRepresentationWithPath_1;
-    public static /*const*/ String sel_setRate_1;
-    public static /*const*/ String sel_extraLineFragmentTextContainer;
-    public static /*const*/ String sel_insertObjects_1atArrangedObjectIndexes_1;
-    public static /*const*/ String sel_fontDescriptorWithSymbolicTraits_1;
-    public static /*const*/ String sel_topMargin;
-    public static /*const*/ String sel_tokenField_1representedObjectForEditingString_1;
-    public static /*const*/ String sel_drawInsertionPointInRect_1color_1turnedOn_1;
-    public static /*const*/ String sel_fontNamed_1hasTraits_1;
-    public static /*const*/ String sel_revertToSavedFromFile_1ofType_1;
-    public static /*const*/ String sel_cString;
-    public static /*const*/ String sel_markerForItemNumber_1;
-    public static /*const*/ String sel_mapTableWithWeakToStrongObjects;
-    public static /*const*/ String sel_autosaveExpandedItems;
-    public static /*const*/ String sel_setMiterLimit_1;
-    public static /*const*/ String sel_indentationLevel;
-    public static /*const*/ String sel_fileHandleForUpdatingAtPath_1;
-    public static /*const*/ String sel_fontWithDescriptor_1textTransform_1;
-    public static /*const*/ String sel_selectLine_1;
-    public static /*const*/ String sel_deleteForward_1;
-    public static /*const*/ String sel_getAdvancements_1forPackedGlyphs_1length_1;
-    public static /*const*/ String sel_usesRuler;
-    public static /*const*/ String sel_performClose_1;
-    public static /*const*/ String sel_trackRect;
-    public static /*const*/ String sel_setFont_1;
-    public static /*const*/ String sel_conformsToProtocol_1;
-    public static /*const*/ String sel_appendBezierPathWithPoints_1count_1;
-    public static /*const*/ String sel_defaultLineHeightForFont_1;
-    public static /*const*/ String sel_mouse_1inRect_1;
-    public static /*const*/ String sel_portCoderWithReceivePort_1sendPort_1components_1;
-    public static /*const*/ String sel_inputClientDisabled_1;
-    public static /*const*/ String sel_widthForSegment_1;
-    public static /*const*/ String sel_performSelector_1;
-    public static /*const*/ String sel_recalculateKeyViewLoop;
-    public static /*const*/ String sel_initWithDrawSelector_1delegate_1;
-    public static /*const*/ String sel_breakUndoCoalescing;
-    public static /*const*/ String sel_font;
-    public static /*const*/ String sel_fontDescriptorWithSize_1;
-    public static /*const*/ String sel_insertItemWithTitle_1atIndex_1;
-    public static /*const*/ String sel_contentAspectRatio;
-    public static /*const*/ String sel_currentHandler;
-    public static /*const*/ String sel_sharedAppleEventManager;
-    public static /*const*/ String sel_pathForResource_1ofType_1;
-    public static /*const*/ String sel_initWithRequest_1cachedResponse_1client_1;
-    public static /*const*/ String sel_isTitled;
-    public static /*const*/ String sel_drawerWillOpen_1;
-    public static /*const*/ String sel_screenFont;
-    public static /*const*/ String sel_principalClass;
-    public static /*const*/ String sel_pathControl_1willDisplayOpenPanel_1;
-    public static /*const*/ String sel_setGroupingSeparator_1;
-    public static /*const*/ String sel_fontWithDescriptor_1size_1;
-    public static /*const*/ String sel_glyphInfoWithCharacterIdentifier_1collection_1baseString_1;
-    public static /*const*/ String sel_movieUnfilteredFileTypes;
-    public static /*const*/ String sel_portList;
-    public static /*const*/ String sel_tokenField_1readFromPasteboard_1;
-    public static /*const*/ String sel_setEndSpecifier_1;
-    public static /*const*/ String sel_textView_1willDisplayToolTip_1forCharacterAtIndex_1;
-    public static /*const*/ String sel_applicationIconImage;
-    public static /*const*/ String sel_target;
-    public static /*const*/ String sel_replaceGlyphAtIndex_1withGlyph_1;
-    public static /*const*/ String sel_borderColorForEdge_1;
-    public static /*const*/ String sel_timeIntervalSinceDate_1;
-    public static /*const*/ String sel_pathsForResourcesOfType_1inDirectory_1forLocalization_1;
-    public static /*const*/ String sel_bitmapData;
-    public static /*const*/ String sel_redComponent;
-    public static /*const*/ String sel_numberOfVisibleItems;
-    public static /*const*/ String sel_selectCell_1;
-    public static /*const*/ String sel_applicationWillHide_1;
-    public static /*const*/ String sel_characterIsMember_1;
-    public static /*const*/ String sel_setArrowsPosition_1;
-    public static /*const*/ String sel_minusSign;
-    public static /*const*/ String sel_canSpawnSeparateThread;
-    public static /*const*/ String sel_setContinuous_1;
-    public static /*const*/ String sel_addSymbolicLinkWithDestination_1preferredFilename_1;
-    public static /*const*/ String sel_destinationOfSymbolicLinkAtPath_1error_1;
-    public static /*const*/ String sel_runUntilDate_1;
-    public static /*const*/ String sel_stringByAbbreviatingWithTildeInPath;
-    public static /*const*/ String sel_drawerWillResizeContents_1toSize_1;
-    public static /*const*/ String sel_imageRectForBounds_1;
-    public static /*const*/ String sel_indexGreaterThanIndex_1;
-    public static /*const*/ String sel_setSelectionFrom_1to_1anchor_1highlight_1;
-    public static /*const*/ String sel_unsignedIntegerValue;
-    public static /*const*/ String sel_focusView;
-    public static /*const*/ String sel_longCharacterIsMember_1;
-    public static /*const*/ String sel_groupingSeparator;
-    public static /*const*/ String sel_depthLimit;
-    public static /*const*/ String sel_attributesAtIndex_1longestEffectiveRange_1inRange_1;
-    public static /*const*/ String sel_setAcceptsArrowKeys_1;
-    public static /*const*/ String sel_isGreaterThanOrEqualTo_1;
-    public static /*const*/ String sel_maxContentSize;
-    public static /*const*/ String sel_setParentWindow_1;
-    public static /*const*/ String sel_importsGraphics;
-    public static /*const*/ String sel_setPaddingPosition_1;
-    public static /*const*/ String sel_yearOfCommonEra;
-    public static /*const*/ String sel_cells;
-    public static /*const*/ String sel_cyanComponent;
-    public static /*const*/ String sel_documentClassForType_1;
-    public static /*const*/ String sel_setSelectionHighlightStyle_1;
-    public static /*const*/ String sel_addWindowController_1;
-    public static /*const*/ String sel_initWithXMLString_1error_1;
-    public static /*const*/ String sel_authenticateComponents_1withData_1;
-    public static /*const*/ String sel_traitsOfFont_1;
-    public static /*const*/ String sel_timeIntervalSinceReferenceDate;
-    public static /*const*/ String sel_orderFrontCharacterPalette_1;
-    public static /*const*/ String sel_setServicesProvider_1;
-    public static /*const*/ String sel_setMessage_1;
-    public static /*const*/ String sel_msgid;
-    public static /*const*/ String sel_beginUndoGrouping;
-    public static /*const*/ String sel_RTFDFromRange_1documentAttributes_1;
-    public static /*const*/ String sel_selectedItem;
-    public static /*const*/ String sel_addTabStop_1;
-    public static /*const*/ String sel_scrollRect_1by_1;
-    public static /*const*/ String sel_icon;
-    public static /*const*/ String sel_setValue_1forUndefinedKey_1;
-    public static /*const*/ String sel_decodeFloatForKey_1;
-    public static /*const*/ String sel_commentURL;
-    public static /*const*/ String sel_shortStandaloneMonthSymbols;
-    public static /*const*/ String sel_browser_1titleOfColumn_1;
-    public static /*const*/ String sel_exit;
-    public static /*const*/ String sel_deselectAll_1;
-    public static /*const*/ String sel_canRemove;
-    public static /*const*/ String sel_proxyType;
-    public static /*const*/ String sel_shouldCloseDocument;
-    public static /*const*/ String sel_setMinimumLineHeight_1;
-    public static /*const*/ String sel_grayColor;
-    public static /*const*/ String sel_suspend;
-    public static /*const*/ String sel_printJobTitle;
-    public static /*const*/ String sel_fileHandleWithStandardOutput;
-    public static /*const*/ String sel_objCType;
-    public static /*const*/ String sel_maximumIntegerDigits;
-    public static /*const*/ String sel_initWithKey_1ascending_1;
-    public static /*const*/ String sel_paramDescriptorForKeyword_1;
-    public static /*const*/ String sel_cookiesForURL_1;
-    public static /*const*/ String sel_currentTextContainer;
-    public static /*const*/ String sel_removeAllCachedResponses;
-    public static /*const*/ String sel_setAllHTTPHeaderFields_1;
-    public static /*const*/ String sel_setShortQuarterSymbols_1;
-    public static /*const*/ String sel_removeItemWithObjectValue_1;
-    public static /*const*/ String sel_reloadColumn_1;
-    public static /*const*/ String sel_initWithData_1;
-    public static /*const*/ String sel_textDidEndEditing_1;
-    public static /*const*/ String sel_descriptorForKeyword_1;
-    public static /*const*/ String sel_gState;
-    public static /*const*/ String sel_setCellClass_1;
-    public static /*const*/ String sel_requestUserAttention_1;
-    public static /*const*/ String sel_disableUndoRegistration;
-    public static /*const*/ String sel_currencySymbol;
-    public static /*const*/ String sel_defaultWritingDirectionForLanguage_1;
-    public static /*const*/ String sel_selectedCellInColumn_1;
-    public static /*const*/ String sel_spellServer_1didForgetWord_1inLanguage_1;
-    public static /*const*/ String sel_initWithType_1error_1;
-    public static /*const*/ String sel_editedRow;
-    public static /*const*/ String sel_expressionForUnionSet_1with_1;
-    public static /*const*/ String sel_verticalMotionCanBeginDrag;
-    public static /*const*/ String sel_selectNextKeyView_1;
-    public static /*const*/ String sel_lowercaseString;
-    public static /*const*/ String sel_intercellSpacing;
-    public static /*const*/ String sel_selectedItemIdentifier;
-    public static /*const*/ String sel_getIndexes_1;
-    public static /*const*/ String sel_contentRect;
-    public static /*const*/ String sel_addObjects_1;
-    public static /*const*/ String sel_selectedRowIndexes;
-    public static /*const*/ String sel_setSecond_1;
-    public static /*const*/ String sel_setIgnoresMultiClick_1;
-    public static /*const*/ String sel_hasMemberInPlane_1;
-    public static /*const*/ String sel_setClientView_1;
-    public static /*const*/ String sel_setInitialFirstResponder_1;
-    public static /*const*/ String sel_defaultAnimationForKey_1;
-    public static /*const*/ String sel_systemTimeZone;
-    public static /*const*/ String sel_pageSizeForPaper_1;
-    public static /*const*/ String sel_windowBackgroundColor;
-    public static /*const*/ String sel_prepareGState;
-    public static /*const*/ String sel_willSetLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1;
-    public static /*const*/ String sel_setScriptingProperties_1;
-    public static /*const*/ String sel_initWithScrollView_1orientation_1;
-    public static /*const*/ String sel_canBecomeVisibleWithoutLogin;
-    public static /*const*/ String sel_scrollLineDown_1;
-    public static /*const*/ String sel_setServicesMenu_1;
-    public static /*const*/ String sel_appleEventCode;
-    public static /*const*/ String sel_replaceObjectsInRange_1withObjectsFromArray_1range_1;
-    public static /*const*/ String sel_autosizesCells;
-    public static /*const*/ String sel_tableView_1toolTipForCell_1rect_1tableColumn_1row_1mouseLocation_1;
-    public static /*const*/ String sel_dateWithYear_1month_1day_1hour_1minute_1second_1timeZone_1;
-    public static /*const*/ String sel_windowWillResize_1toSize_1;
-    public static /*const*/ String sel_initWithUnsignedChar_1;
-    public static /*const*/ String sel_suiteForAppleEventCode_1;
-    public static /*const*/ String sel_setTrailingOffset_1;
-    public static /*const*/ String sel_canBecomeKeyWindow;
-    public static /*const*/ String sel_setAnimationBlockingMode_1;
-    public static /*const*/ String sel_formUnionWithCharacterSet_1;
-    public static /*const*/ String sel_typeForArgumentWithName_1;
-    public static /*const*/ String sel_setFileName_1;
-    public static /*const*/ String sel_createSymbolicLinkAtPath_1pathContent_1;
-    public static /*const*/ String sel_undoMenuTitleForUndoActionName_1;
-    public static /*const*/ String sel_dateStyle;
-    public static /*const*/ String sel_currentContext;
-    public static /*const*/ String sel_dequeueNotificationsMatching_1coalesceMask_1;
-    public static /*const*/ String sel_thousandSeparator;
-    public static /*const*/ String sel_writeData_1;
-    public static /*const*/ String sel_selectedTag;
-    public static /*const*/ String sel_drawWithRect_1options_1;
-    public static /*const*/ String sel_canonicalLocaleIdentifierFromString_1;
-    public static /*const*/ String sel_convertFontTraits_1;
-    public static /*const*/ String sel_itemAdded_1;
-    public static /*const*/ String sel_scriptErrorString;
-    public static /*const*/ String sel_submenuAction_1;
-    public static /*const*/ String sel_initWithType_1subpredicates_1;
-    public static /*const*/ String sel_subpathsOfDirectoryAtPath_1error_1;
-    public static /*const*/ String sel_becomesKeyOnlyIfNeeded;
-    public static /*const*/ String sel_displayAllColumns;
-    public static /*const*/ String sel_indexOfItemWithSubmenu_1;
-    public static /*const*/ String sel_runModalSavePanelForSaveOperation_1delegate_1didSaveSelector_1contextInfo_1;
-    public static /*const*/ String sel_setCollectionBehavior_1;
-    public static /*const*/ String sel_boundingRectWithSize_1options_1attributes_1;
-    public static /*const*/ String sel_valueForAttribute_1;
-    public static /*const*/ String sel_attributedStringForNotANumber;
-    public static /*const*/ String sel_indicesOfObjectsByEvaluatingObjectSpecifier_1;
-    public static /*const*/ String sel_initWithPath_1;
-    public static /*const*/ String sel_doCommandBySelector_1;
-    public static /*const*/ String sel_numberWithChar_1;
-    public static /*const*/ String sel_setAllowsMixedState_1;
-    public static /*const*/ String sel_abortEditing;
-    public static /*const*/ String sel_context;
-    public static /*const*/ String sel_drawerShouldClose_1;
-    public static /*const*/ String sel_tabViewDidChangeNumberOfTabViewItems_1;
-    public static /*const*/ String sel_focusRingType;
-    public static /*const*/ String sel_copyScriptingValue_1forKey_1withProperties_1;
-    public static /*const*/ String sel_acceptsFirstMouse_1;
-    public static /*const*/ String sel_initWithPosition_1objectSpecifier_1;
-    public static /*const*/ String sel_selectionRangeForProposedRange_1granularity_1;
-    public static /*const*/ String sel_isNotEqualTo_1;
-    public static /*const*/ String sel_encodeRootObject_1;
-    public static /*const*/ String sel_hasSuffix_1;
-    public static /*const*/ String sel_initWithFontAttributes_1;
-    public static /*const*/ String sel_initWithRTFDFileWrapper_1documentAttributes_1;
-    public static /*const*/ String sel_miniwindowImage;
-    public static /*const*/ String sel_developmentLocalization;
-    public static /*const*/ String sel_localizedSummaryItems;
-    public static /*const*/ String sel_intValue;
-    public static /*const*/ String sel_setReturnValue_1;
-    public static /*const*/ String sel_selectedMenuItemColor;
-    public static /*const*/ String sel_editColumn_1row_1withEvent_1select_1;
-    public static /*const*/ String sel_descriptionWithCalendarFormat_1timeZone_1locale_1;
-    public static /*const*/ String sel_itemHeight;
-    public static /*const*/ String sel_application_1openFiles_1;
-    public static /*const*/ String sel_window;
-    public static /*const*/ String sel_setShortStandaloneMonthSymbols_1;
-    public static /*const*/ String sel_setTag_1;
-    public static /*const*/ String sel_ignoredWordsInSpellDocumentWithTag_1;
-    public static /*const*/ String sel_preferredLocalizationsFromArray_1;
-    public static /*const*/ String sel_intersectsIndexesInRange_1;
-    public static /*const*/ String sel_scanLongLong_1;
-    public static /*const*/ String sel_characterSetWithContentsOfFile_1;
-    public static /*const*/ String sel_elementWithName_1children_1attributes_1;
-    public static /*const*/ String sel_removeItem_1;
-    public static /*const*/ String sel_classForKeyedArchiver;
-    public static /*const*/ String sel_initWithString_1locale_1;
-    public static /*const*/ String sel_initWithData_1options_1error_1;
-    public static /*const*/ String sel_setIsPaneSplitter_1;
-    public static /*const*/ String sel_URLHandle_1resourceDataDidBecomeAvailable_1;
-    public static /*const*/ String sel_systemDefaultPortNameServer;
-    public static /*const*/ String sel_controlTextDidEndEditing_1;
-    public static /*const*/ String sel_commandDescription;
-    public static /*const*/ String sel_collapseItem_1;
-    public static /*const*/ String sel_setAutoresizesOutlineColumn_1;
-    public static /*const*/ String sel_isSubsetOfHashTable_1;
-    public static /*const*/ String sel_discardEventsMatchingMask_1beforeEvent_1;
-    public static /*const*/ String sel_highlightSelectionInClipRect_1;
-    public static /*const*/ String sel_decodeSizeForKey_1;
-    public static /*const*/ String sel_decimalNumberByRaisingToPower_1;
-    public static /*const*/ String sel_canBecomeMainWindow;
-    public static /*const*/ String sel_setMenuItem_1;
-    public static /*const*/ String sel_contentRectForFrameRect_1styleMask_1;
-    public static /*const*/ String sel_clearGLContext;
-    public static /*const*/ String sel_setFileType_1;
-    public static /*const*/ String sel_expressionForIntersectSet_1with_1;
-    public static /*const*/ String sel_sharedHelpManager;
-    public static /*const*/ String sel_setMiniwindowTitle_1;
-    public static /*const*/ String sel_fontDescriptorWithName_1size_1;
-    public static /*const*/ String sel_cookies;
-    public static /*const*/ String sel_detachNewThreadSelector_1toTarget_1withObject_1;
-    public static /*const*/ String sel_needsPanelToBecomeKey;
-    public static /*const*/ String sel_retainArguments;
-    public static /*const*/ String sel_textStorageWillProcessEditing_1;
-    public static /*const*/ String sel_location;
-    public static /*const*/ String sel_shouldChangeTextInRange_1replacementString_1;
-    public static /*const*/ String sel_textView_1doubleClickedOnCell_1inRect_1;
-    public static /*const*/ String sel_validateVisibleItems;
-    public static /*const*/ String sel_isOneway;
-    public static /*const*/ String sel_zone;
-    public static /*const*/ String sel_titleAlignment;
-    public static /*const*/ String sel_localNameForName_1;
-    public static /*const*/ String sel_loopMode;
-    public static /*const*/ String sel_setFocusRingType_1;
-    public static /*const*/ String sel_stringForKey_1;
-    public static /*const*/ String sel_initWithDomain_1type_1name_1;
-    public static /*const*/ String sel_animationDidEnd_1;
-    public static /*const*/ String sel_addSubview_1positioned_1relativeTo_1;
-    public static /*const*/ String sel_removeObjects_1;
-    public static /*const*/ String sel_graphicsContextWithBitmapImageRep_1;
-    public static /*const*/ String sel_isDescendantOf_1;
-    public static /*const*/ String sel_tableView_1nextTypeSelectMatchFromRow_1toRow_1forString_1;
-    public static /*const*/ String sel_initWithRequest_1delegate_1startImmediately_1;
-    public static /*const*/ String sel_reservedThicknessForMarkers;
-    public static /*const*/ String sel_movieRect;
-    public static /*const*/ String sel_portForName_1host_1;
-    public static /*const*/ String sel_tabView_1willSelectTabViewItem_1;
-    public static /*const*/ String sel_isOneShot;
-    public static /*const*/ String sel_usesThreadedAnimation;
-    public static /*const*/ String sel_shortStandaloneQuarterSymbols;
-    public static /*const*/ String sel_browser_1validateDrop_1proposedRow_1column_1dropOperation_1;
-    public static /*const*/ String sel_setLineSpacing_1;
-    public static /*const*/ String sel_indexOfItemWithTitle_1;
-    public static /*const*/ String sel_subrowsKeyPath;
-    public static /*const*/ String sel_showsResizeIndicator;
-    public static /*const*/ String sel_setState_1;
-    public static /*const*/ String sel_fileAttributesAtPath_1traverseLink_1;
-    public static /*const*/ String sel_setHorizontal_1;
-    public static /*const*/ String sel_windowDidExpose_1;
-    public static /*const*/ String sel_systemID;
-    public static /*const*/ String sel_turnOffKerning_1;
-    public static /*const*/ String sel_stringByReplacingPercentEscapesUsingEncoding_1;
-    public static /*const*/ String sel_control_1textView_1completions_1forPartialWordRange_1indexOfSelectedItem_1;
-    public static /*const*/ String sel_selectLastTabViewItem_1;
-    public static /*const*/ String sel_setKeyEquivalentFont_1;
-    public static /*const*/ String sel_invalidateCursorRectsForView_1;
-    public static /*const*/ String sel_selectTextAtIndex_1;
-    public static /*const*/ String sel_showPools;
-    public static /*const*/ String sel_setPlaysSelectionOnly_1;
-    public static /*const*/ String sel_note;
-    public static /*const*/ String sel_setDrawsCellBackground_1;
-    public static /*const*/ String sel_layoutCharactersInRange_1forLayoutManager_1maximumNumberOfLineFragments_1;
-    public static /*const*/ String sel_lengthOfBytesUsingEncoding_1;
-    public static /*const*/ String sel_columnResizingType;
-    public static /*const*/ String sel_paragraphSeparatorGlyphRange;
-    public static /*const*/ String sel_floatValue;
-    public static /*const*/ String sel_setRoundingIncrement_1;
-    public static /*const*/ String sel_dateFromString_1;
-    public static /*const*/ String sel_panel_1shouldShowFilename_1;
-    public static /*const*/ String sel_isEqualToDate_1;
-    public static /*const*/ String sel_drawWithFrame_1inView_1characterIndex_1;
-    public static /*const*/ String sel_initWithInteger_1;
-    public static /*const*/ String sel_CGImage;
-    public static /*const*/ String sel_endDocument;
-    public static /*const*/ String sel_removeFile;
-    public static /*const*/ String sel_splitView_1shouldCollapseSubview_1forDoubleClickOnDividerAtIndex_1;
-    public static /*const*/ String sel_setDefaultMiterLimit_1;
-    public static /*const*/ String sel_keyCode;
-    public static /*const*/ String sel_raise_1format_1;
-    public static /*const*/ String sel_cellSize;
-    public static /*const*/ String sel_runModalForWindow_1;
-    public static /*const*/ String sel_colorListNamed_1;
-    public static /*const*/ String sel_detachColorList_1;
-    public static /*const*/ String sel_postEvent_1atStart_1;
-    public static /*const*/ String sel_setMaximumFractionDigits_1;
-    public static /*const*/ String sel_setVolatileDomain_1forName_1;
-    public static /*const*/ String sel_imageInterpolation;
-    public static /*const*/ String sel_setTitlePosition_1;
-    public static /*const*/ String sel_leadingOffset;
-    public static /*const*/ String sel_invokeWithTarget_1;
-    public static /*const*/ String sel_negativeFormat;
-    public static /*const*/ String sel_windowController;
-    public static /*const*/ String sel_setVerticalPageScroll_1;
-    public static /*const*/ String sel_applicationDidUpdate_1;
-    public static /*const*/ String sel_valueForProperty_1;
-    public static /*const*/ String sel_tokenField_1hasMenuForRepresentedObject_1;
-    public static /*const*/ String sel_resolveClassMethod_1;
-    public static /*const*/ String sel_setAutomaticQuoteSubstitutionEnabled_1;
-    public static /*const*/ String sel_ordinalityOfUnit_1inUnit_1forDate_1;
-    public static /*const*/ String sel_initWithHost_1port_1protocol_1realm_1authenticationMethod_1;
-    public static /*const*/ String sel_timeIntervalSinceNow;
-    public static /*const*/ String sel_showFindIndicatorForRange_1;
-    public static /*const*/ String sel_drawLabel_1inRect_1;
-    public static /*const*/ String sel_startQuery;
-    public static /*const*/ String sel_initWithNibNamed_1bundle_1;
-    public static /*const*/ String sel_firstResponder;
-    public static /*const*/ String sel_windowWillMove_1;
-    public static /*const*/ String sel_dictionaryForKey_1;
-    public static /*const*/ String sel_decodeValueOfObjCType_1at_1;
-    public static /*const*/ String sel_activeApplication;
-    public static /*const*/ String sel_initWithUnsignedLongLong_1;
-    public static /*const*/ String sel_decimalNumberWithString_1;
-    public static /*const*/ String sel_replaceTextStorage_1;
-    public static /*const*/ String sel_relativePosition;
-    public static /*const*/ String sel_objectValueOfSelectedItem;
-    public static /*const*/ String sel_timeInterval;
-    public static /*const*/ String sel_getBytes_1range_1;
-    public static /*const*/ String sel_initWithViewAnimations_1;
-    public static /*const*/ String sel_setHorizontalRulerView_1;
-    public static /*const*/ String sel_keyPathsForValuesAffectingPreview;
-    public static /*const*/ String sel_setWithObjects_1count_1;
-    public static /*const*/ String sel_bitsPerSample;
-    public static /*const*/ String sel_dayOfYear;
-    public static /*const*/ String sel_maximumFractionDigits;
-    public static /*const*/ String sel_isSelectionByRect;
-    public static /*const*/ String sel_getRed_1green_1blue_1alpha_1;
-    public static /*const*/ String sel_glyphIsEncoded_1;
-    public static /*const*/ String sel_setStartSubelementIdentifier_1;
-    public static /*const*/ String sel_connection_1didFailWithError_1;
-    public static /*const*/ String sel_parser_1foundExternalEntityDeclarationWithName_1publicID_1systemID_1;
-    public static /*const*/ String sel_outlineView_1shouldTypeSelectForEvent_1withCurrentSearchString_1;
-    public static /*const*/ String sel_lowerBaseline_1;
-    public static /*const*/ String sel_outlineView_1willDisplayCell_1forTableColumn_1item_1;
-    public static /*const*/ String sel_notificationWithName_1object_1userInfo_1;
-    public static /*const*/ String sel_setMaxConcurrentOperationCount_1;
-    public static /*const*/ String sel_closeSpellDocumentWithTag_1;
-    public static /*const*/ String sel_popUpStatusItemMenu_1;
-    public static /*const*/ String sel_itemPrototype;
-    public static /*const*/ String sel_commandName;
-    public static /*const*/ String sel_setTextAttributesForZero_1;
-    public static /*const*/ String sel_dateFromComponents_1;
-    public static /*const*/ String sel_outlineViewColumnDidResize_1;
-    public static /*const*/ String sel_setTailIndent_1;
-    public static /*const*/ String sel_setRowTemplates_1;
-    public static /*const*/ String sel_objectsForXQuery_1constants_1error_1;
-    public static /*const*/ String sel_mutableCopyWithZone_1;
-    public static /*const*/ String sel_initWithItemIdentifier_1;
-    public static /*const*/ String sel_minuteOfHour;
-    public static /*const*/ String sel_setAutosavingDelay_1;
-    public static /*const*/ String sel_nextKeyView;
-    public static /*const*/ String sel_orderFront_1;
-    public static /*const*/ String sel_encodeValueOfObjCType_1at_1;
-    public static /*const*/ String sel_mode;
-    public static /*const*/ String sel_appleEventWithEventClass_1eventID_1targetDescriptor_1returnID_1transactionID_1;
-    public static /*const*/ String sel_stringByDeletingPathExtension;
-    public static /*const*/ String sel_standardOutput;
-    public static /*const*/ String sel_enumCodeValue;
-    public static /*const*/ String sel_setResourceData_1;
-    public static /*const*/ String sel_convertRectFromBase_1;
-    public static /*const*/ String sel_initWithContentRect_1styleMask_1backing_1defer_1screen_1;
-    public static /*const*/ String sel_autoenablesItems;
-    public static /*const*/ String sel_textContainerForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1;
-    public static /*const*/ String sel_QTMovie;
-    public static /*const*/ String sel_addObserver_1selector_1name_1object_1suspensionBehavior_1;
-    public static /*const*/ String sel_getArgument_1atIndex_1;
-    public static /*const*/ String sel_replaceChildAtIndex_1withNode_1;
-    public static /*const*/ String sel_beginForDirectory_1file_1types_1modelessDelegate_1didEndSelector_1contextInfo_1;
-    public static /*const*/ String sel_supportsMode_1;
-    public static /*const*/ String sel_openFile_1;
-    public static /*const*/ String sel_zero;
-    public static /*const*/ String sel_compositingFilter;
-    public static /*const*/ String sel_fileGroupOwnerAccountID;
-    public static /*const*/ String sel_tokenField_1writeRepresentedObjects_1toPasteboard_1;
-    public static /*const*/ String sel_tabViewType;
-    public static /*const*/ String sel_drawSortIndicatorWithFrame_1inView_1ascending_1priority_1;
-    public static /*const*/ String sel_spellCheckerDocumentTag;
-    public static /*const*/ String sel_updateFromPMPageFormat;
-    public static /*const*/ String sel_colorSyncProfile;
-    public static /*const*/ String sel_flushBufferedKeyEvents;
-    public static /*const*/ String sel_removeAllObjects;
-    public static /*const*/ String sel_selectItemWithTitle_1;
-    public static /*const*/ String sel_textContainers;
-    public static /*const*/ String sel_isHorizontallyResizable;
-    public static /*const*/ String sel_selectionIndexPaths;
-    public static /*const*/ String sel_setString_1forType_1;
-    public static /*const*/ String sel_setWraps_1;
-    public static /*const*/ String sel_dataCell;
-    public static /*const*/ String sel_addPointer_1;
-    public static /*const*/ String sel_invalidate;
-    public static /*const*/ String sel_draggingImageForRowsWithIndexes_1inColumn_1withEvent_1offset_1;
-    public static /*const*/ String sel_horizontalEdgePadding;
-    public static /*const*/ String sel_view;
-    public static /*const*/ String sel_showsPrintPanel;
-    public static /*const*/ String sel_hyphenationFactor;
-    public static /*const*/ String sel_setAcceptsGlyphInfo_1;
-    public static /*const*/ String sel_formatWidth;
-    public static /*const*/ String sel_stringByAppendingFormat_1;
-    public static /*const*/ String sel_documentForFileName_1;
-    public static /*const*/ String sel_outlineView_1nextTypeSelectMatchFromItem_1toItem_1forString_1;
-    public static /*const*/ String sel_isItemExpanded_1;
-    public static /*const*/ String sel_playbackDeviceIdentifier;
-    public static /*const*/ String sel_addButtonWithTitle_1;
-    public static /*const*/ String sel_lowercaseLetterCharacterSet;
-    public static /*const*/ String sel_netService_1didNotResolve_1;
-    public static /*const*/ String sel_copiesOnScroll;
-    public static /*const*/ String sel_unarchiver_1willReplaceObject_1withObject_1;
-    public static /*const*/ String sel_setHasShadow_1;
-    public static /*const*/ String sel_addObserver_1selector_1name_1object_1;
-    public static /*const*/ String sel_setDouble_1forKey_1;
-    public static /*const*/ String sel_positionOfGlyph_1struckOverRect_1metricsExist_1;
-    public static /*const*/ String sel_sharedInstance;
-    public static /*const*/ String sel_setPaperSize_1;
-    public static /*const*/ String sel_data1;
-    public static /*const*/ String sel_applicationWillBecomeActive_1;
-    public static /*const*/ String sel_URLProtocol_1cachedResponseIsValid_1;
-    public static /*const*/ String sel_mouseDown_1;
-    public static /*const*/ String sel_setVeryShortStandaloneWeekdaySymbols_1;
-    public static /*const*/ String sel_setUsesStrongWriteBarrier_1;
-    public static /*const*/ String sel_second;
-    public static /*const*/ String sel_predicateWithLeftExpression_1rightExpression_1modifier_1type_1options_1;
-    public static /*const*/ String sel_setFloatingPanel_1;
-    public static /*const*/ String sel_parser_1didEndElement_1namespaceURI_1qualifiedName_1;
-    public static /*const*/ String sel_handlePortMessage_1;
-    public static /*const*/ String sel_filteredSetUsingPredicate_1;
-    public static /*const*/ String sel_setLocalizedKeyDictionary_1;
-    public static /*const*/ String sel_drawCellInside_1;
-    public static /*const*/ String sel_browserDidScroll_1;
-    public static /*const*/ String sel_isDirectory;
-    public static /*const*/ String sel_setEnvironment_1;
-    public static /*const*/ String sel_persistence;
-    public static /*const*/ String sel_backingType;
-    public static /*const*/ String sel_orderedDocuments;
-    public static /*const*/ String sel_windowWillUseStandardFrame_1defaultFrame_1;
-    public static /*const*/ String sel_toggleTraditionalCharacterShape_1;
-    public static /*const*/ String sel_fractionOfDistanceThroughGlyphForPoint_1;
-    public static /*const*/ String sel_netServiceWillPublish_1;
-    public static /*const*/ String sel_drawInRect_1relativeCenterPosition_1;
-    public static /*const*/ String sel_setShowsAlpha_1;
-    public static /*const*/ String sel_canDragRowsWithIndexes_1inColumn_1withEvent_1;
-    public static /*const*/ String sel_start;
-    public static /*const*/ String sel_imageRectInRuler;
-    public static /*const*/ String sel_TXTRecordData;
-    public static /*const*/ String sel_groupingLevel;
-    public static /*const*/ String sel_response;
-    public static /*const*/ String sel_insertionIndex;
-    public static /*const*/ String sel_cancelPreviousPerformRequestsWithTarget_1selector_1object_1;
-    public static /*const*/ String sel_itemWithTitle_1;
-    public static /*const*/ String sel_insertRow_1;
-    public static /*const*/ String sel_mutableChildNodes;
-    public static /*const*/ String sel_removeAllPoints;
-    public static /*const*/ String sel_searchForRegistrationDomains;
-    public static /*const*/ String sel_replacementObjectForCoder_1;
-    public static /*const*/ String sel_tangentialPressure;
-    public static /*const*/ String sel_setMaxDate_1;
-    public static /*const*/ String sel_performMnemonic_1;
-    public static /*const*/ String sel_maximumRecentDocumentCount;
-    public static /*const*/ String sel_stringsByAppendingPaths_1;
-    public static /*const*/ String sel_localTimeZone;
-    public static /*const*/ String sel_draggingLocation;
-    public static /*const*/ String sel_searchForAllDomains;
-    public static /*const*/ String sel_attributedStringWithAttachment_1;
-    public static /*const*/ String sel_initWithContentsOfURL_1byReference_1;
-    public static /*const*/ String sel_exchangeObjectAtIndex_1withObjectAtIndex_1;
-    public static /*const*/ String sel_draw;
-    public static /*const*/ String sel_fileIsImmutable;
-    public static /*const*/ String sel_tokenField_1styleForRepresentedObject_1;
-    public static /*const*/ String sel_setAutorecalculatesContentBorderThickness_1forEdge_1;
-    public static /*const*/ String sel_firstRectForCharacterRange_1actualRange_1;
-    public static /*const*/ String sel_targetForAction_1to_1from_1;
-    public static /*const*/ String sel_setShouldCloseDocument_1;
-    public static /*const*/ String sel_originOffset;
-    public static /*const*/ String sel_sharedSupportPath;
-    public static /*const*/ String sel_disableScreenUpdatesUntilFlush;
-    public static /*const*/ String sel_setShortStandaloneQuarterSymbols_1;
-    public static /*const*/ String sel_filenames;
-    public static /*const*/ String sel_numberOfItemsInComboBox_1;
-    public static /*const*/ String sel_hasBytesAvailable;
-    public static /*const*/ String sel_currentConversation;
-    public static /*const*/ String sel_setAllowsEditingTextAttributes_1;
-    public static /*const*/ String sel_initWithName_1stringValue_1;
-    public static /*const*/ String sel_tableViewColumnDidResize_1;
-    public static /*const*/ String sel_knowsPageRange_1;
-    public static /*const*/ String sel_uppercaseLetterCharacterSet;
-    public static /*const*/ String sel_capitalizedLetterCharacterSet;
-    public static /*const*/ String sel_main;
-    public static /*const*/ String sel_genericRGBColorSpace;
-    public static /*const*/ String sel_clearsFilterPredicateOnInsertion;
-    public static /*const*/ String sel_paragraphs;
-    public static /*const*/ String sel_setJobDisposition_1;
-    public static /*const*/ String sel_setContainerClassDescription_1;
-    public static /*const*/ String sel_stringWithContentsOfURL_1;
-    public static /*const*/ String sel_setTrackingMode_1;
-    public static /*const*/ String sel_canCloseDocumentWithDelegate_1shouldCloseSelector_1contextInfo_1;
-    public static /*const*/ String sel_usesItemFromMenu;
-    public static /*const*/ String sel_shortValue;
-    public static /*const*/ String sel_readDataOfLength_1;
-    public static /*const*/ String sel_descriptorWithDescriptorType_1data_1;
-    public static /*const*/ String sel_setCanRemoveAllRows_1;
-    public static /*const*/ String sel_defaultCenter;
-    public static /*const*/ String sel_scriptingIsGreaterThan_1;
-    public static /*const*/ String sel_splitView_1constrainSplitPosition_1ofSubviewAt_1;
-    public static /*const*/ String sel_setTokenStyle_1;
-    public static /*const*/ String sel_initWithContentRect_1styleMask_1backing_1defer_1;
-    public static /*const*/ String sel_insertTabViewItem_1atIndex_1;
-    public static /*const*/ String sel_rowForDisplayValue_1;
-    public static /*const*/ String sel_isDrawingToScreen;
-    public static /*const*/ String sel_encodeRect_1;
-    public static /*const*/ String sel_controlDarkShadowColor;
-    public static /*const*/ String sel_maxDate;
-    public static /*const*/ String sel_lock;
-    public static /*const*/ String sel_resetSystemTimeZone;
-    public static /*const*/ String sel_coerceValue_1toClass_1;
-    public static /*const*/ String sel_qdPort;
-    public static /*const*/ String sel_resultAtIndex_1;
-    public static /*const*/ String sel_descriptorWithBoolean_1;
-    public static /*const*/ String sel_markedRange;
-    public static /*const*/ String sel_colorWithCalibratedHue_1saturation_1brightness_1alpha_1;
-    public static /*const*/ String sel_setSharedPrintInfo_1;
-    public static /*const*/ String sel_setBorderColor_1;
-    public static /*const*/ String sel_parser_1foundCharacters_1;
-    public static /*const*/ String sel_preferredPasteboardTypeFromArray_1restrictedToTypesFromArray_1;
-    public static /*const*/ String sel_resume;
-    public static /*const*/ String sel_iconForFiles_1;
-    public static /*const*/ String sel_drawKeyEquivalentWithFrame_1inView_1;
-    public static /*const*/ String sel_boxType;
-    public static /*const*/ String sel_initWithContainerClassDescription_1containerSpecifier_1key_1name_1;
-    public static /*const*/ String sel_setFill;
-    public static /*const*/ String sel_setParagraphGlyphRange_1separatorGlyphRange_1;
-    public static /*const*/ String sel_copyWithZone_1;
-    public static /*const*/ String sel_self;
-    public static /*const*/ String sel_reservedSpaceLength;
-    public static /*const*/ String sel_unsignedIntValue;
-    public static /*const*/ String sel_URLHandleResourceDidFinishLoading_1;
-    public static /*const*/ String sel_menuWillOpen_1;
-    public static /*const*/ String sel_menuWillClose_1;
-    public static /*const*/ String sel_pointerArrayWithWeakObjects;
-    public static /*const*/ String sel_fetchPredicate;
-    public static /*const*/ String sel_pathToColumn_1;
-    public static /*const*/ String sel_columnWithIdentifier_1;
-    public static /*const*/ String sel_setShouldCreateUI_1;
-    public static /*const*/ String sel_getGlyphs_1range_1;
-    public static /*const*/ String sel_returnID;
-    public static /*const*/ String sel_miterLimit;
-    public static /*const*/ String sel_hidesEmptyCells;
-    public static /*const*/ String sel_userSpaceScaleFactor;
-    public static /*const*/ String sel_xHeight;
-    public static /*const*/ String sel_decimalNumberByMultiplyingBy_1withBehavior_1;
-    public static /*const*/ String sel_reloadData;
-    public static /*const*/ String sel_setShortWeekdaySymbols_1;
-    public static /*const*/ String sel_containsIndexesInRange_1;
-    public static /*const*/ String sel_colorWithDeviceRed_1green_1blue_1alpha_1;
-    public static /*const*/ String sel_screenFontWithRenderingMode_1;
-    public static /*const*/ String sel_suggestedFilename;
-    public static /*const*/ String sel_fileNameExtensionForType_1saveOperation_1;
-    public static /*const*/ String sel_labelFontSize;
-    public static /*const*/ String sel_setAlphaValue_1;
-    public static /*const*/ String sel_openGLContext;
-    public static /*const*/ String sel_scriptingIsLessThan_1;
-    public static /*const*/ String sel_keysSortedByValueUsingSelector_1;
-    public static /*const*/ String sel_control_1didFailToValidatePartialString_1errorDescription_1;
-    public static /*const*/ String sel_offStateImage;
-    public static /*const*/ String sel_bidiProcessingEnabled;
-    public static /*const*/ String sel_isKeyWindow;
-    public static /*const*/ String sel_initWithIconRef_1;
-    public static /*const*/ String sel_changeCurrentDirectoryPath_1;
-    public static /*const*/ String sel_textView;
-    public static /*const*/ String sel_localizedStringForStatusCode_1;
-    public static /*const*/ String sel_setWantsLayer_1;
-    public static /*const*/ String sel_positivePrefix;
-    public static /*const*/ String sel_setDefaultFlatness_1;
-    public static /*const*/ String sel_addChild_1;
-    public static /*const*/ String sel_parser_1foundAttributeDeclarationWithName_1forElement_1type_1defaultValue_1;
-    public static /*const*/ String sel_scannerWithString_1;
-    public static /*const*/ String sel_removeFileWrapper_1;
-    public static /*const*/ String sel_setTitleWidth_1;
-    public static /*const*/ String sel_setTabKeyTraversesCells_1;
-    public static /*const*/ String sel_glyphRangeForBoundingRect_1inTextContainer_1;
-    public static /*const*/ String sel_fileHandleForWritingAtPath_1;
-    public static /*const*/ String sel_initWithContainerClassDescription_1containerSpecifier_1key_1;
-    public static /*const*/ String sel_fontAttributes;
-    public static /*const*/ String sel_reviewUnsavedDocumentsWithAlertTitle_1cancellable_1delegate_1didReviewAllSelector_1contextInfo_1;
-    public static /*const*/ String sel_minWidth;
-    public static /*const*/ String sel_getLineFragmentInsertionPointsForCharacterAtIndex_1alternatePositions_1inDisplayOrder_1positions_1characterIndexes_1;
-    public static /*const*/ String sel_finishDecoding;
-    public static /*const*/ String sel_currentContextDrawingToScreen;
-    public static /*const*/ String sel_setKeyEquivalent_1;
-    public static /*const*/ String sel_smartInsertForString_1replacingRange_1beforeString_1afterString_1;
-    public static /*const*/ String sel_useStandardKerning_1;
-    public static /*const*/ String sel_sharedSystemTypesetter;
-    public static /*const*/ String sel_setDatePickerMode_1;
-    public static /*const*/ String sel_encodePoint_1forKey_1;
-    public static /*const*/ String sel_colorSpace;
-    public static /*const*/ String sel_pasteboardByFilteringTypesInPasteboard_1;
-    public static /*const*/ String sel_sendDoubleAction;
-    public static /*const*/ String sel_isColumnSelected_1;
-    public static /*const*/ String sel_unarchiveObjectWithFile_1;
-    public static /*const*/ String sel_usesEPSOnResolutionMismatch;
-    public static /*const*/ String sel_encodeBycopyObject_1;
-    public static /*const*/ String sel_removeAttributeForName_1;
-    public static /*const*/ String sel_keyCell;
-    public static /*const*/ String sel_allocWithZone_1;
-    public static /*const*/ String sel_getCompression_1factor_1;
-    public static /*const*/ String sel_insertValue_1inPropertyWithKey_1;
-    public static /*const*/ String sel_drawAtPoint_1withAttributes_1;
-    public static /*const*/ String sel_isTrue;
-    public static /*const*/ String sel_expectedContentLength;
-    public static /*const*/ String sel_setTitle_1;
-    public static /*const*/ String sel_connection_1didReceiveAuthenticationChallenge_1;
-    public static /*const*/ String sel_isEnabledForSegment_1;
-    public static /*const*/ String sel_speechSynthesizer_1willSpeakPhoneme_1;
-    public static /*const*/ String sel_setShowsStateColumn_1;
-    public static /*const*/ String sel_requiredFileType;
-    public static /*const*/ String sel_convertRect_1fromView_1;
-    public static /*const*/ String sel_visibleFrame;
-    public static /*const*/ String sel_concludeDragOperation_1;
-    public static /*const*/ String sel_minimumFractionDigits;
-    public static /*const*/ String sel_reopenDocumentForURL_1withContentsOfURL_1error_1;
-    public static /*const*/ String sel_roundingMode;
-    public static /*const*/ String sel_colorWithCatalogName_1colorName_1;
-    public static /*const*/ String sel_setWithSet_1;
-    public static /*const*/ String sel_fileManager_1willProcessPath_1;
-    public static /*const*/ String sel_setSuspended_1;
-    public static /*const*/ String sel_currentInputManager;
-    public static /*const*/ String sel_operatingSystemVersionString;
-    public static /*const*/ String sel_resetBytesInRange_1;
-    public static /*const*/ String sel_sizeForKey_1inTable_1;
-    public static /*const*/ String sel_setFloat_1forKey_1;
-    public static /*const*/ String sel_enableUndoRegistration;
-    public static /*const*/ String sel_initWithCGImage_1;
-    public static /*const*/ String sel_initWithCIImage_1;
-    public static /*const*/ String sel_addCharactersInRange_1;
-    public static /*const*/ String sel_initWithRect_1options_1owner_1userInfo_1;
-    public static /*const*/ String sel_incrementalLoadFromData_1complete_1;
-    public static /*const*/ String sel_tableView_1acceptDrop_1row_1dropOperation_1;
-    public static /*const*/ String sel_classNamed_1;
-    public static /*const*/ String sel_setIndeterminate_1;
-    public static /*const*/ String sel_normalizeAdjacentTextNodesPreservingCDATA_1;
-    public static /*const*/ String sel_validateUserInterfaceItem_1;
-    public static /*const*/ String sel_setPlaysEveryFrame_1;
-    public static /*const*/ String sel_isCompiled;
-    public static /*const*/ String sel_tokenFieldCell_1editingStringForRepresentedObject_1;
-    public static /*const*/ String sel_tableView_1isGroupRow_1;
-    public static /*const*/ String sel_orderFrontLinkPanel_1;
-    public static /*const*/ String sel_alphaControlAddedOrRemoved_1;
-    public static /*const*/ String sel_setShadowColor_1;
-    public static /*const*/ String sel_canBecomeKeyView;
-    public static /*const*/ String sel_addTimer_1forMode_1;
-    public static /*const*/ String sel_clickedColumn;
-    public static /*const*/ String sel_initWithName_1URI_1;
-    public static /*const*/ String sel_saveDocument_1;
-    public static /*const*/ String sel_observationInfo;
-    public static /*const*/ String sel_readFromURL_1options_1documentAttributes_1error_1;
-    public static /*const*/ String sel_addClient_1;
-    public static /*const*/ String sel_appleEventForSuspensionID_1;
-    public static /*const*/ String sel_setGeneratesCalendarDates_1;
-    public static /*const*/ String sel_tableView_1sortDescriptorsDidChange_1;
-    public static /*const*/ String sel_predicateFormat;
-    public static /*const*/ String sel_windowShouldZoom_1toFrame_1;
-    public static /*const*/ String sel_usesFontPanel;
-    public static /*const*/ String sel_encodeNXObject_1;
-    public static /*const*/ String sel_colorAtX_1y_1;
-    public static /*const*/ String sel_publishWithOptions_1;
-    public static /*const*/ String sel_allHTTPHeaderFields;
-    public static /*const*/ String sel_registerPort_1name_1;
-    public static /*const*/ String sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1;
-    public static /*const*/ String sel_hour;
-    public static /*const*/ String sel_setTextLists_1;
-    public static /*const*/ String sel_maximumAdvancement;
-    public static /*const*/ String sel_setHighlightedItemIndex_1;
-    public static /*const*/ String sel_initWithMemoryCapacity_1diskCapacity_1diskPath_1;
-    public static /*const*/ String sel_setDocumentContentKind_1;
-    public static /*const*/ String sel_updateDragTypeRegistration;
-    public static /*const*/ String sel_deviceDescription;
-    public static /*const*/ String sel_setMiniwindowImage_1;
-    public static /*const*/ String sel_sharedTypesetter;
-    public static /*const*/ String sel_deleteToEndOfLine_1;
-    public static /*const*/ String sel_setState_1atRow_1column_1;
-    public static /*const*/ String sel_validModesForFontPanel_1;
-    public static /*const*/ String sel_currentCalendar;
-    public static /*const*/ String sel_selectionIndexPath;
-    public static /*const*/ String sel_setTextFont_1;
-    public static /*const*/ String sel_password;
-    public static /*const*/ String sel_words;
-    public static /*const*/ String sel_status;
-    public static /*const*/ String sel_typingAttributes;
-    public static /*const*/ String sel_handleTakeValue_1forUnboundKey_1;
-    public static /*const*/ String sel_image_1didLoadRepresentation_1withStatus_1;
-    public static /*const*/ String sel_setBitsPerSample_1;
-    public static /*const*/ String sel_sortSubviewsUsingFunction_1context_1;
-    public static /*const*/ String sel_initWithProtocolFamily_1socketType_1protocol_1socket_1;
-    public static /*const*/ String sel_numberOfItemsInMenu_1;
-    public static /*const*/ String sel_numberWithUnsignedShort_1;
-    public static /*const*/ String sel_textView_1menu_1forEvent_1atIndex_1;
-    public static /*const*/ String sel_arrowCursor;
-    public static /*const*/ String sel_abbreviation;
-    public static /*const*/ String sel_moveDown_1;
-    public static /*const*/ String sel_activateContextHelpMode_1;
-    public static /*const*/ String sel_properties;
-    public static /*const*/ String sel_setObject_1forProperty_1error_1;
-    public static /*const*/ String sel_setAutodisplay_1;
-    public static /*const*/ String sel_locationInWindow;
-    public static /*const*/ String sel_layoutManager;
-    public static /*const*/ String sel_hyphenCharacterForGlyphAtIndex_1;
-    public static /*const*/ String sel_play;
-    public static /*const*/ String sel_compositeToPoint_1fromRect_1operation_1fraction_1;
-    public static /*const*/ String sel_cellBackgroundColor;
-    public static /*const*/ String sel_shouldAntialias;
-    public static /*const*/ String sel_windowWillReturnFieldEditor_1toObject_1;
-    public static /*const*/ String sel_setValuesForKeysWithDictionary_1;
-    public static /*const*/ String sel_drawsGrid;
-    public static /*const*/ String sel_patternPhase;
-    public static /*const*/ String sel_setFrame_1;
-    public static /*const*/ String sel_roundingIncrement;
-    public static /*const*/ String sel_adjustScroll_1;
-    public static /*const*/ String sel_alertShowHelp_1;
-    public static /*const*/ String sel_animate_1;
-    public static /*const*/ String sel_tabletID;
-    public static /*const*/ String sel_selectedRowEnumerator;
-    public static /*const*/ String sel_XMLString;
-    public static /*const*/ String sel_setWarningValue_1;
-    public static /*const*/ String sel_tableView_1validateDrop_1proposedRow_1proposedDropOperation_1;
-    public static /*const*/ String sel_checkSpelling_1;
-    public static /*const*/ String sel_setFormattingStringsFilename_1;
-    public static /*const*/ String sel_displayIfNeeded;
-    public static /*const*/ String sel_localizedName;
-    public static /*const*/ String sel_isEqualToSet_1;
-    public static /*const*/ String sel_initWithBytesNoCopy_1length_1encoding_1freeWhenDone_1;
-    public static /*const*/ String sel_reloadPredicate;
-    public static /*const*/ String sel_setNumberOfMajorTickMarks_1;
-    public static /*const*/ String sel_defaultPlaceholderForMarker_1withBinding_1;
-    public static /*const*/ String sel_encodeDataObject_1;
-    public static /*const*/ String sel_writeToURL_1ofType_1;
-    public static /*const*/ String sel_createContext;
-    public static /*const*/ String sel_verticalScroller;
-    public static /*const*/ String sel_setShowsInvisibleCharacters_1;
-    public static /*const*/ String sel_encodeConditionalObject_1forKey_1;
-    public static /*const*/ String sel_isEqualTo_1;
-    public static /*const*/ String sel_translateXBy_1yBy_1;
-    public static /*const*/ String sel_customizationPaletteIsRunning;
-    public static /*const*/ String sel_dictionaryWithDictionary_1;
-    public static /*const*/ String sel_drawMarkersInRect_1;
-    public static /*const*/ String sel_centerSelectionInVisibleArea_1;
-    public static /*const*/ String sel_stringByAppendingString_1;
-    public static /*const*/ String sel_flushWindowIfNeeded;
-    public static /*const*/ String sel_lockFocusOnRepresentation_1;
-    public static /*const*/ String sel_setNotShownAttribute_1forGlyphAtIndex_1;
-    public static /*const*/ String sel_currentReplyAppleEvent;
-    public static /*const*/ String sel_setTitleAlignment_1;
-    public static /*const*/ String sel_removeSuiteNamed_1;
-    public static /*const*/ String sel_capitalizedString;
-    public static /*const*/ String sel_typeFromFileExtension_1;
-    public static /*const*/ String sel_allowsImageEditing;
-    public static /*const*/ String sel_loosenKerning_1;
-    public static /*const*/ String sel_decomposableCharacterSet;
-    public static /*const*/ String sel_subdataWithRange_1;
-    public static /*const*/ String sel_attachPopUpWithFrame_1inView_1;
-    public static /*const*/ String sel_setColumnResizingType_1;
-    public static /*const*/ String sel_genericCMYKColorSpace;
-    public static /*const*/ String sel_actionForControlCharacterAtIndex_1;
-    public static /*const*/ String sel_documentRect;
-    public static /*const*/ String sel_dataWithContentsOfFile_1;
-    public static /*const*/ String sel_localizedDescriptionForType_1;
-    public static /*const*/ String sel_increment;
-    public static /*const*/ String sel_deleteToEndOfParagraph_1;
-    public static /*const*/ String sel_exceptionWithName_1reason_1userInfo_1;
-    public static /*const*/ String sel_postscriptName;
-    public static /*const*/ String sel_setPreferredFilename_1;
-    public static /*const*/ String sel_setPostsBoundsChangedNotifications_1;
-    public static /*const*/ String sel_decimalNumberHandlerWithRoundingMode_1scale_1raiseOnExactness_1raiseOnOverflow_1raiseOnUnderflow_1raiseOnDivideByZero_1;
-    public static /*const*/ String sel_openDocumentWithContentsOfFile_1display_1;
-    public static /*const*/ String sel_objectForInfoDictionaryKey_1;
-    public static /*const*/ String sel_setFrameOrigin_1;
-    public static /*const*/ String sel_pathControl_1willPopUpMenu_1;
-    public static /*const*/ String sel_lineWidth;
-    public static /*const*/ String sel_poseAsClass_1;
-    public static /*const*/ String sel_selectPreviousKeyView_1;
-    public static /*const*/ String sel_isKey_1inTable_1;
-    public static /*const*/ String sel_isZoomed;
-    public static /*const*/ String sel_setCompletionDelay_1;
-    public static /*const*/ String sel_mainMenu;
-    public static /*const*/ String sel_scrollView;
-    public static /*const*/ String sel_dividerColor;
-    public static /*const*/ String sel_requestModes;
-    public static /*const*/ String sel_setShowsResizeIndicator_1;
-    public static /*const*/ String sel_setScrollable_1;
-    public static /*const*/ String sel_setLineScroll_1;
-    public static /*const*/ String sel_resolvePrefixForNamespaceURI_1;
-    public static /*const*/ String sel_bind_1toObject_1withKeyPath_1options_1;
-    public static /*const*/ String sel_alignCenter_1;
-    public static /*const*/ String sel_addTemporaryAttribute_1value_1forCharacterRange_1;
-    public static /*const*/ String sel_expressionForConstantValue_1;
-    public static /*const*/ String sel_initWithContentSize_1preferredEdge_1;
-    public static /*const*/ String sel_setAccessoryView_1;
-    public static /*const*/ String sel_setContentWidth_1type_1;
-    public static /*const*/ String sel_searchMenuTemplate;
-    public static /*const*/ String sel_imageRepClassForType_1;
-    public static /*const*/ String sel_decimalValue;
-    public static /*const*/ String sel_protocolSpecificInformation;
-    public static /*const*/ String sel_statusBar;
-    public static /*const*/ String sel_setTimeZone_1;
-    public static /*const*/ String sel_setWidth_1forSegment_1;
-    public static /*const*/ String sel_objectIsForcedForKey_1inDomain_1;
-    public static /*const*/ String sel_evaluationErrorSpecifier;
-    public static /*const*/ String sel_application_1openFile_1;
-    public static /*const*/ String sel_changeDocumentBackgroundColor_1;
-    public static /*const*/ String sel_volatileDomainNames;
-    public static /*const*/ String sel_changeInLength;
-    public static /*const*/ String sel_autoresizingMask;
-    public static /*const*/ String sel_setRepresentedObject_1;
-    public static /*const*/ String sel_isUndoRegistrationEnabled;
-    public static /*const*/ String sel_alertWithError_1;
-    public static /*const*/ String sel_saturationComponent;
-    public static /*const*/ String sel_spellServer_1didLearnWord_1inLanguage_1;
-    public static /*const*/ String sel_performActionWithHighlightingForItemAtIndex_1;
-    public static /*const*/ String sel_loadSuitesFromBundle_1;
-    public static /*const*/ String sel_firstTextView;
-    public static /*const*/ String sel_targetForAction_1;
-    public static /*const*/ String sel_enterExitEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1trackingNumber_1userData_1;
-    public static /*const*/ String sel_setHelpAnchor_1;
-    public static /*const*/ String sel_printerWithName_1;
-    public static /*const*/ String sel_boundingBoxForControlGlyphAtIndex_1forTextContainer_1proposedLineFragment_1glyphPosition_1characterIndex_1;
-    public static /*const*/ String sel_initWithBytesNoCopy_1length_1freeWhenDone_1;
-    public static /*const*/ String sel_getRow_1column_1ofCell_1;
-    public static /*const*/ String sel_smartDeleteRangeForProposedRange_1;
-    public static /*const*/ String sel_getHue_1saturation_1brightness_1alpha_1;
-    public static /*const*/ String sel_automaticallyNotifiesObserversForKey_1;
-    public static /*const*/ String sel_setAllowsImageEditing_1;
-    public static /*const*/ String sel_draggingUpdated_1;
-    public static /*const*/ String sel_insertRowAtIndex_1withType_1asSubrowOfRow_1animate_1;
-    public static /*const*/ String sel_getRectsExposedDuringLiveResize_1count_1;
-    public static /*const*/ String sel_usesSignificantDigits;
-    public static /*const*/ String sel_numberOfVirtualScreens;
-    public static /*const*/ String sel_sendSynchronousRequest_1returningResponse_1error_1;
-    public static /*const*/ String sel_setBecomesKeyOnlyIfNeeded_1;
-    public static /*const*/ String sel_autorecalculatesKeyViewLoop;
-    public static /*const*/ String sel_decodeDataObject;
-    public static /*const*/ String sel_setOriginOffset_1;
-    public static /*const*/ String sel_pointingDeviceSerialNumber;
-    public static /*const*/ String sel_drawSegment_1inFrame_1withView_1;
-    public static /*const*/ String sel_close;
-    public static /*const*/ String sel_setAlignmentRect_1;
-    public static /*const*/ String sel_paragraphSeparatorCharacterRange;
-    public static /*const*/ String sel_measurementUnits;
-    public static /*const*/ String sel_setUsesEPSOnResolutionMismatch_1;
-    public static /*const*/ String sel_setLineFragmentPadding_1;
-    public static /*const*/ String sel_setLastComponentOfFileName_1;
-    public static /*const*/ String sel_initWithSuiteName_1commandName_1dictionary_1;
-    public static /*const*/ String sel_initWithContent_1;
-    public static /*const*/ String sel_provideNewView_1;
-    public static /*const*/ String sel_pathComponentCells;
-    public static /*const*/ String sel_instanceMethodForSelector_1;
-    public static /*const*/ String sel_layoutManagerDidInvalidateLayout_1;
-    public static /*const*/ String sel_helpAnchor;
-    public static /*const*/ String sel_URLProtocol_1wasRedirectedToRequest_1redirectResponse_1;
-    public static /*const*/ String sel_setIsVisible_1;
-    public static /*const*/ String sel_browser_1sizeToFitWidthOfColumn_1;
-    public static /*const*/ String sel_handleFailureInMethod_1object_1file_1lineNumber_1description_1;
-    public static /*const*/ String sel_serializedRepresentation;
-    public static /*const*/ String sel_replaceTextContainer_1;
-    public static /*const*/ String sel_speechSynthesizer_1willSpeakWord_1ofString_1;
-    public static /*const*/ String sel_startSpeaking_1;
-    public static /*const*/ String sel_setHyphenationFactor_1;
-    public static /*const*/ String sel_retain;
-    public static /*const*/ String sel_insertItem_1atIndex_1;
-    public static /*const*/ String sel_sortWithSortDescriptors_1recursively_1;
-    public static /*const*/ String sel_selectTabViewItem_1;
-    public static /*const*/ String sel_clipRect_1;
-    public static /*const*/ String sel_close_1;
-    public static /*const*/ String sel_didAddSubview_1;
-    public static /*const*/ String sel_markedTextSelectionChanged_1client_1;
-    public static /*const*/ String sel_registerLanguage_1byVendor_1;
-    public static /*const*/ String sel_removeClient_1;
-    public static /*const*/ String sel_setSendsWholeSearchString_1;
-    public static /*const*/ String sel_localName;
-    public static /*const*/ String sel_setSelectedSegment_1;
-    public static /*const*/ String sel_setLineHeightMultiple_1;
-    public static /*const*/ String sel_setCanCreateDirectories_1;
-    public static /*const*/ String sel_setCookieAcceptPolicy_1;
-    public static /*const*/ String sel_convertFont_1toHaveTrait_1;
-    public static /*const*/ String sel_headerCell;
-    public static /*const*/ String sel_maximumDecimalNumber;
-    public static /*const*/ String sel_browser_1isColumnValid_1;
-    public static /*const*/ String sel_tableViewSelectionIsChanging_1;
-    public static /*const*/ String sel_setNotificationBatchingInterval_1;
-    public static /*const*/ String sel_isLeaf;
-    public static /*const*/ String sel_valuesForAttributes_1;
-    public static /*const*/ String sel_removeTemporaryAttribute_1forCharacterRange_1;
-    public static /*const*/ String sel_pixelsWide;
-    public static /*const*/ String sel_orderFrontStandardAboutPanel_1;
-    public static /*const*/ String sel_beginSheetModalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1;
-    public static /*const*/ String sel_setToolTip_1forSegment_1;
-    public static /*const*/ String sel_canonicalXMLStringPreservingComments_1;
-    public static /*const*/ String sel_orderFrontListPanel_1;
-    public static /*const*/ String sel_setIsMiniaturized_1;
-    public static /*const*/ String sel_download_1didReceiveDataOfLength_1;
-    public static /*const*/ String sel_layoutManager_1didCompleteLayoutForTextContainer_1atEnd_1;
-    public static /*const*/ String sel_standardWindowButton_1forStyleMask_1;
-    public static /*const*/ String sel_writeToURL_1atomically_1;
-    public static /*const*/ String sel_useStandardLigatures_1;
-    public static /*const*/ String sel_currentRunLoop;
-    public static /*const*/ String sel_setExtraLineFragmentRect_1usedRect_1textContainer_1;
-    public static /*const*/ String sel_rootElement;
-    public static /*const*/ String sel_setContentViewMargins_1;
-    public static /*const*/ String sel_cancelPerformSelector_1target_1argument_1;
-    public static /*const*/ String sel_outputFormat;
-    public static /*const*/ String sel_arrayWithContentsOfFile_1;
-    public static /*const*/ String sel_applicationWillFinishLaunching_1;
-    public static /*const*/ String sel_prefixForName_1;
-    public static /*const*/ String sel_decimalNumberByDividingBy_1;
-    public static /*const*/ String sel_mouseUpOnCharacterIndex_1atCoordinate_1withModifier_1client_1;
-    public static /*const*/ String sel_defaultVoice;
-    public static /*const*/ String sel_operand;
-    public static /*const*/ String sel_moveToEndOfLine_1;
-    public static /*const*/ String sel_addEntry_1;
-    public static /*const*/ String sel_scaleBy_1;
-    public static /*const*/ String sel_setMnemonicLocation_1;
-    public static /*const*/ String sel_dateWithCalendarFormat_1timeZone_1;
-    public static /*const*/ String sel_setUsesFontLeading_1;
-    public static /*const*/ String sel_CIContext;
-    public static /*const*/ String sel_isDaylightSavingTime;
-    public static /*const*/ String sel_setShowsBorderOnlyWhileMouseInside_1;
-    public static /*const*/ String sel_isSetOnMouseEntered;
-    public static /*const*/ String sel_stringFromDate_1;
-    public static /*const*/ String sel_deselectColumn_1;
-    public static /*const*/ String sel_requestHeaderFieldsWithCookies_1;
-    public static /*const*/ String sel_outlineViewColumnDidMove_1;
-    public static /*const*/ String sel_fileExtensionsFromType_1;
-    public static /*const*/ String sel_setUsesScreenFonts_1;
-    public static /*const*/ String sel_commandDescriptionsInSuite_1;
-    public static /*const*/ String sel_notShownAttributeForGlyphAtIndex_1;
-    public static /*const*/ String sel_isRunning;
-    public static /*const*/ String sel_sharedPrintInfo;
-    public static /*const*/ String sel_isValid;
-    public static /*const*/ String sel_handleFailureInFunction_1file_1lineNumber_1description_1;
-    public static /*const*/ String sel_localizedRecoveryOptions;
-    public static /*const*/ String sel_establishConnection;
-    public static /*const*/ String sel_isMainWindow;
-    public static /*const*/ String sel_setDrawsBackground_1;
-    public static /*const*/ String sel_intAttribute_1forGlyphAtIndex_1;
-    public static /*const*/ String sel_shadowColor;
-    public static /*const*/ String sel_keyEquivalentModifierMask;
-    public static /*const*/ String sel_textStorageDidProcessEditing_1;
-    public static /*const*/ String sel_setType_1;
-    public static /*const*/ String sel_previousSibling;
-    public static /*const*/ String sel_dateByAddingYears_1months_1days_1hours_1minutes_1seconds_1;
-    public static /*const*/ String sel_setMinimum_1;
-    public static /*const*/ String sel_columnAutoresizingStyle;
-    public static /*const*/ String sel_convertPointFromBase_1;
-    public static /*const*/ String sel_layout;
-    public static /*const*/ String sel_textStorage;
-    public static /*const*/ String sel_values;
-    public static /*const*/ String sel_RTFFromRange_1documentAttributes_1;
-    public static /*const*/ String sel_isMiniaturizable;
-    public static /*const*/ String sel_opaqueAncestor;
-    public static /*const*/ String sel_notationName;
-    public static /*const*/ String sel_setBaseWritingDirection_1range_1;
-    public static /*const*/ String sel_setManagedObjectContext_1;
-    public static /*const*/ String sel_patternImage;
-    public static /*const*/ String sel_windowDidResize_1;
-    public static /*const*/ String sel_setFieldEditor_1;
-    public static /*const*/ String sel_initWithContainerClassDescription_1containerSpecifier_1key_1relativePosition_1baseSpecifier_1;
-    public static /*const*/ String sel_setMainMenu_1;
-    public static /*const*/ String sel_setObjectZone_1;
-    public static /*const*/ String sel_localizedDescription;
-    public static /*const*/ String sel_setImageScaling_1;
-    public static /*const*/ String sel_moveToBeginningOfLine_1;
-    public static /*const*/ String sel_transposeWords_1;
-    public static /*const*/ String sel_protocol;
-    public static /*const*/ String sel_isHorizontallyCentered;
-    public static /*const*/ String sel_invert;
-    public static /*const*/ String sel_isEqualToValue_1;
-    public static /*const*/ String sel_registerName_1withNameServer_1;
-    public static /*const*/ String sel_writeToURL_1ofType_1error_1;
-    public static /*const*/ String sel_rangeForUserTextChange;
-    public static /*const*/ String sel_configurePersistentStoreCoordinatorForURL_1ofType_1error_1;
-    public static /*const*/ String sel_setShouldAntialias_1;
-    public static /*const*/ String sel_alignmentRect;
-    public static /*const*/ String sel_zoom_1;
-    public static /*const*/ String sel_rate;
-    public static /*const*/ String sel_maxVisibleColumns;
-    public static /*const*/ String sel_splitViewDidResizeSubviews_1;
-    public static /*const*/ String sel_maxWidth;
-    public static /*const*/ String sel_setData_1;
-    public static /*const*/ String sel_isVisible;
-    public static /*const*/ String sel_isSelected;
-    public static /*const*/ String sel_rulerView_1shouldRemoveMarker_1;
-    public static /*const*/ String sel_setURL_1;
-    public static /*const*/ String sel_drawTitle_1withFrame_1inView_1;
-    public static /*const*/ String sel_usesWeakReadAndWriteBarriers;
-    public static /*const*/ String sel_elementDeclarationForName_1;
-    public static /*const*/ String sel_setOneShot_1;
-    public static /*const*/ String sel_shouldProcessNamespaces;
-    public static /*const*/ String sel_isEqualToArray_1;
-    public static /*const*/ String sel_XMLStringWithOptions_1;
-    public static /*const*/ String sel_initFileURLWithPath_1isDirectory_1;
-    public static /*const*/ String sel_datePickerElements;
-    public static /*const*/ String sel_willChange_1valuesAtIndexes_1forKey_1;
-    public static /*const*/ String sel_setSelected_1forSegment_1;
-    public static /*const*/ String sel_initWithFormat_1shareContext_1;
-    public static /*const*/ String sel_browser_1shouldSizeColumn_1forUserResize_1toWidth_1;
-    public static /*const*/ String sel_indexSetWithIndexesInRange_1;
-    public static /*const*/ String sel_netServiceBrowser_1didFindService_1moreComing_1;
-    public static /*const*/ String sel_keyUp_1;
-    public static /*const*/ String sel_pageHeader;
-    public static /*const*/ String sel_isCancelled;
-    public static /*const*/ String sel_segmentStyle;
-    public static /*const*/ String sel_imageRepWithContentsOfURL_1;
-    public static /*const*/ String sel_initWithNibName_1bundle_1;
-    public static /*const*/ String sel_removeObserver_1fromObjectsAtIndexes_1forKeyPath_1;
-    public static /*const*/ String sel_setFetchPredicate_1;
-    public static /*const*/ String sel_compare_1options_1range_1;
-    public static /*const*/ String sel_validateVisibleColumns;
-    public static /*const*/ String sel_initWithCGColorSpace_1;
-    public static /*const*/ String sel_mountNewRemovableMedia;
-    public static /*const*/ String sel_compare_1options_1range_1locale_1;
-    public static /*const*/ String sel_setTopMargin_1;
-    public static /*const*/ String sel_maximumLengthOfBytesUsingEncoding_1;
-    public static /*const*/ String sel_colorWithAlphaComponent_1;
-    public static /*const*/ String sel_appendBezierPathWithRoundedRect_1xRadius_1yRadius_1;
-    public static /*const*/ String sel_autosavedContentsFileURL;
-    public static /*const*/ String sel_markedTextAttributes;
-    public static /*const*/ String sel_predicateWithValue_1;
-    public static /*const*/ String sel_makeFirstResponder_1;
-    public static /*const*/ String sel_alternateTitle;
-    public static /*const*/ String sel_attribute;
-    public static /*const*/ String sel_decodeIntegerForKey_1;
-    public static /*const*/ String sel_setSeparatesColumns_1;
-    public static /*const*/ String sel_imageRepsWithContentsOfURL_1;
-    public static /*const*/ String sel_isPlanar;
-    public static /*const*/ String sel_download_1didReceiveAuthenticationChallenge_1;
-    public static /*const*/ String sel_startingRow;
-    public static /*const*/ String sel_evaluateWithObject_1substitutionVariables_1;
-    public static /*const*/ String sel_initWithRTFD_1documentAttributes_1;
-    public static /*const*/ String sel_ensureLayoutForTextContainer_1;
-    public static /*const*/ String sel_runModalForWindow_1relativeToWindow_1;
-    public static /*const*/ String sel_isResizable;
-    public static /*const*/ String sel_isSymbolicLink;
-    public static /*const*/ String sel_containsIndexes_1;
-    public static /*const*/ String sel_splitView_1constrainMaxCoordinate_1ofSubviewAt_1;
-    public static /*const*/ String sel_setImportsGraphics_1;
-    public static /*const*/ String sel_action;
-    public static /*const*/ String sel_noteNumberOfItemsChanged;
-    public static /*const*/ String sel_drawBackgroundInClipRect_1;
-    public static /*const*/ String sel_printInfo;
-    public static /*const*/ String sel_performSelector_1withObject_1afterDelay_1;
-    public static /*const*/ String sel_boundingRectForGlyphRange_1inTextContainer_1;
-    public static /*const*/ String sel_currencyCode;
-    public static /*const*/ String sel_splitView_1canCollapseSubview_1;
-    public static /*const*/ String sel_hide;
-    public static /*const*/ String sel_setMonth_1;
-    public static /*const*/ String sel_dataFromTXTRecordDictionary_1;
-    public static /*const*/ String sel_rulerView_1didAddMarker_1;
-    public static /*const*/ String sel_deleteBackward_1;
-    public static /*const*/ String sel_setMaximumLineHeight_1;
-    public static /*const*/ String sel_orderedWindows;
-    public static /*const*/ String sel_standaloneWeekdaySymbols;
-    public static /*const*/ String sel_isAttached;
-    public static /*const*/ String sel_resizeLeftRightCursor;
-    public static /*const*/ String sel_methodSignature;
-    public static /*const*/ String sel_setDiskCapacity_1;
-    public static /*const*/ String sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1;
-    public static /*const*/ String sel_screen;
-    public static /*const*/ String sel_windowNumber;
-    public static /*const*/ String sel_selectSegmentWithTag_1;
-    public static /*const*/ String sel_availableFontFamilies;
-    public static /*const*/ String sel_superclass;
-    public static /*const*/ String sel_registeredImageRepClasses;
-    public static /*const*/ String sel_needsSizing;
-    public static /*const*/ String sel_setUsesAlternatingRowBackgroundColors_1;
-    public static /*const*/ String sel_getBitmapDataPlanes_1;
-    public static /*const*/ String sel_fontWithFamily_1traits_1weight_1size_1;
-    public static /*const*/ String sel_borderColor;
-    public static /*const*/ String sel_colorUsingColorSpace_1;
-    public static /*const*/ String sel_propertyForKey_1;
-    public static /*const*/ String sel_setPublicID_1;
-    public static /*const*/ String sel_forwardInvocation_1;
-    public static /*const*/ String sel_deleteToBeginningOfLine_1;
-    public static /*const*/ String sel_hasNonContiguousLayout;
-    public static /*const*/ String sel_getObjects_1;
-    public static /*const*/ String sel_clearRecentDocuments_1;
-    public static /*const*/ String sel_paletteFontOfSize_1;
-    public static /*const*/ String sel_rightMargin;
-    public static /*const*/ String sel_browser_1createRowsForColumn_1inMatrix_1;
-    public static /*const*/ String sel_removeItemAtPath_1error_1;
-    public static /*const*/ String sel_getRectsBeingDrawn_1count_1;
-    public static /*const*/ String sel_numberWithUnsignedInt_1;
-    public static /*const*/ String sel_complete_1;
-    public static /*const*/ String sel_synchronizeTitleAndSelectedItem;
-    public static /*const*/ String sel_archiverData;
-    public static /*const*/ String sel_selectNextTabViewItem_1;
-    public static /*const*/ String sel_displayNameForType_1;
-    public static /*const*/ String sel_defaultNameServerPortNumber;
-    public static /*const*/ String sel_setFireDate_1;
-    public static /*const*/ String sel_selectFirstTabViewItem_1;
-    public static /*const*/ String sel_setRightMargin_1;
-    public static /*const*/ String sel_menuView;
-    public static /*const*/ String sel_removeObjectsFromIndices_1numIndices_1;
-    public static /*const*/ String sel_tabKeyTraversesCells;
-    public static /*const*/ String sel_initToBuffer_1capacity_1;
-    public static /*const*/ String sel_endPage;
-    public static /*const*/ String sel_setTextAttributesForNotANumber_1;
-    public static /*const*/ String sel_makeNextSegmentKey;
-    public static /*const*/ String sel_addAttributes_1range_1;
-    public static /*const*/ String sel_lineFragmentPadding;
-    public static /*const*/ String sel_showController_1adjustingSize_1;
-    public static /*const*/ String sel_glyphInfoWithGlyphName_1forFont_1baseString_1;
-    public static /*const*/ String sel_initWithCondition_1;
-    public static /*const*/ String sel_handleMachMessage_1;
-    public static /*const*/ String sel_setFontMenu_1;
-    public static /*const*/ String sel_invocationWithMethodSignature_1;
-    public static /*const*/ String sel_textAttributesForPositiveValues;
-    public static /*const*/ String sel_decodePointForKey_1;
-    public static /*const*/ String sel_doubleForKey_1;
-    public static /*const*/ String sel_application_1willPresentError_1;
-    public static /*const*/ String sel_setFloatingPointFormat_1left_1right_1;
-    public static /*const*/ String sel_loadColumnZero;
-    public static /*const*/ String sel_availableFonts;
-    public static /*const*/ String sel_drawUnderlineForGlyphRange_1underlineType_1baselineOffset_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1;
-    public static /*const*/ String sel_highlightedTableColumn;
-    public static /*const*/ String sel_removeObjectsInRange_1;
-    public static /*const*/ String sel_rectForKey_1inTable_1;
-    public static /*const*/ String sel_canStoreColor;
-    public static /*const*/ String sel_windowWillMiniaturize_1;
-    public static /*const*/ String sel_documentForWindow_1;
-    public static /*const*/ String sel_setAttributedStringForNotANumber_1;
-    public static /*const*/ String sel_rangeOfString_1options_1range_1;
-    public static /*const*/ String sel_pause;
-    public static /*const*/ String sel_continueTracking_1at_1inView_1;
-    public static /*const*/ String sel_servicesProvider;
-    public static /*const*/ String sel_setIgnoredWords_1inSpellDocumentWithTag_1;
-    public static /*const*/ String sel_clear_1;
-    public static /*const*/ String sel_readFromData_1options_1documentAttributes_1error_1;
-    public static /*const*/ String sel_columnNumber;
-    public static /*const*/ String sel_components;
-    public static /*const*/ String sel_image;
-    public static /*const*/ String sel_setDisplayMode_1;
-    public static /*const*/ String sel_insertParagraphSeparator_1;
-    public static /*const*/ String sel_setPaperName_1;
-    public static /*const*/ String sel_defaultFormatterBehavior;
-    public static /*const*/ String sel_timeZoneWithAbbreviation_1;
-    public static /*const*/ String sel_setHighlighted_1;
-    public static /*const*/ String sel_addFileWithPath_1;
-    public static /*const*/ String sel_allowsDocumentBackgroundColorChange;
-    public static /*const*/ String sel_initWithURL_1documentAttributes_1;
-    public static /*const*/ String sel_allowsUndo;
-    public static /*const*/ String sel_localeIdentifierFromComponents_1;
-    public static /*const*/ String sel_allowsNonContiguousLayout;
-    public static /*const*/ String sel_arrayWithArray_1;
-    public static /*const*/ String sel_setCompositingOperation_1;
-    public static /*const*/ String sel_netServiceBrowserDidStopSearch_1;
-    public static /*const*/ String sel_setHorizontalEdgePadding_1;
-    public static /*const*/ String sel_accessibilityActionDescription_1;
-    public static /*const*/ String sel_localizedKeyDictionary;
-    public static /*const*/ String sel_initWithColorSyncProfile_1;
-    public static /*const*/ String sel_displayedCommandsTitle;
-    public static /*const*/ String sel_flatness;
-    public static /*const*/ String sel_localizations;
-    public static /*const*/ String sel_mountedRemovableMedia;
-    public static /*const*/ String sel_topAutoreleasePoolCount;
-    public static /*const*/ String sel_postsFrameChangedNotifications;
-    public static /*const*/ String sel_performZoom_1;
-    public static /*const*/ String sel_moveBackward_1;
-    public static /*const*/ String sel_verticalPageScroll;
-    public static /*const*/ String sel_setToolTip_1forCell_1;
-    public static /*const*/ String sel_layoutManagerOwnsFirstResponderInWindow_1;
-    public static /*const*/ String sel_jobStyleHint;
-    public static /*const*/ String sel_selectionIndexes;
-    public static /*const*/ String sel_segmentCount;
-    public static /*const*/ String sel_accessibilityIsIgnored;
-    public static /*const*/ String sel_hasUnautosavedChanges;
-    public static /*const*/ String sel_deactivate;
-    public static /*const*/ String sel_setSelectionIndexPaths_1;
-    public static /*const*/ String sel_pathForSoundResource_1;
-    public static /*const*/ String sel_setUsesRuler_1;
-    public static /*const*/ String sel_takeSelectedTabViewItemFromSender_1;
-    public static /*const*/ String sel_writeToFile_1ofType_1originalFile_1saveOperation_1;
-    public static /*const*/ String sel_numberWithLong_1;
-    public static /*const*/ String sel_interiorBackgroundStyle;
-    public static /*const*/ String sel_insertionPointColor;
-    public static /*const*/ String sel_prompt;
-    public static /*const*/ String sel_finishLaunching;
-    public static /*const*/ String sel_addTextContainer_1;
-    public static /*const*/ String sel_setAutosavedContentsFileURL_1;
-    public static /*const*/ String sel_initWithFrame_1textContainer_1;
-    public static /*const*/ String sel_clearColor;
-    public static /*const*/ String sel_insertText_1;
-    public static /*const*/ String sel_sendAction;
-    public static /*const*/ String sel_innerRect;
-    public static /*const*/ String sel_pointerFunctions;
-    public static /*const*/ String sel_key;
-    public static /*const*/ String sel_comboBoxSelectionDidChange_1;
-    public static /*const*/ String sel_hasMarkedText;
-    public static /*const*/ String sel_setDefaultLineCapStyle_1;
-    public static /*const*/ String sel_stringListForKey_1inTable_1;
-    public static /*const*/ String sel_defaultConnection;
-    public static /*const*/ String sel_pathContentOfSymbolicLinkAtPath_1;
-    public static /*const*/ String sel_stringWithContentsOfFile_1encoding_1error_1;
-    public static /*const*/ String sel_detachSubmenu;
-    public static /*const*/ String sel_isSecure;
-    public static /*const*/ String sel_movie;
-    public static /*const*/ String sel_outlineViewItemWillExpand_1;
-    public static /*const*/ String sel_sharedScriptSuiteRegistry;
-    public static /*const*/ String sel_removeCharactersInString_1;
-    public static /*const*/ String sel_setLocation_1withAdvancements_1forStartOfGlyphRange_1;
-    public static /*const*/ String sel_moveDownAndModifySelection_1;
-    public static /*const*/ String sel_fileAttributesToWriteToURL_1ofType_1forSaveOperation_1originalContentsURL_1error_1;
-    public static /*const*/ String sel_classDescriptionForKey_1;
-    public static /*const*/ String sel_addRequestMode_1;
-    public static /*const*/ String sel_setPullsDown_1;
-    public static /*const*/ String sel_setItemHeight_1;
-    public static /*const*/ String sel_printerFont;
-    public static /*const*/ String sel_linkTextAttributes;
-    public static /*const*/ String sel_state;
-    public static /*const*/ String sel_shouldCloseWindowController_1delegate_1shouldCloseSelector_1contextInfo_1;
-    public static /*const*/ String sel_addIndex_1;
-    public static /*const*/ String sel_setChildSpecifier_1;
-    public static /*const*/ String sel_toolbarDidRemoveItem_1;
-    public static /*const*/ String sel_displayName;
-    public static /*const*/ String sel_setInsertionPointColor_1;
-    public static /*const*/ String sel_bezierPathByReversingPath;
-    public static /*const*/ String sel_connection_1didReceiveData_1;
-    public static /*const*/ String sel_eraSymbols;
-    public static /*const*/ String sel_removeObjectsForKeys_1;
-    public static /*const*/ String sel_subrowIndexesForRow_1;
-    public static /*const*/ String sel_increaseLengthBy_1;
-    public static /*const*/ String sel_viewDidEndLiveResize;
-    public static /*const*/ String sel_encodeBool_1forKey_1;
-    public static /*const*/ String sel_handleQueryWithUnboundKey_1;
-    public static /*const*/ String sel_elementsForName_1;
-    public static /*const*/ String sel_cascadeTopLeftFromPoint_1;
-    public static /*const*/ String sel_linkItemAtPath_1toPath_1error_1;
-    public static /*const*/ String sel_frameSizeForContentSize_1hasHorizontalScroller_1hasVerticalScroller_1borderType_1;
-    public static /*const*/ String sel_initWithString_1attributes_1;
-    public static /*const*/ String sel_readFromData_1options_1documentAttributes_1;
-    public static /*const*/ String sel_setAlpha_1;
-    public static /*const*/ String sel_hash;
-    public static /*const*/ String sel_rangeForUserParagraphAttributeChange;
-    public static /*const*/ String sel_initWithData_1encoding_1;
-    public static /*const*/ String sel_newScriptingObjectOfClass_1forValueForKey_1withContentsValue_1properties_1;
-    public static /*const*/ String sel_pageDown_1;
-    public static /*const*/ String sel_hasCloseBox;
-    public static /*const*/ String sel_standardizedURL;
-    public static /*const*/ String sel_setAttributes_1range_1;
-    public static /*const*/ String sel_setControlSize_1;
-    public static /*const*/ String sel_revertToInitialValues_1;
-    public static /*const*/ String sel_setIntAttribute_1value_1forGlyphAtIndex_1;
-    public static /*const*/ String sel_stopTracking_1at_1inView_1mouseIsUp_1;
-    public static /*const*/ String sel_setParamDescriptor_1forKeyword_1;
-    public static /*const*/ String sel_textShouldBeginEditing_1;
-    public static /*const*/ String sel_applicationDidHide_1;
-    public static /*const*/ String sel_beginSheetWithPrintInfo_1modalForWindow_1delegate_1didEndSelector_1contextInfo_1;
-    public static /*const*/ String sel_shiftIndexesStartingAtIndex_1by_1;
-    public static /*const*/ String sel_getStreamsToHost_1port_1inputStream_1outputStream_1;
-    public static /*const*/ String sel_attributesOfFileSystemForPath_1error_1;
-    public static /*const*/ String sel_setTemporaryAttributes_1forCharacterRange_1;
-    public static /*const*/ String sel_checkSpellingOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1wordCount_1;
-    public static /*const*/ String sel_insertChild_1atIndex_1;
-    public static /*const*/ String sel_defaultManager;
-    public static /*const*/ String sel_invocation;
-    public static /*const*/ String sel_setMinValue_1;
-    public static /*const*/ String sel_decodeSize;
-    public static /*const*/ String sel_replaceObject_1withObject_1;
-    public static /*const*/ String sel_descriptionWithLocale_1;
-    public static /*const*/ String sel_setSharingType_1;
-    public static /*const*/ String sel_isLenient;
-    public static /*const*/ String sel_decimalNumberWithString_1locale_1;
-    public static /*const*/ String sel_allowedTypes;
-    public static /*const*/ String sel_superscript_1;
-    public static /*const*/ String sel_initWithContentsOfFile_1encoding_1error_1;
-    public static /*const*/ String sel_windowsMenu;
-    public static /*const*/ String sel_performSelector_1target_1argument_1order_1modes_1;
-    public static /*const*/ String sel_unscheduleFromRunLoop_1forMode_1;
-    public static /*const*/ String sel_evaluatedArguments;
-    public static /*const*/ String sel_encodeSize_1forKey_1;
-    public static /*const*/ String sel_sendBeforeDate_1components_1from_1reserved_1;
-    public static /*const*/ String sel_containerSize;
-    public static /*const*/ String sel_selectedTextColor;
-    public static /*const*/ String sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1;
-    public static /*const*/ String sel_curveToPoint_1controlPoint1_1controlPoint2_1;
-    public static /*const*/ String sel_mutableBytes;
-    public static /*const*/ String sel_rangeOfUnit_1inUnit_1forDate_1;
-    public static /*const*/ String sel_allowsNaturalLanguage;
-    public static /*const*/ String sel_mouseLocation;
-    public static /*const*/ String sel_selectCellAtRow_1column_1;
-    public static /*const*/ String sel_toggleBaseWritingDirection_1;
-    public static /*const*/ String sel_maximum;
-    public static /*const*/ String sel_initWithFocusedViewRect_1;
-    public static /*const*/ String sel_thickness;
-    public static /*const*/ String sel_setImageOrigin_1;
-    public static /*const*/ String sel_color;
-    public static /*const*/ String sel_capitalizeWord_1;
-    public static /*const*/ String sel_imageRepClassForData_1;
-    public static /*const*/ String sel_outlineTableColumn;
-    public static /*const*/ String sel_runModalWithPrintInfo_1;
-    public static /*const*/ String sel_flushCachedData;
-    public static /*const*/ String sel_exitFullScreenModeWithOptions_1;
-    public static /*const*/ String sel_alertStyle;
-    public static /*const*/ String sel_runModalPageLayoutWithPrintInfo_1delegate_1didRunSelector_1contextInfo_1;
-    public static /*const*/ String sel_setDisplayedWhenStopped_1;
-    public static /*const*/ String sel_drawBackgroundWithFrame_1inView_1characterRange_1layoutManager_1;
-    public static /*const*/ String sel_addObject_1;
-    public static /*const*/ String sel_dragPromisedFilesOfTypes_1fromRect_1source_1slideBack_1event_1;
-    public static /*const*/ String sel_samplesPerPixel;
-    public static /*const*/ String sel_negativePrefix;
-    public static /*const*/ String sel_initialKey;
-    public static /*const*/ String sel_orderFrontColorPanel_1;
-    public static /*const*/ String sel_hasLearnedWord_1;
-    public static /*const*/ String sel_setLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1;
-    public static /*const*/ String sel_setHidesOnDeactivate_1;
-    public static /*const*/ String sel_setMsgid_1;
-    public static /*const*/ String sel_elementCount;
-    public static /*const*/ String sel_dateWithString_1;
-    public static /*const*/ String sel_rangeOfTextBlock_1atIndex_1;
-    public static /*const*/ String sel_setMenuItemCell_1forItemAtIndex_1;
-    public static /*const*/ String sel_defaultTimeZone;
-    public static /*const*/ String sel_gotoBeginning_1;
-    public static /*const*/ String sel_setDrawsOutsideLineFragment_1forGlyphAtIndex_1;
-    public static /*const*/ String sel_characterCollection;
-    public static /*const*/ String sel_getValues_1forParameter_1;
-    public static /*const*/ String sel_removeColumn_1;
-    public static /*const*/ String sel_descender;
-    public static /*const*/ String sel_fragment;
-    public static /*const*/ String sel_setSelectionByRect_1;
-    public static /*const*/ String sel_colorWithColorSpace_1components_1count_1;
-    public static /*const*/ String sel_windingRule;
-    public static /*const*/ String sel_insertColumn_1;
-    public static /*const*/ String sel_resumeWithSuspensionID_1;
-    public static /*const*/ String sel_seekToEndOfFile;
-    public static /*const*/ String sel_initWithTarget_1connection_1;
-    public static /*const*/ String sel_symbolCharacterSet;
-    public static /*const*/ String sel_filterPredicate;
-    public static /*const*/ String sel_setAutoenablesItems_1;
-    public static /*const*/ String sel_printShowingPrintPanel_1;
-    public static /*const*/ String sel_pathForResource_1ofType_1inDirectory_1forLocalization_1;
-    public static /*const*/ String sel_objectByApplyingXSLTAtURL_1arguments_1error_1;
-    public static /*const*/ String sel_setHidesEmptyCells_1;
-    public static /*const*/ String sel_date;
-    public static /*const*/ String sel_writeToFile_1atomically_1;
-    public static /*const*/ String sel_locale;
-    public static /*const*/ String sel_localizedKeyTable;
-    public static /*const*/ String sel_absoluteURL;
-    public static /*const*/ String sel_bundleWithPath_1;
-    public static /*const*/ String sel_setHeaderCell_1;
-    public static /*const*/ String sel_setAutoresizesSubviews_1;
-    public static /*const*/ String sel_URI;
-    public static /*const*/ String sel_controlBackgroundColor;
-    public static /*const*/ String sel_displayNameAtPath_1;
-    public static /*const*/ String sel_decodePortObject;
-    public static /*const*/ String sel_alpha;
-    public static /*const*/ String sel_initWithLeftExpression_1rightExpression_1customSelector_1;
-    public static /*const*/ String sel_secondaryGroupingSize;
-    public static /*const*/ String sel_connectionDidFinishLoading_1;
-    public static /*const*/ String sel_localObjects;
-    public static /*const*/ String sel_enableKeyEquivalentForDefaultButtonCell;
-    public static /*const*/ String sel_drawKnobSlotInRect_1highlight_1;
-    public static /*const*/ String sel_dateWithString_1calendarFormat_1locale_1;
-    public static /*const*/ String sel_stop;
-    public static /*const*/ String sel_appendBezierPathWithOvalInRect_1;
-    public static /*const*/ String sel_componentsSeparatedByCharactersInSet_1;
-    public static /*const*/ String sel_tightenKerning_1;
-    public static /*const*/ String sel_verticalRulerView;
-    public static /*const*/ String sel_setImageAlignment_1;
-    public static /*const*/ String sel_removeFrameUsingName_1;
-    public static /*const*/ String sel_insertColor_1key_1atIndex_1;
-    public static /*const*/ String sel_terminate_1;
-    public static /*const*/ String sel_textContainerChangedTextView_1;
-    public static /*const*/ String sel_removeFileAtPath_1handler_1;
-    public static /*const*/ String sel_splitViewWillResizeSubviews_1;
-    public static /*const*/ String sel_windowDidBecomeMain_1;
-    public static /*const*/ String sel_cellBaselineOffset;
-    public static /*const*/ String sel_addEntriesFromDictionary_1;
-    public static /*const*/ String sel_setOnStateImage_1;
-    public static /*const*/ String sel_colorWithCIColor_1;
-    public static /*const*/ String sel_getCyan_1magenta_1yellow_1black_1alpha_1;
-    public static /*const*/ String sel_symbolicTraits;
-    public static /*const*/ String sel_stringByAppendingPathExtension_1;
-    public static /*const*/ String sel_horizontalScroller;
-    public static /*const*/ String sel_setInitialValue_1;
-    public static /*const*/ String sel_sizeForPaperName_1;
-    public static /*const*/ String sel_CGLContextObj;
-    public static /*const*/ String sel_elementWithName_1;
-    public static /*const*/ String sel_fileManager_1shouldMoveItemAtPath_1toPath_1;
-    public static /*const*/ String sel_richTextSource;
-    public static /*const*/ String sel_unregisterDraggedTypes;
-    public static /*const*/ String sel_absoluteString;
-    public static /*const*/ String sel_spellingPanel;
-    public static /*const*/ String sel_launchedApplications;
-    public static /*const*/ String sel_initWithContentsOfFile_1byReference_1;
-    public static /*const*/ String sel_setLoaded_1;
-    public static /*const*/ String sel_setWindowFrameAutosaveName_1;
-    public static /*const*/ String sel_initOrTestWithTests_1;
-    public static /*const*/ String sel_drawsBackground;
-    public static /*const*/ String sel_numberWithDouble_1;
-    public static /*const*/ String sel_textView_1writeCell_1atIndex_1toPasteboard_1type_1;
-    public static /*const*/ String sel_defaultMiterLimit;
-    public static /*const*/ String sel_containsObject_1;
-    public static /*const*/ String sel_headerTextColor;
-    public static /*const*/ String sel_textView_1doCommandBySelector_1;
-    public static /*const*/ String sel_drawBorderAndBackgroundWithFrame_1inView_1;
-    public static /*const*/ String sel_quarterSymbols;
-    public static /*const*/ String sel_setContainerSize_1;
-    public static /*const*/ String sel_sortUsingSelector_1;
-    public static /*const*/ String sel_setKey_1;
-    public static /*const*/ String sel_headerView;
-    public static /*const*/ String sel_isRegularFile;
-    public static /*const*/ String sel_userData;
-    public static /*const*/ String sel_documentCursor;
-    public static /*const*/ String sel_textEncodingName;
-    public static /*const*/ String sel_performActionForItemAtIndex_1;
-    public static /*const*/ String sel_isCaseInsensitiveLike_1;
-    public static /*const*/ String sel_isEditing;
-    public static /*const*/ String sel_selectFile_1inFileViewerRootedAtPath_1;
-    public static /*const*/ String sel_messageFontOfSize_1;
-    public static /*const*/ String sel_independentConversationQueueing;
-    public static /*const*/ String sel_initWithCoder_1;
-    public static /*const*/ String sel_rangesForUserParagraphAttributeChange;
-    public static /*const*/ String sel_removeTrackingArea_1;
-    public static /*const*/ String sel_glyphGenerator;
-    public static /*const*/ String sel_extraLineFragmentUsedRect;
-    public static /*const*/ String sel_isButtonBordered;
-    public static /*const*/ String sel_setDefaultFormatterBehavior_1;
-    public static /*const*/ String sel_didChange_1valuesAtIndexes_1forKey_1;
-    public static /*const*/ String sel_timeoutInterval;
-    public static /*const*/ String sel_initialValues;
-    public static /*const*/ String sel_getRow_1column_1forPoint_1;
-    public static /*const*/ String sel_tabletPoint_1;
-    public static /*const*/ String sel_setAutorecalculatesKeyViewLoop_1;
-    public static /*const*/ String sel_identifier;
-    public static /*const*/ String sel_scheduleInRunLoop_1forMode_1;
-    public static /*const*/ String sel_baseURL;
-    public static /*const*/ String sel_initWithURL_1;
-    public static /*const*/ String sel_setBackgroundColors_1;
-    public static /*const*/ String sel_addTableColumn_1;
-    public static /*const*/ String sel_fontDescriptorWithFontAttributes_1;
-    public static /*const*/ String sel_dataCellForRow_1;
-    public static /*const*/ String sel_speechSynthesizer_1didEncounterErrorAtIndex_1ofString_1message_1;
-    public static /*const*/ String sel_recoveryAttempter;
-    public static /*const*/ String sel_alignJustified_1;
-    public static /*const*/ String sel_setCompression_1factor_1;
-    public static /*const*/ String sel_elementsForLocalName_1URI_1;
-    public static /*const*/ String sel_deviceGrayColorSpace;
-    public static /*const*/ String sel_scheduledTimerWithTimeInterval_1target_1selector_1userInfo_1repeats_1;
-    public static /*const*/ String sel_runModalSession_1;
-    public static /*const*/ String sel_awakeFromNib;
-    public static /*const*/ String sel_connectionWithReceivePort_1sendPort_1;
-    public static /*const*/ String sel_outlineView_1validateDrop_1proposedItem_1proposedChildIndex_1;
-    public static /*const*/ String sel_remove_1;
-    public static /*const*/ String sel_setTimeInterval_1;
-    public static /*const*/ String sel_splitView_1effectiveRect_1forDrawnRect_1ofDividerAtIndex_1;
-    public static /*const*/ String sel_setUpGState;
-    public static /*const*/ String sel_initWithResponse_1data_1;
-    public static /*const*/ String sel_notificationCenter;
-    public static /*const*/ String sel_setAlternateImage_1;
-    public static /*const*/ String sel_mainWindow;
-    public static /*const*/ String sel_substringWithRange_1;
-    public static /*const*/ String sel_forgetWord_1;
-    public static /*const*/ String sel_shouldCascadeWindows;
-    public static /*const*/ String sel_updateScroller;
-    public static /*const*/ String sel_currentDirectoryPath;
-    public static /*const*/ String sel_isPartialStringValidationEnabled;
-    public static /*const*/ String sel_splitView_1constrainMinCoordinate_1ofSubviewAt_1;
-    public static /*const*/ String sel_drawWithFrame_1inView_1;
-    public static /*const*/ String sel_encodingScheme;
-    public static /*const*/ String sel_namespaceWithName_1stringValue_1;
-    public static /*const*/ String sel_initWithLongLong_1;
-    public static /*const*/ String sel_processIdentifier;
-    public static /*const*/ String sel_setSubmenu_1forItem_1;
-    public static /*const*/ String sel_textAttributesForNil;
-    public static /*const*/ String sel_lockWithPath_1;
-    public static /*const*/ String sel_removeFromSuperviewWithoutNeedingDisplay;
-    public static /*const*/ String sel_cut_1;
-    public static /*const*/ String sel_nullDescriptor;
-    public static /*const*/ String sel_menuFormRepresentation;
-    public static /*const*/ String sel_removeObjectsAtIndexes_1;
-    public static /*const*/ String sel_initWithSource_1;
-    public static /*const*/ String sel_acceptsGlyphInfo;
-    public static /*const*/ String sel_borderType;
-    public static /*const*/ String sel_initWithResumeData_1delegate_1path_1;
-    public static /*const*/ String sel_attachedMenu;
-    public static /*const*/ String sel_stopAnimation;
-    public static /*const*/ String sel_setDoubleAction_1;
-    public static /*const*/ String sel_returnType;
-    public static /*const*/ String sel_fontDescriptorsInCollection_1;
-    public static /*const*/ String sel_setMeasurementUnits_1;
-    public static /*const*/ String sel_baseWritingDirection;
-    public static /*const*/ String sel_currentPoint;
-    public static /*const*/ String sel_initRemoteWithTCPPort_1host_1;
-    public static /*const*/ String sel_entityDeclarationForName_1;
-    public static /*const*/ String sel_evaluate;
-    public static /*const*/ String sel_browser_1draggingImageForRowsWithIndexes_1inColumn_1withEvent_1offset_1;
-    public static /*const*/ String sel_turnOffLigatures_1;
-    public static /*const*/ String sel_setTitleWithMnemonic_1;
-    public static /*const*/ String sel_deepestScreen;
-    public static /*const*/ String sel_connection_1shouldMakeNewConnection_1;
-    public static /*const*/ String sel_selectionShouldChangeInOutlineView_1;
-    public static /*const*/ String sel_preservesSelection;
-    public static /*const*/ String sel_preparePageLayout_1;
-    public static /*const*/ String sel_setOpaque_1;
-    public static /*const*/ String sel_insertObject_1atIndex_1;
-    public static /*const*/ String sel_isActive;
-    public static /*const*/ String sel_drawStrikethroughForGlyphRange_1strikethroughType_1baselineOffset_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1;
-    public static /*const*/ String sel_insertObject_1atArrangedObjectIndex_1;
-    public static /*const*/ String sel_initWithCStringNoCopy_1length_1freeWhenDone_1;
-    public static /*const*/ String sel_previousKeyView;
-    public static /*const*/ String sel_performMiniaturize_1;
-    public static /*const*/ String sel_decimalNumberWithDecimal_1;
-    public static /*const*/ String sel_autosaveTableColumns;
-    public static /*const*/ String sel_baselineOffsetInLayoutManager_1glyphIndex_1;
-    public static /*const*/ String sel_keyViewSelectionDirection;
-    public static /*const*/ String sel_encodeBytes_1length_1;
-    public static /*const*/ String sel_fileManager_1shouldProceedAfterError_1copyingItemAtPath_1toPath_1;
-    public static /*const*/ String sel_menuNeedsUpdate_1;
-    public static /*const*/ String sel_paragraphSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1;
-    public static /*const*/ String sel_synchronize;
-    public static /*const*/ String sel_lockFocus;
-    public static /*const*/ String sel_toggleSmartInsertDelete_1;
-    public static /*const*/ String sel_setMenu_1forSegment_1;
-    public static /*const*/ String sel_removeParamDescriptorWithKeyword_1;
-    public static /*const*/ String sel_applicationShouldOpenUntitledFile_1;
-    public static /*const*/ String sel_DTD;
-    public static /*const*/ String sel_cancelTracking;
-    public static /*const*/ String sel_fileSystemNumber;
-    public static /*const*/ String sel_setLevel_1;
-    public static /*const*/ String sel_setRequiredFileType_1;
-    public static /*const*/ String sel_presentError_1;
-    public static /*const*/ String sel_allowsUserCustomization;
-    public static /*const*/ String sel_childrenKeyPathForNode_1;
-    public static /*const*/ String sel_setYear_1;
-    public static /*const*/ String sel_movieController;
-    public static /*const*/ String sel_unsignedLongValue;
-    public static /*const*/ String sel_hashTableWithOptions_1;
-    public static /*const*/ String sel_setVerticalAlignment_1;
-    public static /*const*/ String sel_cycleToNextInputServerInLanguage_1;
-    public static /*const*/ String sel_sendAction_1to_1from_1;
-    public static /*const*/ String sel_numberFromString_1;
-    public static /*const*/ String sel_setUndoManager_1;
-    public static /*const*/ String sel_imageDimsWhenDisabled;
-    public static /*const*/ String sel_autosavingFileType;
-    public static /*const*/ String sel_unsignedLongLongValue;
-    public static /*const*/ String sel_initImageCell_1;
-    public static /*const*/ String sel_invalidateDisplayForCharacterRange_1;
-    public static /*const*/ String sel_setMaxContentSize_1;
-    public static /*const*/ String sel_outlineView_1isItemExpandable_1;
-    public static /*const*/ String sel_initWithUser_1password_1persistence_1;
-    public static /*const*/ String sel_setBackgroundFilters_1;
-    public static /*const*/ String sel_setAllowsDocumentBackgroundColorChange_1;
-    public static /*const*/ String sel_decodeNXObject;
-    public static /*const*/ String sel_setMaximumSignificantDigits_1;
-    public static /*const*/ String sel_URLsFromRunningOpenPanel;
-    public static /*const*/ String sel_removeChildWindow_1;
-    public static /*const*/ String sel_removeObjectForKey_1;
-    public static /*const*/ String sel_setCellSize_1;
-    public static /*const*/ String sel_getParagraphStart_1end_1contentsEnd_1forRange_1;
-    public static /*const*/ String sel_connectionWithRequest_1delegate_1;
-    public static /*const*/ String sel_setNotShownAttribute_1forGlyphRange_1;
-    public static /*const*/ String sel_collapsesBorders;
-    public static /*const*/ String sel_setNegativeInfinitySymbol_1;
-    public static /*const*/ String sel_initWithKind_1;
-    public static /*const*/ String sel_appleEventCodeForArgumentWithName_1;
-    public static /*const*/ String sel_moveUp_1;
-    public static /*const*/ String sel_initWithTextAlignment_1location_1options_1;
-    public static /*const*/ String sel_systemVersion;
-    public static /*const*/ String sel_numberOfItemsInComboBoxCell_1;
-    public static /*const*/ String sel_readableTypes;
-    public static /*const*/ String sel_setDraggingSourceOperationMask_1forLocal_1;
-    public static /*const*/ String sel_insertLineBreak_1;
-    public static /*const*/ String sel_inLiveResize;
-    public static /*const*/ String sel_setCanHide_1;
-    public static /*const*/ String sel_nextResponder;
-    public static /*const*/ String sel_scrollClipView_1toPoint_1;
-    public static /*const*/ String sel_positiveFormat;
-    public static /*const*/ String sel_redoMenuItemTitle;
-    public static /*const*/ String sel_addIndexesInRange_1;
-    public static /*const*/ String sel_lockBeforeDate_1;
-    public static /*const*/ String sel_unlockWithCondition_1;
-    public static /*const*/ String sel_nextWordFromIndex_1forward_1;
-    public static /*const*/ String sel_waitUntilAllOperationsAreFinished;
-    public static /*const*/ String sel_drawRow_1clipRect_1;
-    public static /*const*/ String sel_setPartialStringValidationEnabled_1;
-    public static /*const*/ String sel_methodSignatureForSelector_1;
-    public static /*const*/ String sel_setSecondaryGroupingSize_1;
-    public static /*const*/ String sel_criteriaForRow_1;
-    public static /*const*/ String sel_setShadowBlurRadius_1;
-    public static /*const*/ String sel_expressionForFunction_1selectorName_1arguments_1;
-    public static /*const*/ String sel_initWithWindowNibName_1;
-    public static /*const*/ String sel_selectItemWithTag_1;
-    public static /*const*/ String sel_characterIndexForPoint_1;
-    public static /*const*/ String sel_validate;
-    public static /*const*/ String sel_setHorizontalPageScroll_1;
-    public static /*const*/ String sel_localizedColorNameComponent;
-    public static /*const*/ String sel_setVoice_1;
-    public static /*const*/ String sel_setCachedSeparately_1;
-    public static /*const*/ String sel_frameRectForContentRect_1;
-    public static /*const*/ String sel_bezelStyle;
-    public static /*const*/ String sel_setDecimalSeparator_1;
-    public static /*const*/ String sel_conversationIdentifier;
-    public static /*const*/ String sel_setPrompt_1;
-    public static /*const*/ String sel_setShowsFirstResponder_1;
-    public static /*const*/ String sel_setRootObject_1;
-    public static /*const*/ String sel_menuBarVisible;
-    public static /*const*/ String sel_netServiceBrowser_1didRemoveDomain_1moreComing_1;
-    public static /*const*/ String sel_threadPriority;
-    public static /*const*/ String sel_countKeyPath;
-    public static /*const*/ String sel_runCustomizationPalette_1;
-    public static /*const*/ String sel_fileHandleWithStandardError;
-    public static /*const*/ String sel_documentContentKind;
-    public static /*const*/ String sel_view_1StringForToolTip_1point_1userData_1;
-    public static /*const*/ String sel_nameFieldLabel;
-    public static /*const*/ String sel_miniaturizeAll_1;
-    public static /*const*/ String sel_initWithRepresentedObject_1;
-    public static /*const*/ String sel_runOperation;
-    public static /*const*/ String sel_drawBackgroundForBlock_1withFrame_1inView_1characterRange_1layoutManager_1;
-    public static /*const*/ String sel_localizedInfoDictionary;
-    public static /*const*/ String sel_scanFloat_1;
-    public static /*const*/ String sel_scanHexDouble_1;
-    public static /*const*/ String sel_continueSpeaking;
-    public static /*const*/ String sel_attachedMenuView;
-    public static /*const*/ String sel_wantsToHandleMouseEvents;
-    public static /*const*/ String sel_attemptRecoveryFromError_1optionIndex_1;
-    public static /*const*/ String sel_window_1shouldDragDocumentWithEvent_1from_1withPasteboard_1;
-    public static /*const*/ String sel_mouseEntered_1;
-    public static /*const*/ String sel_setNameFieldLabel_1;
-    public static /*const*/ String sel_setIndentationPerLevel_1;
-    public static /*const*/ String sel_setMinColumnWidth_1;
-    public static /*const*/ String sel_classNameForClass_1;
-    public static /*const*/ String sel_runLoopModes;
-    public static /*const*/ String sel_pullsDown;
-    public static /*const*/ String sel_setOutlineTableColumn_1;
-    public static /*const*/ String sel_windowDidLoad;
-    public static /*const*/ String sel_read_1maxLength_1;
-    public static /*const*/ String sel_removeItemAtIndex_1;
-    public static /*const*/ String sel_initWithColor_1;
-    public static /*const*/ String sel_compare_1options_1;
-    public static /*const*/ String sel_removeTableColumn_1;
-    public static /*const*/ String sel_isRedoing;
-    public static /*const*/ String sel_setTitleWithRepresentedFilename_1;
-    public static /*const*/ String sel_setDirectory_1;
-    public static /*const*/ String sel_makeDocumentWithContentsOfURL_1ofType_1error_1;
-    public static /*const*/ String sel_isSelectedForSegment_1;
-    public static /*const*/ String sel_month;
-    public static /*const*/ String sel_addRow;
-    public static /*const*/ String sel_layoutOptions;
-    public static /*const*/ String sel_maxNumberOfRows;
-    public static /*const*/ String sel_setUpPrintOperationDefaultValues;
-    public static /*const*/ String sel_initByReferencingURL_1;
-    public static /*const*/ String sel_class;
-    public static /*const*/ String sel_setFrameAutosaveName_1;
-    public static /*const*/ String sel_fileWrapperFromRange_1documentAttributes_1error_1;
-    public static /*const*/ String sel_int32Value;
-    public static /*const*/ String sel_setControlView_1;
-    public static /*const*/ String sel_setCharacterEncoding_1;
-    public static /*const*/ String sel_disableFlushWindow;
-    public static /*const*/ String sel_insertString_1atIndex_1;
-    public static /*const*/ String sel_childNodes;
-    public static /*const*/ String sel_rangeContainerObject;
-    public static /*const*/ String sel_kind;
-    public static /*const*/ String sel_title;
-    public static /*const*/ String sel_bundleWithIdentifier_1;
-    public static /*const*/ String sel_initWithMovie_1;
-    public static /*const*/ String sel_unionHashTable_1;
-    public static /*const*/ String sel_setStartSpecifier_1;
-    public static /*const*/ String sel_browser_1nextTypeSelectMatchFromRow_1toRow_1inColumn_1forString_1;
-    public static /*const*/ String sel_tokenFieldCell_1representedObjectForEditingString_1;
-    public static /*const*/ String sel_initWithContentsOfFile_1;
-    public static /*const*/ String sel_dataWithContentsOfURL_1;
-    public static /*const*/ String sel_firstWeekday;
-    public static /*const*/ String sel_setInitialValues_1;
-    public static /*const*/ String sel_setIntegerValue_1;
-    public static /*const*/ String sel_calcSize;
-    public static /*const*/ String sel_setTokenizingCharacterSet_1;
-    public static /*const*/ String sel_setRepresentedFilename_1;
-    public static /*const*/ String sel_colorSpaceName;
-    public static /*const*/ String sel_setLineBreakMode_1;
-    public static /*const*/ String sel_appliesImmediately;
-    public static /*const*/ String sel_classDescriptionWithAppleEventCode_1;
-    public static /*const*/ String sel_eventRef;
-    public static /*const*/ String sel_textAttributesForZero;
-    public static /*const*/ String sel_setAutosavesConfiguration_1;
-    public static /*const*/ String sel_countOfIndexesInRange_1;
-    public static /*const*/ String sel_count;
-    public static /*const*/ String sel_initWithSuiteName_1className_1dictionary_1;
-    public static /*const*/ String sel_isReleasedWhenClosed;
-    public static /*const*/ String sel_windowWithWindowNumber_1;
-    public static /*const*/ String sel_removeNamespaceForPrefix_1;
-    public static /*const*/ String sel_documentWithRootElement_1;
-    public static /*const*/ String sel_pageFooter;
-    public static /*const*/ String sel_initWithOptions_1capacity_1;
-    public static /*const*/ String sel_insertBacktab_1;
-    public static /*const*/ String sel_changeWindowsItem_1title_1filename_1;
-    public static /*const*/ String sel_changeCount;
-    public static /*const*/ String sel_paragraphCharacterRange;
-    public static /*const*/ String sel_currentProgress;
-    public static /*const*/ String sel_parser_1didStartMappingPrefix_1toURI_1;
-    public static /*const*/ String sel_setFormatWidth_1;
-    public static /*const*/ String sel_cancelAllOperations;
-    public static /*const*/ String sel_beginLoadInBackground;
-    public static /*const*/ String sel_draggedDistance;
-    public static /*const*/ String sel_setIndex_1;
-    public static /*const*/ String sel_initWithScheme_1host_1path_1;
-    public static /*const*/ String sel_toolTipForCell_1;
-    public static /*const*/ String sel_predicateForRow_1;
-    public static /*const*/ String sel_predefinedEntityDeclarationForName_1;
-    public static /*const*/ String sel_replacePointerAtIndex_1withPointer_1;
-    public static /*const*/ String sel_fileURLWithPath_1;
-    public static /*const*/ String sel_currentDocument;
-    public static /*const*/ String sel_shouldDrawInsertionPoint;
-    public static /*const*/ String sel_saveAllDocuments_1;
-    public static /*const*/ String sel_windowControllerWillLoadNib_1;
-    public static /*const*/ String sel_closeAllDocumentsWithDelegate_1didCloseAllSelector_1contextInfo_1;
-    public static /*const*/ String sel_tableView_1heightOfRow_1;
-    public static /*const*/ String sel_postNotificationName_1object_1userInfo_1options_1;
-    public static /*const*/ String sel_imageTypes;
-    public static /*const*/ String sel_setPreferredBackingLocation_1;
-    public static /*const*/ String sel_netServiceDidPublish_1;
-    public static /*const*/ String sel_diskCapacity;
-    public static /*const*/ String sel_initWithString_1calendarFormat_1locale_1;
-    public static /*const*/ String sel_preferredEdge;
-    public static /*const*/ String sel_comboBoxCell_1indexOfItemWithStringValue_1;
-    public static /*const*/ String sel_replaceCharactersInRange_1withString_1;
-    public static /*const*/ String sel_initWithTimeIntervalSinceReferenceDate_1;
-    public static /*const*/ String sel_secondsFromGMT;
-    public static /*const*/ String sel_hasOrderedToManyRelationshipForKey_1;
-    public static /*const*/ String sel_resignFirstResponder;
-    public static /*const*/ String sel_netServiceDidStop_1;
-    public static /*const*/ String sel_absoluteY;
-    public static /*const*/ String sel_beginModalSessionForWindow_1;
-    public static /*const*/ String sel_alignment;
-    public static /*const*/ String sel_setCharactersToBeSkipped_1;
-    public static /*const*/ String sel_requestWithURL_1cachePolicy_1timeoutInterval_1;
-    public static /*const*/ String sel_ruler;
-    public static /*const*/ String sel_isSetOnMouseExited;
-    public static /*const*/ String sel_setRemovable_1;
-    public static /*const*/ String sel_draggingSource;
-    public static /*const*/ String sel_textView_1clickedOnLink_1;
-    public static /*const*/ String sel_canBeVisibleOnAllSpaces;
-    public static /*const*/ String sel_setBadgeLabel_1;
-    public static /*const*/ String sel_parser_1foundUnparsedEntityDeclarationWithName_1publicID_1systemID_1notationName_1;
-    public static /*const*/ String sel_operations;
-    public static /*const*/ String sel_setInteger_1forKey_1;
-    public static /*const*/ String sel_otherMouseUp_1;
-    public static /*const*/ String sel_drawImageWithFrame_1inView_1;
-    public static /*const*/ String sel_getPixel_1atX_1y_1;
-    public static /*const*/ String sel_standardError;
-    public static /*const*/ String sel_setLabel_1;
-    public static /*const*/ String sel_initWithUnsignedInt_1;
-    public static /*const*/ String sel_isFinished;
-    public static /*const*/ String sel_drawSwatchInRect_1;
-    public static /*const*/ String sel_descriptorAtIndex_1;
-    public static /*const*/ String sel_cachedHandleForURL_1;
-    public static /*const*/ String sel_classCode;
-    public static /*const*/ String sel_resolvesAliases;
-    public static /*const*/ String sel_textTypes;
-    public static /*const*/ String sel_invalidateTextContainerOrigin;
-    public static /*const*/ String sel_document;
-    public static /*const*/ String sel_interiorBackgroundStyleForSegment_1;
-    public static /*const*/ String sel_transformedValue_1;
-    public static /*const*/ String sel_substringToIndex_1;
-    public static /*const*/ String sel_addDocument_1;
-    public static /*const*/ String sel_numberWithInteger_1;
-    public static /*const*/ String sel_setBoundsRotation_1;
-    public static /*const*/ String sel_convertFont_1toFace_1;
-    public static /*const*/ String sel_updateInsertionPointStateAndRestartTimer_1;
-    public static /*const*/ String sel_tryToPerform_1with_1;
-    public static /*const*/ String sel_defaultLineHeightForFont;
-    public static /*const*/ String sel_scriptingIsEqualTo_1;
-    public static /*const*/ String sel_setDoubleValue_1;
-    public static /*const*/ String sel_AMSymbol;
-    public static /*const*/ String sel_valueWraps;
-    public static /*const*/ String sel_allCredentials;
-    public static /*const*/ String sel_editingDelegate;
-    public static /*const*/ String sel_maintainsInactiveSelection;
-    public static /*const*/ String sel_policyDelegate;
-    public static /*const*/ String sel_preferences;
-    public static /*const*/ String sel_registerViewClass_1representationClass_1forMIMEType_1;
-    public static /*const*/ String sel_setHostWindow_1;
-    public static /*const*/ String sel_hostWindow;
-    public static /*const*/ String sel_searchFor_1direction_1caseSensitive_1wrap_1;
-    public static /*const*/ String sel_initWithFrame_1frameName_1groupName_1;
-    public static /*const*/ String sel_canGoBack;
-    public static /*const*/ String sel_setFrameLoadDelegate_1;
-    public static /*const*/ String sel_takeStringURLFrom_1;
-    public static /*const*/ String sel_registerURLSchemeAsLocal_1;
-    public static /*const*/ String sel_stringByEvaluatingJavaScriptFromString_1;
-    public static /*const*/ String sel_replaceSelectionWithMarkupString_1;
-    public static /*const*/ String sel_setPreferences_1;
-    public static /*const*/ String sel_customUserAgent;
-    public static /*const*/ String sel_mainFrame;
-    public static /*const*/ String sel_goToBackForwardItem_1;
-    public static /*const*/ String sel_pasteboardTypesForElement_1;
-    public static /*const*/ String sel_applyStyle_1;
-    public static /*const*/ String sel_setResourceLoadDelegate_1;
-    public static /*const*/ String sel_moveToBeginningOfSentenceAndModifySelection_1;
-    public static /*const*/ String sel_replaceSelectionWithArchive_1;
-    public static /*const*/ String sel_userAgentForURL_1;
-    public static /*const*/ String sel_frameLoadDelegate;
-    public static /*const*/ String sel_windowScriptObject;
-    public static /*const*/ String sel_removeDragCaret;
-    public static /*const*/ String sel_editableDOMRangeForPoint_1;
-    public static /*const*/ String sel_moveToEndOfSentence_1;
-    public static /*const*/ String sel_preferencesIdentifier;
-    public static /*const*/ String sel_setPolicyDelegate_1;
-    public static /*const*/ String sel_goBack;
-    public static /*const*/ String sel_downloadDelegate;
-    public static /*const*/ String sel_canShowMIMEType_1;
-    public static /*const*/ String sel_elementAtPoint_1;
-    public static /*const*/ String sel_groupName;
-    public static /*const*/ String sel_selectedFrame;
-    public static /*const*/ String sel_setMIMETypesShownAsHTML_1;
-    public static /*const*/ String sel_goForward;
-    public static /*const*/ String sel_makeTextStandardSize_1;
-    public static /*const*/ String sel_setMainFrameURL_1;
-    public static /*const*/ String sel_pasteboardTypesForSelection;
-    public static /*const*/ String sel_customTextEncodingName;
-    public static /*const*/ String sel_MIMETypesShownAsHTML;
-    public static /*const*/ String sel_replaceSelectionWithText_1;
-    public static /*const*/ String sel_setTextSizeMultiplier_1;
-    public static /*const*/ String sel_stopLoading_1;
-    public static /*const*/ String sel_goBack_1;
-    public static /*const*/ String sel_canMakeTextStandardSize;
-    public static /*const*/ String sel_setCustomUserAgent_1;
-    public static /*const*/ String sel_moveDragCaretToPoint_1;
-    public static /*const*/ String sel_makeTextSmaller_1;
-    public static /*const*/ String sel_moveToBeginningOfSentence_1;
-    public static /*const*/ String sel_reload_1;
-    public static /*const*/ String sel_typingStyle;
-    public static /*const*/ String sel_setShouldCloseWithWindow_1;
-    public static /*const*/ String sel_setMediaStyle_1;
-    public static /*const*/ String sel_canMakeTextLarger;
-    public static /*const*/ String sel_textSizeMultiplier;
-    public static /*const*/ String sel_shouldCloseWithWindow;
-    public static /*const*/ String sel_setPreferencesIdentifier_1;
-    public static /*const*/ String sel_setApplicationNameForUserAgent_1;
-    public static /*const*/ String sel_mainFrameURL;
-    public static /*const*/ String sel_goForward_1;
-    public static /*const*/ String sel_selectedDOMRange;
-    public static /*const*/ String sel_setDownloadDelegate_1;
-    public static /*const*/ String sel_setEditingDelegate_1;
-    public static /*const*/ String sel_setUIDelegate_1;
-    public static /*const*/ String sel_mainFrameTitle;
-    public static /*const*/ String sel_setSelectedDOMRange_1affinity_1;
-    public static /*const*/ String sel_setTypingStyle_1;
-    public static /*const*/ String sel_backForwardList;
-    public static /*const*/ String sel_deleteSelection;
-    public static /*const*/ String sel_canGoForward;
-    public static /*const*/ String sel_styleDeclarationWithText_1;
-    public static /*const*/ String sel_moveToEndOfSentenceAndModifySelection_1;
-    public static /*const*/ String sel_replaceSelectionWithNode_1;
-    public static /*const*/ String sel_URLTitleFromPasteboard_1;
-    public static /*const*/ String sel_UIDelegate;
-    public static /*const*/ String sel_setMaintainsBackForwardList_1;
-    public static /*const*/ String sel_mainFrameIcon;
-    public static /*const*/ String sel_setGroupName_1;
-    public static /*const*/ String sel_canMakeTextSmaller;
-    public static /*const*/ String sel_applicationNameForUserAgent;
-    public static /*const*/ String sel_supportsTextEncoding;
-    public static /*const*/ String sel_canShowMIMETypeAsHTML_1;
-    public static /*const*/ String sel_mediaStyle;
-    public static /*const*/ String sel_makeTextLarger_1;
-    public static /*const*/ String sel_writeElement_1withPasteboardTypes_1toPasteboard_1;
-    public static /*const*/ String sel_estimatedProgress;
-    public static /*const*/ String sel_setCustomTextEncodingName_1;
-    public static /*const*/ String sel_mainFrameDocument;
-    public static /*const*/ String sel_isLoading;
-    public static /*const*/ String sel_selectSentence_1;
-    public static /*const*/ String sel_computedStyleForElement_1pseudoElement_1;
-    public static /*const*/ String sel_writeSelectionWithPasteboardTypes_1toPasteboard_1;
-    public static /*const*/ String sel_resourceLoadDelegate;
-    public static /*const*/ String sel_reload;
-    public static /*const*/ String sel_loadAlternateHTMLString_1baseURL_1forUnreachableURL_1;
-    public static /*const*/ String sel_loadHTMLString_1baseURL_1;
-    public static /*const*/ String sel_loadArchive_1;
-    public static /*const*/ String sel_webView;
-    public static /*const*/ String sel_provisionalDataSource;
-    public static /*const*/ String sel_findFrameNamed_1;
-    public static /*const*/ String sel_DOMDocument;
-    public static /*const*/ String sel_frameView;
-    public static /*const*/ String sel_globalContext;
-    public static /*const*/ String sel_windowObject;
-    public static /*const*/ String sel_childFrames;
-    public static /*const*/ String sel_loadData_1MIMEType_1textEncodingName_1baseURL_1;
-    public static /*const*/ String sel_initWithName_1webFrameView_1webView_1;
-    public static /*const*/ String sel_frameElement;
-    public static /*const*/ String sel_loadRequest_1;
-    public static /*const*/ String sel_parentFrame;
-    public static /*const*/ String sel_representation;
-    public static /*const*/ String sel_documentSource;
-    public static /*const*/ String sel_webView_1didChangeLocationWithinPageForFrame_1;
-    public static /*const*/ String sel_webView_1didFailProvisionalLoadWithError_1forFrame_1;
-    public static /*const*/ String sel_webView_1didFinishLoadForFrame_1;
-    public static /*const*/ String sel_webView_1didReceiveTitle_1forFrame_1;
-    public static /*const*/ String sel_webView_1didStartProvisionalLoadForFrame_1;
-    public static /*const*/ String sel_webView_1didCommitLoadForFrame_1;
-    public static /*const*/ String sel_webView_1resource_1didFinishLoadingFromDataSource_1;
-    public static /*const*/ String sel_webView_1resource_1didFailLoadingWithError_1fromDataSource_1;
-    public static /*const*/ String sel_webView_1identifierForInitialRequest_1fromDataSource_1;
-    public static /*const*/ String sel_webView_1resource_1willSendRequest_1redirectResponse_1fromDataSource_1;
-    public static /*const*/ String sel_webView_1createWebViewWithRequest_1;
-    public static /*const*/ String sel_webViewShow_1;
-    public static /*const*/ String sel_webView_1setFrame_1;
-    public static /*const*/ String sel_webViewClose_1;
-    public static /*const*/ String sel_webView_1contextMenuItemsForElement_1defaultMenuItems_1;
-    public static /*const*/ String sel_webView_1setStatusBarVisible_1;
-    public static /*const*/ String sel_webView_1setResizable_1;
-    public static /*const*/ String sel_webView_1setToolbarsVisible_1;
-    public static /*const*/ String sel_webView_1setStatusText_1;
-    public static /*const*/ String sel_webViewFocus_1;
-    public static /*const*/ String sel_webViewUnfocus_1;
-    public static /*const*/ String sel_webView_1runJavaScriptAlertPanelWithMessage_1;
-    public static /*const*/ String sel_webView_1runJavaScriptConfirmPanelWithMessage_1;
-    public static /*const*/ String sel_webView_1runOpenPanelForFileButtonWithResultListener_1;
-    public static /*const*/ String sel_webView_1mouseDidMoveOverElement_1modifierFlags_1;
-    public static /*const*/ String sel_webView_1printFrameView_1;
-    public static /*const*/ String sel_webView_1decidePolicyForMIMEType_1request_1frame_1decisionListener_1;
-    public static /*const*/ String sel_webView_1decidePolicyForNewWindowAction_1request_1newFrameName_1decisionListener_1;
-    public static /*const*/ String sel_webView_1unableToImplementPolicyWithError_1frame_1;
-    public static /*const*/ String sel_webView_1decidePolicyForNavigationAction_1request_1frame_1decisionListener_1;
-    public static /*const*/ String sel_standardPreferences;
-    public static /*const*/ String sel_setJavaEnabled_1;
-    public static /*const*/ String sel_use;
-    public static /*const*/ String sel_download;
-    public static /*const*/ String sel_ignore;
-    public static /*const*/ String sel_pageTitle;
-    public static /*const*/ String sel_webFrame;
-    public static /*const*/ String sel_chooseFilename_1;
-    public static /*const*/ String sel_addEventListener_1listener_1useCapture_1;
-    public static /*const*/ String sel_handleEvent_1;
-    public static /*const*/ String sel_cancelable;
-    public static /*const*/ String sel_timeStamp;
-    public static /*const*/ String sel_initEvent_1_1_1;
-    public static /*const*/ String sel_bubbles;
-    public static /*const*/ String sel_stopPropagation;
-    public static /*const*/ String sel_initEvent_1canBubbleArg_1cancelableArg_1;
-    public static /*const*/ String sel_eventPhase;
-    public static /*const*/ String sel_currentTarget;
-    public static /*const*/ String sel_preventDefault;
-    public static /*const*/ String sel_screenX;
-    public static /*const*/ String sel_initMouseEvent_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1;
-    public static /*const*/ String sel_clientY;
-    public static /*const*/ String sel_charCode;
-    public static /*const*/ String sel_relatedTarget;
-    public static /*const*/ String sel_button;
-    public static /*const*/ String sel_clientX;
-    public static /*const*/ String sel_initMouseEvent_1canBubble_1cancelable_1view_1detail_1screenX_1screenY_1clientX_1clientY_1ctrlKey_1altKey_1shiftKey_1metaKey_1button_1relatedTarget_1;
-    public static /*const*/ String sel_shiftKey;
-    public static /*const*/ String sel_ctrlKey;
-    public static /*const*/ String sel_metaKey;
-    public static /*const*/ String sel_altKey;
-    public static /*const*/ String sel_keyLocation;
-    public static /*const*/ String sel_getModifierState_1;
-    public static /*const*/ String sel_screenY;
-    public static /*const*/ String sel_detail;
-    public static /*const*/ String sel_handleNotification_1;
-    public static /*const*/ String sel_setAllowsScrolling_1;
-    public static /*const*/ String sel_allowsScrolling;
-    public static /*const*/ String sel_printDocumentView;
-    public static /*const*/ String sel_documentViewShouldHandlePrint;
-    public static /*const*/ String sel_printOperationWithPrintInfo_1;
-    public static /*const*/ String sel_canPrintHeadersAndFooters;
-    public static /*const*/ String sel_wheelDelta;
+	public static const int gestaltSystemVersion = ('s'<<24) + ('y'<<16) + ('s'<<8) + 'v';
+	public static const int noErr = 0;
+	public static const int kProcessTransformToForegroundApplication = 1;
+	public static const int kAlertCautionIcon = ('c'<<24) + ('a'<<16) + ('u'<<8) + 't';
+	public static const int kAlertNoteIcon = ('n'<<24) + ('o'<<16) + ('t'<<8) + 'e';
+	public static const int kAlertStopIcon = ('s'<<24) + ('t'<<16) + ('o'<<8) + 'p';
+        
+    public static const objc.SEL sel_sendSelection;
+    public static const objc.SEL sel_sendDoubleSelection;
+    public static const objc.SEL sel_sendVerticalSelection;
+    public static const objc.SEL sel_sendHorizontalSelection;
+    public static const objc.SEL sel_timerProc_;
+    public static const objc.SEL sel_handleNotification_;
     
-    private static const SelectorData[] selectorData = [
-        { &sel_inputClientEnabled_1, "inputClientEnabled:" },
-        { &sel_setVerticalPagination_1, "setVerticalPagination:" },
-        { &sel_isEqualToHost_1, "isEqualToHost:" },
-        { &sel_compare_1, "compare:" },
-        { &sel_printPanel, "printPanel" },
-        { &sel_unregisterImageRepClass_1, "unregisterImageRepClass:" },
-        { &sel_dataWithLength_1, "dataWithLength:" },
-        { &sel_dismissPopUp, "dismissPopUp" },
-        { &sel_substituteFontForFont_1, "substituteFontForFont:" },
-        { &sel_sendAction_1to_1, "sendAction:to:" },
-        { &sel_rangeOfCharacterFromSet_1options_1range_1, "rangeOfCharacterFromSet:options:range:" },
-        { &sel_autoupdatingCurrentCalendar, "autoupdatingCurrentCalendar" },
-        { &sel_nextDaylightSavingTimeTransitionAfterDate_1, "nextDaylightSavingTimeTransitionAfterDate:" },
-        { &sel_attachmentSizeForGlyphAtIndex_1, "attachmentSizeForGlyphAtIndex:" },
-        { &sel_shouldCollapseAutoExpandedItemsForDeposited_1, "shouldCollapseAutoExpandedItemsForDeposited:" },
-        { &sel_decimalNumberByRoundingAccordingToBehavior_1, "decimalNumberByRoundingAccordingToBehavior:" },
-        { &sel_scanHexFloat_1, "scanHexFloat:" },
-        { &sel_rangesForUserTextChange, "rangesForUserTextChange" },
-        { &sel_indexOfItemWithObjectValue_1, "indexOfItemWithObjectValue:" },
-        { &sel_sendsSearchStringImmediately, "sendsSearchStringImmediately" },
-        { &sel_isTransparent, "isTransparent" },
-        { &sel_widthOfColumn_1, "widthOfColumn:" },
-        { &sel_calendarFormat, "calendarFormat" },
-        { &sel_lineBreakByHyphenatingBeforeIndex_1withinRange_1, "lineBreakByHyphenatingBeforeIndex:withinRange:" },
-        { &sel_parentNode, "parentNode" },
-        { &sel_setDrawsOutsideLineFragment_1forGlyphRange_1, "setDrawsOutsideLineFragment:forGlyphRange:" },
-        { &sel_negativeSuffix, "negativeSuffix" },
-        { &sel_setFlatness_1, "setFlatness:" },
-        { &sel_ignoresAlpha, "ignoresAlpha" },
-        { &sel_setValue_1type_1forDimension_1, "setValue:type:forDimension:" },
-        { &sel_setLayer_1, "setLayer:" },
-        { &sel_setActionName_1, "setActionName:" },
-        { &sel_setIcon_1, "setIcon:" },
-        { &sel_tokenFieldCell_1readFromPasteboard_1, "tokenFieldCell:readFromPasteboard:" },
-        { &sel_setPropertyList_1forType_1, "setPropertyList:forType:" },
-        { &sel_endModalSession_1, "endModalSession:" },
-        { &sel_sharedColorPanel, "sharedColorPanel" },
-        { &sel_contentSizeForFrameSize_1hasHorizontalScroller_1hasVerticalScroller_1borderType_1, "contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:" },
-        { &sel_layoutRectForTextBlock_1glyphRange_1, "layoutRectForTextBlock:glyphRange:" },
-        { &sel_scrollRowToVisible_1, "scrollRowToVisible:" },
-        { &sel_attributedStringForZero, "attributedStringForZero" },
-        { &sel_showsInvisibleCharacters, "showsInvisibleCharacters" },
-        { &sel_adjustPageWidthNew_1left_1right_1limit_1, "adjustPageWidthNew:left:right:limit:" },
-        { &sel_client, "client" },
-        { &sel_initWithKey_1ascending_1selector_1, "initWithKey:ascending:selector:" },
-        { &sel_completedString_1, "completedString:" },
-        { &sel_bundleForClass_1, "bundleForClass:" },
-        { &sel_pathControl_1acceptDrop_1, "pathControl:acceptDrop:" },
-        { &sel_imageRepsWithPasteboard_1, "imageRepsWithPasteboard:" },
-        { &sel_toolTipForSegment_1, "toolTipForSegment:" },
-        { &sel_suspended, "suspended" },
-        { &sel_encodeDouble_1forKey_1, "encodeDouble:forKey:" },
-        { &sel_setNextState, "setNextState" },
-        { &sel_ignoreWord_1inSpellDocumentWithTag_1, "ignoreWord:inSpellDocumentWithTag:" },
-        { &sel_stopMonitoring, "stopMonitoring" },
-        { &sel_initWithTitle_1action_1keyEquivalent_1, "initWithTitle:action:keyEquivalent:" },
-        { &sel_setDropRow_1dropOperation_1, "setDropRow:dropOperation:" },
-        { &sel_contentView, "contentView" },
-        { &sel_setNilSymbol_1, "setNilSymbol:" },
-        { &sel_removePropertyForKey_1inRequest_1, "removePropertyForKey:inRequest:" },
-        { &sel_setMarkerLocation_1, "setMarkerLocation:" },
-        { &sel_resolvedKeyDictionary, "resolvedKeyDictionary" },
-        { &sel_enumeratorAtPath_1, "enumeratorAtPath:" },
-        { &sel_decodeObjectForKey_1, "decodeObjectForKey:" },
-        { &sel_loadInForeground, "loadInForeground" },
-        { &sel_baseSpecifier, "baseSpecifier" },
-        { &sel_isMemberOfClass_1, "isMemberOfClass:" },
-        { &sel_setMaxVisibleColumns_1, "setMaxVisibleColumns:" },
-        { &sel_unmountAndEjectDeviceAtPath_1, "unmountAndEjectDeviceAtPath:" },
-        { &sel_openTempFile_1, "openTempFile:" },
-        { &sel_isRowSelected_1, "isRowSelected:" },
-        { &sel_insertItemWithItemIdentifier_1atIndex_1, "insertItemWithItemIdentifier:atIndex:" },
-        { &sel_parserDidEndDocument_1, "parserDidEndDocument:" },
-        { &sel_reverseTransformedValue_1, "reverseTransformedValue:" },
-        { &sel_setTimeStyle_1, "setTimeStyle:" },
-        { &sel_initWithContentsOfFile_1usedEncoding_1error_1, "initWithContentsOfFile:usedEncoding:error:" },
-        { &sel_endGrouping, "endGrouping" },
-        { &sel_initWithProxyHost_1port_1type_1realm_1authenticationMethod_1, "initWithProxyHost:port:type:realm:authenticationMethod:" },
-        { &sel_tableView_1dataCellForTableColumn_1row_1, "tableView:dataCellForTableColumn:row:" },
-        { &sel_convertPoint_1toView_1, "convertPoint:toView:" },
-        { &sel_setFrame_1display_1animate_1, "setFrame:display:animate:" },
-        { &sel_exceptionDuringOperation_1error_1leftOperand_1rightOperand_1, "exceptionDuringOperation:error:leftOperand:rightOperand:" },
-        { &sel_applicationOpenUntitledFile_1, "applicationOpenUntitledFile:" },
-        { &sel_initWithRootElement_1, "initWithRootElement:" },
-        { &sel_setHorizontalScroller_1, "setHorizontalScroller:" },
-        { &sel_finalWritePrintInfo, "finalWritePrintInfo" },
-        { &sel_addItemWithTitle_1, "addItemWithTitle:" },
-        { &sel_setColor_1, "setColor:" },
-        { &sel_isHostCacheEnabled, "isHostCacheEnabled" },
-        { &sel_controlTextDidChange_1, "controlTextDidChange:" },
-        { &sel_headerLevel, "headerLevel" },
-        { &sel_loadInBackground, "loadInBackground" },
-        { &sel_setNeedsDisplayForItemAtIndex_1, "setNeedsDisplayForItemAtIndex:" },
-        { &sel_setCellPrototype_1, "setCellPrototype:" },
-        { &sel_enqueueNotification_1postingStyle_1coalesceMask_1forModes_1, "enqueueNotification:postingStyle:coalesceMask:forModes:" },
-        { &sel_minColumnWidth, "minColumnWidth" },
-        { &sel_tableView_1shouldTypeSelectForEvent_1withCurrentSearchString_1, "tableView:shouldTypeSelectForEvent:withCurrentSearchString:" },
-        { &sel_validateValue_1forKey_1error_1, "validateValue:forKey:error:" },
-        { &sel_canBeConvertedToEncoding_1, "canBeConvertedToEncoding:" },
-        { &sel_numberOfItems, "numberOfItems" },
-        { &sel_bestRepresentationForDevice_1, "bestRepresentationForDevice:" },
-        { &sel_setBorderColor_1forEdge_1, "setBorderColor:forEdge:" },
-        { &sel_setHorizontalLineScroll_1, "setHorizontalLineScroll:" },
-        { &sel_sharedHTTPCookieStorage, "sharedHTTPCookieStorage" },
-        { &sel_cachesBezierPath, "cachesBezierPath" },
-        { &sel_strokeLineFromPoint_1toPoint_1, "strokeLineFromPoint:toPoint:" },
-        { &sel_preferredBackingLocation, "preferredBackingLocation" },
-        { &sel_removeRowAtIndex_1, "removeRowAtIndex:" },
-        { &sel_setCurrentTime_1, "setCurrentTime:" },
-        { &sel_string, "string" },
-        { &sel_hasVerticalScroller, "hasVerticalScroller" },
-        { &sel_initWithTimeInterval_1sinceDate_1, "initWithTimeInterval:sinceDate:" },
-        { &sel_showsProgressPanel, "showsProgressPanel" },
-        { &sel_setDirectParameter_1, "setDirectParameter:" },
-        { &sel_storeCachedResponse_1forRequest_1, "storeCachedResponse:forRequest:" },
-        { &sel_textUnfilteredPasteboardTypes, "textUnfilteredPasteboardTypes" },
-        { &sel_isDragging, "isDragging" },
-        { &sel_tableView_1shouldTrackCell_1forTableColumn_1row_1, "tableView:shouldTrackCell:forTableColumn:row:" },
-        { &sel_dictionaryRepresentation, "dictionaryRepresentation" },
-        { &sel_attributesForExtraLineFragment, "attributesForExtraLineFragment" },
-        { &sel_getCharacters_1range_1, "getCharacters:range:" },
-        { &sel_nibName, "nibName" },
-        { &sel_initWithURL_1options_1documentAttributes_1error_1, "initWithURL:options:documentAttributes:error:" },
-        { &sel_initWithFrame_1mode_1cellClass_1numberOfRows_1numberOfColumns_1, "initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:" },
-        { &sel_reflectScrolledClipView_1, "reflectScrolledClipView:" },
-        { &sel_stringWithContentsOfURL_1usedEncoding_1error_1, "stringWithContentsOfURL:usedEncoding:error:" },
-        { &sel_displayIfNeededIgnoringOpacity, "displayIfNeededIgnoringOpacity" },
-        { &sel_archiverWillFinish_1, "archiverWillFinish:" },
-        { &sel_initWithOptions_1, "initWithOptions:" },
-        { &sel_ruleEditor_1numberOfChildrenForCriterion_1withRowType_1, "ruleEditor:numberOfChildrenForCriterion:withRowType:" },
-        { &sel_removeColorWithKey_1, "removeColorWithKey:" },
-        { &sel_setObjectValue_1, "setObjectValue:" },
-        { &sel_graphicsContextWithGraphicsPort_1flipped_1, "graphicsContextWithGraphicsPort:flipped:" },
-        { &sel_setMarkedText_1selectedRange_1replacementRange_1, "setMarkedText:selectedRange:replacementRange:" },
-        { &sel_outlineView_1numberOfChildrenOfItem_1, "outlineView:numberOfChildrenOfItem:" },
-        { &sel_cellFrameAtRow_1column_1, "cellFrameAtRow:column:" },
-        { &sel_blueColor, "blueColor" },
-        { &sel_selectedTextBackgroundColor, "selectedTextBackgroundColor" },
-        { &sel_initWithFormat_1locale_1, "initWithFormat:locale:" },
-        { &sel_propertyListForType_1, "propertyListForType:" },
-        { &sel_setConfigurationFromDictionary_1, "setConfigurationFromDictionary:" },
-        { &sel_registerClassDescription_1forClass_1, "registerClassDescription:forClass:" },
-        { &sel_removeAllItems, "removeAllItems" },
-        { &sel_setFontPanelFactory_1, "setFontPanelFactory:" },
-        { &sel_didChangeValueForKey_1withSetMutation_1usingObjects_1, "didChangeValueForKey:withSetMutation:usingObjects:" },
-        { &sel_CGEvent, "CGEvent" },
-        { &sel_disable, "disable" },
-        { &sel_setColumnAutoresizingStyle_1, "setColumnAutoresizingStyle:" },
-        { &sel_absoluteZ, "absoluteZ" },
-        { &sel_intForKey_1inTable_1, "intForKey:inTable:" },
-        { &sel_minFrameWidthWithTitle_1styleMask_1, "minFrameWidthWithTitle:styleMask:" },
-        { &sel_highlightColor, "highlightColor" },
-        { &sel_setRoundingMode_1, "setRoundingMode:" },
-        { &sel_didChangeValueForKey_1, "didChangeValueForKey:" },
-        { &sel_setMenuZone_1, "setMenuZone:" },
-        { &sel_updateFromPrintInfo, "updateFromPrintInfo" },
-        { &sel_setSelectedItemIdentifier_1, "setSelectedItemIdentifier:" },
-        { &sel_setReplyTimeout_1, "setReplyTimeout:" },
-        { &sel_showsFirstResponder, "showsFirstResponder" },
-        { &sel_loadNibNamed_1owner_1, "loadNibNamed:owner:" },
-        { &sel_setDocument_1, "setDocument:" },
-        { &sel_filePosixPermissions, "filePosixPermissions" },
-        { &sel_collapseItem_1collapseChildren_1, "collapseItem:collapseChildren:" },
-        { &sel_setCell_1, "setCell:" },
-        { &sel_setHTTPBodyStream_1, "setHTTPBodyStream:" },
-        { &sel_updateAttachmentsFromPath_1, "updateAttachmentsFromPath:" },
-        { &sel_updateFontPanel, "updateFontPanel" },
-        { &sel_animationDidStop_1, "animationDidStop:" },
-        { &sel_URL_1resourceDidFailLoadingWithReason_1, "URL:resourceDidFailLoadingWithReason:" },
-        { &sel_defaultBaselineOffsetForFont_1, "defaultBaselineOffsetForFont:" },
-        { &sel_browser_1shouldShowCellExpansionForRow_1column_1, "browser:shouldShowCellExpansionForRow:column:" },
-        { &sel_draggingEnded_1, "draggingEnded:" },
-        { &sel_openURL_1, "openURL:" },
-        { &sel_longLongValue, "longLongValue" },
-        { &sel_colorPanel, "colorPanel" },
-        { &sel_encodeFloat_1forKey_1, "encodeFloat:forKey:" },
-        { &sel_shouldBreakLineByHyphenatingBeforeCharacterAtIndex_1, "shouldBreakLineByHyphenatingBeforeCharacterAtIndex:" },
-        { &sel_performSelectorInBackground_1withObject_1, "performSelectorInBackground:withObject:" },
-        { &sel_initTextCell_1, "initTextCell:" },
-        { &sel_classDescription, "classDescription" },
-        { &sel_menuFontOfSize_1, "menuFontOfSize:" },
-        { &sel_window_1willPositionSheet_1usingRect_1, "window:willPositionSheet:usingRect:" },
-        { &sel_allowsTypeSelect, "allowsTypeSelect" },
-        { &sel_attributeWithName_1URI_1stringValue_1, "attributeWithName:URI:stringValue:" },
-        { &sel_setLinkTextAttributes_1, "setLinkTextAttributes:" },
-        { &sel_stringWithFormat_1, "stringWithFormat:" },
-        { &sel_initWithTable_1startingRow_1rowSpan_1startingColumn_1columnSpan_1, "initWithTable:startingRow:rowSpan:startingColumn:columnSpan:" },
-        { &sel_setShouldProcessNamespaces_1, "setShouldProcessNamespaces:" },
-        { &sel_orderFrontRegardless, "orderFrontRegardless" },
-        { &sel_setProtocolForProxy_1, "setProtocolForProxy:" },
-        { &sel_bundlePath, "bundlePath" },
-        { &sel_isAutoscroll, "isAutoscroll" },
-        { &sel_addConnection_1toRunLoop_1forMode_1, "addConnection:toRunLoop:forMode:" },
-        { &sel_moveWordBackwardAndModifySelection_1, "moveWordBackwardAndModifySelection:" },
-        { &sel_textContainerChangedGeometry_1, "textContainerChangedGeometry:" },
-        { &sel_conversation, "conversation" },
-        { &sel_showWindow_1, "showWindow:" },
-        { &sel_showGuessPanel_1, "showGuessPanel:" },
-        { &sel_setBorderWidth_1, "setBorderWidth:" },
-        { &sel_buttons, "buttons" },
-        { &sel_bitmapRepresentation, "bitmapRepresentation" },
-        { &sel_nextObject, "nextObject" },
-        { &sel_predicate, "predicate" },
-        { &sel_verticalPagination, "verticalPagination" },
-        { &sel_readInBackgroundAndNotify, "readInBackgroundAndNotify" },
-        { &sel_pixelBufferMipMapLevel, "pixelBufferMipMapLevel" },
-        { &sel_getValue_1, "getValue:" },
-        { &sel_eventID, "eventID" },
-        { &sel_sortDescriptors, "sortDescriptors" },
-        { &sel_removeObjectAtArrangedObjectIndexPath_1, "removeObjectAtArrangedObjectIndexPath:" },
-        { &sel_decodeBytesWithReturnedLength_1, "decodeBytesWithReturnedLength:" },
-        { &sel_textView_1shouldChangeTextInRange_1replacementString_1, "textView:shouldChangeTextInRange:replacementString:" },
-        { &sel_removeCursorRect_1cursor_1, "removeCursorRect:cursor:" },
-        { &sel_hasPassword, "hasPassword" },
-        { &sel_updateWindows, "updateWindows" },
-        { &sel_pasteboardWithName_1, "pasteboardWithName:" },
-        { &sel_writeSelectionToPasteboard_1types_1, "writeSelectionToPasteboard:types:" },
-        { &sel_setFlipped_1, "setFlipped:" },
-        { &sel_glyphWithName_1, "glyphWithName:" },
-        { &sel_launchApplication_1showIcon_1autolaunch_1, "launchApplication:showIcon:autolaunch:" },
-        { &sel_indexPath, "indexPath" },
-        { &sel_setAttributeDescriptor_1forKeyword_1, "setAttributeDescriptor:forKeyword:" },
-        { &sel_removeAllActions, "removeAllActions" },
-        { &sel_defaultAttachmentScaling, "defaultAttachmentScaling" },
-        { &sel_localizedStringWithFormat_1, "localizedStringWithFormat:" },
-        { &sel_setAutoscroll_1, "setAutoscroll:" },
-        { &sel_heightAdjustLimit, "heightAdjustLimit" },
-        { &sel_moveUpAndModifySelection_1, "moveUpAndModifySelection:" },
-        { &sel_visibilityPriority, "visibilityPriority" },
-        { &sel_textView_1clickedOnCell_1inRect_1atIndex_1, "textView:clickedOnCell:inRect:atIndex:" },
-        { &sel_archivedDataWithRootObject_1, "archivedDataWithRootObject:" },
-        { &sel_parser_1foundCDATA_1, "parser:foundCDATA:" },
-        { &sel_setWidth_1ofColumn_1, "setWidth:ofColumn:" },
-        { &sel_setHighlightedTableColumn_1, "setHighlightedTableColumn:" },
-        { &sel_toggle_1, "toggle:" },
-        { &sel_parent, "parent" },
-        { &sel_tableView_1shouldSelectRow_1, "tableView:shouldSelectRow:" },
-        { &sel_setWithObject_1, "setWithObject:" },
-        { &sel_attribute_1atIndex_1effectiveRange_1, "attribute:atIndex:effectiveRange:" },
-        { &sel_columnsInRect_1, "columnsInRect:" },
-        { &sel_setSearchScopes_1, "setSearchScopes:" },
-        { &sel_setByAddingObjectsFromArray_1, "setByAddingObjectsFromArray:" },
-        { &sel_textViewDidChangeTypingAttributes_1, "textViewDidChangeTypingAttributes:" },
-        { &sel_frameRate, "frameRate" },
-        { &sel_browser_1writeRowsWithIndexes_1inColumn_1toPasteboard_1, "browser:writeRowsWithIndexes:inColumn:toPasteboard:" },
-        { &sel_errorWithDomain_1code_1userInfo_1, "errorWithDomain:code:userInfo:" },
-        { &sel_setAlternate_1, "setAlternate:" },
-        { &sel_currentValue, "currentValue" },
-        { &sel_download_1decideDestinationWithSuggestedFilename_1, "download:decideDestinationWithSuggestedFilename:" },
-        { &sel_setBoxType_1, "setBoxType:" },
-        { &sel_fileNamesFromRunningOpenPanel, "fileNamesFromRunningOpenPanel" },
-        { &sel_valueWithPointer_1, "valueWithPointer:" },
-        { &sel_metadataQuery_1replacementObjectForResultObject_1, "metadataQuery:replacementObjectForResultObject:" },
-        { &sel_editedColumn, "editedColumn" },
-        { &sel_cachedResponseForRequest_1, "cachedResponseForRequest:" },
-        { &sel_failureReason, "failureReason" },
-        { &sel_constantValue, "constantValue" },
-        { &sel_commandClassName, "commandClassName" },
-        { &sel_fileWrapper, "fileWrapper" },
-        { &sel_setUsesUserKeyEquivalents_1, "setUsesUserKeyEquivalents:" },
-        { &sel_prototype, "prototype" },
-        { &sel_clearStartAnimation, "clearStartAnimation" },
-        { &sel_setMovableByWindowBackground_1, "setMovableByWindowBackground:" },
-        { &sel_setDateFormat_1, "setDateFormat:" },
-        { &sel_stringWithContentsOfFile_1usedEncoding_1error_1, "stringWithContentsOfFile:usedEncoding:error:" },
-        { &sel_toggleAutomaticLinkDetection_1, "toggleAutomaticLinkDetection:" },
-        { &sel_statusForTable_1, "statusForTable:" },
-        { &sel_setAllowsColumnSelection_1, "setAllowsColumnSelection:" },
-        { &sel_lowercaseWord_1, "lowercaseWord:" },
-        { &sel_setResolvesAliases_1, "setResolvesAliases:" },
-        { &sel_appendFormat_1, "appendFormat:" },
-        { &sel_isAnimating, "isAnimating" },
-        { &sel_dateFormat, "dateFormat" },
-        { &sel_setMuted_1, "setMuted:" },
-        { &sel_drawWithExpansionFrame_1inView_1, "drawWithExpansionFrame:inView:" },
-        { &sel_copyPath_1toPath_1handler_1, "copyPath:toPath:handler:" },
-        { &sel_isExplicitlyIncluded, "isExplicitlyIncluded" },
-        { &sel_isExtensionHidden, "isExtensionHidden" },
-        { &sel_showPackedGlyphs_1length_1glyphRange_1atPoint_1font_1color_1printingAdjustment_1, "showPackedGlyphs:length:glyphRange:atPoint:font:color:printingAdjustment:" },
-        { &sel_rulerView_1didRemoveMarker_1, "rulerView:didRemoveMarker:" },
-        { &sel_setControlTint_1, "setControlTint:" },
-        { &sel_isSelectable, "isSelectable" },
-        { &sel_initWithMachPort_1, "initWithMachPort:" },
-        { &sel_fill, "fill" },
-        { &sel_isEnteringProximity, "isEnteringProximity" },
-        { &sel_drawingRectForBounds_1, "drawingRectForBounds:" },
-        { &sel_decodeInt32ForKey_1, "decodeInt32ForKey:" },
-        { &sel_deltaY, "deltaY" },
-        { &sel_displaysLinkToolTips, "displaysLinkToolTips" },
-        { &sel_moveToEndOfDocument_1, "moveToEndOfDocument:" },
-        { &sel_isFirstResponder, "isFirstResponder" },
-        { &sel_receiversSpecifier, "receiversSpecifier" },
-        { &sel_canInitWithURL_1, "canInitWithURL:" },
-        { &sel_parameterString, "parameterString" },
-        { &sel_isMovable, "isMovable" },
-        { &sel_setAvoidsEmptySelection_1, "setAvoidsEmptySelection:" },
-        { &sel_lockFocusIfCanDrawInContext_1, "lockFocusIfCanDrawInContext:" },
-        { &sel_updateChangeCount_1, "updateChangeCount:" },
-        { &sel_rootDocument, "rootDocument" },
-        { &sel_superview, "superview" },
-        { &sel_resolveNamespaceForName_1, "resolveNamespaceForName:" },
-        { &sel_maxNumberOfColumns, "maxNumberOfColumns" },
-        { &sel_setMaxSize_1, "setMaxSize:" },
-        { &sel_completePathIntoString_1caseSensitive_1matchesIntoArray_1filterTypes_1, "completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:" },
-        { &sel_updateCell_1, "updateCell:" },
-        { &sel_setWeek_1, "setWeek:" },
-        { &sel_titleRectForBounds_1, "titleRectForBounds:" },
-        { &sel_rulerView_1willAddMarker_1atLocation_1, "rulerView:willAddMarker:atLocation:" },
-        { &sel_message, "message" },
-        { &sel_setContentSize_1, "setContentSize:" },
-        { &sel_broadcast, "broadcast" },
-        { &sel_isNativeType_1, "isNativeType:" },
-        { &sel_contentBorderThicknessForEdge_1, "contentBorderThicknessForEdge:" },
-        { &sel_keyEquivalentOffset, "keyEquivalentOffset" },
-        { &sel_makeUntitledDocumentOfType_1, "makeUntitledDocumentOfType:" },
-        { &sel_windowFrameTextColor, "windowFrameTextColor" },
-        { &sel_addItemsWithTitles_1, "addItemsWithTitles:" },
-        { &sel_levelForRow_1, "levelForRow:" },
-        { &sel_dissolveToPoint_1fromRect_1fraction_1, "dissolveToPoint:fromRect:fraction:" },
-        { &sel_discardCachedImage, "discardCachedImage" },
-        { &sel_rootProxyForConnectionWithRegisteredName_1host_1usingNameServer_1, "rootProxyForConnectionWithRegisteredName:host:usingNameServer:" },
-        { &sel_mouseExited_1, "mouseExited:" },
-        { &sel_stringWithCString_1, "stringWithCString:" },
-        { &sel_standardUserDefaults, "standardUserDefaults" },
-        { &sel_archiver_1didEncodeObject_1, "archiver:didEncodeObject:" },
-        { &sel_canDraw, "canDraw" },
-        { &sel_shouldDelayWindowOrderingForEvent_1, "shouldDelayWindowOrderingForEvent:" },
-        { &sel_selectedMenuItemTextColor, "selectedMenuItemTextColor" },
-        { &sel_attachSubmenuForItemAtIndex_1, "attachSubmenuForItemAtIndex:" },
-        { &sel_condition, "condition" },
-        { &sel_setReservedThicknessForAccessoryView_1, "setReservedThicknessForAccessoryView:" },
-        { &sel_replaceObjectsInRange_1withObjectsFromArray_1, "replaceObjectsInRange:withObjectsFromArray:" },
-        { &sel_placeholderString, "placeholderString" },
-        { &sel_setPMSymbol_1, "setPMSymbol:" },
-        { &sel_localizedNameOfStringEncoding_1, "localizedNameOfStringEncoding:" },
-        { &sel_outlineViewItemWillCollapse_1, "outlineViewItemWillCollapse:" },
-        { &sel_localizedKey, "localizedKey" },
-        { &sel_whiteColor, "whiteColor" },
-        { &sel_viewBoundsChanged_1, "viewBoundsChanged:" },
-        { &sel_vendorDefined, "vendorDefined" },
-        { &sel_classNameDecodedForArchiveClassName_1, "classNameDecodedForArchiveClassName:" },
-        { &sel_lockDate, "lockDate" },
-        { &sel_twoDigitStartDate, "twoDigitStartDate" },
-        { &sel_rectOfRow_1, "rectOfRow:" },
-        { &sel_receivePort, "receivePort" },
-        { &sel_decimalNumberByMultiplyingByPowerOf10_1withBehavior_1, "decimalNumberByMultiplyingByPowerOf10:withBehavior:" },
-        { &sel_isAnyApplicationSpeaking, "isAnyApplicationSpeaking" },
-        { &sel_aeDesc, "aeDesc" },
-        { &sel_windowWillBeginSheet_1, "windowWillBeginSheet:" },
-        { &sel_accessibilityFocusedUIElement, "accessibilityFocusedUIElement" },
-        { &sel_orderBack_1, "orderBack:" },
-        { &sel_scanDecimal_1, "scanDecimal:" },
-        { &sel_transformStruct, "transformStruct" },
-        { &sel_fileAttributesToWriteToFile_1ofType_1saveOperation_1, "fileAttributesToWriteToFile:ofType:saveOperation:" },
-        { &sel_controlCharacterSet, "controlCharacterSet" },
-        { &sel_setNextResponder_1, "setNextResponder:" },
-        { &sel_pasteboardChangedOwner_1, "pasteboardChangedOwner:" },
-        { &sel_canSelectHiddenExtension, "canSelectHiddenExtension" },
-        { &sel_attribute_1atIndex_1longestEffectiveRange_1inRange_1, "attribute:atIndex:longestEffectiveRange:inRange:" },
-        { &sel_setAutovalidates_1, "setAutovalidates:" },
-        { &sel_setAllowsFloats_1, "setAllowsFloats:" },
-        { &sel_sortDescriptorPrototype, "sortDescriptorPrototype" },
-        { &sel_trackKnob_1, "trackKnob:" },
-        { &sel_comboBox_1indexOfItemWithStringValue_1, "comboBox:indexOfItemWithStringValue:" },
-        { &sel_setSource_1, "setSource:" },
-        { &sel_contentFilters, "contentFilters" },
-        { &sel_dictionaryWithContentsOfFile_1, "dictionaryWithContentsOfFile:" },
-        { &sel_drawArrow_1highlight_1, "drawArrow:highlight:" },
-        { &sel_handleSaveScriptCommand_1, "handleSaveScriptCommand:" },
-        { &sel_rangeOfString_1options_1, "rangeOfString:options:" },
-        { &sel_setPickerMode_1, "setPickerMode:" },
-        { &sel_setStandaloneQuarterSymbols_1, "setStandaloneQuarterSymbols:" },
-        { &sel_setSize_1, "setSize:" },
-        { &sel_setAllowsUndo_1, "setAllowsUndo:" },
-        { &sel_edge, "edge" },
-        { &sel_stopLoading, "stopLoading" },
-        { &sel_fileURLWithPath_1isDirectory_1, "fileURLWithPath:isDirectory:" },
-        { &sel_userInfo, "userInfo" },
-        { &sel_components_1fromDate_1, "components:fromDate:" },
-        { &sel_dictionary, "dictionary" },
-        { &sel_connection_1didCancelAuthenticationChallenge_1, "connection:didCancelAuthenticationChallenge:" },
-        { &sel_selectParagraph_1, "selectParagraph:" },
-        { &sel_initWithCapacity_1, "initWithCapacity:" },
-        { &sel_initWithObjectSpecifier_1comparisonOperator_1testObject_1, "initWithObjectSpecifier:comparisonOperator:testObject:" },
-        { &sel_nestingMode, "nestingMode" },
-        { &sel_paragraphSpacingBefore, "paragraphSpacingBefore" },
-        { &sel_itemChanged_1, "itemChanged:" },
-        { &sel_setSelectionIndexes_1, "setSelectionIndexes:" },
-        { &sel_open, "open" },
-        { &sel_sendActionOn_1, "sendActionOn:" },
-        { &sel_initWithFireDate_1interval_1target_1selector_1userInfo_1repeats_1, "initWithFireDate:interval:target:selector:userInfo:repeats:" },
-        { &sel_formatterBehavior, "formatterBehavior" },
-        { &sel_fillRect_1, "fillRect:" },
-        { &sel_animationCurve, "animationCurve" },
-        { &sel_remoteObjects, "remoteObjects" },
-        { &sel_setSelectionIndexPath_1, "setSelectionIndexPath:" },
-        { &sel_availableFontNamesWithTraits_1, "availableFontNamesWithTraits:" },
-        { &sel_convertFont_1toFamily_1, "convertFont:toFamily:" },
-        { &sel_splitView_1resizeSubviewsWithOldSize_1, "splitView:resizeSubviewsWithOldSize:" },
-        { &sel_setSmartInsertDeleteEnabled_1, "setSmartInsertDeleteEnabled:" },
-        { &sel_shouldChangePrintInfo_1, "shouldChangePrintInfo:" },
-        { &sel_objectBeingTested, "objectBeingTested" },
-        { &sel_selectItemWithObjectValue_1, "selectItemWithObjectValue:" },
-        { &sel_rightExpressions, "rightExpressions" },
-        { &sel_unableToSetNilForKey_1, "unableToSetNilForKey:" },
-        { &sel_visibleItems, "visibleItems" },
-        { &sel_items, "items" },
-        { &sel_templatesWithAttributeKeyPaths_1inEntityDescription_1, "templatesWithAttributeKeyPaths:inEntityDescription:" },
-        { &sel_setMaximumIntegerDigits_1, "setMaximumIntegerDigits:" },
-        { &sel_scrollRectToVisible_1, "scrollRectToVisible:" },
-        { &sel_disableKeyEquivalentForDefaultButtonCell, "disableKeyEquivalentForDefaultButtonCell" },
-        { &sel_objectsForXQuery_1error_1, "objectsForXQuery:error:" },
-        { &sel_readToEndOfFileInBackgroundAndNotifyForModes_1, "readToEndOfFileInBackgroundAndNotifyForModes:" },
-        { &sel_scanHexLongLong_1, "scanHexLongLong:" },
-        { &sel_ascender, "ascender" },
-        { &sel_arrangeObjects_1, "arrangeObjects:" },
-        { &sel_setNegativeSuffix_1, "setNegativeSuffix:" },
-        { &sel_initWithString_1, "initWithString:" },
-        { &sel_initWithName_1data_1, "initWithName:data:" },
-        { &sel_data, "data" },
-        { &sel_encodePortObject_1, "encodePortObject:" },
-        { &sel_becomeFirstResponder, "becomeFirstResponder" },
-        { &sel_setImage_1forSegment_1, "setImage:forSegment:" },
-        { &sel_copyRuler_1, "copyRuler:" },
-        { &sel_appendBezierPathWithGlyphs_1count_1inFont_1, "appendBezierPathWithGlyphs:count:inFont:" },
-        { &sel_playsSelectionOnly, "playsSelectionOnly" },
-        { &sel_boundsRectForTextBlock_1glyphRange_1, "boundsRectForTextBlock:glyphRange:" },
-        { &sel_makeObjectsPerformSelector_1withObject_1, "makeObjectsPerformSelector:withObject:" },
-        { &sel_stringByTrimmingCharactersInSet_1, "stringByTrimmingCharactersInSet:" },
-        { &sel_timerWithTimeInterval_1invocation_1repeats_1, "timerWithTimeInterval:invocation:repeats:" },
-        { &sel_viewDidMoveToSuperview, "viewDidMoveToSuperview" },
-        { &sel_pathCell_1willDisplayOpenPanel_1, "pathCell:willDisplayOpenPanel:" },
-        { &sel_pathSeparator, "pathSeparator" },
-        { &sel_generatesCalendarDates, "generatesCalendarDates" },
-        { &sel_pressure, "pressure" },
-        { &sel_sendPort, "sendPort" },
-        { &sel_argumentsRetained, "argumentsRetained" },
-        { &sel_setContainerSpecifier_1, "setContainerSpecifier:" },
-        { &sel_decodeNXColor, "decodeNXColor" },
-        { &sel_orientation, "orientation" },
-        { &sel_setScriptErrorString_1, "setScriptErrorString:" },
-        { &sel_makeDocumentWithContentsOfFile_1ofType_1, "makeDocumentWithContentsOfFile:ofType:" },
-        { &sel_reason, "reason" },
-        { &sel_currentEvent, "currentEvent" },
-        { &sel_setOffScreen_1width_1height_1rowbytes_1, "setOffScreen:width:height:rowbytes:" },
-        { &sel_invalidateAttributesInRange_1, "invalidateAttributesInRange:" },
-        { &sel_descriptorWithDescriptorType_1bytes_1length_1, "descriptorWithDescriptorType:bytes:length:" },
-        { &sel_setCredential_1forProtectionSpace_1, "setCredential:forProtectionSpace:" },
-        { &sel_fileGroupOwnerAccountName, "fileGroupOwnerAccountName" },
-        { &sel_setColor_1forKey_1, "setColor:forKey:" },
-        { &sel_setAutohidesScrollers_1, "setAutohidesScrollers:" },
-        { &sel_noteNumberOfRowsChanged, "noteNumberOfRowsChanged" },
-        { &sel_disableCursorRects, "disableCursorRects" },
-        { &sel_setLenient_1, "setLenient:" },
-        { &sel_registerUnitWithName_1abbreviation_1unitToPointsConversionFactor_1stepUpCycle_1stepDownCycle_1, "registerUnitWithName:abbreviation:unitToPointsConversionFactor:stepUpCycle:stepDownCycle:" },
-        { &sel_standardWindowButton_1, "standardWindowButton:" },
-        { &sel_objectForProperty_1error_1, "objectForProperty:error:" },
-        { &sel_imageRepWithData_1, "imageRepWithData:" },
-        { &sel_flushGraphics, "flushGraphics" },
-        { &sel_setCacheDepthMatchesImageDepth_1, "setCacheDepthMatchesImageDepth:" },
-        { &sel_highlightColorInView_1, "highlightColorInView:" },
-        { &sel_setBaseSpecifier_1, "setBaseSpecifier:" },
-        { &sel_performFileOperation_1source_1destination_1files_1tag_1, "performFileOperation:source:destination:files:tag:" },
-        { &sel_outlineView_1itemForPersistentObject_1, "outlineView:itemForPersistentObject:" },
-        { &sel_propertyListFromData_1mutabilityOption_1format_1errorDescription_1, "propertyListFromData:mutabilityOption:format:errorDescription:" },
-        { &sel_setDocumentView_1, "setDocumentView:" },
-        { &sel_drawsOutsideLineFragmentForGlyphAtIndex_1, "drawsOutsideLineFragmentForGlyphAtIndex:" },
-        { &sel_dragImageForSelectionWithEvent_1origin_1, "dragImageForSelectionWithEvent:origin:" },
-        { &sel_buttonNumber, "buttonNumber" },
-        { &sel_advancementForGlyph_1, "advancementForGlyph:" },
-        { &sel_parser_1validationErrorOccurred_1, "parser:validationErrorOccurred:" },
-        { &sel_reusesColumns, "reusesColumns" },
-        { &sel_minute, "minute" },
-        { &sel_setCanChooseFiles_1, "setCanChooseFiles:" },
-        { &sel_groupingSize, "groupingSize" },
-        { &sel_containsAttachments, "containsAttachments" },
-        { &sel_selectedControlTextColor, "selectedControlTextColor" },
-        { &sel_initWithMantissa_1exponent_1isNegative_1, "initWithMantissa:exponent:isNegative:" },
-        { &sel_initWithVoice_1, "initWithVoice:" },
-        { &sel_setResizingMask_1, "setResizingMask:" },
-        { &sel_setOnMouseExited_1, "setOnMouseExited:" },
-        { &sel_toggleContinuousSpellChecking_1, "toggleContinuousSpellChecking:" },
-        { &sel_allowsCutCopyPaste, "allowsCutCopyPaste" },
-        { &sel_endSheet_1, "endSheet:" },
-        { &sel_allowsBranchSelection, "allowsBranchSelection" },
-        { &sel_initWithRequest_1delegate_1, "initWithRequest:delegate:" },
-        { &sel_isAtEnd, "isAtEnd" },
-        { &sel_relativeString, "relativeString" },
-        { &sel_tableView_1willDisplayCell_1forTableColumn_1row_1, "tableView:willDisplayCell:forTableColumn:row:" },
-        { &sel_resizeSubviewsWithOldSize_1, "resizeSubviewsWithOldSize:" },
-        { &sel_compoundPredicateType, "compoundPredicateType" },
-        { &sel_accessoryControllers, "accessoryControllers" },
-        { &sel_shouldDrawColor, "shouldDrawColor" },
-        { &sel_applicationShouldTerminate_1, "applicationShouldTerminate:" },
-        { &sel_setTextContainer_1, "setTextContainer:" },
-        { &sel_discardCursorRects, "discardCursorRects" },
-        { &sel_deviceCMYKColorSpace, "deviceCMYKColorSpace" },
-        { &sel_setDefaultPlaceholder_1forMarker_1withBinding_1, "setDefaultPlaceholder:forMarker:withBinding:" },
-        { &sel_setIsZoomed_1, "setIsZoomed:" },
-        { &sel_blueComponent, "blueComponent" },
-        { &sel_portWithMachPort_1options_1, "portWithMachPort:options:" },
-        { &sel_restoreGraphicsState, "restoreGraphicsState" },
-        { &sel_isTemplate, "isTemplate" },
-        { &sel_setScanLocation_1, "setScanLocation:" },
-        { &sel_initWithBool_1, "initWithBool:" },
-        { &sel_initWithSet_1copyItems_1, "initWithSet:copyItems:" },
-        { &sel_setPositivePrefix_1, "setPositivePrefix:" },
-        { &sel_propertyForKeyIfAvailable_1, "propertyForKeyIfAvailable:" },
-        { &sel_fileOwnerAccountID, "fileOwnerAccountID" },
-        { &sel_initForIncrementalLoad, "initForIncrementalLoad" },
-        { &sel_cellAttribute_1, "cellAttribute:" },
-        { &sel_baselineLocation, "baselineLocation" },
-        { &sel_initWithAttributedString_1, "initWithAttributedString:" },
-        { &sel_showWindows, "showWindows" },
-        { &sel_writeToFile_1atomically_1updateFilenames_1, "writeToFile:atomically:updateFilenames:" },
-        { &sel_setCookies_1forURL_1mainDocumentURL_1, "setCookies:forURL:mainDocumentURL:" },
-        { &sel_unarchiver_1cannotDecodeObjectOfClassName_1originalClasses_1, "unarchiver:cannotDecodeObjectOfClassName:originalClasses:" },
-        { &sel_selectRow_1inColumn_1, "selectRow:inColumn:" },
-        { &sel_dissolveToPoint_1fraction_1, "dissolveToPoint:fraction:" },
-        { &sel_wantsToTrackMouseForEvent_1inRect_1ofView_1atCharacterIndex_1, "wantsToTrackMouseForEvent:inRect:ofView:atCharacterIndex:" },
-        { &sel_openURLs_1withAppBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifiers_1, "openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:" },
-        { &sel_checkForRemovableMedia, "checkForRemovableMedia" },
-        { &sel_setImage_1, "setImage:" },
-        { &sel_isFixedPitch, "isFixedPitch" },
-        { &sel_protocolFamily, "protocolFamily" },
-        { &sel_protocolCheckerWithTarget_1protocol_1, "protocolCheckerWithTarget:protocol:" },
-        { &sel_streamError, "streamError" },
-        { &sel_replaceBytesInRange_1withBytes_1length_1, "replaceBytesInRange:withBytes:length:" },
-        { &sel_canChooseDirectories, "canChooseDirectories" },
-        { &sel_classForPortCoder, "classForPortCoder" },
-        { &sel_mainRunLoop, "mainRunLoop" },
-        { &sel_setItemPrototype_1, "setItemPrototype:" },
-        { &sel_controlShadowColor, "controlShadowColor" },
-        { &sel_level, "level" },
-        { &sel_setContextHelpModeActive_1, "setContextHelpModeActive:" },
-        { &sel_levelForItem_1, "levelForItem:" },
-        { &sel_setHeightTracksTextView_1, "setHeightTracksTextView:" },
-        { &sel_applicationWillTerminate_1, "applicationWillTerminate:" },
-        { &sel_wantsPeriodicDraggingUpdates, "wantsPeriodicDraggingUpdates" },
-        { &sel_createCommandInstance, "createCommandInstance" },
-        { &sel_parser_1foundElementDeclarationWithName_1model_1, "parser:foundElementDeclarationWithName:model:" },
-        { &sel_window_1shouldPopUpDocumentPathMenu_1, "window:shouldPopUpDocumentPathMenu:" },
-        { &sel_setRepresentedURL_1, "setRepresentedURL:" },
-        { &sel_outlineView_1didDragTableColumn_1, "outlineView:didDragTableColumn:" },
-        { &sel_appendTransform_1, "appendTransform:" },
-        { &sel_setMIMEType_1, "setMIMEType:" },
-        { &sel_setHeadIndent_1, "setHeadIndent:" },
-        { &sel_setConstrainedFrameSize_1, "setConstrainedFrameSize:" },
-        { &sel_setUsesDataSource_1, "setUsesDataSource:" },
-        { &sel_replaceBytesInRange_1withBytes_1, "replaceBytesInRange:withBytes:" },
-        { &sel_rowTypeKeyPath, "rowTypeKeyPath" },
-        { &sel_undoManager, "undoManager" },
-        { &sel_frameCenterRotation, "frameCenterRotation" },
-        { &sel_setTextView_1, "setTextView:" },
-        { &sel_executeAppleEvent_1error_1, "executeAppleEvent:error:" },
-        { &sel_setFormatter_1, "setFormatter:" },
-        { &sel_scanLocation, "scanLocation" },
-        { &sel_scrollsDynamically, "scrollsDynamically" },
-        { &sel_setIndentationLevel_1, "setIndentationLevel:" },
-        { &sel_minimumRangeOfUnit_1, "minimumRangeOfUnit:" },
-        { &sel_textViewForBeginningOfSelection, "textViewForBeginningOfSelection" },
-        { &sel_tokenFieldCell_1displayStringForRepresentedObject_1, "tokenFieldCell:displayStringForRepresentedObject:" },
-        { &sel_constrainFrameRect_1toScreen_1, "constrainFrameRect:toScreen:" },
-        { &sel_getObjectValue_1forString_1range_1error_1, "getObjectValue:forString:range:error:" },
-        { &sel_writeFileContents_1, "writeFileContents:" },
-        { &sel_setProgressMarks_1, "setProgressMarks:" },
-        { &sel_lastComponentOfFileName, "lastComponentOfFileName" },
-        { &sel_preventWindowOrdering, "preventWindowOrdering" },
-        { &sel_setDefaultDate_1, "setDefaultDate:" },
-        { &sel_submenu, "submenu" },
-        { &sel_setTXTRecordData_1, "setTXTRecordData:" },
-        { &sel_bytesPerRow, "bytesPerRow" },
-        { &sel_outlineView_1toolTipForCell_1rect_1tableColumn_1item_1mouseLocation_1, "outlineView:toolTipForCell:rect:tableColumn:item:mouseLocation:" },
-        { &sel_outlineView_1shouldEditTableColumn_1item_1, "outlineView:shouldEditTableColumn:item:" },
-        { &sel_initWithContainerSize_1, "initWithContainerSize:" },
-        { &sel_setEvaluationErrorNumber_1, "setEvaluationErrorNumber:" },
-        { &sel_setTopLevelObject_1, "setTopLevelObject:" },
-        { &sel_dataOfType_1error_1, "dataOfType:error:" },
-        { &sel_isSupersetOfSet_1, "isSupersetOfSet:" },
-        { &sel_initWithURL_1cachePolicy_1timeoutInterval_1, "initWithURL:cachePolicy:timeoutInterval:" },
-        { &sel_setAutosaveExpandedItems_1, "setAutosaveExpandedItems:" },
-        { &sel_rangeValue, "rangeValue" },
-        { &sel_indexPathByAddingIndex_1, "indexPathByAddingIndex:" },
-        { &sel_deleteToMark_1, "deleteToMark:" },
-        { &sel_appleEventCodeForSuite_1, "appleEventCodeForSuite:" },
-        { &sel_getBytes_1, "getBytes:" },
-        { &sel_setMinimumDaysInFirstWeek_1, "setMinimumDaysInFirstWeek:" },
-        { &sel_refusesFirstResponder, "refusesFirstResponder" },
-        { &sel_setMaxItemSize_1, "setMaxItemSize:" },
-        { &sel_localizedStringForKey_1value_1table_1, "localizedStringForKey:value:table:" },
-        { &sel_mapTableWithKeyOptions_1valueOptions_1, "mapTableWithKeyOptions:valueOptions:" },
-        { &sel_test, "test" },
-        { &sel_trackScrollButtons_1, "trackScrollButtons:" },
-        { &sel_PDFRepresentation, "PDFRepresentation" },
-        { &sel_setImageFrameStyle_1, "setImageFrameStyle:" },
-        { &sel_encodeClassName_1intoClassName_1, "encodeClassName:intoClassName:" },
-        { &sel_beginPageInRect_1atPlacement_1, "beginPageInRect:atPlacement:" },
-        { &sel_setAllowsOtherFileTypes_1, "setAllowsOtherFileTypes:" },
-        { &sel_isWordInUserDictionaries_1caseSensitive_1, "isWordInUserDictionaries:caseSensitive:" },
-        { &sel_dispatchRawAppleEvent_1withRawReply_1handlerRefCon_1, "dispatchRawAppleEvent:withRawReply:handlerRefCon:" },
-        { &sel_isScrollable, "isScrollable" },
-        { &sel_numberOfColorStops, "numberOfColorStops" },
-        { &sel_unhideAllApplications_1, "unhideAllApplications:" },
-        { &sel_retainCount, "retainCount" },
-        { &sel_runModalPrintOperation_1delegate_1didRunSelector_1contextInfo_1, "runModalPrintOperation:delegate:didRunSelector:contextInfo:" },
-        { &sel_update, "update" },
-        { &sel_isRotatedOrScaledFromBase, "isRotatedOrScaledFromBase" },
-        { &sel_initWithWindowNibPath_1owner_1, "initWithWindowNibPath:owner:" },
-        { &sel_entryType, "entryType" },
-        { &sel_dictionaryFromTXTRecordData_1, "dictionaryFromTXTRecordData:" },
-        { &sel_setLineCapStyle_1, "setLineCapStyle:" },
-        { &sel_setValues_1forParameter_1, "setValues:forParameter:" },
-        { &sel_numberStyle, "numberStyle" },
-        { &sel_disableCollectorForPointer_1, "disableCollectorForPointer:" },
-        { &sel_initWithPointerFunctions_1capacity_1, "initWithPointerFunctions:capacity:" },
-        { &sel_sendEvent_1, "sendEvent:" },
-        { &sel_removeSelectedObjects_1, "removeSelectedObjects:" },
-        { &sel_serviceConnectionWithName_1rootObject_1usingNameServer_1, "serviceConnectionWithName:rootObject:usingNameServer:" },
-        { &sel_decimalNumberByMultiplyingBy_1, "decimalNumberByMultiplyingBy:" },
-        { &sel_shouldChangeTextInRanges_1replacementStrings_1, "shouldChangeTextInRanges:replacementStrings:" },
-        { &sel_setResizeIncrements_1, "setResizeIncrements:" },
-        { &sel_alignLeft_1, "alignLeft:" },
-        { &sel_launch, "launch" },
-        { &sel_executeCommand, "executeCommand" },
-        { &sel_setPixelBuffer_1cubeMapFace_1mipMapLevel_1currentVirtualScreen_1, "setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:" },
-        { &sel_isCachedSeparately, "isCachedSeparately" },
-        { &sel_setUsesSignificantDigits_1, "setUsesSignificantDigits:" },
-        { &sel_countKeyPathForNode_1, "countKeyPathForNode:" },
-        { &sel_setContainerIsRangeContainerObject_1, "setContainerIsRangeContainerObject:" },
-        { &sel_showsStateColumn, "showsStateColumn" },
-        { &sel_uppercaseString, "uppercaseString" },
-        { &sel_directoryContentsAtPath_1, "directoryContentsAtPath:" },
-        { &sel_titleFont, "titleFont" },
-        { &sel_comparisonPredicateModifier, "comparisonPredicateModifier" },
-        { &sel_isMultiThreaded, "isMultiThreaded" },
-        { &sel_setGroupingAttributes_1, "setGroupingAttributes:" },
-        { &sel_selectedRowIndexesInColumn_1, "selectedRowIndexesInColumn:" },
-        { &sel_isFlushWindowDisabled, "isFlushWindowDisabled" },
-        { &sel_setReusesColumns_1, "setReusesColumns:" },
-        { &sel_getCString_1maxLength_1, "getCString:maxLength:" },
-        { &sel_setIndicatorImage_1inTableColumn_1, "setIndicatorImage:inTableColumn:" },
-        { &sel_keyEquivalent, "keyEquivalent" },
-        { &sel_skipDescendents, "skipDescendents" },
-        { &sel_waitUntilExit, "waitUntilExit" },
-        { &sel_initWithWindowNibName_1owner_1, "initWithWindowNibName:owner:" },
-        { &sel_objectClass, "objectClass" },
-        { &sel_allFrameworks, "allFrameworks" },
-        { &sel_cellWithTag_1, "cellWithTag:" },
-        { &sel_representationUsingType_1properties_1, "representationUsingType:properties:" },
-        { &sel_textPasteboardTypes, "textPasteboardTypes" },
-        { &sel_contentViewMargins, "contentViewMargins" },
-        { &sel_canUndo, "canUndo" },
-        { &sel_initWithFormat_1locale_1arguments_1, "initWithFormat:locale:arguments:" },
-        { &sel_usableParts, "usableParts" },
-        { &sel_comboBoxSelectionIsChanging_1, "comboBoxSelectionIsChanging:" },
-        { &sel_raise_1format_1arguments_1, "raise:format:arguments:" },
-        { &sel_isWindowLoaded, "isWindowLoaded" },
-        { &sel_levelIndicatorStyle, "levelIndicatorStyle" },
-        { &sel_localizedFailureReason, "localizedFailureReason" },
-        { &sel_characterRangeForGlyphRange_1actualGlyphRange_1, "characterRangeForGlyphRange:actualGlyphRange:" },
-        { &sel_lineNumber, "lineNumber" },
-        { &sel_HTTPBody, "HTTPBody" },
-        { &sel_lineBreakMode, "lineBreakMode" },
-        { &sel_isStopped, "isStopped" },
-        { &sel_canResumeDownloadDecodedWithEncodingMIMEType_1, "canResumeDownloadDecodedWithEncodingMIMEType:" },
-        { &sel_removeObjectsAtArrangedObjectIndexPaths_1, "removeObjectsAtArrangedObjectIndexPaths:" },
-        { &sel_isHidden, "isHidden" },
-        { &sel_otherMouseDragged_1, "otherMouseDragged:" },
-        { &sel_headerRectOfColumn_1, "headerRectOfColumn:" },
-        { &sel_hasVerticalRuler, "hasVerticalRuler" },
-        { &sel_setBottomMargin_1, "setBottomMargin:" },
-        { &sel_initWithNotificationCenter_1, "initWithNotificationCenter:" },
-        { &sel_addSpeechDictionary_1, "addSpeechDictionary:" },
-        { &sel_setPositiveFormat_1, "setPositiveFormat:" },
-        { &sel_application_1openTempFile_1, "application:openTempFile:" },
-        { &sel_setEntityName_1, "setEntityName:" },
-        { &sel_setForegroundColor_1, "setForegroundColor:" },
-        { &sel_initWithUnsignedLong_1, "initWithUnsignedLong:" },
-        { &sel_setWindowsMenu_1, "setWindowsMenu:" },
-        { &sel_applicationDidUnhide_1, "applicationDidUnhide:" },
-        { &sel_availableData, "availableData" },
-        { &sel_setVertical_1, "setVertical:" },
-        { &sel_disableUpdates, "disableUpdates" },
-        { &sel_compileAndReturnError_1, "compileAndReturnError:" },
-        { &sel_containsIndex_1, "containsIndex:" },
-        { &sel_canSelectPrevious, "canSelectPrevious" },
-        { &sel_initWithBytes_1length_1encoding_1, "initWithBytes:length:encoding:" },
-        { &sel_setTextColor_1, "setTextColor:" },
-        { &sel_stream_1handleEvent_1, "stream:handleEvent:" },
-        { &sel_setWeekdaySymbols_1, "setWeekdaySymbols:" },
-        { &sel_setHiddenUntilMouseMoves_1, "setHiddenUntilMouseMoves:" },
-        { &sel_orderFrontStandardAboutPanelWithOptions_1, "orderFrontStandardAboutPanelWithOptions:" },
-        { &sel_setAttributesAsDictionary_1, "setAttributesAsDictionary:" },
-        { &sel_rowTypeForRow_1, "rowTypeForRow:" },
-        { &sel_setRequestTimeout_1, "setRequestTimeout:" },
-        { &sel_XMLDataWithOptions_1, "XMLDataWithOptions:" },
-        { &sel_closedHandCursor, "closedHandCursor" },
-        { &sel_nextSibling, "nextSibling" },
-        { &sel_controlTextColor, "controlTextColor" },
-        { &sel_abbreviationDictionary, "abbreviationDictionary" },
-        { &sel_archiverDidFinish_1, "archiverDidFinish:" },
-        { &sel_valueTypeForDimension_1, "valueTypeForDimension:" },
-        { &sel_setCriteriaKeyPath_1, "setCriteriaKeyPath:" },
-        { &sel_isLessThan_1, "isLessThan:" },
-        { &sel_processName, "processName" },
-        { &sel_frameOfOutlineCellAtRow_1, "frameOfOutlineCellAtRow:" },
-        { &sel_removeObjectsInArray_1, "removeObjectsInArray:" },
-        { &sel_leftExpression, "leftExpression" },
-        { &sel_removeToolTip_1, "removeToolTip:" },
-        { &sel_mutableCopy, "mutableCopy" },
-        { &sel_directParameter, "directParameter" },
-        { &sel_name, "name" },
-        { &sel_bitsPerPixel, "bitsPerPixel" },
-        { &sel_weekday, "weekday" },
-        { &sel_descendantNodeAtIndexPath_1, "descendantNodeAtIndexPath:" },
-        { &sel_setPercentSymbol_1, "setPercentSymbol:" },
-        { &sel_selectedCell, "selectedCell" },
-        { &sel_windowWillClose_1, "windowWillClose:" },
-        { &sel_setDatePickerStyle_1, "setDatePickerStyle:" },
-        { &sel_initWithObjects_1, "initWithObjects:" },
-        { &sel_numberWithInt_1, "numberWithInt:" },
-        { &sel_collection, "collection" },
-        { &sel_initWithTarget_1selector_1object_1, "initWithTarget:selector:object:" },
-        { &sel_insertText_1replacementRange_1, "insertText:replacementRange:" },
-        { &sel_initWithAEDescNoCopy_1, "initWithAEDescNoCopy:" },
-        { &sel_usesGroupingSeparator, "usesGroupingSeparator" },
-        { &sel_pathControl_1shouldDragPathComponentCell_1withPasteboard_1, "pathControl:shouldDragPathComponentCell:withPasteboard:" },
-        { &sel_decimalNumberByAdding_1withBehavior_1, "decimalNumberByAdding:withBehavior:" },
-        { &sel_setTextContainer_1forGlyphRange_1, "setTextContainer:forGlyphRange:" },
-        { &sel_needsToDrawRect_1, "needsToDrawRect:" },
-        { &sel_activeConversationChanged_1toNewConversation_1, "activeConversationChanged:toNewConversation:" },
-        { &sel_italicAngle, "italicAngle" },
-        { &sel_aeteResource_1, "aeteResource:" },
-        { &sel_noteNewRecentDocumentURL_1, "noteNewRecentDocumentURL:" },
-        { &sel_setPageScroll_1, "setPageScroll:" },
-        { &sel_speechSynthesizer_1didFinishSpeaking_1, "speechSynthesizer:didFinishSpeaking:" },
-        { &sel_convertSizeToBase_1, "convertSizeToBase:" },
-        { &sel_pointerFunctionsWithOptions_1, "pointerFunctionsWithOptions:" },
-        { &sel_setHTTPBody_1, "setHTTPBody:" },
-        { &sel_itemWithTag_1, "itemWithTag:" },
-        { &sel_spellServer_1checkGrammarInString_1language_1details_1, "spellServer:checkGrammarInString:language:details:" },
-        { &sel_vendorPointingDeviceType, "vendorPointingDeviceType" },
-        { &sel_firstRectForCharacterRange_1, "firstRectForCharacterRange:" },
-        { &sel_classDescriptionsInSuite_1, "classDescriptionsInSuite:" },
-        { &sel_setAttachmentSize_1forGlyphRange_1, "setAttachmentSize:forGlyphRange:" },
-        { &sel_isEmpty, "isEmpty" },
-        { &sel_soundNamed_1, "soundNamed:" },
-        { &sel_preparedCellAtColumn_1row_1, "preparedCellAtColumn:row:" },
-        { &sel_setLeafKeyPath_1, "setLeafKeyPath:" },
-        { &sel_initWithUnsignedInteger_1, "initWithUnsignedInteger:" },
-        { &sel_fractionOfDistanceThroughGlyphForPoint_1inTextContainer_1, "fractionOfDistanceThroughGlyphForPoint:inTextContainer:" },
-        { &sel_isFloatingPanel, "isFloatingPanel" },
-        { &sel_replaceObjectsAtIndexes_1withObjects_1, "replaceObjectsAtIndexes:withObjects:" },
-        { &sel_getComponents_1, "getComponents:" },
-        { &sel_fileType, "fileType" },
-        { &sel_setShowsBaselineSeparator_1, "setShowsBaselineSeparator:" },
-        { &sel_removeCredential_1forProtectionSpace_1, "removeCredential:forProtectionSpace:" },
-        { &sel_imageRepWithContentsOfFile_1, "imageRepWithContentsOfFile:" },
-        { &sel_predicateWithFormat_1argumentArray_1, "predicateWithFormat:argumentArray:" },
-        { &sel_positiveSuffix, "positiveSuffix" },
-        { &sel_formatter, "formatter" },
-        { &sel_setAnimationDelay_1, "setAnimationDelay:" },
-        { &sel_maxConcurrentOperationCount, "maxConcurrentOperationCount" },
-        { &sel_childSpecifier, "childSpecifier" },
-        { &sel_cacheMode, "cacheMode" },
-        { &sel_registerForServices, "registerForServices" },
-        { &sel_setFirstWeekday_1, "setFirstWeekday:" },
-        { &sel_rulerViewClass, "rulerViewClass" },
-        { &sel_initialValue, "initialValue" },
-        { &sel_redColor, "redColor" },
-        { &sel_addDependency_1, "addDependency:" },
-        { &sel_pathExtension, "pathExtension" },
-        { &sel_fastestEncoding, "fastestEncoding" },
-        { &sel_socketType, "socketType" },
-        { &sel_setRuleThickness_1, "setRuleThickness:" },
-        { &sel_setDTDKind_1, "setDTDKind:" },
-        { &sel_setClass_1forClassName_1, "setClass:forClassName:" },
-        { &sel_setDocumentCursor_1, "setDocumentCursor:" },
-        { &sel_extraLineFragmentRect, "extraLineFragmentRect" },
-        { &sel_attributeForName_1, "attributeForName:" },
-        { &sel_defaultCredentialForProtectionSpace_1, "defaultCredentialForProtectionSpace:" },
-        { &sel_indexOfItemWithTag_1, "indexOfItemWithTag:" },
-        { &sel_fontManager_1willIncludeFont_1, "fontManager:willIncludeFont:" },
-        { &sel_scrollRangeToVisible_1, "scrollRangeToVisible:" },
-        { &sel_fileTypeFromLastRunSavePanel, "fileTypeFromLastRunSavePanel" },
-        { &sel_collectionView, "collectionView" },
-        { &sel_tabView, "tabView" },
-        { &sel_commonISOCurrencyCodes, "commonISOCurrencyCodes" },
-        { &sel_removeFontTrait_1, "removeFontTrait:" },
-        { &sel_drawKnob_1, "drawKnob:" },
-        { &sel_tokenField_1menuForRepresentedObject_1, "tokenField:menuForRepresentedObject:" },
-        { &sel_setFrameUsingName_1, "setFrameUsingName:" },
-        { &sel_classNameEncodedForTrueClassName_1, "classNameEncodedForTrueClassName:" },
-        { &sel_windowFrameAutosaveName, "windowFrameAutosaveName" },
-        { &sel_characterAtIndex_1, "characterAtIndex:" },
-        { &sel_smartInsertAfterStringForString_1replacingRange_1, "smartInsertAfterStringForString:replacingRange:" },
-        { &sel_version, "version" },
-        { &sel_objectsAtIndexes_1, "objectsAtIndexes:" },
-        { &sel_requestIsCacheEquivalent_1toRequest_1, "requestIsCacheEquivalent:toRequest:" },
-        { &sel_columnOfMatrix_1, "columnOfMatrix:" },
-        { &sel_isBezeled, "isBezeled" },
-        { &sel_setAutosaveName_1, "setAutosaveName:" },
-        { &sel_becomeMainWindow, "becomeMainWindow" },
-        { &sel_pasteAsRichText_1, "pasteAsRichText:" },
-        { &sel_isSpeaking, "isSpeaking" },
-        { &sel_format, "format" },
-        { &sel_volume, "volume" },
-        { &sel_setMenu_1, "setMenu:" },
-        { &sel_setEra_1, "setEra:" },
-        { &sel_textContainerOrigin, "textContainerOrigin" },
-        { &sel_setLocalizesFormat_1, "setLocalizesFormat:" },
-        { &sel_removeIndex_1, "removeIndex:" },
-        { &sel_gotoPosterFrame_1, "gotoPosterFrame:" },
-        { &sel_validateValue_1forKeyPath_1error_1, "validateValue:forKeyPath:error:" },
-        { &sel_initWithCharactersNoCopy_1length_1freeWhenDone_1, "initWithCharactersNoCopy:length:freeWhenDone:" },
-        { &sel_initWithLength_1, "initWithLength:" },
-        { &sel_setAllowsMultipleSelection_1, "setAllowsMultipleSelection:" },
-        { &sel_isRotatedFromBase, "isRotatedFromBase" },
-        { &sel_beginDocument, "beginDocument" },
-        { &sel_initWithContentsOfURL_1usedEncoding_1error_1, "initWithContentsOfURL:usedEncoding:error:" },
-        { &sel_showsSuppressionButton, "showsSuppressionButton" },
-        { &sel_tearOffMenuRepresentation, "tearOffMenuRepresentation" },
-        { &sel_otherEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1subtype_1data1_1data2_1, "otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:" },
-        { &sel_imageUnfilteredFileTypes, "imageUnfilteredFileTypes" },
-        { &sel_isGathering, "isGathering" },
-        { &sel_slideImage_1from_1to_1, "slideImage:from:to:" },
-        { &sel_initWithTCPPort_1, "initWithTCPPort:" },
-        { &sel_stringByFoldingWithOptions_1locale_1, "stringByFoldingWithOptions:locale:" },
-        { &sel_viewDidUnhide, "viewDidUnhide" },
-        { &sel_controlSize, "controlSize" },
-        { &sel_resourceDataUsingCache_1, "resourceDataUsingCache:" },
-        { &sel_startWhenAnimation_1reachesProgress_1, "startWhenAnimation:reachesProgress:" },
-        { &sel_registerURLHandleClass_1, "registerURLHandleClass:" },
-        { &sel_indicatorImageInTableColumn_1, "indicatorImageInTableColumn:" },
-        { &sel_decimalNumberByMultiplyingByPowerOf10_1, "decimalNumberByMultiplyingByPowerOf10:" },
-        { &sel_scrollPoint_1, "scrollPoint:" },
-        { &sel_setValue_1forKeyPath_1, "setValue:forKeyPath:" },
-        { &sel_fontDescriptorWithMatrix_1, "fontDescriptorWithMatrix:" },
-        { &sel_parser_1foundProcessingInstructionWithTarget_1data_1, "parser:foundProcessingInstructionWithTarget:data:" },
-        { &sel_interfaceStyle, "interfaceStyle" },
-        { &sel_comboBox_1objectValueForItemAtIndex_1, "comboBox:objectValueForItemAtIndex:" },
-        { &sel_applicationDidFinishLaunching_1, "applicationDidFinishLaunching:" },
-        { &sel_currentMemoryUsage, "currentMemoryUsage" },
-        { &sel_altersStateOfSelectedItem, "altersStateOfSelectedItem" },
-        { &sel_selectedColumn, "selectedColumn" },
-        { &sel_convertBaseToScreen_1, "convertBaseToScreen:" },
-        { &sel_lineHeightMultiple, "lineHeightMultiple" },
-        { &sel_CGColorSpace, "CGColorSpace" },
-        { &sel_descriptionInStringsFileFormat, "descriptionInStringsFileFormat" },
-        { &sel_isOutputStackInReverseOrder, "isOutputStackInReverseOrder" },
-        { &sel_takeValue_1forKey_1, "takeValue:forKey:" },
-        { &sel_stringWithContentsOfFile_1, "stringWithContentsOfFile:" },
-        { &sel_addItem_1, "addItem:" },
-        { &sel_viewWillMoveToWindow_1, "viewWillMoveToWindow:" },
-        { &sel_changeFileAttributes_1atPath_1, "changeFileAttributes:atPath:" },
-        { &sel_userFixedPitchFontOfSize_1, "userFixedPitchFontOfSize:" },
-        { &sel_selectRowIndexes_1inColumn_1, "selectRowIndexes:inColumn:" },
-        { &sel_defaultLineCapStyle, "defaultLineCapStyle" },
-        { &sel_attributedAlternateTitle, "attributedAlternateTitle" },
-        { &sel_fileExistsAtPath_1, "fileExistsAtPath:" },
-        { &sel_textView_1clickedOnLink_1atIndex_1, "textView:clickedOnLink:atIndex:" },
-        { &sel_drawers, "drawers" },
-        { &sel_outlineView_1shouldSelectTableColumn_1, "outlineView:shouldSelectTableColumn:" },
-        { &sel_pointValue, "pointValue" },
-        { &sel_integerValue, "integerValue" },
-        { &sel_modifyFontViaPanel_1, "modifyFontViaPanel:" },
-        { &sel_windowTitleForDocumentDisplayName_1, "windowTitleForDocumentDisplayName:" },
-        { &sel_shortWeekdaySymbols, "shortWeekdaySymbols" },
-        { &sel_titleOfSelectedItem, "titleOfSelectedItem" },
-        { &sel_setWindowsNeedUpdate_1, "setWindowsNeedUpdate:" },
-        { &sel_stringWithUTF8String_1, "stringWithUTF8String:" },
-        { &sel_transformedValueClass, "transformedValueClass" },
-        { &sel_initWithColorsAndLocations_1, "initWithColorsAndLocations:" },
-        { &sel_acceptsMouseMovedEvents, "acceptsMouseMovedEvents" },
-        { &sel_toolTipsFontOfSize_1, "toolTipsFontOfSize:" },
-        { &sel_setTextAttributesForPositiveValues_1, "setTextAttributesForPositiveValues:" },
-        { &sel_setAlwaysShowsDecimalSeparator_1, "setAlwaysShowsDecimalSeparator:" },
-        { &sel_setNumberOfColumns_1, "setNumberOfColumns:" },
-        { &sel_moveRightAndModifySelection_1, "moveRightAndModifySelection:" },
-        { &sel_indexOfItem_1, "indexOfItem:" },
-        { &sel_moveWordRight_1, "moveWordRight:" },
-        { &sel_numberWithUnsignedLongLong_1, "numberWithUnsignedLongLong:" },
-        { &sel_initWithAuthenticationChallenge_1sender_1, "initWithAuthenticationChallenge:sender:" },
-        { &sel_panelConvertFont_1, "panelConvertFont:" },
-        { &sel_temporaryAttribute_1atCharacterIndex_1effectiveRange_1, "temporaryAttribute:atCharacterIndex:effectiveRange:" },
-        { &sel_intersectHashTable_1, "intersectHashTable:" },
-        { &sel_positionOfGlyph_1precededByGlyph_1isNominal_1, "positionOfGlyph:precededByGlyph:isNominal:" },
-        { &sel_setLocalizedKeyTable_1, "setLocalizedKeyTable:" },
-        { &sel_fileManager_1shouldLinkItemAtPath_1toPath_1, "fileManager:shouldLinkItemAtPath:toPath:" },
-        { &sel_setScriptErrorNumber_1, "setScriptErrorNumber:" },
-        { &sel_initWithLocaleIdentifier_1, "initWithLocaleIdentifier:" },
-        { &sel_toolTip, "toolTip" },
-        { &sel_alternateMnemonic, "alternateMnemonic" },
-        { &sel_setChannelMapping_1, "setChannelMapping:" },
-        { &sel_setLocalizedKey_1, "setLocalizedKey:" },
-        { &sel_selector, "selector" },
-        { &sel_setCurrencyGroupingSeparator_1, "setCurrencyGroupingSeparator:" },
-        { &sel_initWithKeyOptions_1valueOptions_1capacity_1, "initWithKeyOptions:valueOptions:capacity:" },
-        { &sel_setStandaloneMonthSymbols_1, "setStandaloneMonthSymbols:" },
-        { &sel_physicalMemory, "physicalMemory" },
-        { &sel_parse, "parse" },
-        { &sel_defaultTypesetterBehavior, "defaultTypesetterBehavior" },
-        { &sel_setRulerVisible_1, "setRulerVisible:" },
-        { &sel_resizeDownCursor, "resizeDownCursor" },
-        { &sel_getBoundingRects_1forGlyphs_1count_1, "getBoundingRects:forGlyphs:count:" },
-        { &sel_openPanel, "openPanel" },
-        { &sel_setEntryWidth_1, "setEntryWidth:" },
-        { &sel_insertChildren_1atIndex_1, "insertChildren:atIndex:" },
-        { &sel_selectNext_1, "selectNext:" },
-        { &sel_paragraphGlyphRange, "paragraphGlyphRange" },
-        { &sel_animations, "animations" },
-        { &sel_setMarkers_1, "setMarkers:" },
-        { &sel_raise, "raise" },
-        { &sel_menuZone, "menuZone" },
-        { &sel_weekdaySymbols, "weekdaySymbols" },
-        { &sel_setHTTPMethod_1, "setHTTPMethod:" },
-        { &sel_placeholderAttributedString, "placeholderAttributedString" },
-        { &sel_filenameExtension_1isValidForType_1, "filenameExtension:isValidForType:" },
-        { &sel_initWithReceivePort_1sendPort_1, "initWithReceivePort:sendPort:" },
-        { &sel_setContextHelp_1forObject_1, "setContextHelp:forObject:" },
-        { &sel_archiveRootObject_1toFile_1, "archiveRootObject:toFile:" },
-        { &sel_setAnimations_1, "setAnimations:" },
-        { &sel_locationOfPrintRect_1, "locationOfPrintRect:" },
-        { &sel_setInterfaceStyle_1, "setInterfaceStyle:" },
-        { &sel_startMonitoring, "startMonitoring" },
-        { &sel_presentError_1modalForWindow_1delegate_1didPresentSelector_1contextInfo_1, "presentError:modalForWindow:delegate:didPresentSelector:contextInfo:" },
-        { &sel_windowFrameColor, "windowFrameColor" },
-        { &sel_paragraphSpacing, "paragraphSpacing" },
-        { &sel_fileAttributes, "fileAttributes" },
-        { &sel_setDisplayedCommandsTitle_1, "setDisplayedCommandsTitle:" },
-        { &sel_preflightAndReturnError_1, "preflightAndReturnError:" },
-        { &sel_setObservationInfo_1, "setObservationInfo:" },
-        { &sel_currentCommand, "currentCommand" },
-        { &sel_processInfo, "processInfo" },
-        { &sel_appendString_1, "appendString:" },
-        { &sel_setShowsHelp_1, "setShowsHelp:" },
-        { &sel_datePickerStyle, "datePickerStyle" },
-        { &sel_addFileWrapper_1, "addFileWrapper:" },
-        { &sel_bitmapImageRepForCachingDisplayInRect_1, "bitmapImageRepForCachingDisplayInRect:" },
-        { &sel_initWithFileAtPath_1, "initWithFileAtPath:" },
-        { &sel_cellClass, "cellClass" },
-        { &sel_imageRepsWithContentsOfFile_1, "imageRepsWithContentsOfFile:" },
-        { &sel_localizedScannerWithString_1, "localizedScannerWithString:" },
-        { &sel_isExpandable_1, "isExpandable:" },
-        { &sel_isLoaded, "isLoaded" },
-        { &sel_browser_1acceptDrop_1atRow_1column_1dropOperation_1, "browser:acceptDrop:atRow:column:dropOperation:" },
-        { &sel_panel_1directoryDidChange_1, "panel:directoryDidChange:" },
-        { &sel_publicID, "publicID" },
-        { &sel_contentMaxSize, "contentMaxSize" },
-        { &sel_menuDidClose_1, "menuDidClose:" },
-        { &sel_setPrinter_1, "setPrinter:" },
-        { &sel_keywordForDescriptorAtIndex_1, "keywordForDescriptorAtIndex:" },
-        { &sel_notANumberSymbol, "notANumberSymbol" },
-        { &sel_minimumLineHeight, "minimumLineHeight" },
-        { &sel_setContentBorderThickness_1forEdge_1, "setContentBorderThickness:forEdge:" },
-        { &sel_titleFrameOfColumn_1, "titleFrameOfColumn:" },
-        { &sel_dateValue, "dateValue" },
-        { &sel_numberOfRows, "numberOfRows" },
-        { &sel_isReadableFileAtPath_1, "isReadableFileAtPath:" },
-        { &sel_canInsertChild, "canInsertChild" },
-        { &sel_stringByReplacingOccurrencesOfString_1withString_1options_1range_1, "stringByReplacingOccurrencesOfString:withString:options:range:" },
-        { &sel_ok_1, "ok:" },
-        { &sel_hourOfDay, "hourOfDay" },
-        { &sel_paragraphRangeForRange_1, "paragraphRangeForRange:" },
-        { &sel_focusStack, "focusStack" },
-        { &sel_setUsesThreadedAnimation_1, "setUsesThreadedAnimation:" },
-        { &sel_dataForType_1, "dataForType:" },
-        { &sel_isByref, "isByref" },
-        { &sel_initWithResponse_1data_1userInfo_1storagePolicy_1, "initWithResponse:data:userInfo:storagePolicy:" },
-        { &sel_initWithSerializedRepresentation_1, "initWithSerializedRepresentation:" },
-        { &sel_openDocument_1, "openDocument:" },
-        { &sel_translateRectsNeedingDisplayInRect_1by_1, "translateRectsNeedingDisplayInRect:by:" },
-        { &sel_highlightsBy, "highlightsBy" },
-        { &sel_openHandCursor, "openHandCursor" },
-        { &sel_lineFragmentRectForProposedRect_1remainingRect_1, "lineFragmentRectForProposedRect:remainingRect:" },
-        { &sel_selectedNodes, "selectedNodes" },
-        { &sel_replaceObjectAtIndex_1withObject_1, "replaceObjectAtIndex:withObject:" },
-        { &sel_indexOfItemAtPoint_1, "indexOfItemAtPoint:" },
-        { &sel_setCriteria_1andDisplayValues_1forRowAtIndex_1, "setCriteria:andDisplayValues:forRowAtIndex:" },
-        { &sel_textStorage_1edited_1range_1changeInLength_1invalidatedRange_1, "textStorage:edited:range:changeInLength:invalidatedRange:" },
-        { &sel_synchronizeWindowTitleWithDocumentName, "synchronizeWindowTitleWithDocumentName" },
-        { &sel_fileHandleWithNullDevice, "fileHandleWithNullDevice" },
-        { &sel_descriptorWithTypeCode_1, "descriptorWithTypeCode:" },
-        { &sel_initWithDocFormat_1documentAttributes_1, "initWithDocFormat:documentAttributes:" },
-        { &sel_setAutoresizingMask_1, "setAutoresizingMask:" },
-        { &sel_methodReturnLength, "methodReturnLength" },
-        { &sel_recentDocumentURLs, "recentDocumentURLs" },
-        { &sel_setCurrentDirectoryPath_1, "setCurrentDirectoryPath:" },
-        { &sel_characterSetWithRange_1, "characterSetWithRange:" },
-        { &sel_resizeUpCursor, "resizeUpCursor" },
-        { &sel_rect, "rect" },
-        { &sel_removeCharactersInRange_1, "removeCharactersInRange:" },
-        { &sel_performSelectorOnMainThread_1withObject_1waitUntilDone_1, "performSelectorOnMainThread:withObject:waitUntilDone:" },
-        { &sel_elementAtIndex_1associatedPoints_1, "elementAtIndex:associatedPoints:" },
-        { &sel_dataForKey_1, "dataForKey:" },
-        { &sel_defaultDepthLimit, "defaultDepthLimit" },
-        { &sel_rulersVisible, "rulersVisible" },
-        { &sel_generalPasteboard, "generalPasteboard" },
-        { &sel_setAllowsTickMarkValuesOnly_1, "setAllowsTickMarkValuesOnly:" },
-        { &sel_stateImageOffset, "stateImageOffset" },
-        { &sel_isBordered, "isBordered" },
-        { &sel_insertPointer_1atIndex_1, "insertPointer:atIndex:" },
-        { &sel_keyForFileWrapper_1, "keyForFileWrapper:" },
-        { &sel_renewGState, "renewGState" },
-        { &sel_autovalidates, "autovalidates" },
-        { &sel_localizedNameForFamily_1face_1, "localizedNameForFamily:face:" },
-        { &sel_setAltIncrementValue_1, "setAltIncrementValue:" },
-        { &sel_sortUsingFunction_1context_1, "sortUsingFunction:context:" },
-        { &sel_fileNameExtensionWasHiddenInLastRunSavePanel, "fileNameExtensionWasHiddenInLastRunSavePanel" },
-        { &sel_endSheet_1returnCode_1, "endSheet:returnCode:" },
-        { &sel_insertObjects_1atIndexes_1, "insertObjects:atIndexes:" },
-        { &sel_standaloneMonthSymbols, "standaloneMonthSymbols" },
-        { &sel_prefersAllColumnUserResizing, "prefersAllColumnUserResizing" },
-        { &sel_separatesColumns, "separatesColumns" },
-        { &sel_moveToBeginningOfDocument_1, "moveToBeginningOfDocument:" },
-        { &sel_objectZone, "objectZone" },
-        { &sel_initWithURL_1MIMEType_1expectedContentLength_1textEncodingName_1, "initWithURL:MIMEType:expectedContentLength:textEncodingName:" },
-        { &sel_gotoEnd_1, "gotoEnd:" },
-        { &sel_superscriptRange_1, "superscriptRange:" },
-        { &sel_readInBackgroundAndNotifyForModes_1, "readInBackgroundAndNotifyForModes:" },
-        { &sel_initWithObjects_1forKeys_1, "initWithObjects:forKeys:" },
-        { &sel_cancel, "cancel" },
-        { &sel_suiteName, "suiteName" },
-        { &sel_sortedArrayUsingFunction_1context_1hint_1, "sortedArrayUsingFunction:context:hint:" },
-        { &sel_countWordsInString_1language_1, "countWordsInString:language:" },
-        { &sel_prepareWithInvocationTarget_1, "prepareWithInvocationTarget:" },
-        { &sel_statusItemWithLength_1, "statusItemWithLength:" },
-        { &sel_tableView_1shouldEditTableColumn_1row_1, "tableView:shouldEditTableColumn:row:" },
-        { &sel_appendBezierPathWithRect_1, "appendBezierPathWithRect:" },
-        { &sel_scrollColumnsRightBy_1, "scrollColumnsRightBy:" },
-        { &sel_negativeInfinitySymbol, "negativeInfinitySymbol" },
-        { &sel_firstLineHeadIndent, "firstLineHeadIndent" },
-        { &sel_generateGlyphsForGlyphStorage_1desiredNumberOfCharacters_1glyphIndex_1characterIndex_1, "generateGlyphsForGlyphStorage:desiredNumberOfCharacters:glyphIndex:characterIndex:" },
-        { &sel_dateWithTimeIntervalSinceReferenceDate_1, "dateWithTimeIntervalSinceReferenceDate:" },
-        { &sel_menu_1updateItem_1atIndex_1shouldCancel_1, "menu:updateItem:atIndex:shouldCancel:" },
-        { &sel_connection_1willSendRequest_1redirectResponse_1, "connection:willSendRequest:redirectResponse:" },
-        { &sel_attemptRecoveryFromError_1optionIndex_1delegate_1didRecoverSelector_1contextInfo_1, "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:" },
-        { &sel_cursorUpdate_1, "cursorUpdate:" },
-        { &sel_initWithMachPort_1options_1, "initWithMachPort:options:" },
-        { &sel_applyFontTraits_1range_1, "applyFontTraits:range:" },
-        { &sel_noteHeightOfRowsWithIndexesChanged_1, "noteHeightOfRowsWithIndexesChanged:" },
-        { &sel_orderFrontTablePanel_1, "orderFrontTablePanel:" },
-        { &sel_arrayWithObjects_1, "arrayWithObjects:" },
-        { &sel_enableFlushWindow, "enableFlushWindow" },
-        { &sel_minimum, "minimum" },
-        { &sel_stopListening, "stopListening" },
-        { &sel_endParagraph, "endParagraph" },
-        { &sel_sharingType, "sharingType" },
-        { &sel_backgroundLayoutEnabled, "backgroundLayoutEnabled" },
-        { &sel_yellowColor, "yellowColor" },
-        { &sel_columnIndexesInRect_1, "columnIndexesInRect:" },
-        { &sel_compositingOperation, "compositingOperation" },
-        { &sel_stopModalWithCode_1, "stopModalWithCode:" },
-        { &sel_smallSystemFontSize, "smallSystemFontSize" },
-        { &sel_nonretainedObjectValue, "nonretainedObjectValue" },
-        { &sel_encodeBytes_1length_1forKey_1, "encodeBytes:length:forKey:" },
-        { &sel_objectValues, "objectValues" },
-        { &sel_destroyContext, "destroyContext" },
-        { &sel_setFileModificationDate_1, "setFileModificationDate:" },
-        { &sel_rightMouseDragged_1, "rightMouseDragged:" },
-        { &sel_systemStatusBar, "systemStatusBar" },
-        { &sel_executableArchitectures, "executableArchitectures" },
-        { &sel_recentSearches, "recentSearches" },
-        { &sel_getWhite_1alpha_1, "getWhite:alpha:" },
-        { &sel_readDataToEndOfFile, "readDataToEndOfFile" },
-        { &sel_setHour_1, "setHour:" },
-        { &sel_titleBarFontOfSize_1, "titleBarFontOfSize:" },
-        { &sel_canDragRowsWithIndexes_1atPoint_1, "canDragRowsWithIndexes:atPoint:" },
-        { &sel_acceptsArrowKeys, "acceptsArrowKeys" },
-        { &sel_availableColorLists, "availableColorLists" },
-        { &sel_setUsesLazyFetching_1, "setUsesLazyFetching:" },
-        { &sel_convertAttributes_1, "convertAttributes:" },
-        { &sel_isWritableFileAtPath_1, "isWritableFileAtPath:" },
-        { &sel_timerWithTimeInterval_1target_1selector_1userInfo_1repeats_1, "timerWithTimeInterval:target:selector:userInfo:repeats:" },
-        { &sel_windowDidChangeScreen_1, "windowDidChangeScreen:" },
-        { &sel_insertTextContainer_1atIndex_1, "insertTextContainer:atIndex:" },
-        { &sel_weightOfFont_1, "weightOfFont:" },
-        { &sel_temporaryAttributesAtCharacterIndex_1longestEffectiveRange_1inRange_1, "temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:" },
-        { &sel_trackWithEvent_1, "trackWithEvent:" },
-        { &sel_selectRowIndexes_1byExtendingSelection_1, "selectRowIndexes:byExtendingSelection:" },
-        { &sel_charactersToBeSkipped, "charactersToBeSkipped" },
-        { &sel_names, "names" },
-        { &sel_setAllowsCutCopyPaste_1, "setAllowsCutCopyPaste:" },
-        { &sel_setDuration_1, "setDuration:" },
-        { &sel_sleepForTimeInterval_1, "sleepForTimeInterval:" },
-        { &sel_removeChildAtIndex_1, "removeChildAtIndex:" },
-        { &sel_tokenFieldCell_1writeRepresentedObjects_1toPasteboard_1, "tokenFieldCell:writeRepresentedObjects:toPasteboard:" },
-        { &sel_backgroundStyle, "backgroundStyle" },
-        { &sel_open_1, "open:" },
-        { &sel_indexGreaterThanOrEqualToIndex_1, "indexGreaterThanOrEqualToIndex:" },
-        { &sel_isAbsolutePath, "isAbsolutePath" },
-        { &sel_paletteLabel, "paletteLabel" },
-        { &sel_setQuarterSymbols_1, "setQuarterSymbols:" },
-        { &sel_suppressionButton, "suppressionButton" },
-        { &sel_undo, "undo" },
-        { &sel_rangeOfString_1options_1range_1locale_1, "rangeOfString:options:range:locale:" },
-        { &sel_localizedName_1locale_1, "localizedName:locale:" },
-        { &sel_setTableView_1, "setTableView:" },
-        { &sel_isExecutableFileAtPath_1, "isExecutableFileAtPath:" },
-        { &sel_standaloneQuarterSymbols, "standaloneQuarterSymbols" },
-        { &sel_textView_1shouldSetSpellingState_1range_1, "textView:shouldSetSpellingState:range:" },
-        { &sel_newObject, "newObject" },
-        { &sel_setDocumentEdited_1, "setDocumentEdited:" },
-        { &sel_setRelativePosition_1, "setRelativePosition:" },
-        { &sel_allConnections, "allConnections" },
-        { &sel_isLessThanOrEqualTo_1, "isLessThanOrEqualTo:" },
-        { &sel_attributeWithName_1stringValue_1, "attributeWithName:stringValue:" },
-        { &sel_floatForKey_1, "floatForKey:" },
-        { &sel_initWithDomain_1type_1name_1port_1, "initWithDomain:type:name:port:" },
-        { &sel_setShadowOffset_1, "setShadowOffset:" },
-        { &sel_tabViewItems, "tabViewItems" },
-        { &sel_appleEventCodeForReturnType, "appleEventCodeForReturnType" },
-        { &sel_createFileAtPath_1contents_1attributes_1, "createFileAtPath:contents:attributes:" },
-        { &sel_ruleEditor_1predicatePartsForCriterion_1withDisplayValue_1inRow_1, "ruleEditor:predicatePartsForCriterion:withDisplayValue:inRow:" },
-        { &sel_evaluateWithObject_1, "evaluateWithObject:" },
-        { &sel_pathComponents, "pathComponents" },
-        { &sel_setTarget_1, "setTarget:" },
-        { &sel_fileCreationDate, "fileCreationDate" },
-        { &sel_port, "port" },
-        { &sel_publish, "publish" },
-        { &sel_downloadDidFinish_1, "downloadDidFinish:" },
-        { &sel_endEditing_1, "endEditing:" },
-        { &sel_expectedResourceDataSize, "expectedResourceDataSize" },
-        { &sel_paddingCharacter, "paddingCharacter" },
-        { &sel_convertPoint_1fromView_1, "convertPoint:fromView:" },
-        { &sel_setIntValue_1, "setIntValue:" },
-        { &sel_appendBezierPathWithArcFromPoint_1toPoint_1radius_1, "appendBezierPathWithArcFromPoint:toPoint:radius:" },
-        { &sel_currentFontAction, "currentFontAction" },
-        { &sel_expressionForFunction_1arguments_1, "expressionForFunction:arguments:" },
-        { &sel_minimumDaysInFirstWeek, "minimumDaysInFirstWeek" },
-        { &sel_setDeletesFileUponFailure_1, "setDeletesFileUponFailure:" },
-        { &sel_pageCount, "pageCount" },
-        { &sel_imageAlignment, "imageAlignment" },
-        { &sel_URLProtocol_1didCancelAuthenticationChallenge_1, "URLProtocol:didCancelAuthenticationChallenge:" },
-        { &sel_localizedPaperName, "localizedPaperName" },
-        { &sel_setAllowsBranchSelection_1, "setAllowsBranchSelection:" },
-        { &sel_symbolicLinkDestination, "symbolicLinkDestination" },
-        { &sel_prepareSavePanel_1, "prepareSavePanel:" },
-        { &sel_enableMultipleThreads, "enableMultipleThreads" },
-        { &sel_configurePersistentStoreCoordinatorForURL_1ofType_1modelConfiguration_1storeOptions_1error_1, "configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:" },
-        { &sel_backgroundLoadDidFailWithReason_1, "backgroundLoadDidFailWithReason:" },
-        { &sel_copyAttributesFromContext_1withMask_1, "copyAttributesFromContext:withMask:" },
-        { &sel_isVertical, "isVertical" },
-        { &sel_wait, "wait" },
-        { &sel_firstObjectCommonWithArray_1, "firstObjectCommonWithArray:" },
-        { &sel_hideOtherApplications_1, "hideOtherApplications:" },
-        { &sel_startSpeakingString_1, "startSpeakingString:" },
-        { &sel_makeKeyAndOrderFront_1, "makeKeyAndOrderFront:" },
-        { &sel_drawCellAtIndex_1, "drawCellAtIndex:" },
-        { &sel_headerToolTip, "headerToolTip" },
-        { &sel_readRTFDFromFile_1, "readRTFDFromFile:" },
-        { &sel_knownTimeZoneNames, "knownTimeZoneNames" },
-        { &sel_toOneRelationshipKeys, "toOneRelationshipKeys" },
-        { &sel_replyTimeout, "replyTimeout" },
-        { &sel_setDelegate_1, "setDelegate:" },
-        { &sel_initWithTarget_1protocol_1, "initWithTarget:protocol:" },
-        { &sel_setShowsPrintPanel_1, "setShowsPrintPanel:" },
-        { &sel_trackingNumber, "trackingNumber" },
-        { &sel_initWithDecimal_1, "initWithDecimal:" },
-        { &sel_proxyWithTarget_1connection_1, "proxyWithTarget:connection:" },
-        { &sel_setCompositingFilter_1, "setCompositingFilter:" },
-        { &sel_systemFontSizeForControlSize_1, "systemFontSizeForControlSize:" },
-        { &sel_registerDefaults_1, "registerDefaults:" },
-        { &sel_veryShortStandaloneMonthSymbols, "veryShortStandaloneMonthSymbols" },
-        { &sel_setPlusSign_1, "setPlusSign:" },
-        { &sel_colorRenderingIntent, "colorRenderingIntent" },
-        { &sel_thicknessRequiredInRuler, "thicknessRequiredInRuler" },
-        { &sel_setAlertStyle_1, "setAlertStyle:" },
-        { &sel_searchScopes, "searchScopes" },
-        { &sel_tag, "tag" },
-        { &sel_autosavingDelay, "autosavingDelay" },
-        { &sel_setDateStyle_1, "setDateStyle:" },
-        { &sel_setIcon_1forFile_1options_1, "setIcon:forFile:options:" },
-        { &sel_internationalCurrencySymbol, "internationalCurrencySymbol" },
-        { &sel_netService_1didUpdateTXTRecordData_1, "netService:didUpdateTXTRecordData:" },
-        { &sel_setOnMouseEntered_1, "setOnMouseEntered:" },
-        { &sel_setTextBaseWritingDirection_1, "setTextBaseWritingDirection:" },
-        { &sel_startSpecifier, "startSpecifier" },
-        { &sel_setExcludedFromWindowsMenu_1, "setExcludedFromWindowsMenu:" },
-        { &sel_operatingSystemName, "operatingSystemName" },
-        { &sel_isConcurrent, "isConcurrent" },
-        { &sel_enableRelease_1, "enableRelease:" },
-        { &sel_getValues_1forAttribute_1forVirtualScreen_1, "getValues:forAttribute:forVirtualScreen:" },
-        { &sel_interrupt, "interrupt" },
-        { &sel_whiteComponent, "whiteComponent" },
-        { &sel_keyEquivalentRectForBounds_1, "keyEquivalentRectForBounds:" },
-        { &sel_numberOfVisibleColumns, "numberOfVisibleColumns" },
-        { &sel_windowNibName, "windowNibName" },
-        { &sel_parser_1foundIgnorableWhitespace_1, "parser:foundIgnorableWhitespace:" },
-        { &sel_menuItemCellForItemAtIndex_1, "menuItemCellForItemAtIndex:" },
-        { &sel_addTrackingArea_1, "addTrackingArea:" },
-        { &sel_arrangedObjects, "arrangedObjects" },
-        { &sel_timeStyle, "timeStyle" },
-        { &sel_indexPathWithIndexes_1length_1, "indexPathWithIndexes:length:" },
-        { &sel_addNamespace_1, "addNamespace:" },
-        { &sel_setDisplayValuesKeyPath_1, "setDisplayValuesKeyPath:" },
-        { &sel_notificationBatchingInterval, "notificationBatchingInterval" },
-        { &sel_MIMEType, "MIMEType" },
-        { &sel_drawerWillClose_1, "drawerWillClose:" },
-        { &sel_sortedArrayHint, "sortedArrayHint" },
-        { &sel_shortQuarterSymbols, "shortQuarterSymbols" },
-        { &sel_usesAlternatingRowBackgroundColors, "usesAlternatingRowBackgroundColors" },
-        { &sel_colorWithKey_1, "colorWithKey:" },
-        { &sel_rangeForUserCompletion, "rangeForUserCompletion" },
-        { &sel_boolValue, "boolValue" },
-        { &sel_autosaveName, "autosaveName" },
-        { &sel_childWindows, "childWindows" },
-        { &sel_mapTableWithStrongToWeakObjects, "mapTableWithStrongToWeakObjects" },
-        { &sel_unhide, "unhide" },
-        { &sel_setRowClass_1, "setRowClass:" },
-        { &sel_endSubelementIndex, "endSubelementIndex" },
-        { &sel_preferredLocalizations, "preferredLocalizations" },
-        { &sel_fileSystemChanged, "fileSystemChanged" },
-        { &sel_secondOfMinute, "secondOfMinute" },
-        { &sel_scrollWheel_1, "scrollWheel:" },
-        { &sel_characterIndexForGlyphAtIndex_1, "characterIndexForGlyphAtIndex:" },
-        { &sel_drawRepresentation_1inRect_1, "drawRepresentation:inRect:" },
-        { &sel_setByAddingObject_1, "setByAddingObject:" },
-        { &sel_rotateByAngle_1, "rotateByAngle:" },
-        { &sel_allValues, "allValues" },
-        { &sel_addItemWithObjectValue_1, "addItemWithObjectValue:" },
-        { &sel_tabViewItemAtIndex_1, "tabViewItemAtIndex:" },
-        { &sel_servicePortWithName_1, "servicePortWithName:" },
-        { &sel_multiplier, "multiplier" },
-        { &sel_setSelectionGranularity_1, "setSelectionGranularity:" },
-        { &sel_setViewsNeedDisplay_1, "setViewsNeedDisplay:" },
-        { &sel_object, "object" },
-        { &sel_writeFileWrapper_1, "writeFileWrapper:" },
-        { &sel_authenticationMethod, "authenticationMethod" },
-        { &sel_frameLength, "frameLength" },
-        { &sel_nextNode, "nextNode" },
-        { &sel_characterSetWithCharactersInString_1, "characterSetWithCharactersInString:" },
-        { &sel_messageText, "messageText" },
-        { &sel_setArguments_1, "setArguments:" },
-        { &sel_getBytes_1length_1, "getBytes:length:" },
-        { &sel_setDropItem_1dropChildIndex_1, "setDropItem:dropChildIndex:" },
-        { &sel_expressionForVariable_1, "expressionForVariable:" },
-        { &sel_rectPreservedDuringLiveResize, "rectPreservedDuringLiveResize" },
-        { &sel_isMuted, "isMuted" },
-        { &sel_allowsColumnResizing, "allowsColumnResizing" },
-        { &sel_readFileWrapper, "readFileWrapper" },
-        { &sel_undoNestedGroup, "undoNestedGroup" },
-        { &sel_setIncludedKeys_1, "setIncludedKeys:" },
-        { &sel_textWithStringValue_1, "textWithStringValue:" },
-        { &sel_ruleEditorRowsDidChange_1, "ruleEditorRowsDidChange:" },
-        { &sel_handleMouseEvent_1, "handleMouseEvent:" },
-        { &sel_browser_1canDragRowsWithIndexes_1inColumn_1withEvent_1, "browser:canDragRowsWithIndexes:inColumn:withEvent:" },
-        { &sel_drawPageBorderWithSize_1, "drawPageBorderWithSize:" },
-        { &sel_valueWithBytes_1objCType_1, "valueWithBytes:objCType:" },
-        { &sel_subpathsAtPath_1, "subpathsAtPath:" },
-        { &sel_mnemonicLocation, "mnemonicLocation" },
-        { &sel_dockTile, "dockTile" },
-        { &sel_setFirstLineHeadIndent_1, "setFirstLineHeadIndent:" },
-        { &sel_isAutomaticQuoteSubstitutionEnabled, "isAutomaticQuoteSubstitutionEnabled" },
-        { &sel_allowsReverseTransformation, "allowsReverseTransformation" },
-        { &sel_moveNodes_1toIndexPath_1, "moveNodes:toIndexPath:" },
-        { &sel_seekToFileOffset_1, "seekToFileOffset:" },
-        { &sel_scriptingBeginsWith_1, "scriptingBeginsWith:" },
-        { &sel_setInformativeText_1, "setInformativeText:" },
-        { &sel_initWithIndexSet_1, "initWithIndexSet:" },
-        { &sel_write_1maxLength_1, "write:maxLength:" },
-        { &sel_canInitWithRequest_1, "canInitWithRequest:" },
-        { &sel_enqueueNotification_1postingStyle_1, "enqueueNotification:postingStyle:" },
-        { &sel_setShouldResolveExternalEntities_1, "setShouldResolveExternalEntities:" },
-        { &sel_usesFindPanel, "usesFindPanel" },
-        { &sel_perMillSymbol, "perMillSymbol" },
-        { &sel_setClearsFilterPredicateOnInsertion_1, "setClearsFilterPredicateOnInsertion:" },
-        { &sel_currentLocale, "currentLocale" },
-        { &sel_pasteboardByFilteringData_1ofType_1, "pasteboardByFilteringData:ofType:" },
-        { &sel_isSheet, "isSheet" },
-        { &sel_hasWritablePropertyForKey_1, "hasWritablePropertyForKey:" },
-        { &sel_drawDividerInRect_1, "drawDividerInRect:" },
-        { &sel_sharedUserDefaultsController, "sharedUserDefaultsController" },
-        { &sel_preferredFontNames, "preferredFontNames" },
-        { &sel_menuBarFontOfSize_1, "menuBarFontOfSize:" },
-        { &sel_sharedColorPanelExists, "sharedColorPanelExists" },
-        { &sel_reshape, "reshape" },
-        { &sel_initWithLong_1, "initWithLong:" },
-        { &sel_reservedThicknessForAccessoryView, "reservedThicknessForAccessoryView" },
-        { &sel_setTitleCell_1, "setTitleCell:" },
-        { &sel_sharedSpellCheckerExists, "sharedSpellCheckerExists" },
-        { &sel_locationForSubmenu_1, "locationForSubmenu:" },
-        { &sel_nodesForXPath_1error_1, "nodesForXPath:error:" },
-        { &sel_setHasVerticalRuler_1, "setHasVerticalRuler:" },
-        { &sel_controlHighlightColor, "controlHighlightColor" },
-        { &sel_rowSpan, "rowSpan" },
-        { &sel_decodeObject, "decodeObject" },
-        { &sel_fileHandleForReadingAtPath_1, "fileHandleForReadingAtPath:" },
-        { &sel_didLoadBytes_1loadComplete_1, "didLoadBytes:loadComplete:" },
-        { &sel_renewRows_1columns_1, "renewRows:columns:" },
-        { &sel_performKeyEquivalent_1, "performKeyEquivalent:" },
-        { &sel_windowDidResignKey_1, "windowDidResignKey:" },
-        { &sel_typeForKey_1, "typeForKey:" },
-        { &sel_selectedObjects, "selectedObjects" },
-        { &sel_defaultPrinter, "defaultPrinter" },
-        { &sel_colorWithPatternImage_1, "colorWithPatternImage:" },
-        { &sel_setAttributedAlternateTitle_1, "setAttributedAlternateTitle:" },
-        { &sel_setValue_1forKey_1, "setValue:forKey:" },
-        { &sel_drawInteriorWithFrame_1inView_1, "drawInteriorWithFrame:inView:" },
-        { &sel_copy_1, "copy:" },
-        { &sel_scanString_1intoString_1, "scanString:intoString:" },
-        { &sel_fileManager_1shouldProceedAfterError_1, "fileManager:shouldProceedAfterError:" },
-        { &sel_fileManager_1shouldRemoveItemAtPath_1, "fileManager:shouldRemoveItemAtPath:" },
-        { &sel_removeSavedColumnsWithAutosaveName_1, "removeSavedColumnsWithAutosaveName:" },
-        { &sel_numberWithUnsignedInteger_1, "numberWithUnsignedInteger:" },
-        { &sel_rulerMarkersForTextView_1paragraphStyle_1ruler_1, "rulerMarkersForTextView:paragraphStyle:ruler:" },
-        { &sel_layoutRectForTextBlock_1atIndex_1effectiveRange_1, "layoutRectForTextBlock:atIndex:effectiveRange:" },
-        { &sel_maxPossiblePositionOfDividerAtIndex_1, "maxPossiblePositionOfDividerAtIndex:" },
-        { &sel_removePort_1forMode_1, "removePort:forMode:" },
-        { &sel_drawHashMarksAndLabelsInRect_1, "drawHashMarksAndLabelsInRect:" },
-        { &sel_control_1textView_1doCommandBySelector_1, "control:textView:doCommandBySelector:" },
-        { &sel_getLineFragmentRect_1usedRect_1remainingRect_1forStartingGlyphAtIndex_1proposedRect_1lineSpacing_1paragraphSpacingBefore_1paragraphSpacingAfter_1, "getLineFragmentRect:usedRect:remainingRect:forStartingGlyphAtIndex:proposedRect:lineSpacing:paragraphSpacingBefore:paragraphSpacingAfter:" },
-        { &sel_textContainerInset, "textContainerInset" },
-        { &sel_positionsForCompositeSequence_1numberOfGlyphs_1pointArray_1, "positionsForCompositeSequence:numberOfGlyphs:pointArray:" },
-        { &sel_stringByAppendingPathComponent_1, "StringByAppendingPathComponent:" },
-        { &sel_application_1printFiles_1, "application:printFiles:" },
-        { &sel_scanInt_1, "scanInt:" },
-        { &sel_operators, "operators" },
-        { &sel_fireDate, "fireDate" },
-        { &sel_isExternal, "isExternal" },
-        { &sel_setImagePosition_1, "setImagePosition:" },
-        { &sel_predicateWithFormat_1arguments_1, "predicateWithFormat:arguments:" },
-        { &sel_stopSpeaking, "stopSpeaking" },
-        { &sel_contentWidthValueType, "contentWidthValueType" },
-        { &sel_paddingPosition, "paddingPosition" },
-        { &sel_removeLastObject, "removeLastObject" },
-        { &sel_stringByReplacingCharactersInRange_1withString_1, "stringByReplacingCharactersInRange:withString:" },
-        { &sel_pointerValue, "pointerValue" },
-        { &sel_setTruncatesLastVisibleLine_1, "setTruncatesLastVisibleLine:" },
-        { &sel_URLHandleResourceDidBeginLoading_1, "URLHandleResourceDidBeginLoading:" },
-        { &sel_valueForKeyPath_1, "valueForKeyPath:" },
-        { &sel_setPeriodicDelay_1interval_1, "setPeriodicDelay:interval:" },
-        { &sel_imageRepWithCIImage_1, "imageRepWithCIImage:" },
-        { &sel_wantsNotificationForMarkedText, "wantsNotificationForMarkedText" },
-        { &sel_rectForPart_1, "rectForPart:" },
-        { &sel_setWeekday_1, "setWeekday:" },
-        { &sel_streamStatus, "streamStatus" },
-        { &sel_containsPoint_1, "containsPoint:" },
-        { &sel_underlineThickness, "underlineThickness" },
-        { &sel_allObjects, "allObjects" },
-        { &sel_characters, "characters" },
-        { &sel_outlineViewSelectionIsChanging_1, "outlineViewSelectionIsChanging:" },
-        { &sel_netServiceBrowser_1didNotSearch_1, "netServiceBrowser:didNotSearch:" },
-        { &sel_poolCountHighWaterMark, "poolCountHighWaterMark" },
-        { &sel_setColorSpaceName_1, "setColorSpaceName:" },
-        { &sel_graphicsPort, "graphicsPort" },
-        { &sel_fontDescriptorWithName_1matrix_1, "fontDescriptorWithName:matrix:" },
-        { &sel_setSelectable_1, "setSelectable:" },
-        { &sel_scriptErrorOffendingObjectDescriptor, "scriptErrorOffendingObjectDescriptor" },
-        { &sel_resizingMask, "resizingMask" },
-        { &sel_canHandleRequest_1, "canHandleRequest:" },
-        { &sel_imageRepWithPasteboard_1, "imageRepWithPasteboard:" },
-        { &sel_stopQuery, "stopQuery" },
-        { &sel_dataWithBytes_1length_1, "dataWithBytes:length:" },
-        { &sel_setCachesBezierPath_1, "setCachesBezierPath:" },
-        { &sel_arrayForKey_1, "arrayForKey:" },
-        { &sel_cell, "cell" },
-        { &sel_dealloc, "dealloc" },
-        { &sel_constrainScrollPoint_1, "constrainScrollPoint:" },
-        { &sel_printSettings, "printSettings" },
-        { &sel_autoresizesOutlineColumn, "autoresizesOutlineColumn" },
-        { &sel_setFont_1range_1, "setFont:range:" },
-        { &sel_limitDateForMode_1, "limitDateForMode:" },
-        { &sel_stroke, "stroke" },
-        { &sel_parser_1parseErrorOccurred_1, "parser:parseErrorOccurred:" },
-        { &sel_sendsActionOnEndEditing, "sendsActionOnEndEditing" },
-        { &sel_toggleGrammarChecking_1, "toggleGrammarChecking:" },
-        { &sel_acceptsBinary, "acceptsBinary" },
-        { &sel_indexLessThanIndex_1, "indexLessThanIndex:" },
-        { &sel_setCollapsesBorders_1, "setCollapsesBorders:" },
-        { &sel_setTimeoutInterval_1, "setTimeoutInterval:" },
-        { &sel_setNeedsDisplayInRect_1avoidAdditionalLayout_1, "setNeedsDisplayInRect:avoidAdditionalLayout:" },
-        { &sel_encodeWithCoder_1, "encodeWithCoder:" },
-        { &sel_compositeToPoint_1operation_1, "compositeToPoint:operation:" },
-        { &sel_textView_1doubleClickedOnCell_1inRect_1atIndex_1, "textView:doubleClickedOnCell:inRect:atIndex:" },
-        { &sel_setAlternateTitleWithMnemonic_1, "setAlternateTitleWithMnemonic:" },
-        { &sel_minimumSignificantDigits, "minimumSignificantDigits" },
-        { &sel_stackSize, "stackSize" },
-        { &sel_setLayoutManager_1, "setLayoutManager:" },
-        { &sel_image_1didLoadRepresentationHeader_1, "image:didLoadRepresentationHeader:" },
-        { &sel_depth, "depth" },
-        { &sel_setTypesetter_1, "setTypesetter:" },
-        { &sel_isSessionOnly, "isSessionOnly" },
-        { &sel_performFindPanelAction_1, "performFindPanelAction:" },
-        { &sel_fileManager_1shouldProceedAfterError_1removingItemAtPath_1, "fileManager:shouldProceedAfterError:removingItemAtPath:" },
-        { &sel_paperSize, "paperSize" },
-        { &sel_changeColor_1, "changeColor:" },
-        { &sel_unarchiverDidFinish_1, "unarchiverDidFinish:" },
-        { &sel_initWithObjectsAndKeys_1, "initWithObjectsAndKeys:" },
-        { &sel_notationDeclarationForName_1, "notationDeclarationForName:" },
-        { &sel_maximumSignificantDigits, "maximumSignificantDigits" },
-        { &sel_receivesCredentialSecurely, "receivesCredentialSecurely" },
-        { &sel_setObjectBeingTested_1, "setObjectBeingTested:" },
-        { &sel_cacheDepthMatchesImageDepth, "cacheDepthMatchesImageDepth" },
-        { &sel_hasPropertyForKey_1, "hasPropertyForKey:" },
-        { &sel_draggingDestinationWindow, "draggingDestinationWindow" },
-        { &sel_typeCodeValue, "typeCodeValue" },
-        { &sel_portForName_1, "portForName:" },
-        { &sel_getCString_1maxLength_1encoding_1, "getCString:maxLength:encoding:" },
-        { &sel_attributedString, "attributedString" },
-        { &sel_fileExistsAtPath_1isDirectory_1, "fileExistsAtPath:isDirectory:" },
-        { &sel_updateRuler, "updateRuler" },
-        { &sel_print_1, "print:" },
-        { &sel_setFrameSize_1, "setFrameSize:" },
-        { &sel_dataFromPropertyList_1format_1errorDescription_1, "dataFromPropertyList:format:errorDescription:" },
-        { &sel_initWithContentsOfURL_1ofType_1, "initWithContentsOfURL:ofType:" },
-        { &sel_replaceValueAtIndex_1inPropertyWithKey_1withValue_1, "replaceValueAtIndex:inPropertyWithKey:withValue:" },
-        { &sel_formIntersectionWithCharacterSet_1, "formIntersectionWithCharacterSet:" },
-        { &sel_renderingMode, "renderingMode" },
-        { &sel_viewsNeedDisplay, "viewsNeedDisplay" },
-        { &sel_lineFragmentRectForProposedRect_1sweepDirection_1movementDirection_1remainingRect_1, "lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect:" },
-        { &sel_rulerAccessoryViewForTextView_1paragraphStyle_1ruler_1enabled_1, "rulerAccessoryViewForTextView:paragraphStyle:ruler:enabled:" },
-        { &sel_initWithArray_1copyItems_1, "initWithArray:copyItems:" },
-        { &sel_ensureLayoutForGlyphRange_1, "ensureLayoutForGlyphRange:" },
-        { &sel_availableLocaleIdentifiers, "availableLocaleIdentifiers" },
-        { &sel_viewDidHide, "viewDidHide" },
-        { &sel_setShouldReportNamespacePrefixes_1, "setShouldReportNamespacePrefixes:" },
-        { &sel_runToolbarCustomizationPalette_1, "runToolbarCustomizationPalette:" },
-        { &sel_roundingBehavior, "roundingBehavior" },
-        { &sel_expressionForEvaluatedObject, "expressionForEvaluatedObject" },
-        { &sel_rulerView_1handleMouseDown_1, "rulerView:handleMouseDown:" },
-        { &sel_scanCharactersFromSet_1intoString_1, "scanCharactersFromSet:intoString:" },
-        { &sel_applicationDidChangeScreenParameters_1, "applicationDidChangeScreenParameters:" },
-        { &sel_textView_1clickedOnCell_1inRect_1, "textView:clickedOnCell:inRect:" },
-        { &sel_decodeDoubleForKey_1, "decodeDoubleForKey:" },
-        { &sel_URLHandle_1resourceDidFailLoadingWithReason_1, "URLHandle:resourceDidFailLoadingWithReason:" },
-        { &sel_setCountKeyPath_1, "setCountKeyPath:" },
-        { &sel_showContextHelpForObject_1locationHint_1, "showContextHelpForObject:locationHint:" },
-        { &sel_setData_1forType_1, "setData:forType:" },
-        { &sel_setPixel_1atX_1y_1, "setPixel:atX:y:" },
-        { &sel_setReceiversSpecifier_1, "setReceiversSpecifier:" },
-        { &sel_postNotificationName_1object_1userInfo_1, "postNotificationName:object:userInfo:" },
-        { &sel_rowForItem_1, "rowForItem:" },
-        { &sel_fetch_1, "fetch:" },
-        { &sel_propertyList_1isValidForFormat_1, "propertyList:isValidForFormat:" },
-        { &sel_configureAsServer, "configureAsServer" },
-        { &sel_setAllowsColumnReordering_1, "setAllowsColumnReordering:" },
-        { &sel_charValue, "charValue" },
-        { &sel_setInsertionClassDescription_1, "setInsertionClassDescription:" },
-        { &sel_cyanColor, "cyanColor" },
-        { &sel_lockWhenCondition_1, "lockWhenCondition:" },
-        { &sel_cacheImageInRect_1, "cacheImageInRect:" },
-        { &sel_keyboardFocusIndicatorColor, "keyboardFocusIndicatorColor" },
-        { &sel_hasUndoManager, "hasUndoManager" },
-        { &sel_drawInBezierPath_1relativeCenterPosition_1, "drawInBezierPath:relativeCenterPosition:" },
-        { &sel_decimalNumberByAdding_1, "decimalNumberByAdding:" },
-        { &sel_initWithDescriptorType_1data_1, "initWithDescriptorType:data:" },
-        { &sel_isUndoing, "isUndoing" },
-        { &sel_boolForKey_1, "boolForKey:" },
-        { &sel_localizedCatalogNameComponent, "localizedCatalogNameComponent" },
-        { &sel_representations, "representations" },
-        { &sel_expressionValueWithObject_1context_1, "expressionValueWithObject:context:" },
-        { &sel_viewWillMoveToSuperview_1, "viewWillMoveToSuperview:" },
-        { &sel_alphaValue, "alphaValue" },
-        { &sel_learnWord_1, "learnWord:" },
-        { &sel_releaseGlobally, "releaseGlobally" },
-        { &sel_defaultCompletionDelay, "defaultCompletionDelay" },
-        { &sel_control_1textShouldEndEditing_1, "control:textShouldEndEditing:" },
-        { &sel_alertWithMessageText_1defaultButton_1alternateButton_1otherButton_1informativeTextWithFormat_1, "alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:" },
-        { &sel_control_1textShouldBeginEditing_1, "control:textShouldBeginEditing:" },
-        { &sel_sizeMode, "sizeMode" },
-        { &sel_representedURL, "representedURL" },
-        { &sel_fileHFSCreatorCode, "fileHFSCreatorCode" },
-        { &sel_removeDependency_1, "removeDependency:" },
-        { &sel_parentForItem_1, "parentForItem:" },
-        { &sel_adjustPageHeightNew_1top_1bottom_1limit_1, "adjustPageHeightNew:top:bottom:limit:" },
-        { &sel_showPanels, "showPanels" },
-        { &sel_alwaysUsesMultipleValuesMarker, "alwaysUsesMultipleValuesMarker" },
-        { &sel_setUpFieldEditorAttributes_1, "setUpFieldEditorAttributes:" },
-        { &sel_comboBoxCell_1completedString_1, "comboBoxCell:completedString:" },
-        { &sel_null, "null" },
-        { &sel_setTextAttributesForNil_1, "setTextAttributesForNil:" },
-        { &sel_currencyGroupingSeparator, "currencyGroupingSeparator" },
-        { &sel_toolbarSelectableItemIdentifiers_1, "toolbarSelectableItemIdentifiers:" },
-        { &sel_size, "size" },
-        { &sel_fileModificationDate, "fileModificationDate" },
-        { &sel_timestamp, "timestamp" },
-        { &sel_canonicalRequestForRequest_1, "canonicalRequestForRequest:" },
-        { &sel_moveBackwardAndModifySelection_1, "moveBackwardAndModifySelection:" },
-        { &sel_frameOfColumn_1, "frameOfColumn:" },
-        { &sel_setRefusesFirstResponder_1, "setRefusesFirstResponder:" },
-        { &sel_hasDynamicDepthLimit, "hasDynamicDepthLimit" },
-        { &sel_decodeIntForKey_1, "decodeIntForKey:" },
-        { &sel_autoupdatingCurrentLocale, "autoupdatingCurrentLocale" },
-        { &sel_transformBezierPath_1, "transformBezierPath:" },
-        { &sel_registerPort_1name_1nameServerPortNumber_1, "registerPort:name:nameServerPortNumber:" },
-        { &sel_contentWidth, "contentWidth" },
-        { &sel_noteUserDefaultsChanged, "noteUserDefaultsChanged" },
-        { &sel_orangeColor, "orangeColor" },
-        { &sel_lastItem, "lastItem" },
-        { &sel_setButtonType_1, "setButtonType:" },
-        { &sel_initWithContentsOfURL_1ofType_1error_1, "initWithContentsOfURL:ofType:error:" },
-        { &sel_rowTemplates, "rowTemplates" },
-        { &sel_setEnabled_1forSegment_1, "setEnabled:forSegment:" },
-        { &sel_avoidsEmptySelection, "avoidsEmptySelection" },
-        { &sel_encodeInt_1forKey_1, "encodeInt:forKey:" },
-        { &sel_dictionaryWithValuesForKeys_1, "dictionaryWithValuesForKeys:" },
-        { &sel_start_1, "start:" },
-        { &sel_sortUsingDescriptors_1, "sortUsingDescriptors:" },
-        { &sel_currentParagraphStyle, "currentParagraphStyle" },
-        { &sel_treeNodeWithRepresentedObject_1, "treeNodeWithRepresentedObject:" },
-        { &sel_tableColumnWithIdentifier_1, "tableColumnWithIdentifier:" },
-        { &sel_attributedTitle, "attributedTitle" },
-        { &sel_setEntryType_1, "setEntryType:" },
-        { &sel_pixelFormat, "pixelFormat" },
-        { &sel_temporaryAttribute_1atCharacterIndex_1longestEffectiveRange_1inRange_1, "temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:" },
-        { &sel_treatsFilePackagesAsDirectories, "treatsFilePackagesAsDirectories" },
-        { &sel_glyphAtIndex_1, "glyphAtIndex:" },
-        { &sel_titleWidth_1, "titleWidth:" },
-        { &sel_setWords_1, "setWords:" },
-        { &sel_glyphIndexForPoint_1inTextContainer_1, "glyphIndexForPoint:inTextContainer:" },
-        { &sel_alternateSelectedControlColor, "alternateSelectedControlColor" },
-        { &sel_sizeToCells, "sizeToCells" },
-        { &sel_flushWindow, "flushWindow" },
-        { &sel_URLAtIndex_1effectiveRange_1, "URLAtIndex:effectiveRange:" },
-        { &sel_isSimpleRectangularTextContainer, "isSimpleRectangularTextContainer" },
-        { &sel_dragImageForRowsWithIndexes_1tableColumns_1event_1offset_1, "dragImageForRowsWithIndexes:tableColumns:event:offset:" },
-        { &sel_takeDoubleValueFrom_1, "takeDoubleValueFrom:" },
-        { &sel_selectItem_1, "selectItem:" },
-        { &sel_isMultiple, "isMultiple" },
-        { &sel_arrangeInFront_1, "arrangeInFront:" },
-        { &sel_defaultFocusRingType, "defaultFocusRingType" },
-        { &sel_componentsSeparatedByString_1, "componentsSeparatedByString:" },
-        { &sel_calendar, "calendar" },
-        { &sel_openFile_1withApplication_1, "openFile:withApplication:" },
-        { &sel_moveWordBackward_1, "moveWordBackward:" },
-        { &sel_getCharacters_1, "getCharacters:" },
-        { &sel_initWithInt_1, "initWithInt:" },
-        { &sel_initWithReceivePort_1sendPort_1components_1, "initWithReceivePort:sendPort:components:" },
-        { &sel_setBool_1forKey_1, "setBool:forKey:" },
-        { &sel_keyPathsForValuesAffectingValueForKey_1, "keyPathsForValuesAffectingValueForKey:" },
-        { &sel_saveDocumentTo_1, "saveDocumentTo:" },
-        { &sel_knobRectFlipped_1, "knobRectFlipped:" },
-        { &sel_isEqualToAttributedString_1, "isEqualToAttributedString:" },
-        { &sel_indexOfResult_1, "indexOfResult:" },
-        { &sel_attributesForVoice_1, "attributesForVoice:" },
-        { &sel_encodeConditionalObject_1, "encodeConditionalObject:" },
-        { &sel_pixelBufferCubeMapFace, "pixelBufferCubeMapFace" },
-        { &sel_index, "index" },
-        { &sel_transactionID, "transactionID" },
-        { &sel_displayRectIgnoringOpacity_1, "displayRectIgnoringOpacity:" },
-        { &sel_setKeyboardFocusRingNeedsDisplayInRect_1, "setKeyboardFocusRingNeedsDisplayInRect:" },
-        { &sel_invalidateLayoutForCharacterRange_1isSoft_1actualCharacterRange_1, "invalidateLayoutForCharacterRange:isSoft:actualCharacterRange:" },
-        { &sel_contentsEqualAtPath_1andPath_1, "contentsEqualAtPath:andPath:" },
-        { &sel_cancelOperation_1, "cancelOperation:" },
-        { &sel_accessibilityAttributeValue_1, "accessibilityAttributeValue:" },
-        { &sel_windowNibPath, "windowNibPath" },
-        { &sel_saveToFile_1saveOperation_1delegate_1didSaveSelector_1contextInfo_1, "saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:" },
-        { &sel_setMixedStateImage_1, "setMixedStateImage:" },
-        { &sel_predicateWithFormat_1, "predicateWithFormat:" },
-        { &sel_initWithSendPort_1receivePort_1components_1, "initWithSendPort:receivePort:components:" },
-        { &sel_setRecentsAutosaveName_1, "setRecentsAutosaveName:" },
-        { &sel_autosavesConfiguration, "autosavesConfiguration" },
-        { &sel_setSubitems_1, "setSubitems:" },
-        { &sel_setPathStyle_1, "setPathStyle:" },
-        { &sel_startAnimation_1, "startAnimation:" },
-        { &sel_bezierPath, "bezierPath" },
-        { &sel_archiver_1willEncodeObject_1, "archiver:willEncodeObject:" },
-        { &sel_acceptInputForMode_1beforeDate_1, "acceptInputForMode:beforeDate:" },
-        { &sel_setTearOffMenuRepresentation_1, "setTearOffMenuRepresentation:" },
-        { &sel_writableTypes, "writableTypes" },
-        { &sel_domain, "domain" },
-        { &sel_removeDocument_1, "removeDocument:" },
-        { &sel_showsBaselineSeparator, "showsBaselineSeparator" },
-        { &sel_dragImageForRows_1event_1dragImageOffset_1, "dragImageForRows:event:dragImageOffset:" },
-        { &sel_table, "table" },
-        { &sel_initRegularFileWithContents_1, "initRegularFileWithContents:" },
-        { &sel_add_1, "add:" },
-        { &sel_stateImageWidth, "stateImageWidth" },
-        { &sel_URLProtocol_1didReceiveAuthenticationChallenge_1, "URLProtocol:didReceiveAuthenticationChallenge:" },
-        { &sel_imageAndTitleWidth, "imageAndTitleWidth" },
-        { &sel_trackingAreas, "trackingAreas" },
-        { &sel_initRecordDescriptor, "initRecordDescriptor" },
-        { &sel_itemIdentifier, "itemIdentifier" },
-        { &sel_doubleClickAtIndex_1, "doubleClickAtIndex:" },
-        { &sel_fixesAttributesLazily, "fixesAttributesLazily" },
-        { &sel_netServiceBrowserWillSearch_1, "netServiceBrowserWillSearch:" },
-        { &sel_textureInternalFormat, "textureInternalFormat" },
-        { &sel_valueWithSize_1, "valueWithSize:" },
-        { &sel_setVerticalScroller_1, "setVerticalScroller:" },
-        { &sel_absolutePathForAppBundleWithIdentifier_1, "absolutePathForAppBundleWithIdentifier:" },
-        { &sel_contentMinSize, "contentMinSize" },
-        { &sel_persistentDomainForName_1, "persistentDomainForName:" },
-        { &sel_cellAtIndex_1, "cellAtIndex:" },
-        { &sel_setWithArray_1, "setWithArray:" },
-        { &sel_resetCursorRects, "resetCursorRects" },
-        { &sel_imageRepClassForFileType_1, "imageRepClassForFileType:" },
-        { &sel_setContainerIsObjectBeingTested_1, "setContainerIsObjectBeingTested:" },
-        { &sel_removeProgressMark_1, "removeProgressMark:" },
-        { &sel_hitTestForEvent_1inRect_1ofView_1, "hitTestForEvent:inRect:ofView:" },
-        { &sel_listDescriptor, "listDescriptor" },
-        { &sel_rangeOfUnit_1startDate_1interval_1forDate_1, "rangeOfUnit:startDate:interval:forDate:" },
-        { &sel_checkSpaceForParts, "checkSpaceForParts" },
-        { &sel_availableVoices, "availableVoices" },
-        { &sel_PMPrintSettings, "PMPrintSettings" },
-        { &sel_nonBaseCharacterSet, "nonBaseCharacterSet" },
-        { &sel_launchedTaskWithLaunchPath_1arguments_1, "launchedTaskWithLaunchPath:arguments:" },
-        { &sel_clearCurrentContext, "clearCurrentContext" },
-        { &sel_applicationWillUpdate_1, "applicationWillUpdate:" },
-        { &sel_addFontTrait_1, "addFontTrait:" },
-        { &sel_arrayByAddingObjectsFromArray_1, "arrayByAddingObjectsFromArray:" },
-        { &sel_abortParsing, "abortParsing" },
-        { &sel_subviews, "subviews" },
-        { &sel_initWithContainerClassDescription_1containerSpecifier_1key_1uniqueID_1, "initWithContainerClassDescription:containerSpecifier:key:uniqueID:" },
-        { &sel_acceptableDragTypes, "acceptableDragTypes" },
-        { &sel_managedObjectContext, "managedObjectContext" },
-        { &sel_resizeWithMagnification_1, "resizeWithMagnification:" },
-        { &sel_setUsesFindPanel_1, "setUsesFindPanel:" },
-        { &sel_application_1printFiles_1withSettings_1showPrintPanels_1, "application:printFiles:withSettings:showPrintPanels:" },
-        { &sel_loadAndReturnError_1, "loadAndReturnError:" },
-        { &sel_initWithLeftExpressions_1rightExpressions_1modifier_1operators_1options_1, "initWithLeftExpressions:rightExpressions:modifier:operators:options:" },
-        { &sel_addSelectionIndexes_1, "addSelectionIndexes:" },
-        { &sel_initWithBitmapDataPlanes_1pixelsWide_1pixelsHigh_1bitsPerSample_1samplesPerPixel_1hasAlpha_1isPlanar_1colorSpaceName_1bitmapFormat_1bytesPerRow_1bitsPerPixel_1, "initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:" },
-        { &sel_initToFileAtPath_1append_1, "initToFileAtPath:append:" },
-        { &sel_currencyDecimalSeparator, "currencyDecimalSeparator" },
-        { &sel_expansionFrameWithFrame_1inView_1, "expansionFrameWithFrame:inView:" },
-        { &sel_HTTPShouldHandleCookies, "HTTPShouldHandleCookies" },
-        { &sel_rearrangeObjects, "rearrangeObjects" },
-        { &sel_graphicsContextWithWindow_1, "graphicsContextWithWindow:" },
-        { &sel_stringWithCapacity_1, "stringWithCapacity:" },
-        { &sel_results, "results" },
-        { &sel_loadFileWrapperRepresentation_1ofType_1, "loadFileWrapperRepresentation:ofType:" },
-        { &sel_secondsFromGMTForDate_1, "secondsFromGMTForDate:" },
-        { &sel_clearStopAnimation, "clearStopAnimation" },
-        { &sel_numberWithShort_1, "numberWithShort:" },
-        { &sel_setHorizontallyCentered_1, "setHorizontallyCentered:" },
-        { &sel_setNeedsDisplayInRect_1, "setNeedsDisplayInRect:" },
-        { &sel_objectDidBeginEditing_1, "objectDidBeginEditing:" },
-        { &sel_rightMouseDown_1, "rightMouseDown:" },
-        { &sel_data2, "data2" },
-        { &sel_initWithCalendarIdentifier_1, "initWithCalendarIdentifier:" },
-        { &sel_containsValueForKey_1, "containsValueForKey:" },
-        { &sel_result, "result" },
-        { &sel_printDocument_1, "printDocument:" },
-        { &sel_addSuiteNamed_1, "addSuiteNamed:" },
-        { &sel_deleteCookie_1, "deleteCookie:" },
-        { &sel_isLocationRequiredToCreateForKey_1, "isLocationRequiredToCreateForKey:" },
-        { &sel_saveGraphicsState, "saveGraphicsState" },
-        { &sel_getInfoForFile_1application_1type_1, "getInfoForFile:application:type:" },
-        { &sel_HTTPBodyStream, "HTTPBodyStream" },
-        { &sel_accessibilityParameterizedAttributeNames, "accessibilityParameterizedAttributeNames" },
-        { &sel_objectForKey_1, "objectForKey:" },
-        { &sel_classForArchiver, "classForArchiver" },
-        { &sel_allBundles, "allBundles" },
-        { &sel_rangeOfComposedCharacterSequenceAtIndex_1, "rangeOfComposedCharacterSequenceAtIndex:" },
-        { &sel_allowsDuplicatesInToolbar, "allowsDuplicatesInToolbar" },
-        { &sel_speechSynthesizer_1didEncounterSyncMessage_1, "speechSynthesizer:didEncounterSyncMessage:" },
-        { &sel_performSelector_1withObject_1afterDelay_1inModes_1, "performSelector:withObject:afterDelay:inModes:" },
-        { &sel_setScalesWhenResized_1, "setScalesWhenResized:" },
-        { &sel_fileWrappers, "fileWrappers" },
-        { &sel_setSubmenu_1, "setSubmenu:" },
-        { &sel_setSendsSearchStringImmediately_1, "setSendsSearchStringImmediately:" },
-        { &sel_movieUnfilteredPasteboardTypes, "movieUnfilteredPasteboardTypes" },
-        { &sel_browser_1willDisplayCell_1atRow_1column_1, "browser:willDisplayCell:atRow:column:" },
-        { &sel_valueOfAttribute_1forResultAtIndex_1, "valueOfAttribute:forResultAtIndex:" },
-        { &sel_rightExpression, "rightExpression" },
-        { &sel_moveNode_1toIndexPath_1, "moveNode:toIndexPath:" },
-        { &sel_insertionKey, "insertionKey" },
-        { &sel_columnsAutosaveName, "columnsAutosaveName" },
-        { &sel_connection_1didReceiveResponse_1, "connection:didReceiveResponse:" },
-        { &sel_delegate, "delegate" },
-        { &sel_valueForHTTPHeaderField_1, "valueForHTTPHeaderField:" },
-        { &sel_requiredThickness, "requiredThickness" },
-        { &sel_selectedCells, "selectedCells" },
-        { &sel_setResizable_1, "setResizable:" },
-        { &sel_resizeRightCursor, "resizeRightCursor" },
-        { &sel_arrayWithContentsOfURL_1, "arrayWithContentsOfURL:" },
-        { &sel_setEchosBullets_1, "setEchosBullets:" },
-        { &sel_outlineViewItemDidCollapse_1, "outlineViewItemDidCollapse:" },
-        { &sel_mutableSetValueForKey_1, "mutableSetValueForKey:" },
-        { &sel_initWithObjects_1forKeys_1count_1, "initWithObjects:forKeys:count:" },
-        { &sel_canBeDisabled, "canBeDisabled" },
-        { &sel_selectTabViewItemWithIdentifier_1, "selectTabViewItemWithIdentifier:" },
-        { &sel_setLongEraSymbols_1, "setLongEraSymbols:" },
-        { &sel_displayRect_1, "displayRect:" },
-        { &sel_initRemoteWithProtocolFamily_1socketType_1protocol_1address_1, "initRemoteWithProtocolFamily:socketType:protocol:address:" },
-        { &sel_setQueuePriority_1, "setQueuePriority:" },
-        { &sel_initWithFileDescriptor_1closeOnDealloc_1, "initWithFileDescriptor:closeOnDealloc:" },
-        { &sel_comboBoxWillDismiss_1, "comboBoxWillDismiss:" },
-        { &sel_setMatchesOnMultipleResolution_1, "setMatchesOnMultipleResolution:" },
-        { &sel_connection, "connection" },
-        { &sel_includedKeys, "includedKeys" },
-        { &sel_writeToURL_1options_1error_1, "writeToURL:options:error:" },
-        { &sel_activeProcessorCount, "activeProcessorCount" },
-        { &sel_countByEnumeratingWithState_1objects_1count_1, "countByEnumeratingWithState:objects:count:" },
-        { &sel_setTransformStruct_1, "setTransformStruct:" },
-        { &sel_setVeryShortWeekdaySymbols_1, "setVeryShortWeekdaySymbols:" },
-        { &sel_markerLocation, "markerLocation" },
-        { &sel_widthForLayer_1edge_1, "widthForLayer:edge:" },
-        { &sel_transform, "transform" },
-        { &sel_addSelectionIndexPaths_1, "addSelectionIndexPaths:" },
-        { &sel_removeRequestMode_1, "removeRequestMode:" },
-        { &sel_indexOfObject_1inRange_1, "indexOfObject:inRange:" },
-        { &sel_awakeAfterUsingCoder_1, "awakeAfterUsingCoder:" },
-        { &sel_setKnobProportion_1, "setKnobProportion:" },
-        { &sel_setAllowsUserCustomization_1, "setAllowsUserCustomization:" },
-        { &sel_setCurrentOperation_1, "setCurrentOperation:" },
-        { &sel_outlineView_1isGroupItem_1, "outlineView:isGroupItem:" },
-        { &sel_deleteGlyphsInRange_1, "deleteGlyphsInRange:" },
-        { &sel_setSelectedObjects_1, "setSelectedObjects:" },
-        { &sel_pathComponentCellAtPoint_1withFrame_1inView_1, "pathComponentCellAtPoint:withFrame:inView:" },
-        { &sel_outlineView_1acceptDrop_1item_1childIndex_1, "outlineView:acceptDrop:item:childIndex:" },
-        { &sel_setBackgroundColor_1, "setBackgroundColor:" },
-        { &sel_canSelectNext, "canSelectNext" },
-        { &sel_encodeRect_1forKey_1, "encodeRect:forKey:" },
-        { &sel_resetCursorRect_1inView_1, "resetCursorRect:inView:" },
-        { &sel_resumeData, "resumeData" },
-        { &sel_levelsOfUndo, "levelsOfUndo" },
-        { &sel_objectIsForcedForKey_1, "objectIsForcedForKey:" },
-        { &sel_minSize, "minSize" },
-        { &sel_indentationPerLevel, "indentationPerLevel" },
-        { &sel_browserColumnConfigurationDidChange_1, "browserColumnConfigurationDidChange:" },
-        { &sel_startAnimation, "startAnimation" },
-        { &sel_outlineView_1namesOfPromisedFilesDroppedAtDestination_1forDraggedItems_1, "outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:" },
-        { &sel_setAlignment_1range_1, "setAlignment:range:" },
-        { &sel_zeroSymbol, "zeroSymbol" },
-        { &sel_draggedImage_1beganAt_1, "draggedImage:beganAt:" },
-        { &sel_buttonMask, "buttonMask" },
-        { &sel_frame, "frame" },
-        { &sel_markers, "markers" },
-        { &sel_initWithObjects_1count_1, "initWithObjects:count:" },
-        { &sel_unload, "unload" },
-        { &sel_initForReadingWithData_1, "initForReadingWithData:" },
-        { &sel_year, "year" },
-        { &sel_ruleEditor_1child_1forCriterion_1withRowType_1, "ruleEditor:child:forCriterion:withRowType:" },
-        { &sel_dayOfMonth, "dayOfMonth" },
-        { &sel_colorUsingColorSpaceName_1, "colorUsingColorSpaceName:" },
-        { &sel_registerCoercer_1selector_1toConvertFromClass_1toClass_1, "registerCoercer:selector:toConvertFromClass:toClass:" },
-        { &sel_removeObject_1inRange_1, "removeObject:inRange:" },
-        { &sel_setFrameFromString_1, "setFrameFromString:" },
-        { &sel_canAdd, "canAdd" },
-        { &sel_era, "era" },
-        { &sel_expressionForSubquery_1usingIteratorVariable_1predicate_1, "expressionForSubquery:usingIteratorVariable:predicate:" },
-        { &sel_setAMSymbol_1, "setAMSymbol:" },
-        { &sel_groupedResults, "groupedResults" },
-        { &sel_attributedStringValue, "attributedStringValue" },
-        { &sel_enclosingScrollView, "enclosingScrollView" },
-        { &sel_isEqualToNumber_1, "isEqualToNumber:" },
-        { &sel_mainBundle, "mainBundle" },
-        { &sel_textContainerForGlyphAtIndex_1effectiveRange_1, "textContainerForGlyphAtIndex:effectiveRange:" },
-        { &sel_setUsesGroupingSeparator_1, "setUsesGroupingSeparator:" },
-        { &sel_pointerAtIndex_1, "pointerAtIndex:" },
-        { &sel_arrowsPosition, "arrowsPosition" },
-        { &sel_panel_1compareFilename_1with_1caseSensitive_1, "panel:compareFilename:with:caseSensitive:" },
-        { &sel_drawSeparatorItemWithFrame_1inView_1, "drawSeparatorItemWithFrame:inView:" },
-        { &sel_objectsByEvaluatingWithContainers_1, "objectsByEvaluatingWithContainers:" },
-        { &sel_textTabForGlyphLocation_1writingDirection_1maxLocation_1, "textTabForGlyphLocation:writingDirection:maxLocation:" },
-        { &sel_fontDescriptor, "fontDescriptor" },
-        { &sel_validAttributesForMarkedText, "validAttributesForMarkedText" },
-        { &sel_scriptingEndsWith_1, "scriptingEndsWith:" },
-        { &sel_scrollViaScroller_1, "scrollViaScroller:" },
-        { &sel_setAlwaysUsesMultipleValuesMarker_1, "setAlwaysUsesMultipleValuesMarker:" },
-        { &sel_attributeKeys, "attributeKeys" },
-        { &sel_darkGrayColor, "darkGrayColor" },
-        { &sel_setExtensionHidden_1, "setExtensionHidden:" },
-        { &sel_drawInRect_1withAttributes_1, "drawInRect:withAttributes:" },
-        { &sel_selectTabViewItemAtIndex_1, "selectTabViewItemAtIndex:" },
-        { &sel_contentRectForFrameRect_1, "contentRectForFrameRect:" },
-        { &sel_setParagraphSpacingBefore_1, "setParagraphSpacingBefore:" },
-        { &sel_minDate, "minDate" },
-        { &sel_isARepeat, "isARepeat" },
-        { &sel_selectedTabViewItem, "selectedTabViewItem" },
-        { &sel_minusHashTable_1, "minusHashTable:" },
-        { &sel_preferredLocalizationsFromArray_1forPreferences_1, "preferredLocalizationsFromArray:forPreferences:" },
-        { &sel_setTextBlocks_1, "setTextBlocks:" },
-        { &sel_writePrintInfo, "writePrintInfo" },
-        { &sel_paperName, "paperName" },
-        { &sel_pauseSpeakingAtBoundary_1, "pauseSpeakingAtBoundary:" },
-        { &sel_markedTextAbandoned_1, "markedTextAbandoned:" },
-        { &sel_setTitled_1, "setTitled:" },
-        { &sel_hidesOnDeactivate, "hidesOnDeactivate" },
-        { &sel_selectedRange, "selectedRange" },
-        { &sel_reportException_1, "reportException:" },
-        { &sel_drawBezelWithFrame_1inView_1, "drawBezelWithFrame:inView:" },
-        { &sel_relativeMoveToPoint_1, "relativeMoveToPoint:" },
-        { &sel_printingAdjustmentInLayoutManager_1forNominallySpacedGlyphRange_1packedGlyphs_1count_1, "printingAdjustmentInLayoutManager:forNominallySpacedGlyphRange:packedGlyphs:count:" },
-        { &sel_longValue, "longValue" },
-        { &sel_setMaxNumberOfColumns_1, "setMaxNumberOfColumns:" },
-        { &sel_textView_1draggedCell_1inRect_1event_1atIndex_1, "textView:draggedCell:inRect:event:atIndex:" },
-        { &sel_isRemovable, "isRemovable" },
-        { &sel_handleCloseScriptCommand_1, "handleCloseScriptCommand:" },
-        { &sel_layoutManager_1shouldUseTemporaryAttributes_1forDrawingToScreen_1atCharacterIndex_1effectiveRange_1, "layoutManager:shouldUseTemporaryAttributes:forDrawingToScreen:atCharacterIndex:effectiveRange:" },
-        { &sel_expressionForKeyPath_1, "expressionForKeyPath:" },
-        { &sel_bezierPathWithOvalInRect_1, "bezierPathWithOvalInRect:" },
-        { &sel_deselectSelectedCell, "deselectSelectedCell" },
-        { &sel_defaultSubcontainerAttributeKey, "defaultSubcontainerAttributeKey" },
-        { &sel_yank_1, "yank:" },
-        { &sel_changeSpelling_1, "changeSpelling:" },
-        { &sel_totalAutoreleasedObjects, "totalAutoreleasedObjects" },
-        { &sel_loops, "loops" },
-        { &sel_boundsRectForTextBlock_1atIndex_1effectiveRange_1, "boundsRectForTextBlock:atIndex:effectiveRange:" },
-        { &sel_resignMainWindow, "resignMainWindow" },
-        { &sel_availableLanguages, "availableLanguages" },
-        { &sel_initWithMarkerFormat_1options_1, "initWithMarkerFormat:options:" },
-        { &sel_runInNewThread, "runInNewThread" },
-        { &sel_tableView_1selectionIndexesForProposedSelection_1, "tableView:selectionIndexesForProposedSelection:" },
-        { &sel_fetchWithRequest_1merge_1error_1, "fetchWithRequest:merge:error:" },
-        { &sel_endSubelementIdentifier, "endSubelementIdentifier" },
-        { &sel_implementationClassName, "implementationClassName" },
-        { &sel_eventNumber, "eventNumber" },
-        { &sel_requestTimeout, "requestTimeout" },
-        { &sel_boldSystemFontOfSize_1, "boldSystemFontOfSize:" },
-        { &sel_setPixelsWide_1, "setPixelsWide:" },
-        { &sel_labelForSegment_1, "labelForSegment:" },
-        { &sel_setAlternateTitle_1, "setAlternateTitle:" },
-        { &sel_shouldBreakLineByWordBeforeCharacterAtIndex_1, "shouldBreakLineByWordBeforeCharacterAtIndex:" },
-        { &sel_lockFocusIfCanDraw, "lockFocusIfCanDraw" },
-        { &sel_setFormat_1, "setFormat:" },
-        { &sel_setSegmentCount_1, "setSegmentCount:" },
-        { &sel_accessInstanceVariablesDirectly, "accessInstanceVariablesDirectly" },
-        { &sel_comboBox_1completedString_1, "comboBox:completedString:" },
-        { &sel_moveToBeginningOfParagraph_1, "moveToBeginningOfParagraph:" },
-        { &sel_defaultParagraphStyle, "defaultParagraphStyle" },
-        { &sel_availableTypeFromArray_1, "availableTypeFromArray:" },
-        { &sel_setGregorianStartDate_1, "setGregorianStartDate:" },
-        { &sel_dateWithTimeIntervalSince1970_1, "dateWithTimeIntervalSince1970:" },
-        { &sel_imagePasteboardTypes, "imagePasteboardTypes" },
-        { &sel_laterDate_1, "laterDate:" },
-        { &sel_setBounds_1, "setBounds:" },
-        { &sel_HTTPMethod, "HTTPMethod" },
-        { &sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1bidiLevels_1, "getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:" },
-        { &sel_rectArrayForCharacterRange_1withinSelectedCharacterRange_1inTextContainer_1rectCount_1, "rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:" },
-        { &sel_drawGridInClipRect_1, "drawGridInClipRect:" },
-        { &sel_isStarted, "isStarted" },
-        { &sel_descriptorType, "descriptorType" },
-        { &sel_ISOCurrencyCodes, "ISOCurrencyCodes" },
-        { &sel_resetCancelButtonCell, "resetCancelButtonCell" },
-        { &sel_positiveInfinitySymbol, "positiveInfinitySymbol" },
-        { &sel_sendsActionOnArrowKeys, "sendsActionOnArrowKeys" },
-        { &sel_delete_1, "delete:" },
-        { &sel_toolbarWillAddItem_1, "toolbarWillAddItem:" },
-        { &sel_updateCellInside_1, "updateCellInside:" },
-        { &sel_inputClientResignActive_1, "inputClientResignActive:" },
-        { &sel_initWithEventClass_1eventID_1targetDescriptor_1returnID_1transactionID_1, "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:" },
-        { &sel_decimalNumberByDividingBy_1withBehavior_1, "decimalNumberByDividingBy:withBehavior:" },
-        { &sel_spellServer_1suggestCompletionsForPartialWordRange_1inString_1language_1, "spellServer:suggestCompletionsForPartialWordRange:inString:language:" },
-        { &sel_arrayWithObjects_1count_1, "arrayWithObjects:count:" },
-        { &sel_connectionWithRegisteredName_1host_1, "connectionWithRegisteredName:host:" },
-        { &sel_initWithFormat_1, "initWithFormat:" },
-        { &sel_sharedURLCache, "sharedURLCache" },
-        { &sel_edited_1range_1changeInLength_1, "edited:range:changeInLength:" },
-        { &sel_prepareContent, "prepareContent" },
-        { &sel_stringWithCString_1encoding_1, "stringWithCString:encoding:" },
-        { &sel_postNotificationName_1object_1userInfo_1deliverImmediately_1, "postNotificationName:object:userInfo:deliverImmediately:" },
-        { &sel_coerceToDescriptorType_1, "coerceToDescriptorType:" },
-        { &sel_selectionIndex, "selectionIndex" },
-        { &sel_setContentMaxSize_1, "setContentMaxSize:" },
-        { &sel_setColor_1atX_1y_1, "setColor:atX:y:" },
-        { &sel_graphicsContext, "graphicsContext" },
-        { &sel_hostWithName_1, "hostWithName:" },
-        { &sel_toggleRuler_1, "toggleRuler:" },
-        { &sel_glyphInfoWithGlyph_1forFont_1baseString_1, "glyphInfoWithGlyph:forFont:baseString:" },
-        { &sel_panel_1willExpand_1, "panel:willExpand:" },
-        { &sel_selectText_1, "selectText:" },
-        { &sel_setShortMonthSymbols_1, "setShortMonthSymbols:" },
-        { &sel_setBorderType_1, "setBorderType:" },
-        { &sel_rangeOfString_1, "rangeOfString:" },
-        { &sel_invalidateGlyphsOnLayoutInvalidationForGlyphRange_1, "invalidateGlyphsOnLayoutInvalidationForGlyphRange:" },
-        { &sel_availableMembersOfFontFamily_1, "availableMembersOfFontFamily:" },
-        { &sel_XPath, "XPath" },
-        { &sel_contentsOfDirectoryAtPath_1error_1, "contentsOfDirectoryAtPath:error:" },
-        { &sel_newItemForRepresentedObject_1, "newItemForRepresentedObject:" },
-        { &sel_setMatrixClass_1, "setMatrixClass:" },
-        { &sel_compositeToPoint_1operation_1fraction_1, "compositeToPoint:operation:fraction:" },
-        { &sel_setHorizontallyResizable_1, "setHorizontallyResizable:" },
-        { &sel_mapTableWithStrongToStrongObjects, "mapTableWithStrongToStrongObjects" },
-        { &sel_colorSpaceModel, "colorSpaceModel" },
-        { &sel_setCriticalValue_1, "setCriticalValue:" },
-        { &sel_allowsToolTipsWhenApplicationIsInactive, "allowsToolTipsWhenApplicationIsInactive" },
-        { &sel_transformUsingAffineTransform_1, "transformUsingAffineTransform:" },
-        { &sel_initWithInvocation_1, "initWithInvocation:" },
-        { &sel_containerClassDescription, "containerClassDescription" },
-        { &sel_parser_1resolveExternalEntityName_1systemID_1, "parser:resolveExternalEntityName:systemID:" },
-        { &sel_mouseLocationOutsideOfEventStream, "mouseLocationOutsideOfEventStream" },
-        { &sel_detach, "detach" },
-        { &sel_setPickerMask_1, "setPickerMask:" },
-        { &sel_tokenStyle, "tokenStyle" },
-        { &sel_setOptions_1, "setOptions:" },
-        { &sel_PDFOperationWithView_1insideRect_1toPath_1printInfo_1, "PDFOperationWithView:insideRect:toPath:printInfo:" },
-        { &sel_parser_1didStartElement_1namespaceURI_1qualifiedName_1attributes_1, "parser:didStartElement:namespaceURI:qualifiedName:attributes:" },
-        { &sel_availableFontNamesMatchingFontDescriptor_1, "availableFontNamesMatchingFontDescriptor:" },
-        { &sel_relativePath, "relativePath" },
-        { &sel_moveWordForwardAndModifySelection_1, "moveWordForwardAndModifySelection:" },
-        { &sel_currentTime, "currentTime" },
-        { &sel_slideDraggedImageTo_1, "slideDraggedImageTo:" },
-        { &sel_application_1printFile_1, "application:printFile:" },
-        { &sel_punctuationCharacterSet, "punctuationCharacterSet" },
-        { &sel_allKeysForObject_1, "allKeysForObject:" },
-        { &sel_pathStyle, "pathStyle" },
-        { &sel_allowsEditingTextAttributes, "allowsEditingTextAttributes" },
-        { &sel_lineSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1, "lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:" },
-        { &sel_initWithContentsOfMappedFile_1, "initWithContentsOfMappedFile:" },
-        { &sel_initWithFrame_1pullsDown_1, "initWithFrame:pullsDown:" },
-        { &sel_setView_1, "setView:" },
-        { &sel_outlineViewSelectionDidChange_1, "outlineViewSelectionDidChange:" },
-        { &sel_widthValueTypeForLayer_1edge_1, "widthValueTypeForLayer:edge:" },
-        { &sel_dateWithTimeIntervalSinceNow_1, "dateWithTimeIntervalSinceNow:" },
-        { &sel_display, "display" },
-        { &sel_setRoundingBehavior_1, "setRoundingBehavior:" },
-        { &sel_valueWithPoint_1, "valueWithPoint:" },
-        { &sel_tickMarkValueAtIndex_1, "tickMarkValueAtIndex:" },
-        { &sel_addColumnWithCells_1, "addColumnWithCells:" },
-        { &sel_exposeBinding_1, "exposeBinding:" },
-        { &sel_weekdayOrdinal, "weekdayOrdinal" },
-        { &sel_canAddChild, "canAddChild" },
-        { &sel_hitTest_1, "hitTest:" },
-        { &sel_nibBundle, "nibBundle" },
-        { &sel_resumeExecutionWithResult_1, "resumeExecutionWithResult:" },
-        { &sel_setMonthSymbols_1, "setMonthSymbols:" },
-        { &sel_hitPart, "hitPart" },
-        { &sel_download_1didCancelAuthenticationChallenge_1, "download:didCancelAuthenticationChallenge:" },
-        { &sel_descriptionWithCalendarFormat_1, "descriptionWithCalendarFormat:" },
-        { &sel_setProtocolSpecificInformation_1, "setProtocolSpecificInformation:" },
-        { &sel_tokenField_1shouldAddObjects_1atIndex_1, "tokenField:shouldAddObjects:atIndex:" },
-        { &sel_popUpContextMenu_1withEvent_1forView_1, "popUpContextMenu:withEvent:forView:" },
-        { &sel_stopPeriodicEvents, "stopPeriodicEvents" },
-        { &sel_setDTD_1, "setDTD:" },
-        { &sel_glyphAtIndex_1isValidIndex_1, "glyphAtIndex:isValidIndex:" },
-        { &sel_encodeSize_1, "encodeSize:" },
-        { &sel_windowForSheet, "windowForSheet" },
-        { &sel_displayMode, "displayMode" },
-        { &sel_revertDocumentToSaved_1, "revertDocumentToSaved:" },
-        { &sel_tableView_1objectValueForTableColumn_1row_1, "tableView:objectValueForTableColumn:row:" },
-        { &sel_setBackingType_1, "setBackingType:" },
-        { &sel_scanUpToCharactersFromSet_1intoString_1, "scanUpToCharactersFromSet:intoString:" },
-        { &sel_nextValidKeyView, "nextValidKeyView" },
-        { &sel_arrayWithObject_1, "arrayWithObject:" },
-        { &sel_flushBuffer, "flushBuffer" },
-        { &sel_hasValidObjectValue, "hasValidObjectValue" },
-        { &sel_numberWithUnsignedLong_1, "numberWithUnsignedLong:" },
-        { &sel_collectExhaustively, "collectExhaustively" },
-        { &sel_setImageInterpolation_1, "setImageInterpolation:" },
-        { &sel_setSystemID_1, "setSystemID:" },
-        { &sel_setCornerView_1, "setCornerView:" },
-        { &sel_initWithDouble_1, "initWithDouble:" },
-        { &sel_sortedArrayUsingDescriptors_1, "sortedArrayUsingDescriptors:" },
-        { &sel_removeTextContainerAtIndex_1, "removeTextContainerAtIndex:" },
-        { &sel_whitespaceCharacterSet, "whitespaceCharacterSet" },
-        { &sel_classDescriptionForClass_1, "classDescriptionForClass:" },
-        { &sel_setAttributedString_1, "setAttributedString:" },
-        { &sel_setPixelsHigh_1, "setPixelsHigh:" },
-        { &sel_setDynamicDepthLimit_1, "setDynamicDepthLimit:" },
-        { &sel_sharedApplication, "sharedApplication" },
-        { &sel_sound_1didFinishPlaying_1, "sound:didFinishPlaying:" },
-        { &sel_defaultBehavior, "defaultBehavior" },
-        { &sel_beginSheetForDirectory_1file_1types_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, "beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:" },
-        { &sel_orderFrontFontPanel_1, "orderFrontFontPanel:" },
-        { &sel_searchForBrowsableDomains, "searchForBrowsableDomains" },
-        { &sel_toggleAutomaticQuoteSubstitution_1, "toggleAutomaticQuoteSubstitution:" },
-        { &sel_textView_1willChangeSelectionFromCharacterRanges_1toCharacterRanges_1, "textView:willChangeSelectionFromCharacterRanges:toCharacterRanges:" },
-        { &sel_alignRight_1, "alignRight:" },
-        { &sel_getBytes_1maxLength_1usedLength_1encoding_1options_1range_1remainingRange_1, "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:" },
-        { &sel_keyPointerFunctions, "keyPointerFunctions" },
-        { &sel_mouseDownFlags, "mouseDownFlags" },
-        { &sel_expandItem_1, "expandItem:" },
-        { &sel_bezierPathWithRect_1, "bezierPathWithRect:" },
-        { &sel_setGradientType_1, "setGradientType:" },
-        { &sel_alphanumericCharacterSet, "alphanumericCharacterSet" },
-        { &sel_deleteWordForward_1, "deleteWordForward:" },
-        { &sel_cStringUsingEncoding_1, "cStringUsingEncoding:" },
-        { &sel_storedValueForKey_1, "storedValueForKey:" },
-        { &sel_fileSize, "fileSize" },
-        { &sel_elementWithName_1URI_1, "elementWithName:URI:" },
-        { &sel_pointSize, "pointSize" },
-        { &sel_veryShortMonthSymbols, "veryShortMonthSymbols" },
-        { &sel_transformSize_1, "transformSize:" },
-        { &sel_titleWidth, "titleWidth" },
-        { &sel_setTextContainerInset_1, "setTextContainerInset:" },
-        { &sel_supportedWindowDepths, "supportedWindowDepths" },
-        { &sel_appleEvent, "appleEvent" },
-        { &sel_valueClassForBinding_1, "valueClassForBinding:" },
-        { &sel_setFullScreen, "setFullScreen" },
-        { &sel_encodeObject_1forKey_1, "encodeObject:forKey:" },
-        { &sel_setSpellingState_1range_1, "setSpellingState:range:" },
-        { &sel_greenComponent, "greenComponent" },
-        { &sel_textBackgroundColor, "textBackgroundColor" },
-        { &sel_currentEditor, "currentEditor" },
-        { &sel_attachedSheet, "attachedSheet" },
-        { &sel_new, "new" },
-        { &sel_setChildren_1, "setChildren:" },
-        { &sel_options, "options" },
-        { &sel_setObjectClass_1, "setObjectClass:" },
-        { &sel_borderWidth, "borderWidth" },
-        { &sel_secondarySelectedControlColor, "secondarySelectedControlColor" },
-        { &sel_scrollItemAtIndexToVisible_1, "scrollItemAtIndexToVisible:" },
-        { &sel_wantsLayer, "wantsLayer" },
-        { &sel_setPath_1, "setPath:" },
-        { &sel_setKeys_1triggerChangeNotificationsForDependentKey_1, "setKeys:triggerChangeNotificationsForDependentKey:" },
-        { &sel_verticalAlignment, "verticalAlignment" },
-        { &sel_selectionGranularity, "selectionGranularity" },
-        { &sel_minimumIntegerDigits, "minimumIntegerDigits" },
-        { &sel_canCreateDirectories, "canCreateDirectories" },
-        { &sel_fixAttributesInRange_1, "fixAttributesInRange:" },
-        { &sel_URLWithString_1, "URLWithString:" },
-        { &sel_setFrameFromContentFrame_1, "setFrameFromContentFrame:" },
-        { &sel_setFillColor_1, "setFillColor:" },
-        { &sel_dictionaryWithCapacity_1, "dictionaryWithCapacity:" },
-        { &sel_updateFromPath_1, "updateFromPath:" },
-        { &sel_netServiceDidResolveAddress_1, "netServiceDidResolveAddress:" },
-        { &sel_usesLazyFetching, "usesLazyFetching" },
-        { &sel_setMenuBarVisible_1, "setMenuBarVisible:" },
-        { &sel_windowDidBecomeKey_1, "windowDidBecomeKey:" },
-        { &sel_menuChanged_1, "menuChanged:" },
-        { &sel_itemObjectValueAtIndex_1, "itemObjectValueAtIndex:" },
-        { &sel_setClassName_1forClass_1, "setClassName:forClass:" },
-        { &sel_setShowsToolbarButton_1, "setShowsToolbarButton:" },
-        { &sel_plusSign, "plusSign" },
-        { &sel_sharedSpellChecker, "sharedSpellChecker" },
-        { &sel_getNumberOfRows_1columns_1, "getNumberOfRows:columns:" },
-        { &sel_valueTransformerNames, "valueTransformerNames" },
-        { &sel_interpolatedColorAtLocation_1, "interpolatedColorAtLocation:" },
-        { &sel_updateSpellingPanelWithMisspelledWord_1, "updateSpellingPanelWithMisspelledWord:" },
-        { &sel_yellowComponent, "yellowComponent" },
-        { &sel_acceptsFirstResponder, "acceptsFirstResponder" },
-        { &sel_valueWithRect_1, "valueWithRect:" },
-        { &sel_frameOfCellAtColumn_1row_1, "frameOfCellAtColumn:row:" },
-        { &sel_makeWindowsPerform_1inOrder_1, "makeWindowsPerform:inOrder:" },
-        { &sel_lastIndex, "lastIndex" },
-        { &sel_initWithCharacters_1length_1, "initWithCharacters:length:" },
-        { &sel_initWithIdentifier_1, "initWithIdentifier:" },
-        { &sel_proxyWithLocal_1connection_1, "proxyWithLocal:connection:" },
-        { &sel_scrollColumnToVisible_1, "scrollColumnToVisible:" },
-        { &sel_descriptor, "descriptor" },
-        { &sel_ISOCountryCodes, "ISOCountryCodes" },
-        { &sel_setStandardInput_1, "setStandardInput:" },
-        { &sel_getAdvancements_1forGlyphs_1count_1, "getAdvancements:forGlyphs:count:" },
-        { &sel_displayColumn_1, "displayColumn:" },
-        { &sel_setAltersStateOfSelectedItem_1, "setAltersStateOfSelectedItem:" },
-        { &sel_setFrameRotation_1, "setFrameRotation:" },
-        { &sel_clickedOnLink_1atIndex_1, "clickedOnLink:atIndex:" },
-        { &sel_addAttribute_1, "addAttribute:" },
-        { &sel_readPrintInfo, "readPrintInfo" },
-        { &sel_setCurrentContext_1, "setCurrentContext:" },
-        { &sel_setVerticalLineScroll_1, "setVerticalLineScroll:" },
-        { &sel_commands, "commands" },
-        { &sel_setNamespaces_1, "setNamespaces:" },
-        { &sel_removeEntryAtIndex_1, "removeEntryAtIndex:" },
-        { &sel_setAllowsColumnResizing_1, "setAllowsColumnResizing:" },
-        { &sel_colorWithDeviceCyan_1magenta_1yellow_1black_1alpha_1, "colorWithDeviceCyan:magenta:yellow:black:alpha:" },
-        { &sel_textView_1shouldChangeTypingAttributes_1toAttributes_1, "textView:shouldChangeTypingAttributes:toAttributes:" },
-        { &sel_usesFeedbackWindow, "usesFeedbackWindow" },
-        { &sel_setCookie_1, "setCookie:" },
-        { &sel_keyWindow, "keyWindow" },
-        { &sel_headIndent, "headIndent" },
-        { &sel_removeObjectIdenticalTo_1inRange_1, "removeObjectIdenticalTo:inRange:" },
-        { &sel_applicationWillUnhide_1, "applicationWillUnhide:" },
-        { &sel_currentPage, "currentPage" },
-        { &sel_setOffStateImage_1, "setOffStateImage:" },
-        { &sel_addRowWithCells_1, "addRowWithCells:" },
-        { &sel_setInterlineSpacing_1, "setInterlineSpacing:" },
-        { &sel_imageFileTypes, "imageFileTypes" },
-        { &sel_setArray_1, "setArray:" },
-        { &sel_addLayoutManager_1, "addLayoutManager:" },
-        { &sel_outputStreamToFileAtPath_1append_1, "outputStreamToFileAtPath:append:" },
-        { &sel_registeredDraggedTypes, "registeredDraggedTypes" },
-        { &sel_colorWithCalibratedRed_1green_1blue_1alpha_1, "colorWithCalibratedRed:green:blue:alpha:" },
-        { &sel_invalidateClassDescriptionCache, "invalidateClassDescriptionCache" },
-        { &sel_URLProtocolDidFinishLoading_1, "URLProtocolDidFinishLoading:" },
-        { &sel_didChangeArrangementCriteria, "didChangeArrangementCriteria" },
-        { &sel_ICCProfileData, "ICCProfileData" },
-        { &sel_availableResourceData, "availableResourceData" },
-        { &sel_glyphIndexForPoint_1inTextContainer_1fractionOfDistanceThroughGlyph_1, "glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:" },
-        { &sel_moveToEndOfParagraph_1, "moveToEndOfParagraph:" },
-        { &sel_enterFullScreenMode_1withOptions_1, "enterFullScreenMode:withOptions:" },
-        { &sel_fieldEditor_1forObject_1, "fieldEditor:forObject:" },
-        { &sel_setTreatsFilePackagesAsDirectories_1, "setTreatsFilePackagesAsDirectories:" },
-        { &sel_setLevelIndicatorStyle_1, "setLevelIndicatorStyle:" },
-        { &sel_minimumDecimalNumber, "minimumDecimalNumber" },
-        { &sel_hasSpaceAvailable, "hasSpaceAvailable" },
-        { &sel_widthOfString_1, "widthOfString:" },
-        { &sel_setLocale_1, "setLocale:" },
-        { &sel_setPreferredEdge_1, "setPreferredEdge:" },
-        { &sel_setRichText_1, "setRichText:" },
-        { &sel_rangesForUserCharacterAttributeChange, "rangesForUserCharacterAttributeChange" },
-        { &sel_rectForPage_1, "rectForPage:" },
-        { &sel_rowHeight, "rowHeight" },
-        { &sel_windowDidChangeScreenProfile_1, "windowDidChangeScreenProfile:" },
-        { &sel_setCachePolicy_1, "setCachePolicy:" },
-        { &sel_parser_1didEndMappingPrefix_1, "parser:didEndMappingPrefix:" },
-        { &sel_cleanUpAfterDragOperation, "cleanUpAfterDragOperation" },
-        { &sel_browser_1typeSelectStringForRow_1inColumn_1, "browser:typeSelectStringForRow:inColumn:" },
-        { &sel_canInitWithPasteboard_1, "canInitWithPasteboard:" },
-        { &sel_startListening, "startListening" },
-        { &sel_setExcludedKeys_1, "setExcludedKeys:" },
-        { &sel_readFromFile_1ofType_1, "readFromFile:ofType:" },
-        { &sel_setReservedThicknessForMarkers_1, "setReservedThicknessForMarkers:" },
-        { &sel_windowRef, "windowRef" },
-        { &sel_browser_1selectRow_1inColumn_1, "browser:selectRow:inColumn:" },
-        { &sel_isOpaque, "isOpaque" },
-        { &sel_fontDescriptorWithFamily_1, "fontDescriptorWithFamily:" },
-        { &sel_itemTitleAtIndex_1, "itemTitleAtIndex:" },
-        { &sel_boundingBox, "boundingBox" },
-        { &sel_moveColumn_1toColumn_1, "moveColumn:toColumn:" },
-        { &sel_badgeLabel, "badgeLabel" },
-        { &sel_outline_1, "outline:" },
-        { &sel_characterIndexForInsertionAtPoint_1, "characterIndexForInsertionAtPoint:" },
-        { &sel_URLHandleClassForURL_1, "URLHandleClassForURL:" },
-        { &sel_selectKeyViewFollowingView_1, "selectKeyViewFollowingView:" },
-        { &sel_fullPathForApplication_1, "fullPathForApplication:" },
-        { &sel_outlineView_1willDisplayOutlineCell_1forTableColumn_1item_1, "outlineView:willDisplayOutlineCell:forTableColumn:item:" },
-        { &sel_encodePropertyList_1, "encodePropertyList:" },
-        { &sel_generatesDecimalNumbers, "generatesDecimalNumbers" },
-        { &sel_appendAttributedString_1, "appendAttributedString:" },
-        { &sel_persistentDomainNames, "persistentDomainNames" },
-        { &sel_setUserFont_1, "setUserFont:" },
-        { &sel_initWithProperties_1, "initWithProperties:" },
-        { &sel_loadResourceDataNotifyingClient_1usingCache_1, "loadResourceDataNotifyingClient:usingCache:" },
-        { &sel_closeFile, "closeFile" },
-        { &sel_allHeaderFields, "allHeaderFields" },
-        { &sel_unlearnWord_1, "unlearnWord:" },
-        { &sel_drawsCellBackground, "drawsCellBackground" },
-        { &sel_PICTRepresentation, "PICTRepresentation" },
-        { &sel_imageScaling, "imageScaling" },
-        { &sel_scanUpToString_1intoString_1, "scanUpToString:intoString:" },
-        { &sel_scrollBarColor, "scrollBarColor" },
-        { &sel_initWithDelegate_1name_1, "initWithDelegate:name:" },
-        { &sel_setDateValue_1, "setDateValue:" },
-        { &sel_dividerStyle, "dividerStyle" },
-        { &sel_scrollPageDown_1, "scrollPageDown:" },
-        { &sel_removeLayoutManager_1, "removeLayoutManager:" },
-        { &sel_textAttributesForNegativeValues, "textAttributesForNegativeValues" },
-        { &sel_attachment, "attachment" },
-        { &sel_reset, "reset" },
-        { &sel_initWithAttributes_1, "initWithAttributes:" },
-        { &sel_allowsMixedState, "allowsMixedState" },
-        { &sel_addPort_1forMode_1, "addPort:forMode:" },
-        { &sel_windowDidDeminiaturize_1, "windowDidDeminiaturize:" },
-        { &sel_setRowHeight_1, "setRowHeight:" },
-        { &sel_setGraphicsState_1, "setGraphicsState:" },
-        { &sel_replaceCharactersInRange_1withAttributedString_1, "replaceCharactersInRange:withAttributedString:" },
-        { &sel_setAttributedStringValue_1, "setAttributedStringValue:" },
-        { &sel_criteriaKeyPath, "criteriaKeyPath" },
-        { &sel_standardInput, "standardInput" },
-        { &sel_isFontAvailable_1, "isFontAvailable:" },
-        { &sel_setAllowsTypeSelect_1, "setAllowsTypeSelect:" },
-        { &sel_portWithMachPort_1, "portWithMachPort:" },
-        { &sel_panel_1isValidFilename_1, "panel:isValidFilename:" },
-        { &sel_imageablePageBounds, "imageablePageBounds" },
-        { &sel_notificationWithName_1object_1, "notificationWithName:object:" },
-        { &sel_sharedFontPanelExists, "sharedFontPanelExists" },
-        { &sel_blackColor, "blackColor" },
-        { &sel_removeDescriptorAtIndex_1, "removeDescriptorAtIndex:" },
-        { &sel_dataUsingEncoding_1allowLossyConversion_1, "dataUsingEncoding:allowLossyConversion:" },
-        { &sel_propertyForKey_1inRequest_1, "propertyForKey:inRequest:" },
-        { &sel_setHeaderLevel_1, "setHeaderLevel:" },
-        { &sel_jobTitle, "jobTitle" },
-        { &sel_removePersistentDomainForName_1, "removePersistentDomainForName:" },
-        { &sel_contentResizeIncrements, "contentResizeIncrements" },
-        { &sel_textFileTypes, "textFileTypes" },
-        { &sel_setAction_1, "setAction:" },
-        { &sel_knobProportion, "knobProportion" },
-        { &sel_numberOfArguments, "numberOfArguments" },
-        { &sel_setScrollsDynamically_1, "setScrollsDynamically:" },
-        { &sel_setTextColor_1range_1, "setTextColor:range:" },
-        { &sel_setBoundsSize_1, "setBoundsSize:" },
-        { &sel_setVolume_1, "setVolume:" },
-        { &sel_windowControllers, "windowControllers" },
-        { &sel_insertAttributedString_1atIndex_1, "insertAttributedString:atIndex:" },
-        { &sel_eventWithEventRef_1, "eventWithEventRef:" },
-        { &sel_initByReferencingFile_1, "initByReferencingFile:" },
-        { &sel_fire, "fire" },
-        { &sel_writeToPasteboard_1, "writeToPasteboard:" },
-        { &sel_connectionForProxy, "connectionForProxy" },
-        { &sel_outlineView_1mouseDownInHeaderOfTableColumn_1, "outlineView:mouseDownInHeaderOfTableColumn:" },
-        { &sel_mutableArrayValueForKeyPath_1, "mutableArrayValueForKeyPath:" },
-        { &sel_validRequestorForSendType_1returnType_1, "validRequestorForSendType:returnType:" },
-        { &sel_isRichText, "isRichText" },
-        { &sel_moveWordLeft_1, "moveWordLeft:" },
-        { &sel_indexSetWithIndex_1, "indexSetWithIndex:" },
-        { &sel_setContextMenuRepresentation_1, "setContextMenuRepresentation:" },
-        { &sel_updateTrackingAreas, "updateTrackingAreas" },
-        { &sel_defaultCollector, "defaultCollector" },
-        { &sel_orderedIndex, "orderedIndex" },
-        { &sel_relativeCurveToPoint_1controlPoint1_1controlPoint2_1, "relativeCurveToPoint:controlPoint1:controlPoint2:" },
-        { &sel_setShowsApplicationBadge_1, "setShowsApplicationBadge:" },
-        { &sel_setValue_1, "setValue:" },
-        { &sel_attributeDeclarationForName_1elementName_1, "attributeDeclarationForName:elementName:" },
-        { &sel_setWidth_1type_1forLayer_1, "setWidth:type:forLayer:" },
-        { &sel_decodePoint, "decodePoint" },
-        { &sel_makeWindowControllers, "makeWindowControllers" },
-        { &sel_userFontOfSize_1, "userFontOfSize:" },
-        { &sel_dependencies, "dependencies" },
-        { &sel_setAttributes_1, "setAttributes:" },
-        { &sel_setFrameCenterRotation_1, "setFrameCenterRotation:" },
-        { &sel_nilSymbol, "nilSymbol" },
-        { &sel_scalesWhenResized, "scalesWhenResized" },
-        { &sel_setMinusSign_1, "setMinusSign:" },
-        { &sel_predicateOperatorType, "predicateOperatorType" },
-        { &sel_replyWithException_1, "replyWithException:" },
-        { &sel_fileName, "fileName" },
-        { &sel_indexPathByRemovingLastIndex, "indexPathByRemovingLastIndex" },
-        { &sel_openHelpAnchor_1inBook_1, "openHelpAnchor:inBook:" },
-        { &sel_initWithBytes_1objCType_1, "initWithBytes:objCType:" },
-        { &sel_removeObject_1, "removeObject:" },
-        { &sel_colorNameComponent, "colorNameComponent" },
-        { &sel_setCellBackgroundColor_1, "setCellBackgroundColor:" },
-        { &sel_getLineDash_1count_1phase_1, "getLineDash:count:phase:" },
-        { &sel_scriptingContains_1, "scriptingContains:" },
-        { &sel_setDefaultWindingRule_1, "setDefaultWindingRule:" },
-        { &sel_outputStreamToBuffer_1capacity_1, "outputStreamToBuffer:capacity:" },
-        { &sel_defaultButtonTitle, "defaultButtonTitle" },
-        { &sel_draggingSourceOperationMask, "draggingSourceOperationMask" },
-        { &sel_textDidChange_1, "textDidChange:" },
-        { &sel_drawSheetBorderWithSize_1, "drawSheetBorderWithSize:" },
-        { &sel_integerForKey_1, "integerForKey:" },
-        { &sel_setDefaultNameServerPortNumber_1, "setDefaultNameServerPortNumber:" },
-        { &sel_previousNode, "previousNode" },
-        { &sel_trackingArea, "trackingArea" },
-        { &sel_highlightWithLevel_1, "highlightWithLevel:" },
-        { &sel_trackMouse_1inRect_1ofView_1atCharacterIndex_1untilMouseUp_1, "trackMouse:inRect:ofView:atCharacterIndex:untilMouseUp:" },
-        { &sel_signatureWithObjCTypes_1, "signatureWithObjCTypes:" },
-        { &sel_saveToURL_1ofType_1forSaveOperation_1error_1, "saveToURL:ofType:forSaveOperation:error:" },
-        { &sel_dataWithBytesNoCopy_1length_1freeWhenDone_1, "dataWithBytesNoCopy:length:freeWhenDone:" },
-        { &sel_encodeInteger_1forKey_1, "encodeInteger:forKey:" },
-        { &sel_removeFromSuperview, "removeFromSuperview" },
-        { &sel_dataWithBytesNoCopy_1length_1, "dataWithBytesNoCopy:length:" },
-        { &sel_initWithIndexesInRange_1, "initWithIndexesInRange:" },
-        { &sel_initWithKeyPointerFunctions_1valuePointerFunctions_1capacity_1, "initWithKeyPointerFunctions:valuePointerFunctions:capacity:" },
-        { &sel_tilt, "tilt" },
-        { &sel_setHidden_1, "setHidden:" },
-        { &sel_setMenuFormRepresentation_1, "setMenuFormRepresentation:" },
-        { &sel_setCanChooseDirectories_1, "setCanChooseDirectories:" },
-        { &sel_usedRectForTextContainer_1, "usedRectForTextContainer:" },
-        { &sel_allowsColumnSelection, "allowsColumnSelection" },
-        { &sel_orderOut_1, "orderOut:" },
-        { &sel_filterUsingPredicate_1, "filterUsingPredicate:" },
-        { &sel_setTest_1, "setTest:" },
-        { &sel_setAllowedTypes_1, "setAllowedTypes:" },
-        { &sel_registerForDraggedTypes_1, "registerForDraggedTypes:" },
-        { &sel_objectEnumerator, "objectEnumerator" },
-        { &sel_setWindowController_1, "setWindowController:" },
-        { &sel_setDestination_1, "setDestination:" },
-        { &sel_addRepresentation_1, "addRepresentation:" },
-        { &sel_isEqual_1, "isEqual:" },
-        { &sel_glyphRangeForTextContainer_1, "glyphRangeForTextContainer:" },
-        { &sel_setStandaloneWeekdaySymbols_1, "setStandaloneWeekdaySymbols:" },
-        { &sel_setIgnoresAlpha_1, "setIgnoresAlpha:" },
-        { &sel_drawBarInside_1flipped_1, "drawBarInside:flipped:" },
-        { &sel_doesNotRecognizeSelector_1, "doesNotRecognizeSelector:" },
-        { &sel_windowDidResignMain_1, "windowDidResignMain:" },
-        { &sel_scrollItemAtIndexToTop_1, "scrollItemAtIndexToTop:" },
-        { &sel_makePreviousSegmentKey, "makePreviousSegmentKey" },
-        { &sel_download_1shouldDecodeSourceDataOfMIMEType_1, "download:shouldDecodeSourceDataOfMIMEType:" },
-        { &sel_compareObject_1toObject_1, "compareObject:toObject:" },
-        { &sel_widthTracksTextView, "widthTracksTextView" },
-        { &sel_subpredicates, "subpredicates" },
-        { &sel_relativeLineToPoint_1, "relativeLineToPoint:" },
-        { &sel_gridStyleMask, "gridStyleMask" },
-        { &sel_initWithCString_1, "initWithCString:" },
-        { &sel_imageScalingForSegment_1, "imageScalingForSegment:" },
-        { &sel_editWithFrame_1inView_1editor_1delegate_1event_1, "editWithFrame:inView:editor:delegate:event:" },
-        { &sel_glyphPacking, "glyphPacking" },
-        { &sel_resolveWithTimeout_1, "resolveWithTimeout:" },
-        { &sel_hasEditedDocuments, "hasEditedDocuments" },
-        { &sel_getLineFragmentRect_1usedRect_1forParagraphSeparatorGlyphRange_1atProposedOrigin_1, "getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:" },
-        { &sel_autosaveDocumentWithDelegate_1didAutosaveSelector_1contextInfo_1, "autosaveDocumentWithDelegate:didAutosaveSelector:contextInfo:" },
-        { &sel_readSelectionFromPasteboard_1type_1, "readSelectionFromPasteboard:type:" },
-        { &sel_spellServer_1suggestGuessesForWord_1inLanguage_1, "spellServer:suggestGuessesForWord:inLanguage:" },
-        { &sel_initWithTimeIntervalSinceNow_1, "initWithTimeIntervalSinceNow:" },
-        { &sel_setMaxWidth_1, "setMaxWidth:" },
-        { &sel_userDefaultsChanged, "userDefaultsChanged" },
-        { &sel_setWidth_1, "setWidth:" },
-        { &sel_setPrintPanel_1, "setPrintPanel:" },
-        { &sel_setCurrentPage_1, "setCurrentPage:" },
-        { &sel_resizeIncrements, "resizeIncrements" },
-        { &sel_selectWithFrame_1inView_1editor_1delegate_1start_1length_1, "selectWithFrame:inView:editor:delegate:start:length:" },
-        { &sel_sRGBColorSpace, "sRGBColorSpace" },
-        { &sel_scriptErrorExpectedTypeDescriptor, "scriptErrorExpectedTypeDescriptor" },
-        { &sel_setHasHorizontalRuler_1, "setHasHorizontalRuler:" },
-        { &sel_initialFirstResponder, "initialFirstResponder" },
-        { &sel_stringForObjectValue_1, "stringForObjectValue:" },
-        { &sel_pageRange, "pageRange" },
-        { &sel_printOperationWithView_1, "printOperationWithView:" },
-        { &sel_initWithFrame_1pixelFormat_1, "initWithFrame:pixelFormat:" },
-        { &sel_fileWrapperOfType_1error_1, "fileWrapperOfType:error:" },
-        { &sel_doesContain_1, "doesContain:" },
-        { &sel_mutableSetValueForKeyPath_1, "mutableSetValueForKeyPath:" },
-        { &sel_initWithURL_1cached_1, "initWithURL:cached:" },
-        { &sel_controlAlternatingRowBackgroundColors, "controlAlternatingRowBackgroundColors" },
-        { &sel_pathComponentCellClass, "pathComponentCellClass" },
-        { &sel_arrayWithCapacity_1, "arrayWithCapacity:" },
-        { &sel_types, "types" },
-        { &sel_setPrintInfo_1, "setPrintInfo:" },
-        { &sel_indexOfTabViewItemWithIdentifier_1, "indexOfTabViewItemWithIdentifier:" },
-        { &sel_isEnabled, "isEnabled" },
-        { &sel_setHeaderView_1, "setHeaderView:" },
-        { &sel_accessibilityHitTest_1, "accessibilityHitTest:" },
-        { &sel_removeMarker_1, "removeMarker:" },
-        { &sel_showContextHelp_1, "showContextHelp:" },
-        { &sel_selectsInsertedObjects, "selectsInsertedObjects" },
-        { &sel_selectedRowInColumn_1, "selectedRowInColumn:" },
-        { &sel_noteNewRecentDocument_1, "noteNewRecentDocument:" },
-        { &sel_setAttachment_1, "setAttachment:" },
-        { &sel_localeIdentifier, "localeIdentifier" },
-        { &sel_scrollLineUp_1, "scrollLineUp:" },
-        { &sel_setCalendarFormat_1, "setCalendarFormat:" },
-        { &sel_setAssociatedPoints_1atIndex_1, "setAssociatedPoints:atIndex:" },
-        { &sel_resourceData, "resourceData" },
-        { &sel_setVeryShortStandaloneMonthSymbols_1, "setVeryShortStandaloneMonthSymbols:" },
-        { &sel_windowDidUpdate_1, "windowDidUpdate:" },
-        { &sel_moveLeft_1, "moveLeft:" },
-        { &sel_showsBorderOnlyWhileMouseInside, "showsBorderOnlyWhileMouseInside" },
-        { &sel_valueForKey_1, "valueForKey:" },
-        { &sel_setContentResizeIncrements_1, "setContentResizeIncrements:" },
-        { &sel_drain, "drain" },
-        { &sel_concat, "concat" },
-        { &sel_scrollerWidthForControlSize_1, "scrollerWidthForControlSize:" },
-        { &sel_insertItemWithTitle_1action_1keyEquivalent_1atIndex_1, "insertItemWithTitle:action:keyEquivalent:atIndex:" },
-        { &sel_doubleValue, "doubleValue" },
-        { &sel_dividerThickness, "dividerThickness" },
-        { &sel_rowAtPoint_1, "rowAtPoint:" },
-        { &sel_updateWindowsItem_1, "updateWindowsItem:" },
-        { &sel_calendarDate, "calendarDate" },
-        { &sel_fixAttachmentAttributeInRange_1, "fixAttachmentAttributeInRange:" },
-        { &sel_mapTableWithWeakToWeakObjects, "mapTableWithWeakToWeakObjects" },
-        { &sel_setClip, "setClip" },
-        { &sel_evaluationErrorNumber, "evaluationErrorNumber" },
-        { &sel_revertToSavedFromURL_1ofType_1, "revertToSavedFromURL:ofType:" },
-        { &sel_autorecalculatesContentBorderThicknessForEdge_1, "autorecalculatesContentBorderThicknessForEdge:" },
-        { &sel_lineToPoint_1, "lineToPoint:" },
-        { &sel_insertionReplaces, "insertionReplaces" },
-        { &sel_smallestEncoding, "smallestEncoding" },
-        { &sel_elementAtIndex_1, "elementAtIndex:" },
-        { &sel_getReturnValue_1, "getReturnValue:" },
-        { &sel_regularFileContents, "regularFileContents" },
-        { &sel_recache, "recache" },
-        { &sel_setTextAttributesForNegativeInfinity_1, "setTextAttributesForNegativeInfinity:" },
-        { &sel_horizontalRulerView, "horizontalRulerView" },
-        { &sel_initToMemory, "initToMemory" },
-        { &sel_shouldCreateUI, "shouldCreateUI" },
-        { &sel_scheme, "scheme" },
-        { &sel_raiseBaseline_1, "raiseBaseline:" },
-        { &sel_initWithArray_1, "initWithArray:" },
-        { &sel_displayNameForKey_1value_1, "displayNameForKey:value:" },
-        { &sel_centerScanRect_1, "centerScanRect:" },
-        { &sel_memoryCapacity, "memoryCapacity" },
-        { &sel_setBackgroundLayoutEnabled_1, "setBackgroundLayoutEnabled:" },
-        { &sel_machPort, "machPort" },
-        { &sel_selectedFont, "selectedFont" },
-        { &sel_tableColumns, "tableColumns" },
-        { &sel_removeObjectAtIndex_1, "removeObjectAtIndex:" },
-        { &sel_insertNewButtonImage_1in_1, "insertNewButtonImage:in:" },
-        { &sel_stringWithContentsOfURL_1encoding_1error_1, "stringWithContentsOfURL:encoding:error:" },
-        { &sel_menuChangedMessagesEnabled, "menuChangedMessagesEnabled" },
-        { &sel_initWithShort_1, "initWithShort:" },
-        { &sel_setColorRenderingIntent_1, "setColorRenderingIntent:" },
-        { &sel_descriptionWithCalendarFormat_1locale_1, "descriptionWithCalendarFormat:locale:" },
-        { &sel_resourceSpecifier, "resourceSpecifier" },
-        { &sel_pasteboardByFilteringFile_1, "pasteboardByFilteringFile:" },
-        { &sel_dragColor_1withEvent_1fromView_1, "dragColor:withEvent:fromView:" },
-        { &sel_setStroke, "setStroke" },
-        { &sel_isControllerVisible, "isControllerVisible" },
-        { &sel_putCell_1atRow_1column_1, "putCell:atRow:column:" },
-        { &sel_firstIndex, "firstIndex" },
-        { &sel_setFontManagerFactory_1, "setFontManagerFactory:" },
-        { &sel_exponentSymbol, "exponentSymbol" },
-        { &sel_stringValue, "stringValue" },
-        { &sel_getObjects_1range_1, "getObjects:range:" },
-        { &sel_scriptingProperties, "scriptingProperties" },
-        { &sel_query, "query" },
-        { &sel_eventClass, "eventClass" },
-        { &sel_dateWithNaturalLanguageString_1, "dateWithNaturalLanguageString:" },
-        { &sel_datePickerMode, "datePickerMode" },
-        { &sel_setAlternateMnemonicLocation_1, "setAlternateMnemonicLocation:" },
-        { &sel_stringByDeletingLastPathComponent, "stringByDeletingLastPathComponent" },
-        { &sel_encodeObject_1, "encodeObject:" },
-        { &sel_unarchiveObjectWithData_1, "unarchiveObjectWithData:" },
-        { &sel_destination, "destination" },
-        { &sel_ensureLayoutForCharacterRange_1, "ensureLayoutForCharacterRange:" },
-        { &sel_tabView_1didSelectTabViewItem_1, "tabView:didSelectTabViewItem:" },
-        { &sel_removeContextHelpForObject_1, "removeContextHelpForObject:" },
-        { &sel_ensureGlyphsForCharacterRange_1, "ensureGlyphsForCharacterRange:" },
-        { &sel_setMinimumFractionDigits_1, "setMinimumFractionDigits:" },
-        { &sel_boundsRotation, "boundsRotation" },
-        { &sel_invalidateDisplayForGlyphRange_1, "invalidateDisplayForGlyphRange:" },
-        { &sel_rectForBlock_1layoutAtPoint_1inRect_1textContainer_1characterRange_1, "rectForBlock:layoutAtPoint:inRect:textContainer:characterRange:" },
-        { &sel_pasteFont_1, "pasteFont:" },
-        { &sel_backgroundColor, "backgroundColor" },
-        { &sel_stringFromNumber_1, "stringFromNumber:" },
-        { &sel_expiresDate, "expiresDate" },
-        { &sel_initWithWindowRef_1, "initWithWindowRef:" },
-        { &sel_toggleToolbarShown_1, "toggleToolbarShown:" },
-        { &sel_outlineViewItemDidExpand_1, "outlineViewItemDidExpand:" },
-        { &sel_TIFFRepresentationOfImageRepsInArray_1usingCompression_1factor_1, "TIFFRepresentationOfImageRepsInArray:usingCompression:factor:" },
-        { &sel_variable, "variable" },
-        { &sel_objectsForKeys_1notFoundMarker_1, "objectsForKeys:notFoundMarker:" },
-        { &sel_controlColor, "controlColor" },
-        { &sel_unarchiverWillFinish_1, "unarchiverWillFinish:" },
-        { &sel_proposedCredential, "proposedCredential" },
-        { &sel_isPaneSplitter, "isPaneSplitter" },
-        { &sel_endUndoGrouping, "endUndoGrouping" },
-        { &sel_setFrameRate_1, "setFrameRate:" },
-        { &sel_completionDelay, "completionDelay" },
-        { &sel_setUserFixedPitchFont_1, "setUserFixedPitchFont:" },
-        { &sel_isIndeterminate, "isIndeterminate" },
-        { &sel_menuItem, "menuItem" },
-        { &sel_setNumberStyle_1, "setNumberStyle:" },
-        { &sel_takeIntegerValueFrom_1, "takeIntegerValueFrom:" },
-        { &sel_setIndentationMarkerFollowsCell_1, "setIndentationMarkerFollowsCell:" },
-        { &sel_tile, "tile" },
-        { &sel_cancelButtonRectForBounds_1, "cancelButtonRectForBounds:" },
-        { &sel_deselectRow_1, "deselectRow:" },
-        { &sel_setMouseCoalescingEnabled_1, "setMouseCoalescingEnabled:" },
-        { &sel_removeWindowController_1, "removeWindowController:" },
-        { &sel_warningValue, "warningValue" },
-        { &sel_isVerticallyResizable, "isVerticallyResizable" },
-        { &sel_defaultFetchRequest, "defaultFetchRequest" },
-        { &sel_netServiceWillResolve_1, "netServiceWillResolve:" },
-        { &sel_addProgressMark_1, "addProgressMark:" },
-        { &sel_recentsAutosaveName, "recentsAutosaveName" },
-        { &sel_commitEditing, "commitEditing" },
-        { &sel_attributesOfItemAtPath_1error_1, "attributesOfItemAtPath:error:" },
-        { &sel_download_1willSendRequest_1redirectResponse_1, "download:willSendRequest:redirectResponse:" },
-        { &sel_canBeCompressedUsing_1, "canBeCompressedUsing:" },
-        { &sel_strokeRect_1, "strokeRect:" },
-        { &sel_descriptionWithLocale_1indent_1, "descriptionWithLocale:indent:" },
-        { &sel_applicationDockMenu_1, "applicationDockMenu:" },
-        { &sel_initWithCString_1length_1, "initWithCString:length:" },
-        { &sel_runPageLayout_1, "runPageLayout:" },
-        { &sel_toolbar_1itemForItemIdentifier_1willBeInsertedIntoToolbar_1, "toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:" },
-        { &sel_setSelectsInsertedObjects_1, "setSelectsInsertedObjects:" },
-        { &sel_alternateSelectedControlTextColor, "alternateSelectedControlTextColor" },
-        { &sel_isValidGlyphIndex_1, "isValidGlyphIndex:" },
-        { &sel_stringForKey_1inTable_1, "stringForKey:inTable:" },
-        { &sel_cellSizeForBounds_1, "cellSizeForBounds:" },
-        { &sel_beginSheetForDirectory_1file_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, "beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:" },
-        { &sel_invalidateLayoutForCharacterRange_1actualCharacterRange_1, "invalidateLayoutForCharacterRange:actualCharacterRange:" },
-        { &sel_initAsTearOff, "initAsTearOff" },
-        { &sel_allowsOtherFileTypes, "allowsOtherFileTypes" },
-        { &sel_mouseMoved_1, "mouseMoved:" },
-        { &sel_deleteCharactersInRange_1, "deleteCharactersInRange:" },
-        { &sel_setTitleFont_1, "setTitleFont:" },
-        { &sel_showsApplicationBadge, "showsApplicationBadge" },
-        { &sel_initWithLeftExpression_1rightExpression_1modifier_1type_1options_1, "initWithLeftExpression:rightExpression:modifier:type:options:" },
-        { &sel_distantPast, "distantPast" },
-        { &sel_isReady, "isReady" },
-        { &sel_draggedImage_1movedTo_1, "draggedImage:movedTo:" },
-        { &sel_resetTotalAutoreleasedObjects, "resetTotalAutoreleasedObjects" },
-        { &sel_setGlyphGenerator_1, "setGlyphGenerator:" },
-        { &sel_groupsByEvent, "groupsByEvent" },
-        { &sel_shortMonthSymbols, "shortMonthSymbols" },
-        { &sel_setDescriptor_1forKeyword_1, "setDescriptor:forKeyword:" },
-        { &sel_description, "description" },
-        { &sel_replaceOccurrencesOfString_1withString_1options_1range_1, "replaceOccurrencesOfString:withString:options:range:" },
-        { &sel_boundsRectForContentRect_1inRect_1textContainer_1characterRange_1, "boundsRectForContentRect:inRect:textContainer:characterRange:" },
-        { &sel_authenticationDataForComponents_1, "authenticationDataForComponents:" },
-        { &sel_isExecuting, "isExecuting" },
-        { &sel_branchImage, "branchImage" },
-        { &sel_decodeRectForKey_1, "decodeRectForKey:" },
-        { &sel_rectValue, "rectValue" },
-        { &sel_setFrameTopLeftPoint_1, "setFrameTopLeftPoint:" },
-        { &sel_initWithFileDescriptor_1, "initWithFileDescriptor:" },
-        { &sel_removePointerAtIndex_1, "removePointerAtIndex:" },
-        { &sel_executeAndReturnError_1, "executeAndReturnError:" },
-        { &sel_changeCaseOfLetter_1, "changeCaseOfLetter:" },
-        { &sel_appendBezierPathWithArcWithCenter_1radius_1startAngle_1endAngle_1clockwise_1, "appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:" },
-        { &sel_insertNewlineIgnoringFieldEditor_1, "insertNewlineIgnoringFieldEditor:" },
-        { &sel_attributeDescriptorForKeyword_1, "attributeDescriptorForKeyword:" },
-        { &sel_decimalNumberWithMantissa_1exponent_1isNegative_1, "decimalNumberWithMantissa:exponent:isNegative:" },
-        { &sel_activeConversationWillChange_1fromOldConversation_1, "activeConversationWillChange:fromOldConversation:" },
-        { &sel_layoutAlgorithm, "layoutAlgorithm" },
-        { &sel_itemNumberInTextList_1atIndex_1, "itemNumberInTextList:atIndex:" },
-        { &sel_initWithImage_1hotSpot_1, "initWithImage:hotSpot:" },
-        { &sel_setStackSize_1, "setStackSize:" },
-        { &sel_matrixInColumn_1, "matrixInColumn:" },
-        { &sel_performSelector_1withObject_1, "performSelector:withObject:" },
-        { &sel_setSound_1, "setSound:" },
-        { &sel_accessibilityPerformAction_1, "accessibilityPerformAction:" },
-        { &sel_comment, "comment" },
-        { &sel_rangeOfNominallySpacedGlyphsContainingIndex_1, "rangeOfNominallySpacedGlyphsContainingIndex:" },
-        { &sel_showAttachmentCell_1inRect_1characterIndex_1, "showAttachmentCell:inRect:characterIndex:" },
-        { &sel_isDisplayedWhenStopped, "isDisplayedWhenStopped" },
-        { &sel_addCollection_1options_1, "addCollection:options:" },
-        { &sel_drawInRect_1angle_1, "drawInRect:angle:" },
-        { &sel_initWithFrame_1mode_1prototype_1numberOfRows_1numberOfColumns_1, "initWithFrame:mode:prototype:numberOfRows:numberOfColumns:" },
-        { &sel_sharedCredentialStorage, "sharedCredentialStorage" },
-        { &sel_colorWithDeviceWhite_1alpha_1, "colorWithDeviceWhite:alpha:" },
-        { &sel_setMainDocumentURL_1, "setMainDocumentURL:" },
-        { &sel_interpretKeyEvents_1, "interpretKeyEvents:" },
-        { &sel_readFromData_1ofType_1error_1, "readFromData:ofType:error:" },
-        { &sel_tokenFieldCell_1menuForRepresentedObject_1, "tokenFieldCell:menuForRepresentedObject:" },
-        { &sel_setEventHandler_1andSelector_1forEventClass_1andEventID_1, "setEventHandler:andSelector:forEventClass:andEventID:" },
-        { &sel_addAttribute_1value_1range_1, "addAttribute:value:range:" },
-        { &sel_outlineView_1writeItems_1toPasteboard_1, "outlineView:writeItems:toPasteboard:" },
-        { &sel_initWithCString_1encoding_1, "initWithCString:encoding:" },
-        { &sel_setTypesetterBehavior_1, "setTypesetterBehavior:" },
-        { &sel_removeObjectAtArrangedObjectIndex_1, "removeObjectAtArrangedObjectIndex:" },
-        { &sel_redo, "redo" },
-        { &sel_addMarker_1, "addMarker:" },
-        { &sel_backgroundColors, "backgroundColors" },
-        { &sel_leafKeyPath, "leafKeyPath" },
-        { &sel_setMinimumIntegerDigits_1, "setMinimumIntegerDigits:" },
-        { &sel_waitForDataInBackgroundAndNotify, "waitForDataInBackgroundAndNotify" },
-        { &sel_setPreservesContentDuringLiveResize_1, "setPreservesContentDuringLiveResize:" },
-        { &sel_setRootElement_1, "setRootElement:" },
-        { &sel_dataWithEPSInsideRect_1, "dataWithEPSInsideRect:" },
-        { &sel_valuesForKeys_1, "valuesForKeys:" },
-        { &sel_imageOrigin, "imageOrigin" },
-        { &sel_writePDFInsideRect_1toPasteboard_1, "writePDFInsideRect:toPasteboard:" },
-        { &sel_sortIndicatorRectForBounds_1, "sortIndicatorRectForBounds:" },
-        { &sel_predefinedNamespaceForPrefix_1, "predefinedNamespaceForPrefix:" },
-        { &sel_viewWillStartLiveResize, "viewWillStartLiveResize" },
-        { &sel_becomeKeyWindow, "becomeKeyWindow" },
-        { &sel_isHighlighted, "isHighlighted" },
-        { &sel_initWithPickerMask_1colorPanel_1, "initWithPickerMask:colorPanel:" },
-        { &sel_systemFontOfSize_1, "systemFontOfSize:" },
-        { &sel_decimalNumberBySubtracting_1withBehavior_1, "decimalNumberBySubtracting:withBehavior:" },
-        { &sel_hide_1, "hide:" },
-        { &sel_resetSearchButtonCell, "resetSearchButtonCell" },
-        { &sel_runModalForDirectory_1file_1types_1, "runModalForDirectory:file:types:" },
-        { &sel_pathForImageResource_1, "pathForImageResource:" },
-        { &sel_setFilterPredicate_1, "setFilterPredicate:" },
-        { &sel_validateEditing, "validateEditing" },
-        { &sel_makeDocumentForURL_1withContentsOfURL_1ofType_1error_1, "makeDocumentForURL:withContentsOfURL:ofType:error:" },
-        { &sel_localizedCompare_1, "localizedCompare:" },
-        { &sel_sharedWorkspace, "sharedWorkspace" },
-        { &sel_deliverResult, "deliverResult" },
-        { &sel_aspectRatio, "aspectRatio" },
-        { &sel_keyEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1characters_1charactersIgnoringModifiers_1isARepeat_1keyCode_1, "keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:" },
-        { &sel_soundUnfilteredPasteboardTypes, "soundUnfilteredPasteboardTypes" },
-        { &sel_dateByAddingComponents_1toDate_1options_1, "dateByAddingComponents:toDate:options:" },
-        { &sel_indentationMarkerFollowsCell, "indentationMarkerFollowsCell" },
-        { &sel_typesetter, "typesetter" },
-        { &sel_childCount, "childCount" },
-        { &sel_borderRect, "borderRect" },
-        { &sel_setPageOrder_1, "setPageOrder:" },
-        { &sel_currentThread, "currentThread" },
-        { &sel_textViewDidChangeSelection_1, "textViewDidChangeSelection:" },
-        { &sel_setBaseWritingDirection_1, "setBaseWritingDirection:" },
-        { &sel_attributedSubStringForProposedRange_1actualRange_1, "attributedSubStringForProposedRange:actualRange:" },
-        { &sel_pop, "pop" },
-        { &sel_animator, "animator" },
-        { &sel_allowsEmptySelection, "allowsEmptySelection" },
-        { &sel_scriptingIsGreaterThanOrEqualTo_1, "scriptingIsGreaterThanOrEqualTo:" },
-        { &sel_numberOfSelectedRows, "numberOfSelectedRows" },
-        { &sel_imageDidNotDraw_1inRect_1, "imageDidNotDraw:inRect:" },
-        { &sel_topLevelObject, "topLevelObject" },
-        { &sel_openDocumentWithContentsOfURL_1display_1, "openDocumentWithContentsOfURL:display:" },
-        { &sel_valueListAttributes, "valueListAttributes" },
-        { &sel_enableFreedObjectCheck_1, "enableFreedObjectCheck:" },
-        { &sel_moveForward_1, "moveForward:" },
-        { &sel_setSendsActionOnArrowKeys_1, "setSendsActionOnArrowKeys:" },
-        { &sel_versionForClassName_1, "versionForClassName:" },
-        { &sel_coerceValue_1forKey_1, "coerceValue:forKey:" },
-        { &sel_operatingSystem, "operatingSystem" },
-        { &sel_characterEncoding, "characterEncoding" },
-        { &sel_blendedColorWithFraction_1ofColor_1, "blendedColorWithFraction:ofColor:" },
-        { &sel_panel_1userEnteredFilename_1confirmed_1, "panel:userEnteredFilename:confirmed:" },
-        { &sel_addSelectedObjects_1, "addSelectedObjects:" },
-        { &sel_pointingDeviceID, "pointingDeviceID" },
-        { &sel_children, "children" },
-        { &sel_takeObjectValueFrom_1, "takeObjectValueFrom:" },
-        { &sel_indexSet, "indexSet" },
-        { &sel_setMovie_1, "setMovie:" },
-        { &sel_setKeyEquivalentModifierMask_1, "setKeyEquivalentModifierMask:" },
-        { &sel_allowsKeyedCoding, "allowsKeyedCoding" },
-        { &sel_rotateByDegrees_1, "rotateByDegrees:" },
-        { &sel_compoundTypes, "compoundTypes" },
-        { &sel_setShortStandaloneWeekdaySymbols_1, "setShortStandaloneWeekdaySymbols:" },
-        { &sel_removeWindowsItem_1, "removeWindowsItem:" },
-        { &sel_stringArrayForKey_1, "stringArrayForKey:" },
-        { &sel_outlineView_1typeSelectStringForTableColumn_1item_1, "outlineView:typeSelectStringForTableColumn:item:" },
-        { &sel_initWithWindow_1, "initWithWindow:" },
-        { &sel_accessibilityIsAttributeSettable_1, "accessibilityIsAttributeSettable:" },
-        { &sel_rangeForUserCharacterAttributeChange, "rangeForUserCharacterAttributeChange" },
-        { &sel_setCalendar_1, "setCalendar:" },
-        { &sel_beginEditing, "beginEditing" },
-        { &sel_enableUpdates, "enableUpdates" },
-        { &sel_setPrefersAllColumnUserResizing_1, "setPrefersAllColumnUserResizing:" },
-        { &sel_isTornOff, "isTornOff" },
-        { &sel_checkSpellingOfString_1startingAt_1, "checkSpellingOfString:startingAt:" },
-        { &sel_drawPackedGlyphs_1atPoint_1, "drawPackedGlyphs:atPoint:" },
-        { &sel_graphicsContextWithAttributes_1, "graphicsContextWithAttributes:" },
-        { &sel_textView_1completions_1forPartialWordRange_1indexOfSelectedItem_1, "textView:completions:forPartialWordRange:indexOfSelectedItem:" },
-        { &sel_outlineView_1shouldExpandItem_1, "outlineView:shouldExpandItem:" },
-        { &sel_isInFullScreenMode, "isInFullScreenMode" },
-        { &sel_userKeyEquivalent, "userKeyEquivalent" },
-        { &sel_menuBarHeight, "menuBarHeight" },
-        { &sel_initWithSize_1depth_1separate_1alpha_1, "initWithSize:depth:separate:alpha:" },
-        { &sel_criticalValue, "criticalValue" },
-        { &sel_tableView_1didClickTableColumn_1, "tableView:didClickTableColumn:" },
-        { &sel_addChildWindow_1ordered_1, "addChildWindow:ordered:" },
-        { &sel_autoscroll_1, "autoscroll:" },
-        { &sel_infoDictionary, "infoDictionary" },
-        { &sel_printOperationWithSettings_1error_1, "printOperationWithSettings:error:" },
-        { &sel_translateOriginToPoint_1, "translateOriginToPoint:" },
-        { &sel_takeStoredValue_1forKey_1, "takeStoredValue:forKey:" },
-        { &sel_mouseUp_1, "mouseUp:" },
-        { &sel_setNotationName_1, "setNotationName:" },
-        { &sel_setArgument_1atIndex_1, "setArgument:atIndex:" },
-        { &sel_setSelectedAttributes_1isMultiple_1, "setSelectedAttributes:isMultiple:" },
-        { &sel_dayOfCommonEra, "dayOfCommonEra" },
-        { &sel_greenColor, "greenColor" },
-        { &sel_initWithProtocolFamily_1socketType_1protocol_1address_1, "initWithProtocolFamily:socketType:protocol:address:" },
-        { &sel_setAttachmentCell_1, "setAttachmentCell:" },
-        { &sel_previousFailureCount, "previousFailureCount" },
-        { &sel_currentOperation, "currentOperation" },
-        { &sel_tokenField_1completionsForSubString_1indexOfToken_1indexOfSelectedItem_1, "tokenField:completionsForSubString:indexOfToken:indexOfSelectedItem:" },
-        { &sel_positionOfGlyph_1struckOverGlyph_1metricsExist_1, "positionOfGlyph:struckOverGlyph:metricsExist:" },
-        { &sel_setMarkedTextAttributes_1, "setMarkedTextAttributes:" },
-        { &sel_validateToolbarItem_1, "validateToolbarItem:" },
-        { &sel_startingColumn, "startingColumn" },
-        { &sel_setSelectedRanges_1, "setSelectedRanges:" },
-        { &sel_addItemWithTitle_1action_1keyEquivalent_1, "addItemWithTitle:action:keyEquivalent:" },
-        { &sel_postNotificationName_1object_1, "postNotificationName:object:" },
-        { &sel_replacementObjectForKeyedArchiver_1, "replacementObjectForKeyedArchiver:" },
-        { &sel_deletesFileUponFailure, "deletesFileUponFailure" },
-        { &sel_speechRecognizer_1didRecognizeCommand_1, "speechRecognizer:didRecognizeCommand:" },
-        { &sel_columnSpan, "columnSpan" },
-        { &sel_animationBlockingMode, "animationBlockingMode" },
-        { &sel_drawParts, "drawParts" },
-        { &sel_style, "style" },
-        { &sel_makeUntitledDocumentOfType_1error_1, "makeUntitledDocumentOfType:error:" },
-        { &sel_filteredArrayUsingPredicate_1, "filteredArrayUsingPredicate:" },
-        { &sel_wantsDefaultClipping, "wantsDefaultClipping" },
-        { &sel_one, "one" },
-        { &sel_persistentStoreTypeForFileType_1, "persistentStoreTypeForFileType:" },
-        { &sel_pixelsHigh, "pixelsHigh" },
-        { &sel_rulerView_1shouldMoveMarker_1, "rulerView:shouldMoveMarker:" },
-        { &sel_sizeWithAttributes_1, "sizeWithAttributes:" },
-        { &sel_drawTitleOfColumn_1inRect_1, "drawTitleOfColumn:inRect:" },
-        { &sel_setLevelsOfUndo_1, "setLevelsOfUndo:" },
-        { &sel_invoke, "invoke" },
-        { &sel_keyEnumerator, "keyEnumerator" },
-        { &sel_convertFont_1toSize_1, "convertFont:toSize:" },
-        { &sel_mouseExited_1withFrame_1inView_1, "mouseExited:withFrame:inView:" },
-        { &sel_widthAdjustLimit, "widthAdjustLimit" },
-        { &sel_animationResizeTime_1, "animationResizeTime:" },
-        { &sel_ensureLayoutForBoundingRect_1inTextContainer_1, "ensureLayoutForBoundingRect:inTextContainer:" },
-        { &sel_initWithExpressionType_1, "initWithExpressionType:" },
-        { &sel_numberWithUnsignedChar_1, "numberWithUnsignedChar:" },
-        { &sel_directory, "directory" },
-        { &sel_address, "address" },
-        { &sel_defaultPixelFormat, "defaultPixelFormat" },
-        { &sel_deleteBackwardByDecomposingPreviousCharacter_1, "deleteBackwardByDecomposingPreviousCharacter:" },
-        { &sel_clickCount, "clickCount" },
-        { &sel_trackMarker_1withMouseEvent_1, "trackMarker:withMouseEvent:" },
-        { &sel_URL_1resourceDataDidBecomeAvailable_1, "URL:resourceDataDidBecomeAvailable:" },
-        { &sel_outlineView_1setObjectValue_1forTableColumn_1byItem_1, "outlineView:setObjectValue:forTableColumn:byItem:" },
-        { &sel_insert_1, "insert:" },
-        { &sel_methodForSelector_1, "methodForSelector:" },
-        { &sel_insertGlyph_1atGlyphIndex_1characterIndex_1, "insertGlyph:atGlyphIndex:characterIndex:" },
-        { &sel_readFromFileWrapper_1ofType_1error_1, "readFromFileWrapper:ofType:error:" },
-        { &sel_selectedControlColor, "selectedControlColor" },
-        { &sel_selectedRow, "selectedRow" },
-        { &sel_control_1isValidObject_1, "control:isValidObject:" },
-        { &sel_setUniqueID_1, "setUniqueID:" },
-        { &sel_initWithName_1fromFile_1, "initWithName:fromFile:" },
-        { &sel_sizeOfLabel_1, "sizeOfLabel:" },
-        { &sel_credentialsForProtectionSpace_1, "credentialsForProtectionSpace:" },
-        { &sel_anyObject, "anyObject" },
-        { &sel_runLoopModesForAnimating, "runLoopModesForAnimating" },
-        { &sel_setSortDescriptors_1, "setSortDescriptors:" },
-        { &sel_convertSize_1toView_1, "convertSize:toView:" },
-        { &sel_setLineFragmentRect_1forGlyphRange_1usedRect_1, "setLineFragmentRect:forGlyphRange:usedRect:" },
-        { &sel_discardEditing, "discardEditing" },
-        { &sel_isAutodisplay, "isAutodisplay" },
-        { &sel_matchesOnMultipleResolution, "matchesOnMultipleResolution" },
-        { &sel_multipleThreadsEnabled, "multipleThreadsEnabled" },
-        { &sel_positionOfGlyph_1forCharacter_1struckOverRect_1, "positionOfGlyph:forCharacter:struckOverRect:" },
-        { &sel_boundsRectForBlock_1contentRect_1inRect_1textContainer_1characterRange_1, "boundsRectForBlock:contentRect:inRect:textContainer:characterRange:" },
-        { &sel_outlineView_1objectValueForTableColumn_1byItem_1, "outlineView:objectValueForTableColumn:byItem:" },
-        { &sel_transformPoint_1, "transformPoint:" },
-        { &sel_createClassDescription, "createClassDescription" },
-        { &sel_inputStreamWithFileAtPath_1, "inputStreamWithFileAtPath:" },
-        { &sel_menuForEvent_1inRect_1ofView_1, "menuForEvent:inRect:ofView:" },
-        { &sel_setRowTypeKeyPath_1, "setRowTypeKeyPath:" },
-        { &sel_infoForBinding_1, "infoForBinding:" },
-        { &sel_setDataRetained_1, "setDataRetained:" },
-        { &sel_revertToContentsOfURL_1ofType_1error_1, "revertToContentsOfURL:ofType:error:" },
-        { &sel_currentControlTint, "currentControlTint" },
-        { &sel_selection, "selection" },
-        { &sel_array, "array" },
-        { &sel_setStyle_1, "setStyle:" },
-        { &sel_setPredicate_1, "setPredicate:" },
-        { &sel_endEditing, "endEditing" },
-        { &sel_doClick_1, "doClick:" },
-        { &sel_toManyRelationshipKeys, "toManyRelationshipKeys" },
-        { &sel_selectedKnobColor, "selectedKnobColor" },
-        { &sel_setOrderedIndex_1, "setOrderedIndex:" },
-        { &sel_initWithSet_1, "initWithSet:" },
-        { &sel_drawSelector, "drawSelector" },
-        { &sel_requestWithURL_1, "requestWithURL:" },
-        { &sel_imageNamed_1, "imageNamed:" },
-        { &sel_hyphenationFactorForGlyphAtIndex_1, "hyphenationFactorForGlyphAtIndex:" },
-        { &sel_miniwindowTitle, "miniwindowTitle" },
-        { &sel_isFileURL, "isFileURL" },
-        { &sel_selectedSegment, "selectedSegment" },
-        { &sel_applicationDidResignActive_1, "applicationDidResignActive:" },
-        { &sel_initWithString_1calendarFormat_1, "initWithString:calendarFormat:" },
-        { &sel_initWithProtectionSpace_1proposedCredential_1previousFailureCount_1failureResponse_1error_1sender_1, "initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:" },
-        { &sel_menuHasKeyEquivalent_1forEvent_1target_1action_1, "menuHasKeyEquivalent:forEvent:target:action:" },
-        { &sel_minPossiblePositionOfDividerAtIndex_1, "minPossiblePositionOfDividerAtIndex:" },
-        { &sel_abbreviationForDate_1, "abbreviationForDate:" },
-        { &sel_absoluteX, "absoluteX" },
-        { &sel_scriptErrorNumber, "scriptErrorNumber" },
-        { &sel_previousValidKeyView, "previousValidKeyView" },
-        { &sel_valueWithRange_1, "valueWithRange:" },
-        { &sel_initWithDefaults_1initialValues_1, "initWithDefaults:initialValues:" },
-        { &sel_initNotTestWithTest_1, "initNotTestWithTest:" },
-        { &sel_abortModal, "abortModal" },
-        { &sel_isSuspended, "isSuspended" },
-        { &sel_isFilePackageAtPath_1, "isFilePackageAtPath:" },
-        { &sel_useCredential_1forAuthenticationChallenge_1, "useCredential:forAuthenticationChallenge:" },
-        { &sel_draggingSequenceNumber, "draggingSequenceNumber" },
-        { &sel_lastColumn, "lastColumn" },
-        { &sel_distantFuture, "distantFuture" },
-        { &sel_download_1didReceiveResponse_1, "download:didReceiveResponse:" },
-        { &sel_textTransform, "textTransform" },
-        { &sel_hasHorizontalScroller, "hasHorizontalScroller" },
-        { &sel_shadowBlurRadius, "shadowBlurRadius" },
-        { &sel_pointingDeviceType, "pointingDeviceType" },
-        { &sel_setMenuView_1, "setMenuView:" },
-        { &sel_setWindingRule_1, "setWindingRule:" },
-        { &sel_imageForSegment_1, "imageForSegment:" },
-        { &sel_bytes, "bytes" },
-        { &sel_propertyListFromStringsFileFormat, "propertyListFromStringsFileFormat" },
-        { &sel_setParagraphStyle_1, "setParagraphStyle:" },
-        { &sel_highlightMode, "highlightMode" },
-        { &sel_voice, "voice" },
-        { &sel_hostName, "hostName" },
-        { &sel_removeAccessoryController_1, "removeAccessoryController:" },
-        { &sel_rowsInRect_1, "rowsInRect:" },
-        { &sel_registerImageRepClass_1, "registerImageRepClass:" },
-        { &sel_value_1withObjCType_1, "value:withObjCType:" },
-        { &sel_enclosingMenuItem, "enclosingMenuItem" },
-        { &sel_exposedBindings, "exposedBindings" },
-        { &sel_setSharedScriptSuiteRegistry_1, "setSharedScriptSuiteRegistry:" },
-        { &sel_readablePasteboardTypes, "readablePasteboardTypes" },
-        { &sel_drawViewBackgroundInRect_1, "drawViewBackgroundInRect:" },
-        { &sel_setDataCell_1, "setDataCell:" },
-        { &sel_dataRepresentationOfType_1, "dataRepresentationOfType:" },
-        { &sel_setOrientation_1, "setOrientation:" },
-        { &sel_setFileWrapper_1, "setFileWrapper:" },
-        { &sel_runModalOpenPanel_1forTypes_1, "runModalOpenPanel:forTypes:" },
-        { &sel_adjustSubviews, "adjustSubviews" },
-        { &sel_setCurrencyDecimalSeparator_1, "setCurrencyDecimalSeparator:" },
-        { &sel_needsDisplay, "needsDisplay" },
-        { &sel_insertValue_1atIndex_1inPropertyWithKey_1, "insertValue:atIndex:inPropertyWithKey:" },
-        { &sel_setTextStorage_1, "setTextStorage:" },
-        { &sel_isAlternate, "isAlternate" },
-        { &sel_setOutputFormat_1, "setOutputFormat:" },
-        { &sel_comboBoxWillPopUp_1, "comboBoxWillPopUp:" },
-        { &sel_insertChild_1, "insertChild:" },
-        { &sel_initWithCommandDescription_1, "initWithCommandDescription:" },
-        { &sel_setLineDash_1count_1phase_1, "setLineDash:count:phase:" },
-        { &sel_setHardInvalidation_1forGlyphRange_1, "setHardInvalidation:forGlyphRange:" },
-        { &sel_setAllowsToolTipsWhenApplicationIsInactive_1, "setAllowsToolTipsWhenApplicationIsInactive:" },
-        { &sel_tableView_1namesOfPromisedFilesDroppedAtDestination_1forDraggedRowsWithIndexes_1, "tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:" },
-        { &sel_highlightedItemIndex, "highlightedItemIndex" },
-        { &sel_trailingOffset, "trailingOffset" },
-        { &sel_layer, "layer" },
-        { &sel_isDeletableFileAtPath_1, "isDeletableFileAtPath:" },
-        { &sel_textUnfilteredTypes, "textUnfilteredTypes" },
-        { &sel_gregorianStartDate, "gregorianStartDate" },
-        { &sel_isDocumentEdited, "isDocumentEdited" },
-        { &sel_colorWithCalibratedWhite_1alpha_1, "colorWithCalibratedWhite:alpha:" },
-        { &sel_shouldRunSavePanelWithAccessoryView, "shouldRunSavePanelWithAccessoryView" },
-        { &sel_finishEncoding, "finishEncoding" },
-        { &sel_setKeyCell_1, "setKeyCell:" },
-        { &sel_isPartialStringValid_1newEditingString_1errorDescription_1, "isPartialStringValid:newEditingString:errorDescription:" },
-        { &sel_setRangeContainerObject_1, "setRangeContainerObject:" },
-        { &sel_typeOfFile_1error_1, "typeOfFile:error:" },
-        { &sel_disappearingItemCursor, "disappearingItemCursor" },
-        { &sel_textureMaxMipMapLevel, "textureMaxMipMapLevel" },
-        { &sel_setEraSymbols_1, "setEraSymbols:" },
-        { &sel_setBordered_1, "setBordered:" },
-        { &sel_precomposedStringWithCanonicalMapping, "precomposedStringWithCanonicalMapping" },
-        { &sel_setEnabled_1, "setEnabled:" },
-        { &sel_setChildrenKeyPath_1, "setChildrenKeyPath:" },
-        { &sel_applicationDidBecomeActive_1, "applicationDidBecomeActive:" },
-        { &sel_setCancelButtonCell_1, "setCancelButtonCell:" },
-        { &sel_backgroundFilters, "backgroundFilters" },
-        { &sel_indexOfCellWithTag_1, "indexOfCellWithTag:" },
-        { &sel_UTF8String, "UTF8String" },
-        { &sel_horizontalPagination, "horizontalPagination" },
-        { &sel_allowedInputSourceLocales, "allowedInputSourceLocales" },
-        { &sel_toolbar, "toolbar" },
-        { &sel_setGeneratesDecimalNumbers_1, "setGeneratesDecimalNumbers:" },
-        { &sel_highlight_1withFrame_1inView_1, "highlight:withFrame:inView:" },
-        { &sel_rotation, "rotation" },
-        { &sel_colorForControlTint_1, "colorForControlTint:" },
-        { &sel_mutableString, "mutableString" },
-        { &sel_shadowWithLevel_1, "shadowWithLevel:" },
-        { &sel_frameRectForContentRect_1styleMask_1, "frameRectForContentRect:styleMask:" },
-        { &sel_numberOfColorComponents, "numberOfColorComponents" },
-        { &sel_alternateImage, "alternateImage" },
-        { &sel_initWithString_1relativeToURL_1, "initWithString:relativeToURL:" },
-        { &sel_pageOrder, "pageOrder" },
-        { &sel_cancel_1, "cancel:" },
-        { &sel_declareTypes_1owner_1, "declareTypes:owner:" },
-        { &sel_lastObject, "lastObject" },
-        { &sel_type_1conformsToType_1, "type:conformsToType:" },
-        { &sel_mutableArrayValueForKey_1, "mutableArrayValueForKey:" },
-        { &sel_initWithName_1host_1, "initWithName:host:" },
-        { &sel_keyEquivalentWidth, "keyEquivalentWidth" },
-        { &sel_modifier, "modifier" },
-        { &sel_setPerMillSymbol_1, "setPerMillSymbol:" },
-        { &sel_setToolbar_1, "setToolbar:" },
-        { &sel_changeAttributes_1, "changeAttributes:" },
-        { &sel_removeItemWithTitle_1, "removeItemWithTitle:" },
-        { &sel_setAspectRatio_1, "setAspectRatio:" },
-        { &sel_undoManagerForTextView_1, "undoManagerForTextView:" },
-        { &sel_clickedPathComponentCell, "clickedPathComponentCell" },
-        { &sel_commentWithStringValue_1, "commentWithStringValue:" },
-        { &sel_initWithContainerSpecifier_1key_1, "initWithContainerSpecifier:key:" },
-        { &sel_windowWillReturnUndoManager_1, "windowWillReturnUndoManager:" },
-        { &sel_imageAndTitleOffset, "imageAndTitleOffset" },
-        { &sel_initialize, "initialize" },
-        { &sel_truncatesLastVisibleLine, "truncatesLastVisibleLine" },
-        { &sel_setExponentSymbol_1, "setExponentSymbol:" },
-        { &sel_setCurrentProgress_1, "setCurrentProgress:" },
-        { &sel_initWithContentsOfFile_1options_1error_1, "initWithContentsOfFile:options:error:" },
-        { &sel_titleCell, "titleCell" },
-        { &sel_setCurrencySymbol_1, "setCurrencySymbol:" },
-        { &sel_usesScreenFonts, "usesScreenFonts" },
-        { &sel_propertyList, "propertyList" },
-        { &sel_subgroups, "subgroups" },
-        { &sel_setFloatValue_1knobProportion_1, "setFloatValue:knobProportion:" },
-        { &sel_componentsJoinedByString_1, "componentsJoinedByString:" },
-        { &sel_initWithICCProfileData_1, "initWithICCProfileData:" },
-        { &sel_setNextKeyView_1, "setNextKeyView:" },
-        { &sel_setAnimationCurve_1, "setAnimationCurve:" },
-        { &sel_tokenFieldCell_1completionsForSubString_1indexOfToken_1indexOfSelectedItem_1, "tokenFieldCell:completionsForSubString:indexOfToken:indexOfSelectedItem:" },
-        { &sel_takeValuesFromDictionary_1, "takeValuesFromDictionary:" },
-        { &sel_imageRepClassForPasteboardType_1, "imageRepClassForPasteboardType:" },
-        { &sel_setPlaybackDeviceIdentifier_1, "setPlaybackDeviceIdentifier:" },
-        { &sel_globallyUniqueString, "globallyUniqueString" },
-        { &sel_setLineWidth_1, "setLineWidth:" },
-        { &sel_selectedColumnIndexes, "selectedColumnIndexes" },
-        { &sel_addWindowsItem_1title_1filename_1, "addWindowsItem:title:filename:" },
-        { &sel_truncateFileAtOffset_1, "truncateFileAtOffset:" },
-        { &sel_setStandardOutput_1, "setStandardOutput:" },
-        { &sel_encodeInt32_1forKey_1, "encodeInt32:forKey:" },
-        { &sel_baselineDeltaForCharacterAtIndex_1, "baselineDeltaForCharacterAtIndex:" },
-        { &sel_setValueWraps_1, "setValueWraps:" },
-        { &sel_addOperation_1, "addOperation:" },
-        { &sel_resignKeyWindow, "resignKeyWindow" },
-        { &sel_insertNewline_1, "insertNewline:" },
-        { &sel_saveFrameUsingName_1, "saveFrameUsingName:" },
-        { &sel_setWithObjects_1, "setWithObjects:" },
-        { &sel_indexOfItemWithTarget_1andAction_1, "indexOfItemWithTarget:andAction:" },
-        { &sel_processEditing, "processEditing" },
-        { &sel_removeValueAtIndex_1fromPropertyWithKey_1, "removeValueAtIndex:fromPropertyWithKey:" },
-        { &sel_setShouldCascadeWindows_1, "setShouldCascadeWindows:" },
-        { &sel_stepBack_1, "stepBack:" },
-        { &sel_lockWhenCondition_1beforeDate_1, "lockWhenCondition:beforeDate:" },
-        { &sel_realm, "realm" },
-        { &sel_appendBezierPathWithPackedGlyphs_1, "appendBezierPathWithPackedGlyphs:" },
-        { &sel_inputStreamWithData_1, "inputStreamWithData:" },
-        { &sel_clickedRow, "clickedRow" },
-        { &sel_animationShouldStart_1, "animationShouldStart:" },
-        { &sel_appleEventCodeForKey_1, "appleEventCodeForKey:" },
-        { &sel_sendAction_1to_1forAllCells_1, "sendAction:to:forAllCells:" },
-        { &sel_writableTypesForSaveOperation_1, "writableTypesForSaveOperation:" },
-        { &sel_drawWellInside_1, "drawWellInside:" },
-        { &sel_intersectsSet_1, "intersectsSet:" },
-        { &sel_runOperationModalForWindow_1delegate_1didRunSelector_1contextInfo_1, "runOperationModalForWindow:delegate:didRunSelector:contextInfo:" },
-        { &sel_setAllowsEmptySelection_1, "setAllowsEmptySelection:" },
-        { &sel_tighteningFactorForTruncation, "tighteningFactorForTruncation" },
-        { &sel_insertDescriptor_1atIndex_1, "insertDescriptor:atIndex:" },
-        { &sel_setDefaultBehavior_1, "setDefaultBehavior:" },
-        { &sel_allowsFloats, "allowsFloats" },
-        { &sel_representedObject, "representedObject" },
-        { &sel_isFlipped, "isFlipped" },
-        { &sel_rectOfColumn_1, "rectOfColumn:" },
-        { &sel_setFrame_1display_1, "setFrame:display:" },
-        { &sel_setTextAttributesForPositiveInfinity_1, "setTextAttributesForPositiveInfinity:" },
-        { &sel_textUnfilteredFileTypes, "textUnfilteredFileTypes" },
-        { &sel_bezierPathByFlatteningPath, "bezierPathByFlatteningPath" },
-        { &sel_week, "week" },
-        { &sel_takeIntValueFrom_1, "takeIntValueFrom:" },
-        { &sel_setWantsNotificationForMarkedText_1, "setWantsNotificationForMarkedText:" },
-        { &sel_stringByPaddingToLength_1withString_1startingAtIndex_1, "stringByPaddingToLength:withString:startingAtIndex:" },
-        { &sel_stopModal, "stopModal" },
-        { &sel_veryShortWeekdaySymbols, "veryShortWeekdaySymbols" },
-        { &sel_user, "user" },
-        { &sel_animation_1didReachProgressMark_1, "animation:didReachProgressMark:" },
-        { &sel_fontWithName_1size_1, "fontWithName:size:" },
-        { &sel_selectWord_1, "selectWord:" },
-        { &sel_initWithDuration_1animationCurve_1, "initWithDuration:animationCurve:" },
-        { &sel_afmDictionary, "afmDictionary" },
-        { &sel_canChooseFiles, "canChooseFiles" },
-        { &sel_defaultLineWidth, "defaultLineWidth" },
-        { &sel_childAtIndex_1, "childAtIndex:" },
-        { &sel_pathForResource_1ofType_1inDirectory_1, "pathForResource:ofType:inDirectory:" },
-        { &sel_outlineView_1heightOfRowByItem_1, "outlineView:heightOfRowByItem:" },
-        { &sel_PMSymbol, "PMSymbol" },
-        { &sel_setBackgroundStyle_1, "setBackgroundStyle:" },
-        { &sel_decimalSeparator, "decimalSeparator" },
-        { &sel_knobThickness, "knobThickness" },
-        { &sel_request, "request" },
-        { &sel_indicesOfObjectsByEvaluatingWithContainer_1count_1, "indicesOfObjectsByEvaluatingWithContainer:count:" },
-        { &sel_objectByApplyingXSLTString_1arguments_1error_1, "objectByApplyingXSLTString:arguments:error:" },
-        { &sel_colorizeByMappingGray_1toColor_1blackMapping_1whiteMapping_1, "colorizeByMappingGray:toColor:blackMapping:whiteMapping:" },
-        { &sel_minusSet_1, "minusSet:" },
-        { &sel_setAutomaticallyRearrangesObjects_1, "setAutomaticallyRearrangesObjects:" },
-        { &sel_fixFontAttributeInRange_1, "fixFontAttributeInRange:" },
-        { &sel_frameRotation, "frameRotation" },
-        { &sel_addObserver_1forKeyPath_1options_1context_1, "addObserver:forKeyPath:options:context:" },
-        { &sel_collectionNames, "collectionNames" },
-        { &sel_titleOfColumn_1, "titleOfColumn:" },
-        { &sel_characterIdentifier, "characterIdentifier" },
-        { &sel_setPanelFont_1isMultiple_1, "setPanelFont:isMultiple:" },
-        { &sel_ruleThickness, "ruleThickness" },
-        { &sel_customSelector, "customSelector" },
-        { &sel_startSpeakingString_1toURL_1, "startSpeakingString:toURL:" },
-        { &sel_language, "language" },
-        { &sel_draggedImage_1endedAt_1operation_1, "draggedImage:endedAt:operation:" },
-        { &sel_removeSelectionIndexPaths_1, "removeSelectionIndexPaths:" },
-        { &sel_TIFFRepresentationOfImageRepsInArray_1, "TIFFRepresentationOfImageRepsInArray:" },
-        { &sel_setSet_1, "setSet:" },
-        { &sel_stringWithCString_1length_1, "stringWithCString:length:" },
-        { &sel_objectsByEvaluatingSpecifier, "objectsByEvaluatingSpecifier" },
-        { &sel_subarrayWithRange_1, "subarrayWithRange:" },
-        { &sel_collectIfNeeded, "collectIfNeeded" },
-        { &sel_pathWithComponents_1, "pathWithComponents:" },
-        { &sel_autoreleasedObjectCount, "autoreleasedObjectCount" },
-        { &sel_addCharactersInString_1, "addCharactersInString:" },
-        { &sel_setTemplate_1, "setTemplate:" },
-        { &sel_indexOfObjectIdenticalTo_1, "indexOfObjectIdenticalTo:" },
-        { &sel_setRepresentation, "setRepresentation" },
-        { &sel_URLResourceDidFinishLoading_1, "URLResourceDidFinishLoading:" },
-        { &sel_type, "type" },
-        { &sel_setMarkedText_1selectedRange_1, "setMarkedText:selectedRange:" },
-        { &sel_dictionaryWithObjects_1forKeys_1, "dictionaryWithObjects:forKeys:" },
-        { &sel_wantsToDelayTextChangeNotifications, "wantsToDelayTextChangeNotifications" },
-        { &sel_setCompletes_1, "setCompletes:" },
-        { &sel_releaseGState, "releaseGState" },
-        { &sel_descriptorWithEnumCode_1, "descriptorWithEnumCode:" },
-        { &sel_label, "label" },
-        { &sel_run, "run" },
-        { &sel_hasHorizontalRuler, "hasHorizontalRuler" },
-        { &sel_rowClass, "rowClass" },
-        { &sel_automaticRearrangementKeyPaths, "automaticRearrangementKeyPaths" },
-        { &sel_fileManager_1shouldProceedAfterError_1movingItemAtPath_1toPath_1, "fileManager:shouldProceedAfterError:movingItemAtPath:toPath:" },
-        { &sel_writeToURL_1atomically_1encoding_1error_1, "writeToURL:atomically:encoding:error:" },
-        { &sel_deviceID, "deviceID" },
-        { &sel_descriptorWithInt32_1, "descriptorWithInt32:" },
-        { &sel_encodeInt64_1forKey_1, "encodeInt64:forKey:" },
-        { &sel_insertEntry_1atIndex_1, "insertEntry:atIndex:" },
-        { &sel_leftMargin, "leftMargin" },
-        { &sel_setKeyEquivalentFont_1size_1, "setKeyEquivalentFont:size:" },
-        { &sel_colorWithDeviceHue_1saturation_1brightness_1alpha_1, "colorWithDeviceHue:saturation:brightness:alpha:" },
-        { &sel_nextState, "nextState" },
-        { &sel_scanHexInt_1, "scanHexInt:" },
-        { &sel_lineSpacing, "lineSpacing" },
-        { &sel_textureTarget, "textureTarget" },
-        { &sel_miniaturize_1, "miniaturize:" },
-        { &sel_browser_1namesOfPromisedFilesDroppedAtDestination_1forDraggedRowsWithIndexes_1inColumn_1, "browser:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:inColumn:" },
-        { &sel_localizedNameForTIFFCompressionType_1, "localizedNameForTIFFCompressionType:" },
-        { &sel_acceptConnectionInBackgroundAndNotifyForModes_1, "acceptConnectionInBackgroundAndNotifyForModes:" },
-        { &sel_setCanBecomeVisibleWithoutLogin_1, "setCanBecomeVisibleWithoutLogin:" },
-        { &sel_dictionaryWithObjectsAndKeys_1, "dictionaryWithObjectsAndKeys:" },
-        { &sel_ensureGlyphsForGlyphRange_1, "ensureGlyphsForGlyphRange:" },
-        { &sel_indexOfTickMarkAtPoint_1, "indexOfTickMarkAtPoint:" },
-        { &sel_dayOfWeek, "dayOfWeek" },
-        { &sel_glyphRangeForCharacterRange_1actualCharacterRange_1, "glyphRangeForCharacterRange:actualCharacterRange:" },
-        { &sel_enableCollectorForPointer_1, "enableCollectorForPointer:" },
-        { &sel_rulerView_1willMoveMarker_1toLocation_1, "rulerView:willMoveMarker:toLocation:" },
-        { &sel_comboBoxCell_1objectValueForItemAtIndex_1, "comboBoxCell:objectValueForItemAtIndex:" },
-        { &sel_setValidateSize_1, "setValidateSize:" },
-        { &sel_controlTint, "controlTint" },
-        { &sel_deselectItemAtIndex_1, "deselectItemAtIndex:" },
-        { &sel_defaultWindingRule, "defaultWindingRule" },
-        { &sel_setMaxValue_1, "setMaxValue:" },
-        { &sel_longEraSymbols, "longEraSymbols" },
-        { &sel_canRedo, "canRedo" },
-        { &sel_arguments, "arguments" },
-        { &sel_windows, "windows" },
-        { &sel_downloadDidBegin_1, "downloadDidBegin:" },
-        { &sel_pasteboard_1provideDataForType_1, "pasteboard:provideDataForType:" },
-        { &sel_length, "length" },
-        { &sel_imagePosition, "imagePosition" },
-        { &sel_setAllowedFileTypes_1, "setAllowedFileTypes:" },
-        { &sel_moveForwardAndModifySelection_1, "moveForwardAndModifySelection:" },
-        { &sel_filename, "filename" },
-        { &sel_mountedLocalVolumePaths, "mountedLocalVolumePaths" },
-        { &sel_sharedFontManager, "sharedFontManager" },
-        { &sel_dictionaryWithObjects_1forKeys_1count_1, "dictionaryWithObjects:forKeys:count:" },
-        { &sel_transpose_1, "transpose:" },
-        { &sel_drawTitleWithFrame_1inView_1, "drawTitleWithFrame:inView:" },
-        { &sel_worksWhenModal, "worksWhenModal" },
-        { &sel_registerClassDescription_1, "registerClassDescription:" },
-        { &sel_setAllowsTruncatedLabels_1, "setAllowsTruncatedLabels:" },
-        { &sel_bezierPathWithRoundedRect_1xRadius_1yRadius_1, "bezierPathWithRoundedRect:xRadius:yRadius:" },
-        { &sel_prefix, "prefix" },
-        { &sel_usesStrongWriteBarrier, "usesStrongWriteBarrier" },
-        { &sel_argumentNames, "argumentNames" },
-        { &sel_setCaseSensitive_1, "setCaseSensitive:" },
-        { &sel_outlineView_1didClickTableColumn_1, "outlineView:didClickTableColumn:" },
-        { &sel_textDidBeginEditing_1, "textDidBeginEditing:" },
-        { &sel_visibleRect, "visibleRect" },
-        { &sel_isSubviewCollapsed_1, "isSubviewCollapsed:" },
-        { &sel_completionsForPartialWordRange_1indexOfSelectedItem_1, "completionsForPartialWordRange:indexOfSelectedItem:" },
-        { &sel_setMinDate_1, "setMinDate:" },
-        { &sel_colorFromPasteboard_1, "colorFromPasteboard:" },
-        { &sel_instanceMethodSignatureForSelector_1, "instanceMethodSignatureForSelector:" },
-        { &sel_makeCellAtRow_1column_1, "makeCellAtRow:column:" },
-        { &sel_pasteAsPlainText_1, "pasteAsPlainText:" },
-        { &sel_willRemoveSubview_1, "willRemoveSubview:" },
-        { &sel_beginSheet_1modalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, "beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:" },
-        { &sel_notificationCenterForType_1, "notificationCenterForType:" },
-        { &sel_isDaylightSavingTimeForDate_1, "isDaylightSavingTimeForDate:" },
-        { &sel_load, "load" },
-        { &sel_menuForSegment_1, "menuForSegment:" },
-        { &sel_scheduledTimerWithTimeInterval_1invocation_1repeats_1, "scheduledTimerWithTimeInterval:invocation:repeats:" },
-        { &sel_unregisterClass_1, "unregisterClass:" },
-        { &sel_setByAddingObjectsFromSet_1, "setByAddingObjectsFromSet:" },
-        { &sel_setDepthLimit_1, "setDepthLimit:" },
-        { &sel_setVeryShortMonthSymbols_1, "setVeryShortMonthSymbols:" },
-        { &sel_writeToURL_1ofType_1forSaveOperation_1originalContentsURL_1error_1, "writeToURL:ofType:forSaveOperation:originalContentsURL:error:" },
-        { &sel_directoryAttributes, "directoryAttributes" },
-        { &sel_otherMouseDown_1, "otherMouseDown:" },
-        { &sel_unhideWithoutActivation, "unhideWithoutActivation" },
-        { &sel_initWithContainerClassDescription_1containerSpecifier_1key_1startSpecifier_1endSpecifier_1, "initWithContainerClassDescription:containerSpecifier:key:startSpecifier:endSpecifier:" },
-        { &sel_setHasHorizontalScroller_1, "setHasHorizontalScroller:" },
-        { &sel_trackMouse_1adding_1, "trackMouse:adding:" },
-        { &sel_substituteGlyphsInRange_1withGlyphs_1, "substituteGlyphsInRange:withGlyphs:" },
-        { &sel_drawCell_1, "drawCell:" },
-        { &sel_currentCursor, "currentCursor" },
-        { &sel_maxSize, "maxSize" },
-        { &sel_cookiesWithResponseHeaderFields_1forURL_1, "cookiesWithResponseHeaderFields:forURL:" },
-        { &sel_isBycopy, "isBycopy" },
-        { &sel_addCursorRect_1cursor_1, "addCursorRect:cursor:" },
-        { &sel_accessibilityActionNames, "accessibilityActionNames" },
-        { &sel_openDocumentWithContentsOfURL_1display_1error_1, "openDocumentWithContentsOfURL:display:error:" },
-        { &sel_templateViews, "templateViews" },
-        { &sel_keyPath, "keyPath" },
-        { &sel_minValue, "minValue" },
-        { &sel_setImageDimsWhenDisabled_1, "setImageDimsWhenDisabled:" },
-        { &sel_appendData_1, "appendData:" },
-        { &sel_netServiceBrowser_1didFindDomain_1moreComing_1, "netServiceBrowser:didFindDomain:moreComing:" },
-        { &sel_initWithDescriptorType_1bytes_1length_1, "initWithDescriptorType:bytes:length:" },
-        { &sel_hasReadablePropertyForKey_1, "hasReadablePropertyForKey:" },
-        { &sel_stopWhenAnimation_1reachesProgress_1, "stopWhenAnimation:reachesProgress:" },
-        { &sel_setWorksWhenModal_1, "setWorksWhenModal:" },
-        { &sel_localizedInputManagerName, "localizedInputManagerName" },
-        { &sel_knobColor, "knobColor" },
-        { &sel_screens, "screens" },
-        { &sel_deminiaturize_1, "deminiaturize:" },
-        { &sel_bundleIdentifier, "bundleIdentifier" },
-        { &sel_setLoopMode_1, "setLoopMode:" },
-        { &sel_expandItem_1expandChildren_1, "expandItem:expandChildren:" },
-        { &sel_dataWithContentsOfFile_1options_1error_1, "dataWithContentsOfFile:options:error:" },
-        { &sel_lineBreakBeforeIndex_1withinRange_1, "lineBreakBeforeIndex:withinRange:" },
-        { &sel_fileOwnerAccountName, "fileOwnerAccountName" },
-        { &sel_insertColumn_1withCells_1, "insertColumn:withCells:" },
-        { &sel_windowLevel, "windowLevel" },
-        { &sel_setGrammarCheckingEnabled_1, "setGrammarCheckingEnabled:" },
-        { &sel_shortStandaloneWeekdaySymbols, "shortStandaloneWeekdaySymbols" },
-        { &sel_push, "push" },
-        { &sel_initWithContentsOfFile_1ofType_1, "initWithContentsOfFile:ofType:" },
-        { &sel_removePortForName_1, "removePortForName:" },
-        { &sel_setMaximumRecents_1, "setMaximumRecents:" },
-        { &sel_supermenu, "supermenu" },
-        { &sel_setWidth_1type_1forLayer_1edge_1, "setWidth:type:forLayer:edge:" },
-        { &sel_itemRemoved_1, "itemRemoved:" },
-        { &sel_initWithBytesNoCopy_1length_1, "initWithBytesNoCopy:length:" },
-        { &sel_printer, "printer" },
-        { &sel_compact, "compact" },
-        { &sel_setDefaultLineWidth_1, "setDefaultLineWidth:" },
-        { &sel_CGLPixelFormatObj, "CGLPixelFormatObj" },
-        { &sel_initWithDictionary_1copyItems_1, "initWithDictionary:copyItems:" },
-        { &sel_tableView_1didDragTableColumn_1, "tableView:didDragTableColumn:" },
-        { &sel_formattingStringsFilename, "formattingStringsFilename" },
-        { &sel_setScrollView_1, "setScrollView:" },
-        { &sel_value, "value" },
-        { &sel_editedMask, "editedMask" },
-        { &sel_ruleEditor_1displayValueForCriterion_1inRow_1, "ruleEditor:displayValueForCriterion:inRow:" },
-        { &sel_leading, "leading" },
-        { &sel_titleRect, "titleRect" },
-        { &sel_setColumnsAutosaveName_1, "setColumnsAutosaveName:" },
-        { &sel_stop_1, "stop:" },
-        { &sel_titleColor, "titleColor" },
-        { &sel_initWithContainerClassDescription_1containerSpecifier_1key_1test_1, "initWithContainerClassDescription:containerSpecifier:key:test:" },
-        { &sel_bytesPerPlane, "bytesPerPlane" },
-        { &sel_pageScroll, "pageScroll" },
-        { &sel_groupingAttributes, "groupingAttributes" },
-        { &sel_setAutomaticLinkDetectionEnabled_1, "setAutomaticLinkDetectionEnabled:" },
-        { &sel_tableView_1mouseDownInHeaderOfTableColumn_1, "tableView:mouseDownInHeaderOfTableColumn:" },
-        { &sel_representationOfImageRepsInArray_1usingType_1properties_1, "representationOfImageRepsInArray:usingType:properties:" },
-        { &sel_attributeRuns, "attributeRuns" },
-        { &sel_decodeRect, "decodeRect" },
-        { &sel_drawerDidOpen_1, "drawerDidOpen:" },
-        { &sel_scrollerWidth, "scrollerWidth" },
-        { &sel_defaultMenu, "defaultMenu" },
-        { &sel_URLProtocol_1didLoadData_1, "URLProtocol:didLoadData:" },
-        { &sel_allKeys, "allKeys" },
-        { &sel_startPeriodicEventsAfterDelay_1withPeriod_1, "startPeriodicEventsAfterDelay:withPeriod:" },
-        { &sel_tableViewSelectionDidChange_1, "tableViewSelectionDidChange:" },
-        { &sel_setStandalone_1, "setStandalone:" },
-        { &sel_makeMainWindow, "makeMainWindow" },
-        { &sel_moveLeftAndModifySelection_1, "moveLeftAndModifySelection:" },
-        { &sel_pasteboardWithUniqueName, "pasteboardWithUniqueName" },
-        { &sel_fileSystemFileNumber, "fileSystemFileNumber" },
-        { &sel_jobDisposition, "jobDisposition" },
-        { &sel_setCurrentVirtualScreen_1, "setCurrentVirtualScreen:" },
-        { &sel_setHasThousandSeparators_1, "setHasThousandSeparators:" },
-        { &sel_alternateMnemonicLocation, "alternateMnemonicLocation" },
-        { &sel_characterSetWithBitmapRepresentation_1, "characterSetWithBitmapRepresentation:" },
-        { &sel_startLoading, "startLoading" },
-        { &sel_member_1, "member:" },
-        { &sel_setSelectedFont_1isMultiple_1, "setSelectedFont:isMultiple:" },
-        { &sel_monthOfYear, "monthOfYear" },
-        { &sel_restoreCachedImage, "restoreCachedImage" },
-        { &sel_image_1didLoadPartOfRepresentation_1withValidRows_1, "image:didLoadPartOfRepresentation:withValidRows:" },
-        { &sel_mouseEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1clickCount_1pressure_1, "mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:" },
-        { &sel_setInternationalCurrencySymbol_1, "setInternationalCurrencySymbol:" },
-        { &sel_mainThread, "mainThread" },
-        { &sel_lineCapStyle, "lineCapStyle" },
-        { &sel_setDefaultParagraphStyle_1, "setDefaultParagraphStyle:" },
-        { &sel_cellFrameForTextContainer_1proposedLineFragment_1glyphPosition_1characterIndex_1, "cellFrameForTextContainer:proposedLineFragment:glyphPosition:characterIndex:" },
-        { &sel_resolveInstanceMethod_1, "resolveInstanceMethod:" },
-        { &sel_illegalCharacterSet, "illegalCharacterSet" },
-        { &sel_setKnobThickness_1, "setKnobThickness:" },
-        { &sel_runModalPageLayoutWithPrintInfo_1, "runModalPageLayoutWithPrintInfo:" },
-        { &sel_popUpContextMenu_1withEvent_1forView_1withFont_1, "popUpContextMenu:withEvent:forView:withFont:" },
-        { &sel_modalWindow, "modalWindow" },
-        { &sel_autorelease, "autorelease" },
-        { &sel_draggingEntered_1, "draggingEntered:" },
-        { &sel_allowsTruncatedLabels, "allowsTruncatedLabels" },
-        { &sel_fileDescriptor, "fileDescriptor" },
-        { &sel_ISOLanguageCodes, "ISOLanguageCodes" },
-        { &sel_onStateImage, "onStateImage" },
-        { &sel_imageFrameStyle, "imageFrameStyle" },
-        { &sel_setFloatValue_1, "setFloatValue:" },
-        { &sel_initWithColors_1atLocations_1colorSpace_1, "initWithColors:atLocations:colorSpace:" },
-        { &sel_descriptorWithString_1, "descriptorWithString:" },
-        { &sel_setPoolCountHighWaterMark_1, "setPoolCountHighWaterMark:" },
-        { &sel_veryShortStandaloneWeekdaySymbols, "veryShortStandaloneWeekdaySymbols" },
-        { &sel_addTypes_1owner_1, "addTypes:owner:" },
-        { &sel_numberWithLongLong_1, "numberWithLongLong:" },
-        { &sel_setDay_1, "setDay:" },
-        { &sel_initWithHTML_1documentAttributes_1, "initWithHTML:documentAttributes:" },
-        { &sel_replaceSubview_1with_1, "replaceSubview:with:" },
-        { &sel_makeObjectsPerformSelector_1, "makeObjectsPerformSelector:" },
-        { &sel_setRunLoopModes_1, "setRunLoopModes:" },
-        { &sel_getFileSystemRepresentation_1maxLength_1, "getFileSystemRepresentation:maxLength:" },
-        { &sel_scale, "scale" },
-        { &sel_draggedImageLocation, "draggedImageLocation" },
-        { &sel_setFocusStack_1, "setFocusStack:" },
-        { &sel_isReadOnlyKey_1, "isReadOnlyKey:" },
-        { &sel_shadowOffset, "shadowOffset" },
-        { &sel_URLHandleUsingCache_1, "URLHandleUsingCache:" },
-        { &sel_isWellFormed, "isWellFormed" },
-        { &sel_tokenField_1editingStringForRepresentedObject_1, "tokenField:editingStringForRepresentedObject:" },
-        { &sel_setGroupsByEvent_1, "setGroupsByEvent:" },
-        { &sel_parser_1foundComment_1, "parser:foundComment:" },
-        { &sel_initWithHTML_1baseURL_1documentAttributes_1, "initWithHTML:baseURL:documentAttributes:" },
-        { &sel_uppercaseWord_1, "uppercaseWord:" },
-        { &sel_testPart_1, "testPart:" },
-        { &sel_dataSource, "dataSource" },
-        { &sel_lineRangeForRange_1, "lineRangeForRange:" },
-        { &sel_hostWithAddress_1, "hostWithAddress:" },
-        { &sel_removeRunLoop_1, "removeRunLoop:" },
-        { &sel_fileHandleWithStandardInput, "fileHandleWithStandardInput" },
-        { &sel_itemArray, "itemArray" },
-        { &sel_rectOfPathComponentCell_1withFrame_1inView_1, "rectOfPathComponentCell:withFrame:inView:" },
-        { &sel_TIFFRepresentation, "TIFFRepresentation" },
-        { &sel_archiver_1willReplaceObject_1withObject_1, "archiver:willReplaceObject:withObject:" },
-        { &sel_currentVirtualScreen, "currentVirtualScreen" },
-        { &sel_gridColor, "gridColor" },
-        { &sel_boundingRectForGlyph_1, "boundingRectForGlyph:" },
-        { &sel_setDataSource_1, "setDataSource:" },
-        { &sel_setDefaultLineJoinStyle_1, "setDefaultLineJoinStyle:" },
-        { &sel_textBlocks, "textBlocks" },
-        { &sel_drawerDidClose_1, "drawerDidClose:" },
-        { &sel_valueWithName_1inPropertyWithKey_1, "valueWithName:inPropertyWithKey:" },
-        { &sel_managedObjectModel, "managedObjectModel" },
-        { &sel_outlineView_1persistentObjectForItem_1, "outlineView:persistentObjectForItem:" },
-        { &sel_setSelectedRange_1, "setSelectedRange:" },
-        { &sel_magentaComponent, "magentaComponent" },
-        { &sel_setIncrement_1, "setIncrement:" },
-        { &sel_editingStringForObjectValue_1, "editingStringForObjectValue:" },
-        { &sel_addClip, "addClip" },
-        { &sel_setSelectionIndex_1, "setSelectionIndex:" },
-        { &sel_replyAppleEventForSuspensionID_1, "replyAppleEventForSuspensionID:" },
-        { &sel_URLProtocol_1didFailWithError_1, "URLProtocol:didFailWithError:" },
-        { &sel_ignoresMouseEvents, "ignoresMouseEvents" },
-        { &sel_dateWithNaturalLanguageString_1locale_1, "dateWithNaturalLanguageString:locale:" },
-        { &sel_recordDescriptor, "recordDescriptor" },
-        { &sel_makeCurrentContext, "makeCurrentContext" },
-        { &sel_excludedKeys, "excludedKeys" },
-        { &sel_fileManager_1shouldProceedAfterError_1linkingItemAtPath_1toPath_1, "fileManager:shouldProceedAfterError:linkingItemAtPath:toPath:" },
-        { &sel_set, "set" },
-        { &sel_mainScreen, "mainScreen" },
-        { &sel_setVersion_1, "setVersion:" },
-        { &sel_displayRectIgnoringOpacity_1inContext_1, "displayRectIgnoringOpacity:inContext:" },
-        { &sel_setNumberOfTickMarks_1, "setNumberOfTickMarks:" },
-        { &sel_showsHelp, "showsHelp" },
-        { &sel_takeColorFrom_1, "takeColorFrom:" },
-        { &sel_horizontalPageScroll, "horizontalPageScroll" },
-        { &sel_pointingHandCursor, "pointingHandCursor" },
-        { &sel_vendorID, "vendorID" },
-        { &sel_setSelectedRanges_1affinity_1stillSelecting_1, "setSelectedRanges:affinity:stillSelecting:" },
-        { &sel_setHTTPShouldHandleCookies_1, "setHTTPShouldHandleCookies:" },
-        { &sel_initWithType_1location_1, "initWithType:location:" },
-        { &sel_stringByResolvingSymlinksInPath, "stringByResolvingSymlinksInPath" },
-        { &sel_tryLock, "tryLock" },
-        { &sel_convertSizeFromBase_1, "convertSizeFromBase:" },
-        { &sel_setCacheMode_1, "setCacheMode:" },
-        { &sel_entityName, "entityName" },
-        { &sel_takeFloatValueFrom_1, "takeFloatValueFrom:" },
-        { &sel_showsStateBy, "showsStateBy" },
-        { &sel_highlightedItem, "highlightedItem" },
-        { &sel_superclassDescription, "superclassDescription" },
-        { &sel_flagsChanged_1, "flagsChanged:" },
-        { &sel_alloc, "alloc" },
-        { &sel_setDisplaysWhenScreenProfileChanges_1, "setDisplaysWhenScreenProfileChanges:" },
-        { &sel_CIImage, "CIImage" },
-        { &sel_setSupermenu_1, "setSupermenu:" },
-        { &sel_setSharedURLCache_1, "setSharedURLCache:" },
-        { &sel_pathCell_1willPopUpMenu_1, "pathCell:willPopUpMenu:" },
-        { &sel_setAttributes_1ofItemAtPath_1error_1, "setAttributes:ofItemAtPath:error:" },
-        { &sel_tableView_1typeSelectStringForTableColumn_1row_1, "tableView:typeSelectStringForTableColumn:row:" },
-        { &sel_moveWordLeftAndModifySelection_1, "moveWordLeftAndModifySelection:" },
-        { &sel_whitespaceAndNewlineCharacterSet, "whitespaceAndNewlineCharacterSet" },
-        { &sel_pathControl_1validateDrop_1, "pathControl:validateDrop:" },
-        { &sel_createCommandInstanceWithZone_1, "createCommandInstanceWithZone:" },
-        { &sel_configurationDictionary, "configurationDictionary" },
-        { &sel_classFallbacksForKeyedArchiver, "classFallbacksForKeyedArchiver" },
-        { &sel_DTDKind, "DTDKind" },
-        { &sel_initWithPath_1documentAttributes_1, "initWithPath:documentAttributes:" },
-        { &sel_addObjectsFromArray_1, "addObjectsFromArray:" },
-        { &sel_tokenField_1displayStringForRepresentedObject_1, "tokenField:displayStringForRepresentedObject:" },
-        { &sel_firstVisibleColumn, "firstVisibleColumn" },
-        { &sel_gradientType, "gradientType" },
-        { &sel_familyName, "familyName" },
-        { &sel_uniqueID, "uniqueID" },
-        { &sel_setFormatterBehavior_1, "setFormatterBehavior:" },
-        { &sel_tokenFieldCell_1hasMenuForRepresentedObject_1, "tokenFieldCell:hasMenuForRepresentedObject:" },
-        { &sel_fileManager_1shouldCopyItemAtPath_1toPath_1, "fileManager:shouldCopyItemAtPath:toPath:" },
-        { &sel_keySpecifier, "keySpecifier" },
-        { &sel_copyItemAtPath_1toPath_1error_1, "copyItemAtPath:toPath:error:" },
-        { &sel_setLength_1, "setLength:" },
-        { &sel_reloadItem_1, "reloadItem:" },
-        { &sel_removeObjectsAtArrangedObjectIndexes_1, "removeObjectsAtArrangedObjectIndexes:" },
-        { &sel_setVisibilityPriority_1, "setVisibilityPriority:" },
-        { &sel_insertItemWithObjectValue_1atIndex_1, "insertItemWithObjectValue:atIndex:" },
-        { &sel_searchButtonCell, "searchButtonCell" },
-        { &sel_getCString_1maxLength_1range_1remainingRange_1, "getCString:maxLength:range:remainingRange:" },
-        { &sel_outlineView_1child_1ofItem_1, "outlineView:child:ofItem:" },
-        { &sel_numberOfComponents, "numberOfComponents" },
-        { &sel_isKindOfClass_1, "isKindOfClass:" },
-        { &sel_processorCount, "processorCount" },
-        { &sel_lineJoinStyle, "lineJoinStyle" },
-        { &sel_collectionBehavior, "collectionBehavior" },
-        { &sel_setApplicationIconImage_1, "setApplicationIconImage:" },
-        { &sel_setLaunchPath_1, "setLaunchPath:" },
-        { &sel_initFileURLWithPath_1, "initFileURLWithPath:" },
-        { &sel_selectItemAtIndex_1, "selectItemAtIndex:" },
-        { &sel_IBeamCursor, "IBeamCursor" },
-        { &sel_isColor, "isColor" },
-        { &sel_cancelAuthenticationChallenge_1, "cancelAuthenticationChallenge:" },
-        { &sel_echosBullets, "echosBullets" },
-        { &sel_setHasUndoManager_1, "setHasUndoManager:" },
-        { &sel_RTFDFileWrapperFromRange_1documentAttributes_1, "RTFDFileWrapperFromRange:documentAttributes:" },
-        { &sel_highlightCell_1atRow_1column_1, "highlightCell:atRow:column:" },
-        { &sel_currentHost, "currentHost" },
-        { &sel_setURI_1, "setURI:" },
-        { &sel_suiteNames, "suiteNames" },
-        { &sel_genericGrayColorSpace, "genericGrayColorSpace" },
-        { &sel_volatileDomainForName_1, "volatileDomainForName:" },
-        { &sel_tokenizingCharacterSet, "tokenizingCharacterSet" },
-        { &sel_initWithXMLString_1, "initWithXMLString:" },
-        { &sel_function, "function" },
-        { &sel_sizeForMagnification_1, "sizeForMagnification:" },
-        { &sel_commitEditingWithDelegate_1didCommitSelector_1contextInfo_1, "commitEditingWithDelegate:didCommitSelector:contextInfo:" },
-        { &sel_writeToFile_1, "writeToFile:" },
-        { &sel_displayIfNeededInRect_1, "displayIfNeededInRect:" },
-        { &sel_optionDescriptionsForBinding_1, "optionDescriptionsForBinding:" },
-        { &sel_initWithSize_1, "initWithSize:" },
-        { &sel_cornerView, "cornerView" },
-        { &sel_redoActionName, "redoActionName" },
-        { &sel_setLocation_1forStartOfGlyphRange_1, "setLocation:forStartOfGlyphRange:" },
-        { &sel_setAllowedInputSourceLocales_1, "setAllowedInputSourceLocales:" },
-        { &sel_convertRect_1toView_1, "convertRect:toView:" },
-        { &sel_preferredFilenameExtensionForType_1, "preferredFilenameExtensionForType:" },
-        { &sel_tableView_1writeRows_1toPasteboard_1, "tableView:writeRows:toPasteboard:" },
-        { &sel_rootObject, "rootObject" },
-        { &sel_isEqualToHashTable_1, "isEqualToHashTable:" },
-        { &sel_indent_1, "indent:" },
-        { &sel_removeIndexesInRange_1, "removeIndexesInRange:" },
-        { &sel_numberWithBool_1, "numberWithBool:" },
-        { &sel_setPersistentDomain_1forName_1, "setPersistentDomain:forName:" },
-        { &sel_netServiceBrowser_1didRemoveService_1moreComing_1, "netServiceBrowser:didRemoveService:moreComing:" },
-        { &sel_timeZoneWithName_1data_1, "timeZoneWithName:data:" },
-        { &sel_drawImage_1withFrame_1inView_1, "drawImage:withFrame:inView:" },
-        { &sel_buttonToolTip, "buttonToolTip" },
-        { &sel_enableCursorRects, "enableCursorRects" },
-        { &sel_rulerAttributesInRange_1, "rulerAttributesInRange:" },
-        { &sel_setMemoryCapacity_1, "setMemoryCapacity:" },
-        { &sel_isSeparatorItem, "isSeparatorItem" },
-        { &sel_save_1, "save:" },
-        { &sel_documentView, "documentView" },
-        { &sel_setHostCacheEnabled_1, "setHostCacheEnabled:" },
-        { &sel_setDatePickerElements_1, "setDatePickerElements:" },
-        { &sel_mixedStateImage, "mixedStateImage" },
-        { &sel_setAcceptsMouseMovedEvents_1, "setAcceptsMouseMovedEvents:" },
-        { &sel_numberOfTabViewItems, "numberOfTabViewItems" },
-        { &sel_portForName_1host_1nameServerPortNumber_1, "portForName:host:nameServerPortNumber:" },
-        { &sel_printerWithName_1domain_1includeUnavailable_1, "printerWithName:domain:includeUnavailable:" },
-        { &sel_insertObjects_1atArrangedObjectIndexPaths_1, "insertObjects:atArrangedObjectIndexPaths:" },
-        { &sel_browser_1shouldTypeSelectForEvent_1withCurrentSearchString_1, "browser:shouldTypeSelectForEvent:withCurrentSearchString:" },
-        { &sel_defaultTabInterval, "defaultTabInterval" },
-        { &sel_initWithTitle_1, "initWithTitle:" },
-        { &sel_timeZoneForSecondsFromGMT_1, "timeZoneForSecondsFromGMT:" },
-        { &sel_initWithPasteboard_1, "initWithPasteboard:" },
-        { &sel_subscriptRange_1, "subscriptRange:" },
-        { &sel_highlightColorWithFrame_1inView_1, "highlightColorWithFrame:inView:" },
-        { &sel_didChangeText, "didChangeText" },
-        { &sel_storagePolicy, "storagePolicy" },
-        { &sel_respondsToSelector_1, "respondsToSelector:" },
-        { &sel_namesOfPromisedFilesDroppedAtDestination_1, "namesOfPromisedFilesDroppedAtDestination:" },
-        { &sel_unsignedShortValue, "unsignedShortValue" },
-        { &sel_setZeroSymbol_1, "setZeroSymbol:" },
-        { &sel_resourcePath, "resourcePath" },
-        { &sel_markerFormat, "markerFormat" },
-        { &sel_hotSpot, "hotSpot" },
-        { &sel_imageUnfilteredPasteboardTypes, "imageUnfilteredPasteboardTypes" },
-        { &sel_editedRange, "editedRange" },
-        { &sel_setMenuChangedMessagesEnabled_1, "setMenuChangedMessagesEnabled:" },
-        { &sel_tailIndent, "tailIndent" },
-        { &sel_release, "release" },
-        { &sel_readFromURL_1options_1documentAttributes_1, "readFromURL:options:documentAttributes:" },
-        { &sel_underlinePosition, "underlinePosition" },
-        { &sel_setMinItemSize_1, "setMinItemSize:" },
-        { &sel_initWithImage_1foregroundColorHint_1backgroundColorHint_1hotSpot_1, "initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:" },
-        { &sel_setPlaceholderString_1, "setPlaceholderString:" },
-        { &sel_createDirectoryAtPath_1withIntermediateDirectories_1attributes_1error_1, "createDirectoryAtPath:withIntermediateDirectories:attributes:error:" },
-        { &sel_setDefaultTabInterval_1, "setDefaultTabInterval:" },
-        { &sel_invertedSet, "invertedSet" },
-        { &sel_iconForFile_1, "iconForFile:" },
-        { &sel_modifyFont_1, "modifyFont:" },
-        { &sel_setProcessName_1, "setProcessName:" },
-        { &sel_addObserver_1toObjectsAtIndexes_1forKeyPath_1options_1context_1, "addObserver:toObjectsAtIndexes:forKeyPath:options:context:" },
-        { &sel_resolve, "resolve" },
-        { &sel_namespaces, "namespaces" },
-        { &sel_drawInBezierPath_1angle_1, "drawInBezierPath:angle:" },
-        { &sel_setPixelFormat_1, "setPixelFormat:" },
-        { &sel_resizeUpDownCursor, "resizeUpDownCursor" },
-        { &sel_daylightSavingTimeOffsetForDate_1, "daylightSavingTimeOffsetForDate:" },
-        { &sel_setCanSpawnSeparateThread_1, "setCanSpawnSeparateThread:" },
-        { &sel_setTitleBaseWritingDirection_1, "setTitleBaseWritingDirection:" },
-        { &sel_subscript_1, "subscript:" },
-        { &sel_URL, "URL" },
-        { &sel_headerColor, "headerColor" },
-        { &sel_stringByAddingPercentEscapesUsingEncoding_1, "stringByAddingPercentEscapesUsingEncoding:" },
-        { &sel_draggingExited_1, "draggingExited:" },
-        { &sel_ignoreModifierKeysWhileDragging, "ignoreModifierKeysWhileDragging" },
-        { &sel_componentsToDisplayForPath_1, "componentsToDisplayForPath:" },
-        { &sel_glyphRangeForBoundingRectWithoutAdditionalLayout_1inTextContainer_1, "glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:" },
-        { &sel_removeTrackingRect_1, "removeTrackingRect:" },
-        { &sel_handlePrintScriptCommand_1, "handlePrintScriptCommand:" },
-        { &sel_viewDidMoveToWindow, "viewDidMoveToWindow" },
-        { &sel_allocateGState, "allocateGState" },
-        { &sel_availableStringEncodings, "availableStringEncodings" },
-        { &sel_instantiateNibWithExternalNameTable_1, "instantiateNibWithExternalNameTable:" },
-        { &sel_setWeekdayOrdinal_1, "setWeekdayOrdinal:" },
-        { &sel_setWithCapacity_1, "setWithCapacity:" },
-        { &sel_setCurrentAppleEventAndReplyEventWithSuspensionID_1, "setCurrentAppleEventAndReplyEventWithSuspensionID:" },
-        { &sel_convertFont_1toNotHaveTrait_1, "convertFont:toNotHaveTrait:" },
-        { &sel_performSelector_1withObject_1withObject_1, "performSelector:withObject:withObject:" },
-        { &sel_removeIndexes_1, "removeIndexes:" },
-        { &sel_objectSpecifierWithDescriptor_1, "objectSpecifierWithDescriptor:" },
-        { &sel_objectValue, "objectValue" },
-        { &sel_timeZone, "timeZone" },
-        { &sel_viewSizeChanged_1, "viewSizeChanged:" },
-        { &sel_clearDrawable, "clearDrawable" },
-        { &sel_parentRowForRow_1, "parentRowForRow:" },
-        { &sel_trackingMode, "trackingMode" },
-        { &sel_selectedRanges, "selectedRanges" },
-        { &sel_suspendExecution, "suspendExecution" },
-        { &sel_setDefaultPrinter_1, "setDefaultPrinter:" },
-        { &sel_loadDataRepresentation_1ofType_1, "loadDataRepresentation:ofType:" },
-        { &sel_closestTickMarkValueToValue_1, "closestTickMarkValueToValue:" },
-        { &sel_removeFromRunLoop_1forMode_1, "removeFromRunLoop:forMode:" },
-        { &sel_cancelUserAttentionRequest_1, "cancelUserAttentionRequest:" },
-        { &sel_dictionaryWithObject_1forKey_1, "dictionaryWithObject:forKey:" },
-        { &sel_isDataRetained, "isDataRetained" },
-        { &sel_setLoops_1, "setLoops:" },
-        { &sel_hashTableWithWeakObjects, "hashTableWithWeakObjects" },
-        { &sel_documentForURL_1, "documentForURL:" },
-        { &sel_removeRepresentation_1, "removeRepresentation:" },
-        { &sel_keyClassDescription, "keyClassDescription" },
-        { &sel_noResponderFor_1, "noResponderFor:" },
-        { &sel_setBidiLevels_1forGlyphRange_1, "setBidiLevels:forGlyphRange:" },
-        { &sel_cancelIncrementalLoad, "cancelIncrementalLoad" },
-        { &sel_highlightedBranchImage, "highlightedBranchImage" },
-        { &sel_setAttributedStringForZero_1, "setAttributedStringForZero:" },
-        { &sel_drawAtPoint_1fromRect_1operation_1fraction_1, "drawAtPoint:fromRect:operation:fraction:" },
-        { &sel_fileHFSTypeCode, "fileHFSTypeCode" },
-        { &sel_maximumRecents, "maximumRecents" },
-        { &sel_useFont_1, "useFont:" },
-        { &sel_selectKeyViewPrecedingView_1, "selectKeyViewPrecedingView:" },
-        { &sel_attributedStringForNil, "attributedStringForNil" },
-        { &sel_isGrammarCheckingEnabled, "isGrammarCheckingEnabled" },
-        { &sel_owner, "owner" },
-        { &sel_searchForServicesOfType_1inDomain_1, "searchForServicesOfType:inDomain:" },
-        { &sel_frameAutosaveName, "frameAutosaveName" },
-        { &sel_setCommands_1, "setCommands:" },
-        { &sel_URLResourceDidCancelLoading_1, "URLResourceDidCancelLoading:" },
-        { &sel_uniqueSpellDocumentTag, "uniqueSpellDocumentTag" },
-        { &sel_needsToBeUpdatedFromPath_1, "needsToBeUpdatedFromPath:" },
-        { &sel_bounds, "bounds" },
-        { &sel_contextHelpForKey_1, "contextHelpForKey:" },
-        { &sel_setSendsActionOnEndEditing_1, "setSendsActionOnEndEditing:" },
-        { &sel_scanDouble_1, "scanDouble:" },
-        { &sel_download_1willResumeWithResponse_1fromByte_1, "download:willResumeWithResponse:fromByte:" },
-        { &sel_drawFromCenter_1radius_1toCenter_1radius_1options_1, "drawFromCenter:radius:toCenter:radius:options:" },
-        { &sel_defaultFlatness, "defaultFlatness" },
-        { &sel_keepBackupFile, "keepBackupFile" },
-        { &sel_willChangeValueForKey_1, "willChangeValueForKey:" },
-        { &sel_initWithDateFormat_1allowNaturalLanguage_1, "initWithDateFormat:allowNaturalLanguage:" },
-        { &sel_textView_1writablePasteboardTypesForCell_1atIndex_1, "textView:writablePasteboardTypesForCell:atIndex:" },
-        { &sel_getTIFFCompressionTypes_1count_1, "getTIFFCompressionTypes:count:" },
-        { &sel_decodePropertyList, "decodePropertyList" },
-        { &sel_saveDocumentWithDelegate_1didSaveSelector_1contextInfo_1, "saveDocumentWithDelegate:didSaveSelector:contextInfo:" },
-        { &sel_encodePoint_1, "encodePoint:" },
-        { &sel_selectRow_1byExtendingSelection_1, "selectRow:byExtendingSelection:" },
-        { &sel_preservesContentDuringLiveResize, "preservesContentDuringLiveResize" },
-        { &sel_registerUndoWithTarget_1selector_1object_1, "registerUndoWithTarget:selector:object:" },
-        { &sel_removeCollection_1, "removeCollection:" },
-        { &sel_nextEventMatchingMask_1, "nextEventMatchingMask:" },
-        { &sel_getObjects_1andKeys_1, "getObjects:andKeys:" },
-        { &sel_EPSRepresentation, "EPSRepresentation" },
-        { &sel_isModalPanel, "isModalPanel" },
-        { &sel_statusCode, "statusCode" },
-        { &sel_setCopiesOnScroll_1, "setCopiesOnScroll:" },
-        { &sel_setHorizontalPagination_1, "setHorizontalPagination:" },
-        { &sel_removeAllIndexes, "removeAllIndexes" },
-        { &sel_download_1didFailWithError_1, "download:didFailWithError:" },
-        { &sel_modifierFlags, "modifierFlags" },
-        { &sel_draggedColumn, "draggedColumn" },
-        { &sel_initWithUser_1, "initWithUser:" },
-        { &sel_setLayoutRect_1forTextBlock_1glyphRange_1, "setLayoutRect:forTextBlock:glyphRange:" },
-        { &sel_selectionAffinity, "selectionAffinity" },
-        { &sel_beginParagraph, "beginParagraph" },
-        { &sel_runModalForTypes_1, "runModalForTypes:" },
-        { &sel_reloadCriteria, "reloadCriteria" },
-        { &sel_PDFOperationWithView_1insideRect_1toData_1printInfo_1, "PDFOperationWithView:insideRect:toData:printInfo:" },
-        { &sel_cellAtRow_1column_1, "cellAtRow:column:" },
-        { &sel_selectColumn_1byExtendingSelection_1, "selectColumn:byExtendingSelection:" },
-        { &sel_addresses, "addresses" },
-        { &sel_setCanBeVisibleOnAllSpaces_1, "setCanBeVisibleOnAllSpaces:" },
-        { &sel_bundleForSuite_1, "bundleForSuite:" },
-        { &sel_stringWithCharacters_1length_1, "stringWithCharacters:length:" },
-        { &sel_dataWithContentsOfURL_1options_1error_1, "dataWithContentsOfURL:options:error:" },
-        { &sel_isExpanded, "isExpanded" },
-        { &sel_rectForLayoutAtPoint_1inRect_1textContainer_1characterRange_1, "rectForLayoutAtPoint:inRect:textContainer:characterRange:" },
-        { &sel_initWithXMLString_1options_1error_1, "initWithXMLString:options:error:" },
-        { &sel_datePickerCell_1validateProposedDateValue_1timeInterval_1, "datePickerCell:validateProposedDateValue:timeInterval:" },
-        { &sel_replaceCharactersInRange_1withRTFD_1, "replaceCharactersInRange:withRTFD:" },
-        { &sel_setNeedsDisplay_1, "setNeedsDisplay:" },
-        { &sel_tableViewColumnDidMove_1, "tableViewColumnDidMove:" },
-        { &sel_printOperationWithView_1printInfo_1, "printOperationWithView:printInfo:" },
-        { &sel_parserDidStartDocument_1, "parserDidStartDocument:" },
-        { &sel_privateFrameworksPath, "privateFrameworksPath" },
-        { &sel_informativeText, "informativeText" },
-        { &sel_attributesAtIndex_1effectiveRange_1, "attributesAtIndex:effectiveRange:" },
-        { &sel_rectArrayForGlyphRange_1withinSelectedGlyphRange_1inTextContainer_1rectCount_1, "rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:" },
-        { &sel_swapWithMark_1, "swapWithMark:" },
-        { &sel_setDrawsGrid_1, "setDrawsGrid:" },
-        { &sel_highlight_1, "highlight:" },
-        { &sel_maximumLineHeight, "maximumLineHeight" },
-        { &sel_phonemesFromText_1, "phonemesFromText:" },
-        { &sel_convertSize_1fromView_1, "convertSize:fromView:" },
-        { &sel_setProperty_1withValue_1, "setProperty:withValue:" },
-        { &sel_cookieAcceptPolicy, "cookieAcceptPolicy" },
-        { &sel_hasThousandSeparators, "hasThousandSeparators" },
-        { &sel_setTighteningFactorForTruncation_1, "setTighteningFactorForTruncation:" },
-        { &sel_contextMenuRepresentation, "contextMenuRepresentation" },
-        { &sel_precomposedStringWithCompatibilityMapping, "precomposedStringWithCompatibilityMapping" },
-        { &sel_threadDictionary, "threadDictionary" },
-        { &sel_redoMenuTitleForUndoActionName_1, "redoMenuTitleForUndoActionName:" },
-        { &sel_setNumberOfVisibleItems_1, "setNumberOfVisibleItems:" },
-        { &sel_preferredLanguages, "preferredLanguages" },
-        { &sel_mouseDraggedOnCharacterIndex_1atCoordinate_1withModifier_1client_1, "mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:" },
-        { &sel_setMultiplier_1, "setMultiplier:" },
-        { &sel_sortedArrayUsingSelector_1, "sortedArrayUsingSelector:" },
-        { &sel_drawInRect_1, "drawInRect:" },
-        { &sel_reversedSortDescriptor, "reversedSortDescriptor" },
-        { &sel_setIdentifier_1, "setIdentifier:" },
-        { &sel_systemLocale, "systemLocale" },
-        { &sel_rulerView_1didMoveMarker_1, "rulerView:didMoveMarker:" },
-        { &sel_serviceConnectionWithName_1rootObject_1, "serviceConnectionWithName:rootObject:" },
-        { &sel_mouseDownCanMoveWindow, "mouseDownCanMoveWindow" },
-        { &sel_setMode_1, "setMode:" },
-        { &sel_rectOfTickMarkAtIndex_1, "rectOfTickMarkAtIndex:" },
-        { &sel_rangeOfCharacterFromSet_1, "rangeOfCharacterFromSet:" },
-        { &sel_pageUp_1, "pageUp:" },
-        { &sel_sendsWholeSearchString, "sendsWholeSearchString" },
-        { &sel_selectColumnIndexes_1byExtendingSelection_1, "selectColumnIndexes:byExtendingSelection:" },
-        { &sel_localizedCaseInsensitiveCompare_1, "localizedCaseInsensitiveCompare:" },
-        { &sel_isEqualToString_1, "isEqualToString:" },
-        { &sel_invalidateHashMarks, "invalidateHashMarks" },
-        { &sel_setInitialKey_1, "setInitialKey:" },
-        { &sel_setDividerStyle_1, "setDividerStyle:" },
-        { &sel_expressionForMinusSet_1with_1, "expressionForMinusSet:with:" },
-        { &sel_netService_1didNotPublish_1, "netService:didNotPublish:" },
-        { &sel_evaluatedReceivers, "evaluatedReceivers" },
-        { &sel_removeTabViewItem_1, "removeTabViewItem:" },
-        { &sel_initWithContainerClassDescription_1containerSpecifier_1key_1index_1, "initWithContainerClassDescription:containerSpecifier:key:index:" },
-        { &sel_predicateWithLeftExpression_1rightExpression_1customSelector_1, "predicateWithLeftExpression:rightExpression:customSelector:" },
-        { &sel_brownColor, "brownColor" },
-        { &sel_leafKeyPathForNode_1, "leafKeyPathForNode:" },
-        { &sel_drawBackgroundForGlyphRange_1atPoint_1, "drawBackgroundForGlyphRange:atPoint:" },
-        { &sel_rulerView_1willSetClientView_1, "rulerView:willSetClientView:" },
-        { &sel_className, "className" },
-        { &sel_runMode_1beforeDate_1, "runMode:beforeDate:" },
-        { &sel_applicationShouldTerminateAfterLastWindowClosed_1, "applicationShouldTerminateAfterLastWindowClosed:" },
-        { &sel_newDocument_1, "newDocument:" },
-        { &sel_arrayByAddingObject_1, "arrayByAddingObject:" },
-        { &sel_savePanel, "savePanel" },
-        { &sel_prefersTrackingUntilMouseUp, "prefersTrackingUntilMouseUp" },
-        { &sel_setLocations_1startingGlyphIndexes_1count_1forGlyphRange_1, "setLocations:startingGlyphIndexes:count:forGlyphRange:" },
-        { &sel_setListensInForegroundOnly_1, "setListensInForegroundOnly:" },
-        { &sel_initWithUnsignedShort_1, "initWithUnsignedShort:" },
-        { &sel_letterCharacterSet, "letterCharacterSet" },
-        { &sel_listensInForegroundOnly, "listensInForegroundOnly" },
-        { &sel_menu_1willHighlightItem_1, "menu:willHighlightItem:" },
-        { &sel_charactersIgnoringModifiers, "charactersIgnoringModifiers" },
-        { &sel_insertionContainer, "insertionContainer" },
-        { &sel_searchButtonRectForBounds_1, "searchButtonRectForBounds:" },
-        { &sel_accessibilitySetValue_1forAttribute_1, "accessibilitySetValue:forAttribute:" },
-        { &sel_setPathSeparator_1, "setPathSeparator:" },
-        { &sel_applicationWillResignActive_1, "applicationWillResignActive:" },
-        { &sel_scriptingIsLessThanOrEqualTo_1, "scriptingIsLessThanOrEqualTo:" },
-        { &sel_decodeValuesOfObjCTypes_1, "decodeValuesOfObjCTypes:" },
-        { &sel_setIntercellSpacing_1, "setIntercellSpacing:" },
-        { &sel_sharedSystemTypesetterForBehavior_1, "sharedSystemTypesetterForBehavior:" },
-        { &sel_drawFromPoint_1toPoint_1options_1, "drawFromPoint:toPoint:options:" },
-        { &sel_windowDidMove_1, "windowDidMove:" },
-        { &sel_setVisible_1, "setVisible:" },
-        { &sel_credentialWithUser_1password_1persistence_1, "credentialWithUser:password:persistence:" },
-        { &sel_decomposedStringWithCanonicalMapping, "decomposedStringWithCanonicalMapping" },
-        { &sel_openFile_1withApplication_1andDeactivate_1, "openFile:withApplication:andDeactivate:" },
-        { &sel_convertRectToBase_1, "convertRectToBase:" },
-        { &sel_outputStreamToMemory, "outputStreamToMemory" },
-        { &sel_autorepeat, "autorepeat" },
-        { &sel_servicesMenu, "servicesMenu" },
-        { &sel_beginGrouping, "beginGrouping" },
-        { &sel_setNilValueForKey_1, "setNilValueForKey:" },
-        { &sel_usesFontLeading, "usesFontLeading" },
-        { &sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1, "lineFragmentRectForGlyphAtIndex:effectiveRange:" },
-        { &sel_takeStringValueFrom_1, "takeStringValueFrom:" },
-        { &sel_fontDescriptorByAddingAttributes_1, "fontDescriptorByAddingAttributes:" },
-        { &sel_startTrackingAt_1inView_1, "startTrackingAt:inView:" },
-        { &sel_application_1delegateHandlesKey_1, "application:delegateHandlesKey:" },
-        { &sel_stringByExpandingTildeInPath, "stringByExpandingTildeInPath" },
-        { &sel_menu, "menu" },
-        { &sel_setMinute_1, "setMinute:" },
-        { &sel_startSubelementIdentifier, "startSubelementIdentifier" },
-        { &sel_waitForDataInBackgroundAndNotifyForModes_1, "waitForDataInBackgroundAndNotifyForModes:" },
-        { &sel_removeCachedResponseForRequest_1, "removeCachedResponseForRequest:" },
-        { &sel_attributeForLocalName_1URI_1, "attributeForLocalName:URI:" },
-        { &sel_saveDocumentAs_1, "saveDocumentAs:" },
-        { &sel_containerIsObjectBeingTested, "containerIsObjectBeingTested" },
-        { &sel_mouseDownOnCharacterIndex_1atCoordinate_1withModifier_1client_1, "mouseDownOnCharacterIndex:atCoordinate:withModifier:client:" },
-        { &sel_setPosition_1ofDividerAtIndex_1, "setPosition:ofDividerAtIndex:" },
-        { &sel_terminationStatus, "terminationStatus" },
-        { &sel_imageWidth, "imageWidth" },
-        { &sel_accessoryView, "accessoryView" },
-        { &sel_outlineView_1shouldTrackCell_1forTableColumn_1item_1, "outlineView:shouldTrackCell:forTableColumn:item:" },
-        { &sel_initWithLevelIndicatorStyle_1, "initWithLevelIndicatorStyle:" },
-        { &sel_deltaX, "deltaX" },
-        { &sel_valueForUndefinedKey_1, "valueForUndefinedKey:" },
-        { &sel_mainDocumentURL, "mainDocumentURL" },
-        { &sel_position, "position" },
-        { &sel_animates, "animates" },
-        { &sel_addTabViewItem_1, "addTabViewItem:" },
-        { &sel_unlockFocus, "unlockFocus" },
-        { &sel_download_1didCreateDestination_1, "download:didCreateDestination:" },
-        { &sel_defaults, "defaults" },
-        { &sel_viewWillDraw, "viewWillDraw" },
-        { &sel_findApplications, "findApplications" },
-        { &sel_unbind_1, "unbind:" },
-        { &sel_positionOfGlyph_1withRelation_1toBaseGlyph_1totalAdvancement_1metricsExist_1, "positionOfGlyph:withRelation:toBaseGlyph:totalAdvancement:metricsExist:" },
-        { &sel_isGreaterThan_1, "isGreaterThan:" },
-        { &sel_dataWithPDFInsideRect_1, "dataWithPDFInsideRect:" },
-        { &sel_setAttributedTitle_1, "setAttributedTitle:" },
-        { &sel_expressionType, "expressionType" },
-        { &sel_tokenFieldCell_1shouldAddObjects_1atIndex_1, "tokenFieldCell:shouldAddObjects:atIndex:" },
-        { &sel_removeEventHandlerForEventClass_1andEventID_1, "removeEventHandlerForEventClass:andEventID:" },
-        { &sel_postNotification_1, "postNotification:" },
-        { &sel_indexOfTabViewItem_1, "indexOfTabViewItem:" },
-        { &sel_outlineView_1shouldSelectItem_1, "outlineView:shouldSelectItem:" },
-        { &sel_setSegmentStyle_1, "setSegmentStyle:" },
-        { &sel_stateImageRectForBounds_1, "stateImageRectForBounds:" },
-        { &sel_setContentAspectRatio_1, "setContentAspectRatio:" },
-        { &sel_instantiateNibWithOwner_1topLevelObjects_1, "instantiateNibWithOwner:topLevelObjects:" },
-        { &sel_setPrototype_1, "setPrototype:" },
-        { &sel_allowsMultipleSelection, "allowsMultipleSelection" },
-        { &sel_setRecentSearches_1, "setRecentSearches:" },
-        { &sel_setTypingAttributes_1, "setTypingAttributes:" },
-        { &sel_observeValueForKeyPath_1ofObject_1change_1context_1, "observeValueForKeyPath:ofObject:change:context:" },
-        { &sel_performDragOperation_1, "performDragOperation:" },
-        { &sel_processingInstructionWithName_1stringValue_1, "processingInstructionWithName:stringValue:" },
-        { &sel_initWithKind_1options_1, "initWithKind:options:" },
-        { &sel_instancesRespondToSelector_1, "instancesRespondToSelector:" },
-        { &sel_keyEquivalentFont, "keyEquivalentFont" },
-        { &sel_calendarIdentifier, "calendarIdentifier" },
-        { &sel_source, "source" },
-        { &sel_shouldBeTreatedAsInkEvent_1, "shouldBeTreatedAsInkEvent:" },
-        { &sel_queuePriority, "queuePriority" },
-        { &sel_autoresizesAllColumnsToFit, "autoresizesAllColumnsToFit" },
-        { &sel_outlineView_1shouldCollapseItem_1, "outlineView:shouldCollapseItem:" },
-        { &sel_dragImage_1at_1offset_1event_1pasteboard_1source_1slideBack_1, "dragImage:at:offset:event:pasteboard:source:slideBack:" },
-        { &sel_sender, "sender" },
-        { &sel_numberOfColumns, "numberOfColumns" },
-        { &sel_indexPathWithIndex_1, "indexPathWithIndex:" },
-        { &sel_setPreferredFontNames_1, "setPreferredFontNames:" },
-        { &sel_windowDidEndSheet_1, "windowDidEndSheet:" },
-        { &sel_capHeight, "capHeight" },
-        { &sel_matchingFontDescriptorWithMandatoryKeys_1, "matchingFontDescriptorWithMandatoryKeys:" },
-        { &sel_finalize, "finalize" },
-        { &sel_prepareForDragOperation_1, "prepareForDragOperation:" },
-        { &sel_setCellAttribute_1to_1, "setCellAttribute:to:" },
-        { &sel_metadataQuery_1replacementValueForAttribute_1value_1, "metadataQuery:replacementValueForAttribute:value:" },
-        { &sel_hueComponent, "hueComponent" },
-        { &sel_maxValue, "maxValue" },
-        { &sel_soundUnfilteredTypes, "soundUnfilteredTypes" },
-        { &sel_setFileAttributes_1, "setFileAttributes:" },
-        { &sel_valueLists, "valueLists" },
-        { &sel_breakLock, "breakLock" },
-        { &sel_selectCellWithTag_1, "selectCellWithTag:" },
-        { &sel_setMovable_1, "setMovable:" },
-        { &sel_synchronizeFile, "synchronizeFile" },
-        { &sel_setVerticallyResizable_1, "setVerticallyResizable:" },
-        { &sel_setButtonBordered_1, "setButtonBordered:" },
-        { &sel_useOptimizedDrawing_1, "useOptimizedDrawing:" },
-        { &sel_tryLockWhenCondition_1, "tryLockWhenCondition:" },
-        { &sel_textContainer, "textContainer" },
-        { &sel_setValueListAttributes_1, "setValueListAttributes:" },
-        { &sel_rangeOfCharacterFromSet_1options_1, "rangeOfCharacterFromSet:options:" },
-        { &sel_dragFile_1fromRect_1slideBack_1event_1, "dragFile:fromRect:slideBack:event:" },
-        { &sel_tickMarkPosition, "tickMarkPosition" },
-        { &sel_addRunLoop_1, "addRunLoop:" },
-        { &sel_dataWithCapacity_1, "dataWithCapacity:" },
-        { &sel_removeVolatileDomainForName_1, "removeVolatileDomainForName:" },
-        { &sel_signal, "signal" },
-        { &sel_progressMarks, "progressMarks" },
-        { &sel_unhide_1, "unhide:" },
-        { &sel_provideNewButtonImage, "provideNewButtonImage" },
-        { &sel_connectionWithRegisteredName_1host_1usingNameServer_1, "connectionWithRegisteredName:host:usingNameServer:" },
-        { &sel_localizesFormat, "localizesFormat" },
-        { &sel_lineScroll, "lineScroll" },
-        { &sel_initDirectoryWithFileWrappers_1, "initDirectoryWithFileWrappers:" },
-        { &sel_wantsToInterpretAllKeystrokes, "wantsToInterpretAllKeystrokes" },
-        { &sel_convertPointToBase_1, "convertPointToBase:" },
-        { &sel_keyWithAppleEventCode_1, "keyWithAppleEventCode:" },
-        { &sel_loadSuiteWithDictionary_1fromBundle_1, "loadSuiteWithDictionary:fromBundle:" },
-        { &sel_automaticallyPreparesContent, "automaticallyPreparesContent" },
-        { &sel_cornerRadius, "cornerRadius" },
-        { &sel_sharedScriptExecutionContext, "sharedScriptExecutionContext" },
-        { &sel_setPoolCountHighWaterResolution_1, "setPoolCountHighWaterResolution:" },
-        { &sel_appendBezierPath_1, "appendBezierPath:" },
-        { &sel_appleEventClassCode, "appleEventClassCode" },
-        { &sel_initTextCell_1pullsDown_1, "initTextCell:pullsDown:" },
-        { &sel_numberOfTickMarks, "numberOfTickMarks" },
-        { &sel_setIndependentConversationQueueing_1, "setIndependentConversationQueueing:" },
-        { &sel_extendPowerOffBy_1, "extendPowerOffBy:" },
-        { &sel_isCollecting, "isCollecting" },
-        { &sel_canInsert, "canInsert" },
-        { &sel_valuePointerFunctions, "valuePointerFunctions" },
-        { &sel_sizeValue, "sizeValue" },
-        { &sel_openOnEdge_1, "openOnEdge:" },
-        { &sel_rectOfItemAtIndex_1, "rectOfItemAtIndex:" },
-        { &sel_booleanForKey_1inTable_1, "booleanForKey:inTable:" },
-        { &sel_showHelp_1, "showHelp:" },
-        { &sel_heightTracksTextView, "heightTracksTextView" },
-        { &sel_hasTitleBar, "hasTitleBar" },
-        { &sel_setViewAnimations_1, "setViewAnimations:" },
-        { &sel_updateSpellingPanelWithGrammarString_1detail_1, "updateSpellingPanelWithGrammarString:detail:" },
-        { &sel_showsToolbarButton, "showsToolbarButton" },
-        { &sel_environment, "environment" },
-        { &sel_matchesAppleEventCode_1, "matchesAppleEventCode:" },
-        { &sel_hasPrefix_1, "hasPrefix:" },
-        { &sel_hasUnappliedChanges, "hasUnappliedChanges" },
-        { &sel_setName_1, "setName:" },
-        { &sel_isMovableByWindowBackground, "isMovableByWindowBackground" },
-        { &sel_printerNames, "printerNames" },
-        { &sel_initWithDictionary_1, "initWithDictionary:" },
-        { &sel_stringByStandardizingPath, "stringByStandardizingPath" },
-        { &sel_usesUserKeyEquivalents, "usesUserKeyEquivalents" },
-        { &sel_drawStateImageWithFrame_1inView_1, "drawStateImageWithFrame:inView:" },
-        { &sel_openUntitledDocumentAndDisplay_1error_1, "openUntitledDocumentAndDisplay:error:" },
-        { &sel_lastVisibleColumn, "lastVisibleColumn" },
-        { &sel_paste_1, "paste:" },
-        { &sel_indexOfItemWithRepresentedObject_1, "indexOfItemWithRepresentedObject:" },
-        { &sel_supportsCommand_1, "supportsCommand:" },
-        { &sel_scrollPageUp_1, "scrollPageUp:" },
-        { &sel_draggedImage_1endedAt_1deposited_1, "draggedImage:endedAt:deposited:" },
-        { &sel_setPositiveInfinitySymbol_1, "setPositiveInfinitySymbol:" },
-        { &sel_noteFileSystemChanged_1, "noteFileSystemChanged:" },
-        { &sel_moveRight_1, "moveRight:" },
-        { &sel_arrowPosition, "arrowPosition" },
-        { &sel_setMenuRepresentation_1, "setMenuRepresentation:" },
-        { &sel_endLoadInBackground, "endLoadInBackground" },
-        { &sel_smartInsertBeforeStringForString_1replacingRange_1, "smartInsertBeforeStringForString:replacingRange:" },
-        { &sel_openUntitledDocumentOfType_1display_1, "openUntitledDocumentOfType:display:" },
-        { &sel_scriptingValueForSpecifier_1, "scriptingValueForSpecifier:" },
-        { &sel_setShowsSuppressionButton_1, "setShowsSuppressionButton:" },
-        { &sel_resizeLeftCursor, "resizeLeftCursor" },
-        { &sel_setDefaultCredential_1forProtectionSpace_1, "setDefaultCredential:forProtectionSpace:" },
-        { &sel_systemTabletID, "systemTabletID" },
-        { &sel_unlock, "unlock" },
-        { &sel_mostCompatibleStringEncoding, "mostCompatibleStringEncoding" },
-        { &sel_glyphName, "glyphName" },
-        { &sel_center, "center" },
-        { &sel_setJobTitle_1, "setJobTitle:" },
-        { &sel_cancelButtonCell, "cancelButtonCell" },
-        { &sel_namespaceForPrefix_1, "namespaceForPrefix:" },
-        { &sel_browserWillScroll_1, "browserWillScroll:" },
-        { &sel_initWithCompoundTypes_1, "initWithCompoundTypes:" },
-        { &sel_setPaddingCharacter_1, "setPaddingCharacter:" },
-        { &sel_image_1willLoadRepresentation_1, "image:willLoadRepresentation:" },
-        { &sel_pasteRuler_1, "pasteRuler:" },
-        { &sel_drawGlyphsForGlyphRange_1atPoint_1, "drawGlyphsForGlyphRange:atPoint:" },
-        { &sel_PMPrintSession, "PMPrintSession" },
-        { &sel_setDefaultButtonCell_1, "setDefaultButtonCell:" },
-        { &sel_printerTypes, "printerTypes" },
-        { &sel_findString_1inBook_1, "findString:inBook:" },
-        { &sel_executablePath, "executablePath" },
-        { &sel_components_1fromDate_1toDate_1options_1, "components:fromDate:toDate:options:" },
-        { &sel_displayValuesForRow_1, "displayValuesForRow:" },
-        { &sel_pageLayout, "pageLayout" },
-        { &sel_resizeFlags, "resizeFlags" },
-        { &sel_DTDNodeWithXMLString_1, "DTDNodeWithXMLString:" },
-        { &sel_replyToOpenOrPrint_1, "replyToOpenOrPrint:" },
-        { &sel_insertTab_1, "insertTab:" },
-        { &sel_documents, "documents" },
-        { &sel_tagForSegment_1, "tagForSegment:" },
-        { &sel_initForURL_1withContentsOfURL_1ofType_1error_1, "initForURL:withContentsOfURL:ofType:error:" },
-        { &sel_initWithRoundingMode_1scale_1raiseOnExactness_1raiseOnOverflow_1raiseOnUnderflow_1raiseOnDivideByZero_1, "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:" },
-        { &sel_addIndexes_1, "addIndexes:" },
-        { &sel_setAttributeRuns_1, "setAttributeRuns:" },
-        { &sel_splitView_1additionalEffectiveRectOfDividerAtIndex_1, "splitView:additionalEffectiveRectOfDividerAtIndex:" },
-        { &sel_writeSelectionToPasteboard_1type_1, "writeSelectionToPasteboard:type:" },
-        { &sel_day, "day" },
-        { &sel_numberOfRowsInTableView_1, "numberOfRowsInTableView:" },
-        { &sel_insertCompletion_1forPartialWordRange_1movement_1isFinal_1, "insertCompletion:forPartialWordRange:movement:isFinal:" },
-        { &sel_notPredicateWithSubpredicate_1, "notPredicateWithSubpredicate:" },
-        { &sel_rootProxyForConnectionWithRegisteredName_1host_1, "rootProxyForConnectionWithRegisteredName:host:" },
-        { &sel_stopSpeakingAtBoundary_1, "stopSpeakingAtBoundary:" },
-        { &sel_pathsMatchingExtensions_1, "pathsMatchingExtensions:" },
-        { &sel_caseInsensitiveCompare_1, "caseInsensitiveCompare:" },
-        { &sel_labelFontOfSize_1, "labelFontOfSize:" },
-        { &sel_createDirectoryAtPath_1attributes_1, "createDirectoryAtPath:attributes:" },
-        { &sel_initListDescriptor, "initListDescriptor" },
-        { &sel_setParagraphSpacing_1, "setParagraphSpacing:" },
-        { &sel_getColor_1location_1atIndex_1, "getColor:location:atIndex:" },
-        { &sel_pointerArrayWithOptions_1, "pointerArrayWithOptions:" },
-        { &sel_guessesForWord_1, "guessesForWord:" },
-        { &sel_searchTextRectForBounds_1, "searchTextRectForBounds:" },
-        { &sel_allowsColumnReordering, "allowsColumnReordering" },
-        { &sel_isMainThread, "isMainThread" },
-        { &sel_accessibilityAttributeNames, "accessibilityAttributeNames" },
-        { &sel_saveOptions, "saveOptions" },
-        { &sel_setAutomaticallyPreparesContent_1, "setAutomaticallyPreparesContent:" },
-        { &sel_setGridColor_1, "setGridColor:" },
-        { &sel_textAttributesForNegativeInfinity, "textAttributesForNegativeInfinity" },
-        { &sel_decimalDigitCharacterSet, "decimalDigitCharacterSet" },
-        { &sel_removeObserver_1name_1object_1, "removeObserver:name:object:" },
-        { &sel_columnContentWidthForColumnWidth_1, "columnContentWidthForColumnWidth:" },
-        { &sel_wraps, "wraps" },
-        { &sel_getIndexes_1maxCount_1inIndexRange_1, "getIndexes:maxCount:inIndexRange:" },
-        { &sel_doubleAction, "doubleAction" },
-        { &sel_layoutParagraphAtPoint_1, "layoutParagraphAtPoint:" },
-        { &sel_cacheDisplayInRect_1toBitmapImageRep_1, "cacheDisplayInRect:toBitmapImageRep:" },
-        { &sel_setUsesItemFromMenu_1, "setUsesItemFromMenu:" },
-        { &sel_parserError, "parserError" },
-        { &sel_numberOfMajorTickMarks, "numberOfMajorTickMarks" },
-        { &sel_changeFont_1, "changeFont:" },
-        { &sel_displaysWhenScreenProfileChanges, "displaysWhenScreenProfileChanges" },
-        { &sel_titleBaseWritingDirection, "titleBaseWritingDirection" },
-        { &sel_columnAtPoint_1, "columnAtPoint:" },
-        { &sel_setAppliesImmediately_1, "setAppliesImmediately:" },
-        { &sel_addAccessoryController_1, "addAccessoryController:" },
-        { &sel_setEditable_1, "setEditable:" },
-        { &sel_moveRulerlineFromLocation_1toLocation_1, "moveRulerlineFromLocation:toLocation:" },
-        { &sel_runModal, "runModal" },
-        { &sel_selectionShouldChangeInTableView_1, "selectionShouldChangeInTableView:" },
-        { &sel_dragSelectionWithEvent_1offset_1slideBack_1, "dragSelectionWithEvent:offset:slideBack:" },
-        { &sel_rootProxy, "rootProxy" },
-        { &sel_brightnessComponent, "brightnessComponent" },
-        { &sel_setLabel_1forSegment_1, "setLabel:forSegment:" },
-        { &sel_copy, "copy" },
-        { &sel_helpRequested_1, "helpRequested:" },
-        { &sel_setThreadPriority_1, "setThreadPriority:" },
-        { &sel_minContentSize, "minContentSize" },
-        { &sel_setShowsProgressPanel_1, "setShowsProgressPanel:" },
-        { &sel_setMessageText_1, "setMessageText:" },
-        { &sel_setLayoutAlgorithm_1, "setLayoutAlgorithm:" },
-        { &sel_setInContext_1, "setInContext:" },
-        { &sel_resultCount, "resultCount" },
-        { &sel_usesDataSource, "usesDataSource" },
-        { &sel_textLists, "textLists" },
-        { &sel_setSelectedRange_1affinity_1stillSelecting_1, "setSelectedRange:affinity:stillSelecting:" },
-        { &sel_shouldResolveExternalEntities, "shouldResolveExternalEntities" },
-        { &sel_clientView, "clientView" },
-        { &sel_styleMask, "styleMask" },
-        { &sel_setCurrencyCode_1, "setCurrencyCode:" },
-        { &sel_methodReturnType, "methodReturnType" },
-        { &sel_dataUsingEncoding_1, "dataUsingEncoding:" },
-        { &sel_removeTabStop_1, "removeTabStop:" },
-        { &sel_reloadItem_1reloadChildren_1, "reloadItem:reloadChildren:" },
-        { &sel_ancestorSharedWithView_1, "ancestorSharedWithView:" },
-        { &sel_indexLessThanOrEqualToIndex_1, "indexLessThanOrEqualToIndex:" },
-        { &sel_removeAllActionsWithTarget_1, "removeAllActionsWithTarget:" },
-        { &sel_subtype, "subtype" },
-        { &sel_imageRectForPaper_1, "imageRectForPaper:" },
-        { &sel_initWithWindow_1rect_1, "initWithWindow:rect:" },
-        { &sel_enable, "enable" },
-        { &sel_scanInteger_1, "scanInteger:" },
-        { &sel_initWithContentsOfURL_1encoding_1error_1, "initWithContentsOfURL:encoding:error:" },
-        { &sel_removeObjectIdenticalTo_1, "removeObjectIdenticalTo:" },
-        { &sel_createTexture_1fromView_1internalFormat_1, "createTexture:fromView:internalFormat:" },
-        { &sel_decimalNumberByRaisingToPower_1withBehavior_1, "decimalNumberByRaisingToPower:withBehavior:" },
-        { &sel_appendBezierPathWithArcWithCenter_1radius_1startAngle_1endAngle_1, "appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:" },
-        { &sel_fontPanel_1, "fontPanel:" },
-        { &sel_predicateWithSubpredicates_1, "predicateWithSubpredicates:" },
-        { &sel_layoutGlyphsInLayoutManager_1startingAtGlyphIndex_1maxNumberOfLineFragments_1nextGlyphIndex_1, "layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:" },
-        { &sel_attributes, "attributes" },
-        { &sel_EPSOperationWithView_1insideRect_1toData_1, "EPSOperationWithView:insideRect:toData:" },
-        { &sel_listOptions, "listOptions" },
-        { &sel_windowWillLoad, "windowWillLoad" },
-        { &sel_alwaysShowsDecimalSeparator, "alwaysShowsDecimalSeparator" },
-        { &sel_replyToApplicationShouldTerminate_1, "replyToApplicationShouldTerminate:" },
-        { &sel_setThousandSeparator_1, "setThousandSeparator:" },
-        { &sel_insertObject_1atArrangedObjectIndexPath_1, "insertObject:atArrangedObjectIndexPath:" },
-        { &sel_cleanUpOperation, "cleanUpOperation" },
-        { &sel_trackMouse_1inRect_1ofView_1untilMouseUp_1, "trackMouse:inRect:ofView:untilMouseUp:" },
-        { &sel_replaceLayoutManager_1, "replaceLayoutManager:" },
-        { &sel_isPartialStringValid_1proposedSelectedRange_1originalString_1originalSelectedRange_1errorDescription_1, "isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:" },
-        { &sel_setNegativeFormat_1, "setNegativeFormat:" },
-        { &sel_copyFont_1, "copyFont:" },
-        { &sel_outlineView_1sortDescriptorsDidChange_1, "outlineView:sortDescriptorsDidChange:" },
-        { &sel_stringWithString_1, "stringWithString:" },
-        { &sel_valueWithUniqueID_1inPropertyWithKey_1, "valueWithUniqueID:inPropertyWithKey:" },
-        { &sel_setHighlightsBy_1, "setHighlightsBy:" },
-        { &sel_setContinuousSpellCheckingEnabled_1, "setContinuousSpellCheckingEnabled:" },
-        { &sel_isMouseCoalescingEnabled, "isMouseCoalescingEnabled" },
-        { &sel_numberOfSelectedColumns, "numberOfSelectedColumns" },
-        { &sel_spellServer_1findMisspelledWordInString_1language_1wordCount_1countOnly_1, "spellServer:findMisspelledWordInString:language:wordCount:countOnly:" },
-        { &sel_PMPageFormat, "PMPageFormat" },
-        { &sel_insertText_1client_1, "insertText:client:" },
-        { &sel_numberWithFloat_1, "numberWithFloat:" },
-        { &sel_compositeToPoint_1fromRect_1operation_1, "compositeToPoint:fromRect:operation:" },
-        { &sel_numberOfPlanes, "numberOfPlanes" },
-        { &sel_childrenKeyPath, "childrenKeyPath" },
-        { &sel_countForObject_1, "countForObject:" },
-        { &sel_fontWithName_1matrix_1, "fontWithName:matrix:" },
-        { &sel_toolbarAllowedItemIdentifiers_1, "toolbarAllowedItemIdentifiers:" },
-        { &sel_makeDocumentWithContentsOfURL_1ofType_1, "makeDocumentWithContentsOfURL:ofType:" },
-        { &sel_initWithHTML_1options_1documentAttributes_1, "initWithHTML:options:documentAttributes:" },
-        { &sel_fileSystemRepresentation, "fileSystemRepresentation" },
-        { &sel_viewAnimations, "viewAnimations" },
-        { &sel_tabletProximity_1, "tabletProximity:" },
-        { &sel_replacementClassForClass_1, "replacementClassForClass:" },
-        { &sel_columnWidthForColumnContentWidth_1, "columnWidthForColumnContentWidth:" },
-        { &sel_undoMenuItemTitle, "undoMenuItemTitle" },
-        { &sel_expressionForAggregate_1, "expressionForAggregate:" },
-        { &sel_useStoredAccessor, "useStoredAccessor" },
-        { &sel_ensureAttributesAreFixedInRange_1, "ensureAttributesAreFixedInRange:" },
-        { &sel_stringForType_1, "stringForType:" },
-        { &sel_setLeaf_1, "setLeaf:" },
-        { &sel_URLFromPasteboard_1, "URLFromPasteboard:" },
-        { &sel_initWithURL_1byReference_1, "initWithURL:byReference:" },
-        { &sel_readToEndOfFileInBackgroundAndNotify, "readToEndOfFileInBackgroundAndNotify" },
-        { &sel_application_1openFileWithoutUI_1, "application:openFileWithoutUI:" },
-        { &sel_performClick_1, "performClick:" },
-        { &sel_completes, "completes" },
-        { &sel_setRulersVisible_1, "setRulersVisible:" },
-        { &sel_minimumSize, "minimumSize" },
-        { &sel_setProperty_1forKey_1inRequest_1, "setProperty:forKey:inRequest:" },
-        { &sel_isCopyingOperation, "isCopyingOperation" },
-        { &sel_allowsTickMarkValuesOnly, "allowsTickMarkValuesOnly" },
-        { &sel_insertGlyphs_1length_1forStartingGlyphAtIndex_1characterIndex_1, "insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:" },
-        { &sel_convertFont_1, "convertFont:" },
-        { &sel_setNegativePrefix_1, "setNegativePrefix:" },
-        { &sel_dispatch, "dispatch" },
-        { &sel_makeNewConnection_1sender_1, "makeNewConnection:sender:" },
-        { &sel_writeToFile_1atomically_1encoding_1error_1, "writeToFile:atomically:encoding:error:" },
-        { &sel_isHiddenOrHasHiddenAncestor, "isHiddenOrHasHiddenAncestor" },
-        { &sel_endEditingFor_1, "endEditingFor:" },
-        { &sel_acceptConnectionInBackgroundAndNotify, "acceptConnectionInBackgroundAndNotify" },
-        { &sel_setValue_1forHTTPHeaderField_1, "setValue:forHTTPHeaderField:" },
-        { &sel_intersectSet_1, "intersectSet:" },
-        { &sel_tabView_1shouldSelectTabViewItem_1, "tabView:shouldSelectTabViewItem:" },
-        { &sel_mouseDragged_1, "mouseDragged:" },
-        { &sel_dataFromRange_1documentAttributes_1error_1, "dataFromRange:documentAttributes:error:" },
-        { &sel_sharedFrameworksPath, "sharedFrameworksPath" },
-        { &sel_tableView_1writeRowsWithIndexes_1toPasteboard_1, "tableView:writeRowsWithIndexes:toPasteboard:" },
-        { &sel_setWindowFrameForAttachingToRect_1onScreen_1preferredEdge_1popUpSelectedItem_1, "setWindowFrameForAttachingToRect:onScreen:preferredEdge:popUpSelectedItem:" },
-        { &sel_valueAtIndex_1inPropertyWithKey_1, "valueAtIndex:inPropertyWithKey:" },
-        { &sel_setDisplaysLinkToolTips_1, "setDisplaysLinkToolTips:" },
-        { &sel_removeObserver_1forKeyPath_1, "removeObserver:forKeyPath:" },
-        { &sel_hasAlpha, "hasAlpha" },
-        { &sel_scrollCellToVisibleAtRow_1column_1, "scrollCellToVisibleAtRow:column:" },
-        { &sel_activateIgnoringOtherApps_1, "activateIgnoringOtherApps:" },
-        { &sel_getArgumentTypeAtIndex_1, "getArgumentTypeAtIndex:" },
-        { &sel_textShouldEndEditing_1, "textShouldEndEditing:" },
-        { &sel_nextEventMatchingMask_1untilDate_1inMode_1dequeue_1, "nextEventMatchingMask:untilDate:inMode:dequeue:" },
-        { &sel_timeIntervalSince1970, "timeIntervalSince1970" },
-        { &sel_decimalNumberBySubtracting_1, "decimalNumberBySubtracting:" },
-        { &sel_sendBeforeDate_1, "sendBeforeDate:" },
-        { &sel_autohidesScrollers, "autohidesScrollers" },
-        { &sel_controlPointBounds, "controlPointBounds" },
-        { &sel_setMinimumSignificantDigits_1, "setMinimumSignificantDigits:" },
-        { &sel_setDestination_1allowOverwrite_1, "setDestination:allowOverwrite:" },
-        { &sel_setTransparent_1, "setTransparent:" },
-        { &sel_decodeArrayOfObjCType_1count_1at_1, "decodeArrayOfObjCType:count:at:" },
-        { &sel_isMiniaturized, "isMiniaturized" },
-        { &sel_setAlignment_1, "setAlignment:" },
-        { &sel_setCornerRadius_1, "setCornerRadius:" },
-        { &sel_foregroundColor, "foregroundColor" },
-        { &sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1, "lineFragmentUsedRectForGlyphAtIndex:effectiveRange:" },
-        { &sel_attributedSubStringFromRange_1, "attributedSubStringFromRange:" },
-        { &sel_isSubsetOfSet_1, "isSubsetOfSet:" },
-        { &sel_iconForFileType_1, "iconForFileType:" },
-        { &sel_readFromURL_1ofType_1, "readFromURL:ofType:" },
-        { &sel_decodeBytesForKey_1returnedLength_1, "decodeBytesForKey:returnedLength:" },
-        { &sel_parser_1foundInternalEntityDeclarationWithName_1value_1, "parser:foundInternalEntityDeclarationWithName:value:" },
-        { &sel_commonPrefixWithString_1options_1, "commonPrefixWithString:options:" },
-        { &sel_tableView_1setObjectValue_1forTableColumn_1row_1, "tableView:setObjectValue:forTableColumn:row:" },
-        { &sel_fileWrapperRepresentationOfType_1, "fileWrapperRepresentationOfType:" },
-        { &sel_representedFilename, "representedFilename" },
-        { &sel_eventWithCGEvent_1, "eventWithCGEvent:" },
-        { &sel_setFileURL_1, "setFileURL:" },
-        { &sel_loadWindow, "loadWindow" },
-        { &sel_defaultLineJoinStyle, "defaultLineJoinStyle" },
-        { &sel_backingLocation, "backingLocation" },
-        { &sel_matrix, "matrix" },
-        { &sel_isEqualToTimeZone_1, "isEqualToTimeZone:" },
-        { &sel_statistics, "statistics" },
-        { &sel_launchAppWithBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifier_1, "launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier:" },
-        { &sel_isHorizontal, "isHorizontal" },
-        { &sel_launchPath, "launchPath" },
-        { &sel_setTextAlignment_1, "setTextAlignment:" },
-        { &sel_initWithBitmapDataPlanes_1pixelsWide_1pixelsHigh_1bitsPerSample_1samplesPerPixel_1hasAlpha_1isPlanar_1colorSpaceName_1bytesPerRow_1bitsPerPixel_1, "initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:" },
-        { &sel_setPatternPhase_1, "setPatternPhase:" },
-        { &sel_mouseEntered_1withFrame_1inView_1, "mouseEntered:withFrame:inView:" },
-        { &sel_matchingFontDescriptorsWithMandatoryKeys_1, "matchingFontDescriptorsWithMandatoryKeys:" },
-        { &sel_objectDidEndEditing_1, "objectDidEndEditing:" },
-        { &sel_setMaximum_1, "setMaximum:" },
-        { &sel_initWithIndexes_1length_1, "initWithIndexes:length:" },
-        { &sel_tableView_1shouldShowCellExpansionForTableColumn_1row_1, "tableView:shouldShowCellExpansionForTableColumn:row:" },
-        { &sel_moveToPoint_1, "moveToPoint:" },
-        { &sel_setGridStyleMask_1, "setGridStyleMask:" },
-        { &sel_firstUnlaidGlyphIndex, "firstUnlaidGlyphIndex" },
-        { &sel_isProxy, "isProxy" },
-        { &sel_takeValue_1forKeyPath_1, "takeValue:forKeyPath:" },
-        { &sel_drawCellAtRow_1column_1, "drawCellAtRow:column:" },
-        { &sel_setRulerViewClass_1, "setRulerViewClass:" },
-        { &sel_objectByApplyingXSLT_1arguments_1error_1, "objectByApplyingXSLT:arguments:error:" },
-        { &sel_setArrowPosition_1, "setArrowPosition:" },
-        { &sel_setCharacterIndex_1forGlyphAtIndex_1, "setCharacterIndex:forGlyphAtIndex:" },
-        { &sel_willChangeValueForKey_1withSetMutation_1usingObjects_1, "willChangeValueForKey:withSetMutation:usingObjects:" },
-        { &sel_setVerticalRulerView_1, "setVerticalRulerView:" },
-        { &sel_suspendCurrentAppleEvent, "suspendCurrentAppleEvent" },
-        { &sel_drawStatusBarBackgroundInRect_1withHighlight_1, "drawStatusBarBackgroundInRect:withHighlight:" },
-        { &sel_performClickWithFrame_1inView_1, "performClickWithFrame:inView:" },
-        { &sel_coveredCharacterSet, "coveredCharacterSet" },
-        { &sel_browser_1numberOfRowsInColumn_1, "browser:numberOfRowsInColumn:" },
-        { &sel_isLike_1, "isLike:" },
-        { &sel_blackComponent, "blackComponent" },
-        { &sel_appendBezierPathWithGlyph_1inFont_1, "appendBezierPathWithGlyph:inFont:" },
-        { &sel_validateMenuItem_1, "validateMenuItem:" },
-        { &sel_isEqualToIndexSet_1, "isEqualToIndexSet:" },
-        { &sel_setBezelStyle_1, "setBezelStyle:" },
-        { &sel_scaleUnitSquareToSize_1, "scaleUnitSquareToSize:" },
-        { &sel_setStartSubelementIndex_1, "setStartSubelementIndex:" },
-        { &sel_frameOfInsideOfColumn_1, "frameOfInsideOfColumn:" },
-        { &sel_setBlocksOtherRecognizers_1, "setBlocksOtherRecognizers:" },
-        { &sel_setMinSize_1, "setMinSize:" },
-        { &sel_setEndSubelementIndex_1, "setEndSubelementIndex:" },
-        { &sel_cStringLength, "cStringLength" },
-        { &sel_writeWithBackupToFile_1ofType_1saveOperation_1, "writeWithBackupToFile:ofType:saveOperation:" },
-        { &sel_setDefaultButtonTitle_1, "setDefaultButtonTitle:" },
-        { &sel_setMinContentSize_1, "setMinContentSize:" },
-        { &sel_setFormattingDictionary_1, "setFormattingDictionary:" },
-        { &sel_boundingRectForFont, "boundingRectForFont" },
-        { &sel_postsBoundsChangedNotifications, "postsBoundsChangedNotifications" },
-        { &sel_setParagraphs_1, "setParagraphs:" },
-        { &sel_setShowsControlCharacters_1, "setShowsControlCharacters:" },
-        { &sel_writeSafelyToURL_1ofType_1forSaveOperation_1error_1, "writeSafelyToURL:ofType:forSaveOperation:error:" },
-        { &sel_controlLightHighlightColor, "controlLightHighlightColor" },
-        { &sel_objectSpecifier, "objectSpecifier" },
-        { &sel_dictionaryWithContentsOfURL_1, "dictionaryWithContentsOfURL:" },
-        { &sel_performSelector_1onThread_1withObject_1waitUntilDone_1modes_1, "performSelector:onThread:withObject:waitUntilDone:modes:" },
-        { &sel_setJobStyleHint_1, "setJobStyleHint:" },
-        { &sel_sortedArrayUsingFunction_1context_1, "sortedArrayUsingFunction:context:" },
-        { &sel_setBoundsRect_1forTextBlock_1glyphRange_1, "setBoundsRect:forTextBlock:glyphRange:" },
-        { &sel_hasShadow, "hasShadow" },
-        { &sel_windowShouldClose_1, "windowShouldClose:" },
-        { &sel_defaultTokenizingCharacterSet, "defaultTokenizingCharacterSet" },
-        { &sel_isRulerVisible, "isRulerVisible" },
-        { &sel_setSubrowsKeyPath_1, "setSubrowsKeyPath:" },
-        { &sel_animationDelay, "animationDelay" },
-        { &sel_selectAll_1, "selectAll:" },
-        { &sel_parser_1foundNotationDeclarationWithName_1publicID_1systemID_1, "parser:foundNotationDeclarationWithName:publicID:systemID:" },
-        { &sel_readSelectionFromPasteboard_1, "readSelectionFromPasteboard:" },
-        { &sel_validateAndReturnError_1, "validateAndReturnError:" },
-        { &sel_setScriptErrorOffendingObjectDescriptor_1, "setScriptErrorOffendingObjectDescriptor:" },
-        { &sel_makeKeyWindow, "makeKeyWindow" },
-        { &sel_itemAtIndex_1, "itemAtIndex:" },
-        { &sel_objectAtIndex_1, "objectAtIndex:" },
-        { &sel_protectionSpace, "protectionSpace" },
-        { &sel_getCString_1, "getCString:" },
-        { &sel_initSymbolicLinkWithDestination_1, "initSymbolicLinkWithDestination:" },
-        { &sel_daylightSavingTimeOffset, "daylightSavingTimeOffset" },
-        { &sel_rangeOfTextList_1atIndex_1, "rangeOfTextList:atIndex:" },
-        { &sel_currentDirectory, "currentDirectory" },
-        { &sel_windowControllerDidLoadNib_1, "windowControllerDidLoadNib:" },
-        { &sel_setGroupingSize_1, "setGroupingSize:" },
-        { &sel_subitems, "subitems" },
-        { &sel_initWithFileWrapper_1, "initWithFileWrapper:" },
-        { &sel_documentVisibleRect, "documentVisibleRect" },
-        { &sel_setCount_1, "setCount:" },
-        { &sel_setScriptErrorExpectedTypeDescriptor_1, "setScriptErrorExpectedTypeDescriptor:" },
-        { &sel_setReleasedWhenClosed_1, "setReleasedWhenClosed:" },
-        { &sel_imageUnfilteredTypes, "imageUnfilteredTypes" },
-        { &sel_writeToFile_1options_1error_1, "writeToFile:options:error:" },
-        { &sel_controlContentFontOfSize_1, "controlContentFontOfSize:" },
-        { &sel_insertRow_1withCells_1, "insertRow:withCells:" },
-        { &sel_temporaryAttributesAtCharacterIndex_1effectiveRange_1, "temporaryAttributesAtCharacterIndex:effectiveRange:" },
-        { &sel_stepForward_1, "stepForward:" },
-        { &sel_convertScreenToBase_1, "convertScreenToBase:" },
-        { &sel_printerWithType_1, "printerWithType:" },
-        { &sel_setSliderType_1, "setSliderType:" },
-        { &sel_applicationShouldHandleReopen_1hasVisibleWindows_1, "applicationShouldHandleReopen:hasVisibleWindows:" },
-        { &sel_selectedTextAttributes, "selectedTextAttributes" },
-        { &sel_setStandardError_1, "setStandardError:" },
-        { &sel_drawRect_1, "drawRect:" },
-        { &sel_URLs, "URLs" },
-        { &sel_animationForKey_1, "animationForKey:" },
-        { &sel_setSubviews_1, "setSubviews:" },
-        { &sel_setString_1, "setString:" },
-        { &sel_openFile_1fromImage_1at_1inView_1, "openFile:fromImage:at:inView:" },
-        { &sel_draggedImage, "draggedImage" },
-        { &sel_numberOfGlyphs, "numberOfGlyphs" },
-        { &sel_itemAtRow_1, "itemAtRow:" },
-        { &sel_drawKnob, "drawKnob" },
-        { &sel_imageRepsWithData_1, "imageRepsWithData:" },
-        { &sel_dragOperationForDraggingInfo_1type_1, "dragOperationForDraggingInfo:type:" },
-        { &sel_initWithRTF_1documentAttributes_1, "initWithRTF:documentAttributes:" },
-        { &sel_pathsForResourcesOfType_1inDirectory_1, "pathsForResourcesOfType:inDirectory:" },
-        { &sel_fontName, "fontName" },
-        { &sel_layoutManagers, "layoutManagers" },
-        { &sel_error, "error" },
-        { &sel_parentWindow, "parentWindow" },
-        { &sel_registerClass_1, "registerClass:" },
-        { &sel_hideOtherApplications, "hideOtherApplications" },
-        { &sel_alphaComponent, "alphaComponent" },
-        { &sel_setPrefersColorMatch_1, "setPrefersColorMatch:" },
-        { &sel_stopAnimation_1, "stopAnimation:" },
-        { &sel_glyphIndexForCharacterAtIndex_1, "glyphIndexForCharacterAtIndex:" },
-        { &sel_rulerView_1shouldAddMarker_1, "rulerView:shouldAddMarker:" },
-        { &sel_initWithFrame_1, "initWithFrame:" },
-        { &sel_init, "init" },
-        { &sel_selectedColumnEnumerator, "selectedColumnEnumerator" },
-        { &sel_viewWithTag_1, "viewWithTag:" },
-        { &sel_classForKeyedUnarchiver, "classForKeyedUnarchiver" },
-        { &sel_addRow_1, "addRow:" },
-        { &sel_contextHelpForObject_1, "contextHelpForObject:" },
-        { &sel_server, "server" },
-        { &sel_colorUsingColorSpaceName_1device_1, "colorUsingColorSpaceName:device:" },
-        { &sel_valueTransformerForName_1, "valueTransformerForName:" },
-        { &sel_soundUnfilteredFileTypes, "soundUnfilteredFileTypes" },
-        { &sel_setSelectedTextAttributes_1, "setSelectedTextAttributes:" },
-        { &sel_setLeadingOffset_1, "setLeadingOffset:" },
-        { &sel_scrollToPoint_1, "scrollToPoint:" },
-        { &sel_lastPathComponent, "lastPathComponent" },
-        { &sel_lossyCString, "lossyCString" },
-        { &sel_registerServicesMenuSendTypes_1returnTypes_1, "registerServicesMenuSendTypes:returnTypes:" },
-        { &sel_keyDown_1, "keyDown:" },
-        { &sel_setWidthTracksTextView_1, "setWidthTracksTextView:" },
-        { &sel_incrementBy_1, "incrementBy:" },
-        { &sel_moveWordForward_1, "moveWordForward:" },
-        { &sel_dataWithContentsOfMappedFile_1, "dataWithContentsOfMappedFile:" },
-        { &sel_socket, "socket" },
-        { &sel_EPSOperationWithView_1insideRect_1toData_1printInfo_1, "EPSOperationWithView:insideRect:toData:printInfo:" },
-        { &sel_width, "width" },
-        { &sel_capabilityMask, "capabilityMask" },
-        { &sel_setBezeled_1, "setBezeled:" },
-        { &sel_currentMode, "currentMode" },
-        { &sel_sliderType, "sliderType" },
-        { &sel_fileIsAppendOnly, "fileIsAppendOnly" },
-        { &sel_isAutomaticLinkDetectionEnabled, "isAutomaticLinkDetectionEnabled" },
-        { &sel_setBoundsOrigin_1, "setBoundsOrigin:" },
-        { &sel_selectionHighlightStyle, "selectionHighlightStyle" },
-        { &sel_registerName_1, "registerName:" },
-        { &sel_moveWordRightAndModifySelection_1, "moveWordRightAndModifySelection:" },
-        { &sel_setCharacters_1, "setCharacters:" },
-        { &sel_setWordFieldStringValue_1, "setWordFieldStringValue:" },
-        { &sel_reverseObjectEnumerator, "reverseObjectEnumerator" },
-        { &sel_encodeByrefObject_1, "encodeByrefObject:" },
-        { &sel_defaultDecimalNumberHandler, "defaultDecimalNumberHandler" },
-        { &sel_isEntryAcceptable_1, "isEntryAcceptable:" },
-        { &sel_orderWindow_1relativeTo_1, "orderWindow:relativeTo:" },
-        { &sel_writablePasteboardTypes, "writablePasteboardTypes" },
-        { &sel_addTrackingRect_1owner_1userData_1assumeInside_1, "addTrackingRect:owner:userData:assumeInside:" },
-        { &sel_setPathComponentCells_1, "setPathComponentCells:" },
-        { &sel_timeZoneWithName_1, "timeZoneWithName:" },
-        { &sel_setAutosaveTableColumns_1, "setAutosaveTableColumns:" },
-        { &sel_orPredicateWithSubpredicates_1, "orPredicateWithSubpredicates:" },
-        { &sel_isEqualToDictionary_1, "isEqualToDictionary:" },
-        { &sel_bottomMargin, "bottomMargin" },
-        { &sel_initWithYear_1month_1day_1hour_1minute_1second_1timeZone_1, "initWithYear:month:day:hour:minute:second:timeZone:" },
-        { &sel_scrollColumnsLeftBy_1, "scrollColumnsLeftBy:" },
-        { &sel_initWithContentsOfURL_1error_1, "initWithContentsOfURL:error:" },
-        { &sel_setTabViewType_1, "setTabViewType:" },
-        { &sel_initWithFloat_1, "initWithFloat:" },
-        { &sel_attributedStringForObjectValue_1withDefaultAttributes_1, "attributedStringForObjectValue:withDefaultAttributes:" },
-        { &sel_sharedGlyphGenerator, "sharedGlyphGenerator" },
-        { &sel_maximumRangeOfUnit_1, "maximumRangeOfUnit:" },
-        { &sel_docFormatFromRange_1documentAttributes_1, "docFormatFromRange:documentAttributes:" },
-        { &sel_initWithBitmapImageRep_1, "initWithBitmapImageRep:" },
-        { &sel_mnemonic, "mnemonic" },
-        { &sel_prefersColorMatch, "prefersColorMatch" },
-        { &sel_fileSystemAttributesAtPath_1, "fileSystemAttributesAtPath:" },
-        { &sel_rotateByRadians_1, "rotateByRadians:" },
-        { &sel_createConversationForConnection_1, "createConversationForConnection:" },
-        { &sel_setWindow_1, "setWindow:" },
-        { &sel_addFontDescriptors_1toCollection_1, "addFontDescriptors:toCollection:" },
-        { &sel_setMark_1, "setMark:" },
-        { &sel_terminate, "terminate" },
-        { &sel_setTickMarkPosition_1, "setTickMarkPosition:" },
-        { &sel_setIgnoresMouseEvents_1, "setIgnoresMouseEvents:" },
-        { &sel_pointerArrayWithStrongObjects, "pointerArrayWithStrongObjects" },
-        { &sel_intersectsHashTable_1, "intersectsHashTable:" },
-        { &sel_initWithTransform_1, "initWithTransform:" },
-        { &sel_deviceRGBColorSpace, "deviceRGBColorSpace" },
-        { &sel_currentDiskUsage, "currentDiskUsage" },
-        { &sel_writeToFile_1ofType_1, "writeToFile:ofType:" },
-        { &sel_unionSet_1, "unionSet:" },
-        { &sel_bitmapFormat, "bitmapFormat" },
-        { &sel_moveItemAtPath_1toPath_1error_1, "moveItemAtPath:toPath:error:" },
-        { &sel_tableView, "tableView" },
-        { &sel_performSelectorOnMainThread_1withObject_1waitUntilDone_1modes_1, "performSelectorOnMainThread:withObject:waitUntilDone:modes:" },
-        { &sel_initAndTestWithTests_1, "initAndTestWithTests:" },
-        { &sel_setVerticalMotionCanBeginDrag_1, "setVerticalMotionCanBeginDrag:" },
-        { &sel_documentClassNames, "documentClassNames" },
-        { &sel_setShadow_1, "setShadow:" },
-        { &sel_beginLineWithGlyphAtIndex_1, "beginLineWithGlyphAtIndex:" },
-        { &sel_predicateWithSubstitutionVariables_1, "predicateWithSubstitutionVariables:" },
-        { &sel_EPSOperationWithView_1insideRect_1toPath_1printInfo_1, "EPSOperationWithView:insideRect:toPath:printInfo:" },
-        { &sel_startSubelementIndex, "startSubelementIndex" },
-        { &sel_sleepUntilDate_1, "sleepUntilDate:" },
-        { &sel_menuForEvent_1, "menuForEvent:" },
-        { &sel_disabledControlTextColor, "disabledControlTextColor" },
-        { &sel_addRegularFileWithContents_1preferredFilename_1, "addRegularFileWithContents:preferredFilename:" },
-        { &sel_setTakesTitleFromPreviousColumn_1, "setTakesTitleFromPreviousColumn:" },
-        { &sel_removeSelectionIndexes_1, "removeSelectionIndexes:" },
-        { &sel_resizedColumn, "resizedColumn" },
-        { &sel_host, "host" },
-        { &sel_setDefaultAttachmentScaling_1, "setDefaultAttachmentScaling:" },
-        { &sel_boundingRectWithSize_1options_1, "boundingRectWithSize:options:" },
-        { &sel_magentaColor, "magentaColor" },
-        { &sel_performDefaultImplementation, "performDefaultImplementation" },
-        { &sel_getPeriodicDelay_1interval_1, "getPeriodicDelay:interval:" },
-        { &sel_RTFFromRange_1, "RTFFromRange:" },
-        { &sel_setStringValue_1, "setStringValue:" },
-        { &sel_setPaletteLabel_1, "setPaletteLabel:" },
-        { &sel_years_1months_1days_1hours_1minutes_1seconds_1sinceDate_1, "years:months:days:hours:minutes:seconds:sinceDate:" },
-        { &sel_initWithFormat_1arguments_1, "initWithFormat:arguments:" },
-        { &sel_firstUnlaidCharacterIndex, "firstUnlaidCharacterIndex" },
-        { &sel_panelSelectionDidChange_1, "panelSelectionDidChange:" },
-        { &sel_typesFilterableTo_1, "typesFilterableTo:" },
-        { &sel_selectPreviousTabViewItem_1, "selectPreviousTabViewItem:" },
-        { &sel_URLProtocol_1didReceiveResponse_1cacheStoragePolicy_1, "URLProtocol:didReceiveResponse:cacheStoragePolicy:" },
-        { &sel_loadView, "loadView" },
-        { &sel_setPositiveSuffix_1, "setPositiveSuffix:" },
-        { &sel_setSizeMode_1, "setSizeMode:" },
-        { &sel_addValue_1forHTTPHeaderField_1, "addValue:forHTTPHeaderField:" },
-        { &sel_replacementObjectForPortCoder_1, "replacementObjectForPortCoder:" },
-        { &sel_cycleToNextInputLanguage_1, "cycleToNextInputLanguage:" },
-        { &sel_setContentMinSize_1, "setContentMinSize:" },
-        { &sel_convertWeight_1ofFont_1, "convertWeight:ofFont:" },
-        { &sel_code, "code" },
-        { &sel_TIFFRepresentationUsingCompression_1factor_1, "TIFFRepresentationUsingCompression:factor:" },
-        { &sel_setSelector_1, "setSelector:" },
-        { &sel_URLHandleResourceDidCancelLoading_1, "URLHandleResourceDidCancelLoading:" },
-        { &sel_setTag_1forSegment_1, "setTag:forSegment:" },
-        { &sel_viewFrameChanged_1, "viewFrameChanged:" },
-        { &sel_attachmentCell, "attachmentCell" },
-        { &sel_removeStatusItem_1, "removeStatusItem:" },
-        { &sel_pathForAuxiliaryExecutable_1, "pathForAuxiliaryExecutable:" },
-        { &sel_fileURL, "fileURL" },
-        { &sel_drawerShouldOpen_1, "drawerShouldOpen:" },
-        { &sel_initForWritingWithMutableData_1, "initForWritingWithMutableData:" },
-        { &sel_content, "content" },
-        { &sel_addSubview_1, "addSubview:" },
-        { &sel_stringByReplacingOccurrencesOfString_1withString_1, "stringByReplacingOccurrencesOfString:withString:" },
-        { &sel_stringWithFileSystemRepresentation_1length_1, "stringWithFileSystemRepresentation:length:" },
-        { &sel_isVerticallyCentered, "isVerticallyCentered" },
-        { &sel_setVerticallyCentered_1, "setVerticallyCentered:" },
-        { &sel_selectPrevious_1, "selectPrevious:" },
-        { &sel_addTemporaryAttributes_1forCharacterRange_1, "addTemporaryAttributes:forCharacterRange:" },
-        { &sel_tabState, "tabState" },
-        { &sel_defaultQueue, "defaultQueue" },
-        { &sel_showsControlCharacters, "showsControlCharacters" },
-        { &sel_indexOfObject_1, "indexOfObject:" },
-        { &sel_shadow, "shadow" },
-        { &sel_fontMenu_1, "fontMenu:" },
-        { &sel_movePath_1toPath_1handler_1, "movePath:toPath:handler:" },
-        { &sel_setDictionary_1, "setDictionary:" },
-        { &sel_verticalLineScroll, "verticalLineScroll" },
-        { &sel_showsAlpha, "showsAlpha" },
-        { &sel_removeObserver_1, "removeObserver:" },
-        { &sel_isFieldEditor, "isFieldEditor" },
-        { &sel_fileHandleForWriting, "fileHandleForWriting" },
-        { &sel_contentsAtPath_1, "contentsAtPath:" },
-        { &sel_writeProperty_1forKey_1, "writeProperty:forKey:" },
-        { &sel_drawWithRect_1options_1attributes_1, "drawWithRect:options:attributes:" },
-        { &sel_initWithName_1, "initWithName:" },
-        { &sel_getFileSystemInfoForPath_1isRemovable_1isWritable_1isUnmountable_1description_1type_1, "getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:" },
-        { &sel_setOpenGLContext_1, "setOpenGLContext:" },
-        { &sel_hasSubmenu, "hasSubmenu" },
-        { &sel_rangeOfTextTable_1atIndex_1, "rangeOfTextTable:atIndex:" },
-        { &sel_connection_1willCacheResponse_1, "connection:willCacheResponse:" },
-        { &sel_automaticallyRearrangesObjects, "automaticallyRearrangesObjects" },
-        { &sel_registerCommandDescription_1, "registerCommandDescription:" },
-        { &sel_indexOfSelectedItem, "indexOfSelectedItem" },
-        { &sel_underline_1, "underline:" },
-        { &sel_beginModalSessionForWindow_1relativeToWindow_1, "beginModalSessionForWindow:relativeToWindow:" },
-        { &sel_initWithData_1options_1documentAttributes_1error_1, "initWithData:options:documentAttributes:error:" },
-        { &sel_revert_1, "revert:" },
-        { &sel_displayableSubpredicatesOfPredicate_1, "displayableSubpredicatesOfPredicate:" },
-        { &sel_dataWithData_1, "dataWithData:" },
-        { &sel_scaleXBy_1yBy_1, "scaleXBy:yBy:" },
-        { &sel_decodeBoolForKey_1, "decodeBoolForKey:" },
-        { &sel_itemTitles, "itemTitles" },
-        { &sel_removeFontDescriptor_1fromCollection_1, "removeFontDescriptor:fromCollection:" },
-        { &sel_isContinuousSpellCheckingEnabled, "isContinuousSpellCheckingEnabled" },
-        { &sel_paragraphSpacingBeforeGlyphAtIndex_1withProposedLineFragmentRect_1, "paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:" },
-        { &sel_ignoreSpelling_1, "ignoreSpelling:" },
-        { &sel_crosshairCursor, "crosshairCursor" },
-        { &sel_setSelected_1, "setSelected:" },
-        { &sel_RTFDFromRange_1, "RTFDFromRange:" },
-        { &sel_setCanSelectHiddenExtension_1, "setCanSelectHiddenExtension:" },
-        { &sel_setNestingMode_1, "setNestingMode:" },
-        { &sel_addItemsWithObjectValues_1, "addItemsWithObjectValues:" },
-        { &sel_setContentFilters_1, "setContentFilters:" },
-        { &sel_setAutorepeat_1, "setAutorepeat:" },
-        { &sel_resizeWithOldSuperviewSize_1, "resizeWithOldSuperviewSize:" },
-        { &sel_areCursorRectsEnabled, "areCursorRectsEnabled" },
-        { &sel_browser_1selectCellWithString_1inColumn_1, "browser:selectCellWithString:inColumn:" },
-        { &sel_setLastColumn_1, "setLastColumn:" },
-        { &sel_isContextHelpModeActive, "isContextHelpModeActive" },
-        { &sel_setTitleColor_1, "setTitleColor:" },
-        { &sel_initWithBytes_1length_1, "initWithBytes:length:" },
-        { &sel_animation_1valueForProgress_1, "animation:valueForProgress:" },
-        { &sel_fillColor, "fillColor" },
-        { &sel_completionsForPartialWordRange_1inString_1language_1inSpellDocumentWithTag_1, "completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:" },
-        { &sel_typeForContentsOfURL_1error_1, "typeForContentsOfURL:error:" },
-        { &sel_setShowPanels_1, "setShowPanels:" },
-        { &sel_outlineView_1dataCellForTableColumn_1item_1, "outlineView:dataCellForTableColumn:item:" },
-        { &sel_setLineJoinStyle_1, "setLineJoinStyle:" },
-        { &sel_cancelPerformSelectorsWithTarget_1, "cancelPerformSelectorsWithTarget:" },
-        { &sel_nextDaylightSavingTimeTransition, "nextDaylightSavingTimeTransition" },
-        { &sel_setEndSubelementIdentifier_1, "setEndSubelementIdentifier:" },
-        { &sel_channelMapping, "channelMapping" },
-        { &sel_setTitle_1ofColumn_1, "setTitle:ofColumn:" },
-        { &sel_setHeaderToolTip_1, "setHeaderToolTip:" },
-        { &sel_initWithChar_1, "initWithChar:" },
-        { &sel_shouldReportNamespacePrefixes, "shouldReportNamespacePrefixes" },
-        { &sel_decomposedStringWithCompatibilityMapping, "decomposedStringWithCompatibilityMapping" },
-        { &sel_undoActionName, "undoActionName" },
-        { &sel_attachColorList_1, "attachColorList:" },
-        { &sel_cancelPreviousPerformRequestsWithTarget_1, "cancelPreviousPerformRequestsWithTarget:" },
-        { &sel_addToolTipRect_1owner_1userData_1, "addToolTipRect:owner:userData:" },
-        { &sel_isOptionalArgumentWithName_1, "isOptionalArgumentWithName:" },
-        { &sel_fileHandleForReading, "fileHandleForReading" },
-        { &sel_removeConnection_1fromRunLoop_1forMode_1, "removeConnection:fromRunLoop:forMode:" },
-        { &sel_controlTextDidBeginEditing_1, "controlTextDidBeginEditing:" },
-        { &sel_closePath, "closePath" },
-        { &sel_isPlaying, "isPlaying" },
-        { &sel_matrixClass, "matrixClass" },
-        { &sel_doCommandBySelector_1client_1, "doCommandBySelector:client:" },
-        { &sel_appendBytes_1length_1, "appendBytes:length:" },
-        { &sel_lightGrayColor, "lightGrayColor" },
-        { &sel_menuRepresentation, "menuRepresentation" },
-        { &sel_dateWithString_1calendarFormat_1, "dateWithString:calendarFormat:" },
-        { &sel_decodeClassName_1asClassName_1, "decodeClassName:asClassName:" },
-        { &sel_deleteToBeginningOfParagraph_1, "deleteToBeginningOfParagraph:" },
-        { &sel_runModalForDirectory_1file_1, "runModalForDirectory:file:" },
-        { &sel_inverseForRelationshipKey_1, "inverseForRelationshipKey:" },
-        { &sel_cancelLoadInBackground, "cancelLoadInBackground" },
-        { &sel_setLeftMargin_1, "setLeftMargin:" },
-        { &sel_tabStopType, "tabStopType" },
-        { &sel_replaceCharactersInRange_1withRTF_1, "replaceCharactersInRange:withRTF:" },
-        { &sel_drawInRect_1fromRect_1operation_1fraction_1, "drawInRect:fromRect:operation:fraction:" },
-        { &sel_sound, "sound" },
-        { &sel_localizedRecoverySuggestion, "localizedRecoverySuggestion" },
-        { &sel_getInputStream_1outputStream_1, "getInputStream:outputStream:" },
-        { &sel_defaultType, "defaultType" },
-        { &sel_sharedFontPanel, "sharedFontPanel" },
-        { &sel_fixParagraphStyleAttributeInRange_1, "fixParagraphStyleAttributeInRange:" },
-        { &sel_textColor, "textColor" },
-        { &sel_noteFileSystemChanged, "noteFileSystemChanged" },
-        { &sel_setObject_1forKey_1, "setObject:forKey:" },
-        { &sel_drawAtPoint_1, "drawAtPoint:" },
-        { &sel_tableView_1shouldSelectTableColumn_1, "tableView:shouldSelectTableColumn:" },
-        { &sel_deleteWordBackward_1, "deleteWordBackward:" },
-        { &sel_pipe, "pipe" },
-        { &sel_resetStandardUserDefaults, "resetStandardUserDefaults" },
-        { &sel_orderFrontSpacingPanel_1, "orderFrontSpacingPanel:" },
-        { &sel_setUsesFontPanel_1, "setUsesFontPanel:" },
-        { &sel_saveToURL_1ofType_1forSaveOperation_1delegate_1didSaveSelector_1contextInfo_1, "saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:" },
-        { &sel_linkPath_1toPath_1handler_1, "linkPath:toPath:handler:" },
-        { &sel_addTimeInterval_1, "addTimeInterval:" },
-        { &sel_formattingDictionary, "formattingDictionary" },
-        { &sel_ignoresMultiClick, "ignoresMultiClick" },
-        { &sel_encodeValuesOfObjCTypes_1, "encodeValuesOfObjCTypes:" },
-        { &sel_indexAtPosition_1, "indexAtPosition:" },
-        { &sel_autoresizesSubviews, "autoresizesSubviews" },
-        { &sel_takesTitleFromPreviousColumn, "takesTitleFromPreviousColumn" },
-        { &sel_titlePosition, "titlePosition" },
-        { &sel_currentAppleEvent, "currentAppleEvent" },
-        { &sel_valueForDimension_1, "valueForDimension:" },
-        { &sel_printDocumentWithSettings_1showPrintPanel_1delegate_1didPrintSelector_1contextInfo_1, "printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:" },
-        { &sel_isZoomable, "isZoomable" },
-        { &sel_setNeedsDisplay, "setNeedsDisplay" },
-        { &sel_initWithColors_1, "initWithColors:" },
-        { &sel_isSubclassOfClass_1, "isSubclassOfClass:" },
-        { &sel_adobeRGB1998ColorSpace, "adobeRGB1998ColorSpace" },
-        { &sel_textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1, "textView:willChangeSelectionFromCharacterRange:toCharacterRange:" },
-        { &sel_useAllLigatures_1, "useAllLigatures:" },
-        { &sel_setFrameUsingName_1force_1, "setFrameUsingName:force:" },
-        { &sel_percentSymbol, "percentSymbol" },
-        { &sel_addRepresentations_1, "addRepresentations:" },
-        { &sel_writeEPSInsideRect_1toPasteboard_1, "writeEPSInsideRect:toPasteboard:" },
-        { &sel_systemFontSize, "systemFontSize" },
-        { &sel_canRemoveAllRows, "canRemoveAllRows" },
-        { &sel_endLineWithGlyphRange_1, "endLineWithGlyphRange:" },
-        { &sel_maxItemSize, "maxItemSize" },
-        { &sel_setImageScaling_1forSegment_1, "setImageScaling:forSegment:" },
-        { &sel_reloadDefaultFontFamilies, "reloadDefaultFontFamilies" },
-        { &sel_removeRow_1, "removeRow:" },
-        { &sel_contentSize, "contentSize" },
-        { &sel_setValueTransformer_1forName_1, "setValueTransformer:forName:" },
-        { &sel_defaultCStringEncoding, "defaultCStringEncoding" },
-        { &sel_setMaxNumberOfRows_1, "setMaxNumberOfRows:" },
-        { &sel_continueWithoutCredentialForAuthenticationChallenge_1, "continueWithoutCredentialForAuthenticationChallenge:" },
-        { &sel_encodeArrayOfObjCType_1count_1at_1, "encodeArrayOfObjCType:count:at:" },
-        { &sel_tabStops, "tabStops" },
-        { &sel_altIncrementValue, "altIncrementValue" },
-        { &sel_removeAttribute_1range_1, "removeAttribute:range:" },
-        { &sel_rightExpressionAttributeType, "rightExpressionAttributeType" },
-        { &sel_setAutoresizesAllColumnsToFit_1, "setAutoresizesAllColumnsToFit:" },
-        { &sel_removeAllToolTips, "removeAllToolTips" },
-        { &sel_setNotANumberSymbol_1, "setNotANumberSymbol:" },
-        { &sel_setMinWidth_1, "setMinWidth:" },
-        { &sel_setDefaultTimeZone_1, "setDefaultTimeZone:" },
-        { &sel_setTabStops_1, "setTabStops:" },
-        { &sel_textView_1draggedCell_1inRect_1event_1, "textView:draggedCell:inRect:event:" },
-        { &sel_PDFOperationWithView_1insideRect_1toData_1, "PDFOperationWithView:insideRect:toData:" },
-        { &sel_outlineView_1selectionIndexesForProposedSelection_1, "outlineView:selectionIndexesForProposedSelection:" },
-        { &sel_initWithContentsOfURL_1, "initWithContentsOfURL:" },
-        { &sel_setBidiProcessingEnabled_1, "setBidiProcessingEnabled:" },
-        { &sel_selectToMark_1, "selectToMark:" },
-        { &sel_newlineCharacterSet, "newlineCharacterSet" },
-        { &sel_accessibilitySetOverrideValue_1forAttribute_1, "accessibilitySetOverrideValue:forAttribute:" },
-        { &sel_setPostsFrameChangedNotifications_1, "setPostsFrameChangedNotifications:" },
-        { &sel_cellPrototype, "cellPrototype" },
-        { &sel_unmarkText, "unmarkText" },
-        { &sel_displayValuesKeyPath, "displayValuesKeyPath" },
-        { &sel_orderFrontStylesPanel_1, "orderFrontStylesPanel:" },
-        { &sel_getBuffer_1length_1, "getBuffer:length:" },
-        { &sel_calcDrawInfo_1, "calcDrawInfo:" },
-        { &sel_initWithUTF8String_1, "initWithUTF8String:" },
-        { &sel_deselectAllCells, "deselectAllCells" },
-        { &sel_checkGrammarOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1details_1, "checkGrammarOfString:startingAt:language:wrap:inSpellDocumentWithTag:details:" },
-        { &sel_poolCountHighWaterResolution, "poolCountHighWaterResolution" },
-        { &sel_canInitWithData_1, "canInitWithData:" },
-        { &sel_setHasVerticalScroller_1, "setHasVerticalScroller:" },
-        { &sel_flushHostCache, "flushHostCache" },
-        { &sel_toolbarDefaultItemIdentifiers_1, "toolbarDefaultItemIdentifiers:" },
-        { &sel_setSearchButtonCell_1, "setSearchButtonCell:" },
-        { &sel_defaultButtonCell, "defaultButtonCell" },
-        { &sel_sizeLastColumnToFit, "sizeLastColumnToFit" },
-        { &sel_addColumn, "addColumn" },
-        { &sel_failureResponse, "failureResponse" },
-        { &sel_insertTabIgnoringFieldEditor_1, "insertTabIgnoringFieldEditor:" },
-        { &sel_locationForGlyphAtIndex_1, "locationForGlyphAtIndex:" },
-        { &sel_insertContainerBreak_1, "insertContainerBreak:" },
-        { &sel_setAutosizesCells_1, "setAutosizesCells:" },
-        { &sel_isEditable, "isEditable" },
-        { &sel_path, "path" },
-        { &sel_setStringValue_1resolvingEntities_1, "setStringValue:resolvingEntities:" },
-        { &sel_readFileContentsType_1toFile_1, "readFileContentsType:toFile:" },
-        { &sel_fileExtensionHidden, "fileExtensionHidden" },
-        { &sel_setTextureImageToPixelBuffer_1colorBuffer_1, "setTextureImageToPixelBuffer:colorBuffer:" },
-        { &sel_setFilename_1, "setFilename:" },
-        { &sel_callStackReturnAddresses, "callStackReturnAddresses" },
-        { &sel_blocksOtherRecognizers, "blocksOtherRecognizers" },
-        { &sel_pixelBuffer, "pixelBuffer" },
-        { &sel_initWithStartingColor_1endingColor_1, "initWithStartingColor:endingColor:" },
-        { &sel_indexOfObjectIdenticalTo_1inRange_1, "indexOfObjectIdenticalTo:inRange:" },
-        { &sel_duration, "duration" },
-        { &sel_matchForPredicate_1, "matchForPredicate:" },
-        { &sel_windowDidMiniaturize_1, "windowDidMiniaturize:" },
-        { &sel_drawWithFrame_1inView_1characterIndex_1layoutManager_1, "drawWithFrame:inView:characterIndex:layoutManager:" },
-        { &sel_setTwoDigitStartDate_1, "setTwoDigitStartDate:" },
-        { &sel_selectTextAtRow_1column_1, "selectTextAtRow:column:" },
-        { &sel_splitView_1shouldHideDividerAtIndex_1, "splitView:shouldHideDividerAtIndex:" },
-        { &sel_isExcludedFromWindowsMenu, "isExcludedFromWindowsMenu" },
-        { &sel_earlierDate_1, "earlierDate:" },
-        { &sel_initWithLeftExpressions_1rightExpressionAttributeType_1modifier_1operators_1options_1, "initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:" },
-        { &sel_minItemSize, "minItemSize" },
-        { &sel_setSearchMenuTemplate_1, "setSearchMenuTemplate:" },
-        { &sel_rightMouseUp_1, "rightMouseUp:" },
-        { &sel_stopSpeaking_1, "stopSpeaking:" },
-        { &sel_getObjectValue_1forString_1errorDescription_1, "getObjectValue:forString:errorDescription:" },
-        { &sel_unarchiver_1didDecodeObject_1, "unarchiver:didDecodeObject:" },
-        { &sel_endSpecifier, "endSpecifier" },
-        { &sel_ascending, "ascending" },
-        { &sel_sharedCoercionHandler, "sharedCoercionHandler" },
-        { &sel_textAttributesForPositiveInfinity, "textAttributesForPositiveInfinity" },
-        { &sel_isEqualToData_1, "isEqualToData:" },
-        { &sel_setHighlightMode_1, "setHighlightMode:" },
-        { &sel_valueWithNonretainedObject_1, "valueWithNonretainedObject:" },
-        { &sel_textAttributesForNotANumber, "textAttributesForNotANumber" },
-        { &sel_getCFRunLoop, "getCFRunLoop" },
-        { &sel_invalidateGlyphsForCharacterRange_1changeInLength_1actualCharacterRange_1, "invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:" },
-        { &sel_cachedResponse, "cachedResponse" },
-        { &sel_containerIsRangeContainerObject, "containerIsRangeContainerObject" },
-        { &sel_setLanguage_1, "setLanguage:" },
-        { &sel_loadNibFile_1externalNameTable_1withZone_1, "loadNibFile:externalNameTable:withZone:" },
-        { &sel_offsetInFile, "offsetInFile" },
-        { &sel_initWithRulerView_1markerLocation_1image_1imageOrigin_1, "initWithRulerView:markerLocation:image:imageOrigin:" },
-        { &sel_commandDescriptionWithAppleEventClass_1andAppleEventCode_1, "commandDescriptionWithAppleEventClass:andAppleEventCode:" },
-        { &sel_detachDrawingThread_1toTarget_1withObject_1, "detachDrawingThread:toTarget:withObject:" },
-        { &sel_outlineView_1shouldShowCellExpansionForTableColumn_1item_1, "outlineView:shouldShowCellExpansionForTableColumn:item:" },
-        { &sel_catalogNameComponent, "catalogNameComponent" },
-        { &sel_monthSymbols, "monthSymbols" },
-        { &sel_invalidateShadow, "invalidateShadow" },
-        { &sel_waitUntilDate_1, "waitUntilDate:" },
-        { &sel_languageLevel, "languageLevel" },
-        { &sel_XMLData, "XMLData" },
-        { &sel_textView_1shouldChangeTextInRanges_1replacementStrings_1, "textView:shouldChangeTextInRanges:replacementStrings:" },
-        { &sel_initWithPointerFunctions_1, "initWithPointerFunctions:" },
-        { &sel_initWithTextureTarget_1textureInternalFormat_1textureMaxMipMapLevel_1pixelsWide_1pixelsHigh_1, "initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:" },
-        { &sel_classForClassName_1, "classForClassName:" },
-        { &sel_decodeInt64ForKey_1, "decodeInt64ForKey:" },
-        { &sel_stringWithSavedFrame, "stringWithSavedFrame" },
-        { &sel_writeRTFDToFile_1atomically_1, "writeRTFDToFile:atomically:" },
-        { &sel_initWithLocal_1connection_1, "initWithLocal:connection:" },
-        { &sel_sendBeforeDate_1msgid_1components_1from_1reserved_1, "sendBeforeDate:msgid:components:from:reserved:" },
-        { &sel_playsEveryFrame, "playsEveryFrame" },
-        { &sel_prependTransform_1, "prependTransform:" },
-        { &sel_setUsesWeakReadAndWriteBarriers_1, "setUsesWeakReadAndWriteBarriers:" },
-        { &sel_isContinuous, "isContinuous" },
-        { &sel_andPredicateWithSubpredicates_1, "andPredicateWithSubpredicates:" },
-        { &sel_cookieWithProperties_1, "cookieWithProperties:" },
-        { &sel_builtInPlugInsPath, "builtInPlugInsPath" },
-        { &sel_performSelector_1onThread_1withObject_1waitUntilDone_1, "performSelector:onThread:withObject:waitUntilDone:" },
-        { &sel_sharedDocumentController, "sharedDocumentController" },
-        { &sel_setNeedsSizing_1, "setNeedsSizing:" },
-        { &sel_selectorForCommand_1, "selectorForCommand:" },
-        { &sel_displayIfNeededInRectIgnoringOpacity_1, "displayIfNeededInRectIgnoringOpacity:" },
-        { &sel_draggingPasteboard, "draggingPasteboard" },
-        { &sel_unscriptRange_1, "unscriptRange:" },
-        { &sel_launchApplication_1, "launchApplication:" },
-        { &sel_inputClientBecomeActive_1, "inputClientBecomeActive:" },
-        { &sel_getFirstUnlaidCharacterIndex_1glyphIndex_1, "getFirstUnlaidCharacterIndex:glyphIndex:" },
-        { &sel_initWithContentsOfURL_1options_1error_1, "initWithContentsOfURL:options:error:" },
-        { &sel_createSymbolicLinkAtPath_1withDestinationPath_1error_1, "createSymbolicLinkAtPath:withDestinationPath:error:" },
-        { &sel_accessibilityAttributeValue_1forParameter_1, "accessibilityAttributeValue:forParameter:" },
-        { &sel_setPlaceholderAttributedString_1, "setPlaceholderAttributedString:" },
-        { &sel_initWithIndex_1, "initWithIndex:" },
-        { &sel_readFromURL_1ofType_1error_1, "readFromURL:ofType:error:" },
-        { &sel_preferredFilename, "preferredFilename" },
-        { &sel_smartInsertDeleteEnabled, "smartInsertDeleteEnabled" },
-        { &sel_horizontalLineScroll, "horizontalLineScroll" },
-        { &sel_doDoubleClick_1, "doDoubleClick:" },
-        { &sel_fontDescriptorWithFace_1, "fontDescriptorWithFace:" },
-        { &sel_pointerArrayWithPointerFunctions_1, "pointerArrayWithPointerFunctions:" },
-        { &sel_defaultDate, "defaultDate" },
-        { &sel_typesetterBehavior, "typesetterBehavior" },
-        { &sel_setAllowsNonContiguousLayout_1, "setAllowsNonContiguousLayout:" },
-        { &sel_control_1didFailToFormatString_1errorDescription_1, "control:didFailToFormatString:errorDescription:" },
-        { &sel_isBaseFont, "isBaseFont" },
-        { &sel_removeDescriptorWithKeyword_1, "removeDescriptorWithKeyword:" },
-        { &sel_substringFromIndex_1, "substringFromIndex:" },
-        { &sel_componentsFromLocaleIdentifier_1, "componentsFromLocaleIdentifier:" },
-        { &sel_setUsesFeedbackWindow_1, "setUsesFeedbackWindow:" },
-        { &sel_setAnimates_1, "setAnimates:" },
-        { &sel_initWithDomain_1code_1userInfo_1, "initWithDomain:code:userInfo:" },
-        { &sel_setContentView_1, "setContentView:" },
-        { &sel_allowedFileTypes, "allowedFileTypes" },
-        { &sel_leftExpressions, "leftExpressions" },
-        { &sel_isStandalone, "isStandalone" },
-        { &sel_floatForKey_1inTable_1, "floatForKey:inTable:" },
-        { &sel_notANumber, "notANumber" },
-        { &sel_updateFromPMPrintSettings, "updateFromPMPrintSettings" },
-        { &sel_wantsToTrackMouse, "wantsToTrackMouse" },
-        { &sel_initWithName_1reason_1userInfo_1, "initWithName:reason:userInfo:" },
-        { &sel_prepareOpenGL, "prepareOpenGL" },
-        { &sel_setAttributedStringForNil_1, "setAttributedStringForNil:" },
-        { &sel_sizeToFit, "sizeToFit" },
-        { &sel_setSortDescriptorPrototype_1, "setSortDescriptorPrototype:" },
-        { &sel_canHide, "canHide" },
-        { &sel_replacementObjectForArchiver_1, "replacementObjectForArchiver:" },
-        { &sel_purpleColor, "purpleColor" },
-        { &sel_setProperty_1forKey_1, "setProperty:forKey:" },
-        { &sel_separatorItem, "separatorItem" },
-        { &sel_loadedCellAtRow_1column_1, "loadedCellAtRow:column:" },
-        { &sel_containerSpecifier, "containerSpecifier" },
-        { &sel_draggingSourceOperationMaskForLocal_1, "draggingSourceOperationMaskForLocal:" },
-        { &sel_willPresentError_1, "willPresentError:" },
-        { &sel_strikethroughGlyphRange_1strikethroughType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1, "strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:" },
-        { &sel_elementWithName_1stringValue_1, "elementWithName:stringValue:" },
-        { &sel_unsignedCharValue, "unsignedCharValue" },
-        { &sel_rangeOfComposedCharacterSequencesForRange_1, "rangeOfComposedCharacterSequencesForRange:" },
-        { &sel_activate_1, "activate:" },
-        { &sel_controlView, "controlView" },
-        { &sel_cachePolicy, "cachePolicy" },
-        { &sel_fontAttributesInRange_1, "fontAttributesInRange:" },
-        { &sel_setPreservesSelection_1, "setPreservesSelection:" },
-        { &sel_unscript_1, "unscript:" },
-        { &sel_deltaZ, "deltaZ" },
-        { &sel_connection_1handleRequest_1, "connection:handleRequest:" },
-        { &sel_caseSensitive, "caseSensitive" },
-        { &sel_tabViewItemAtPoint_1, "tabViewItemAtPoint:" },
-        { &sel_setTextAttributesForNegativeValues_1, "setTextAttributesForNegativeValues:" },
-        { &sel_underlineGlyphRange_1underlineType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1, "underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:" },
-        { &sel_classForCoder, "classForCoder" },
-        { &sel_setContent_1, "setContent:" },
-        { &sel_getLineStart_1end_1contentsEnd_1forRange_1, "getLineStart:end:contentsEnd:forRange:" },
-        { &sel_removeRowsAtIndexes_1includeSubrows_1, "removeRowsAtIndexes:includeSubrows:" },
-        { &sel_tokenFieldCell_1styleForRepresentedObject_1, "tokenFieldCell:styleForRepresentedObject:" },
-        { &sel_setToolTip_1, "setToolTip:" },
-        { &sel_titleHeight, "titleHeight" },
-        { &sel_setShowsStateBy_1, "setShowsStateBy:" },
-        { &sel_URLWithString_1relativeToURL_1, "URLWithString:relativeToURL:" },
-        { &sel_fileSystemRepresentationWithPath_1, "fileSystemRepresentationWithPath:" },
-        { &sel_setRate_1, "setRate:" },
-        { &sel_extraLineFragmentTextContainer, "extraLineFragmentTextContainer" },
-        { &sel_insertObjects_1atArrangedObjectIndexes_1, "insertObjects:atArrangedObjectIndexes:" },
-        { &sel_fontDescriptorWithSymbolicTraits_1, "fontDescriptorWithSymbolicTraits:" },
-        { &sel_topMargin, "topMargin" },
-        { &sel_tokenField_1representedObjectForEditingString_1, "tokenField:representedObjectForEditingString:" },
-        { &sel_drawInsertionPointInRect_1color_1turnedOn_1, "drawInsertionPointInRect:color:turnedOn:" },
-        { &sel_fontNamed_1hasTraits_1, "fontNamed:hasTraits:" },
-        { &sel_revertToSavedFromFile_1ofType_1, "revertToSavedFromFile:ofType:" },
-        { &sel_cString, "cString" },
-        { &sel_markerForItemNumber_1, "markerForItemNumber:" },
-        { &sel_mapTableWithWeakToStrongObjects, "mapTableWithWeakToStrongObjects" },
-        { &sel_autosaveExpandedItems, "autosaveExpandedItems" },
-        { &sel_setMiterLimit_1, "setMiterLimit:" },
-        { &sel_indentationLevel, "indentationLevel" },
-        { &sel_fileHandleForUpdatingAtPath_1, "fileHandleForUpdatingAtPath:" },
-        { &sel_fontWithDescriptor_1textTransform_1, "fontWithDescriptor:textTransform:" },
-        { &sel_selectLine_1, "selectLine:" },
-        { &sel_deleteForward_1, "deleteForward:" },
-        { &sel_getAdvancements_1forPackedGlyphs_1length_1, "getAdvancements:forPackedGlyphs:length:" },
-        { &sel_usesRuler, "usesRuler" },
-        { &sel_performClose_1, "performClose:" },
-        { &sel_trackRect, "trackRect" },
-        { &sel_setFont_1, "setFont:" },
-        { &sel_conformsToProtocol_1, "conformsToProtocol:" },
-        { &sel_appendBezierPathWithPoints_1count_1, "appendBezierPathWithPoints:count:" },
-        { &sel_defaultLineHeightForFont_1, "defaultLineHeightForFont:" },
-        { &sel_mouse_1inRect_1, "mouse:inRect:" },
-        { &sel_portCoderWithReceivePort_1sendPort_1components_1, "portCoderWithReceivePort:sendPort:components:" },
-        { &sel_inputClientDisabled_1, "inputClientDisabled:" },
-        { &sel_widthForSegment_1, "widthForSegment:" },
-        { &sel_performSelector_1, "performSelector:" },
-        { &sel_recalculateKeyViewLoop, "recalculateKeyViewLoop" },
-        { &sel_initWithDrawSelector_1delegate_1, "initWithDrawSelector:delegate:" },
-        { &sel_breakUndoCoalescing, "breakUndoCoalescing" },
-        { &sel_font, "font" },
-        { &sel_fontDescriptorWithSize_1, "fontDescriptorWithSize:" },
-        { &sel_insertItemWithTitle_1atIndex_1, "insertItemWithTitle:atIndex:" },
-        { &sel_contentAspectRatio, "contentAspectRatio" },
-        { &sel_currentHandler, "currentHandler" },
-        { &sel_sharedAppleEventManager, "sharedAppleEventManager" },
-        { &sel_pathForResource_1ofType_1, "pathForResource:ofType:" },
-        { &sel_initWithRequest_1cachedResponse_1client_1, "initWithRequest:cachedResponse:client:" },
-        { &sel_isTitled, "isTitled" },
-        { &sel_drawerWillOpen_1, "drawerWillOpen:" },
-        { &sel_screenFont, "screenFont" },
-        { &sel_principalClass, "principalClass" },
-        { &sel_pathControl_1willDisplayOpenPanel_1, "pathControl:willDisplayOpenPanel:" },
-        { &sel_setGroupingSeparator_1, "setGroupingSeparator:" },
-        { &sel_fontWithDescriptor_1size_1, "fontWithDescriptor:size:" },
-        { &sel_glyphInfoWithCharacterIdentifier_1collection_1baseString_1, "glyphInfoWithCharacterIdentifier:collection:baseString:" },
-        { &sel_movieUnfilteredFileTypes, "movieUnfilteredFileTypes" },
-        { &sel_portList, "portList" },
-        { &sel_tokenField_1readFromPasteboard_1, "tokenField:readFromPasteboard:" },
-        { &sel_setEndSpecifier_1, "setEndSpecifier:" },
-        { &sel_textView_1willDisplayToolTip_1forCharacterAtIndex_1, "textView:willDisplayToolTip:forCharacterAtIndex:" },
-        { &sel_applicationIconImage, "applicationIconImage" },
-        { &sel_target, "target" },
-        { &sel_replaceGlyphAtIndex_1withGlyph_1, "replaceGlyphAtIndex:withGlyph:" },
-        { &sel_borderColorForEdge_1, "borderColorForEdge:" },
-        { &sel_timeIntervalSinceDate_1, "timeIntervalSinceDate:" },
-        { &sel_pathsForResourcesOfType_1inDirectory_1forLocalization_1, "pathsForResourcesOfType:inDirectory:forLocalization:" },
-        { &sel_bitmapData, "bitmapData" },
-        { &sel_redComponent, "redComponent" },
-        { &sel_numberOfVisibleItems, "numberOfVisibleItems" },
-        { &sel_selectCell_1, "selectCell:" },
-        { &sel_applicationWillHide_1, "applicationWillHide:" },
-        { &sel_characterIsMember_1, "characterIsMember:" },
-        { &sel_setArrowsPosition_1, "setArrowsPosition:" },
-        { &sel_minusSign, "minusSign" },
-        { &sel_canSpawnSeparateThread, "canSpawnSeparateThread" },
-        { &sel_setContinuous_1, "setContinuous:" },
-        { &sel_addSymbolicLinkWithDestination_1preferredFilename_1, "addSymbolicLinkWithDestination:preferredFilename:" },
-        { &sel_destinationOfSymbolicLinkAtPath_1error_1, "destinationOfSymbolicLinkAtPath:error:" },
-        { &sel_runUntilDate_1, "runUntilDate:" },
-        { &sel_stringByAbbreviatingWithTildeInPath, "stringByAbbreviatingWithTildeInPath" },
-        { &sel_drawerWillResizeContents_1toSize_1, "drawerWillResizeContents:toSize:" },
-        { &sel_imageRectForBounds_1, "imageRectForBounds:" },
-        { &sel_indexGreaterThanIndex_1, "indexGreaterThanIndex:" },
-        { &sel_setSelectionFrom_1to_1anchor_1highlight_1, "setSelectionFrom:to:anchor:highlight:" },
-        { &sel_unsignedIntegerValue, "unsignedIntegerValue" },
-        { &sel_focusView, "focusView" },
-        { &sel_longCharacterIsMember_1, "longCharacterIsMember:" },
-        { &sel_groupingSeparator, "groupingSeparator" },
-        { &sel_depthLimit, "depthLimit" },
-        { &sel_attributesAtIndex_1longestEffectiveRange_1inRange_1, "attributesAtIndex:longestEffectiveRange:inRange:" },
-        { &sel_setAcceptsArrowKeys_1, "setAcceptsArrowKeys:" },
-        { &sel_isGreaterThanOrEqualTo_1, "isGreaterThanOrEqualTo:" },
-        { &sel_maxContentSize, "maxContentSize" },
-        { &sel_setParentWindow_1, "setParentWindow:" },
-        { &sel_importsGraphics, "importsGraphics" },
-        { &sel_setPaddingPosition_1, "setPaddingPosition:" },
-        { &sel_yearOfCommonEra, "yearOfCommonEra" },
-        { &sel_cells, "cells" },
-        { &sel_cyanComponent, "cyanComponent" },
-        { &sel_documentClassForType_1, "documentClassForType:" },
-        { &sel_setSelectionHighlightStyle_1, "setSelectionHighlightStyle:" },
-        { &sel_addWindowController_1, "addWindowController:" },
-        { &sel_initWithXMLString_1error_1, "initWithXMLString:error:" },
-        { &sel_authenticateComponents_1withData_1, "authenticateComponents:withData:" },
-        { &sel_traitsOfFont_1, "traitsOfFont:" },
-        { &sel_timeIntervalSinceReferenceDate, "timeIntervalSinceReferenceDate" },
-        { &sel_orderFrontCharacterPalette_1, "orderFrontCharacterPalette:" },
-        { &sel_setServicesProvider_1, "setServicesProvider:" },
-        { &sel_setMessage_1, "setMessage:" },
-        { &sel_msgid, "msgid" },
-        { &sel_beginUndoGrouping, "beginUndoGrouping" },
-        { &sel_RTFDFromRange_1documentAttributes_1, "RTFDFromRange:documentAttributes:" },
-        { &sel_selectedItem, "selectedItem" },
-        { &sel_addTabStop_1, "addTabStop:" },
-        { &sel_scrollRect_1by_1, "scrollRect:by:" },
-        { &sel_icon, "icon" },
-        { &sel_setValue_1forUndefinedKey_1, "setValue:forUndefinedKey:" },
-        { &sel_decodeFloatForKey_1, "decodeFloatForKey:" },
-        { &sel_commentURL, "commentURL" },
-        { &sel_shortStandaloneMonthSymbols, "shortStandaloneMonthSymbols" },
-        { &sel_browser_1titleOfColumn_1, "browser:titleOfColumn:" },
-        { &sel_exit, "exit" },
-        { &sel_deselectAll_1, "deselectAll:" },
-        { &sel_canRemove, "canRemove" },
-        { &sel_proxyType, "proxyType" },
-        { &sel_shouldCloseDocument, "shouldCloseDocument" },
-        { &sel_setMinimumLineHeight_1, "setMinimumLineHeight:" },
-        { &sel_grayColor, "grayColor" },
-        { &sel_suspend, "suspend" },
-        { &sel_printJobTitle, "printJobTitle" },
-        { &sel_fileHandleWithStandardOutput, "fileHandleWithStandardOutput" },
-        { &sel_objCType, "objCType" },
-        { &sel_maximumIntegerDigits, "maximumIntegerDigits" },
-        { &sel_initWithKey_1ascending_1, "initWithKey:ascending:" },
-        { &sel_paramDescriptorForKeyword_1, "paramDescriptorForKeyword:" },
-        { &sel_cookiesForURL_1, "cookiesForURL:" },
-        { &sel_currentTextContainer, "currentTextContainer" },
-        { &sel_removeAllCachedResponses, "removeAllCachedResponses" },
-        { &sel_setAllHTTPHeaderFields_1, "setAllHTTPHeaderFields:" },
-        { &sel_setShortQuarterSymbols_1, "setShortQuarterSymbols:" },
-        { &sel_removeItemWithObjectValue_1, "removeItemWithObjectValue:" },
-        { &sel_reloadColumn_1, "reloadColumn:" },
-        { &sel_initWithData_1, "initWithData:" },
-        { &sel_textDidEndEditing_1, "textDidEndEditing:" },
-        { &sel_descriptorForKeyword_1, "descriptorForKeyword:" },
-        { &sel_gState, "gState" },
-        { &sel_setCellClass_1, "setCellClass:" },
-        { &sel_requestUserAttention_1, "requestUserAttention:" },
-        { &sel_disableUndoRegistration, "disableUndoRegistration" },
-        { &sel_currencySymbol, "currencySymbol" },
-        { &sel_defaultWritingDirectionForLanguage_1, "defaultWritingDirectionForLanguage:" },
-        { &sel_selectedCellInColumn_1, "selectedCellInColumn:" },
-        { &sel_spellServer_1didForgetWord_1inLanguage_1, "spellServer:didForgetWord:inLanguage:" },
-        { &sel_initWithType_1error_1, "initWithType:error:" },
-        { &sel_editedRow, "editedRow" },
-        { &sel_expressionForUnionSet_1with_1, "expressionForUnionSet:with:" },
-        { &sel_verticalMotionCanBeginDrag, "verticalMotionCanBeginDrag" },
-        { &sel_selectNextKeyView_1, "selectNextKeyView:" },
-        { &sel_lowercaseString, "lowercaseString" },
-        { &sel_intercellSpacing, "intercellSpacing" },
-        { &sel_selectedItemIdentifier, "selectedItemIdentifier" },
-        { &sel_getIndexes_1, "getIndexes:" },
-        { &sel_contentRect, "contentRect" },
-        { &sel_addObjects_1, "addObjects:" },
-        { &sel_selectedRowIndexes, "selectedRowIndexes" },
-        { &sel_setSecond_1, "setSecond:" },
-        { &sel_setIgnoresMultiClick_1, "setIgnoresMultiClick:" },
-        { &sel_hasMemberInPlane_1, "hasMemberInPlane:" },
-        { &sel_setClientView_1, "setClientView:" },
-        { &sel_setInitialFirstResponder_1, "setInitialFirstResponder:" },
-        { &sel_defaultAnimationForKey_1, "defaultAnimationForKey:" },
-        { &sel_systemTimeZone, "systemTimeZone" },
-        { &sel_pageSizeForPaper_1, "pageSizeForPaper:" },
-        { &sel_windowBackgroundColor, "windowBackgroundColor" },
-        { &sel_prepareGState, "prepareGState" },
-        { &sel_willSetLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1, "willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:" },
-        { &sel_setScriptingProperties_1, "setScriptingProperties:" },
-        { &sel_initWithScrollView_1orientation_1, "initWithScrollView:orientation:" },
-        { &sel_canBecomeVisibleWithoutLogin, "canBecomeVisibleWithoutLogin" },
-        { &sel_scrollLineDown_1, "scrollLineDown:" },
-        { &sel_setServicesMenu_1, "setServicesMenu:" },
-        { &sel_appleEventCode, "appleEventCode" },
-        { &sel_replaceObjectsInRange_1withObjectsFromArray_1range_1, "replaceObjectsInRange:withObjectsFromArray:range:" },
-        { &sel_autosizesCells, "autosizesCells" },
-        { &sel_tableView_1toolTipForCell_1rect_1tableColumn_1row_1mouseLocation_1, "tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:" },
-        { &sel_dateWithYear_1month_1day_1hour_1minute_1second_1timeZone_1, "dateWithYear:month:day:hour:minute:second:timeZone:" },
-        { &sel_windowWillResize_1toSize_1, "windowWillResize:toSize:" },
-        { &sel_initWithUnsignedChar_1, "initWithUnsignedChar:" },
-        { &sel_suiteForAppleEventCode_1, "suiteForAppleEventCode:" },
-        { &sel_setTrailingOffset_1, "setTrailingOffset:" },
-        { &sel_canBecomeKeyWindow, "canBecomeKeyWindow" },
-        { &sel_setAnimationBlockingMode_1, "setAnimationBlockingMode:" },
-        { &sel_formUnionWithCharacterSet_1, "formUnionWithCharacterSet:" },
-        { &sel_typeForArgumentWithName_1, "typeForArgumentWithName:" },
-        { &sel_setFileName_1, "setFileName:" },
-        { &sel_createSymbolicLinkAtPath_1pathContent_1, "createSymbolicLinkAtPath:pathContent:" },
-        { &sel_undoMenuTitleForUndoActionName_1, "undoMenuTitleForUndoActionName:" },
-        { &sel_dateStyle, "dateStyle" },
-        { &sel_currentContext, "currentContext" },
-        { &sel_dequeueNotificationsMatching_1coalesceMask_1, "dequeueNotificationsMatching:coalesceMask:" },
-        { &sel_thousandSeparator, "thousandSeparator" },
-        { &sel_writeData_1, "writeData:" },
-        { &sel_selectedTag, "selectedTag" },
-        { &sel_drawWithRect_1options_1, "drawWithRect:options:" },
-        { &sel_canonicalLocaleIdentifierFromString_1, "canonicalLocaleIdentifierFromString:" },
-        { &sel_convertFontTraits_1, "convertFontTraits:" },
-        { &sel_itemAdded_1, "itemAdded:" },
-        { &sel_scriptErrorString, "scriptErrorString" },
-        { &sel_submenuAction_1, "submenuAction:" },
-        { &sel_initWithType_1subpredicates_1, "initWithType:subpredicates:" },
-        { &sel_subpathsOfDirectoryAtPath_1error_1, "subpathsOfDirectoryAtPath:error:" },
-        { &sel_becomesKeyOnlyIfNeeded, "becomesKeyOnlyIfNeeded" },
-        { &sel_displayAllColumns, "displayAllColumns" },
-        { &sel_indexOfItemWithSubmenu_1, "indexOfItemWithSubmenu:" },
-        { &sel_runModalSavePanelForSaveOperation_1delegate_1didSaveSelector_1contextInfo_1, "runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:" },
-        { &sel_setCollectionBehavior_1, "setCollectionBehavior:" },
-        { &sel_boundingRectWithSize_1options_1attributes_1, "boundingRectWithSize:options:attributes:" },
-        { &sel_valueForAttribute_1, "valueForAttribute:" },
-        { &sel_attributedStringForNotANumber, "attributedStringForNotANumber" },
-        { &sel_indicesOfObjectsByEvaluatingObjectSpecifier_1, "indicesOfObjectsByEvaluatingObjectSpecifier:" },
-        { &sel_initWithPath_1, "initWithPath:" },
-        { &sel_doCommandBySelector_1, "doCommandBySelector:" },
-        { &sel_numberWithChar_1, "numberWithChar:" },
-        { &sel_setAllowsMixedState_1, "setAllowsMixedState:" },
-        { &sel_abortEditing, "abortEditing" },
-        { &sel_context, "context" },
-        { &sel_drawerShouldClose_1, "drawerShouldClose:" },
-        { &sel_tabViewDidChangeNumberOfTabViewItems_1, "tabViewDidChangeNumberOfTabViewItems:" },
-        { &sel_focusRingType, "focusRingType" },
-        { &sel_copyScriptingValue_1forKey_1withProperties_1, "copyScriptingValue:forKey:withProperties:" },
-        { &sel_acceptsFirstMouse_1, "acceptsFirstMouse:" },
-        { &sel_initWithPosition_1objectSpecifier_1, "initWithPosition:objectSpecifier:" },
-        { &sel_selectionRangeForProposedRange_1granularity_1, "selectionRangeForProposedRange:granularity:" },
-        { &sel_isNotEqualTo_1, "isNotEqualTo:" },
-        { &sel_encodeRootObject_1, "encodeRootObject:" },
-        { &sel_hasSuffix_1, "hasSuffix:" },
-        { &sel_initWithFontAttributes_1, "initWithFontAttributes:" },
-        { &sel_initWithRTFDFileWrapper_1documentAttributes_1, "initWithRTFDFileWrapper:documentAttributes:" },
-        { &sel_miniwindowImage, "miniwindowImage" },
-        { &sel_developmentLocalization, "developmentLocalization" },
-        { &sel_localizedSummaryItems, "localizedSummaryItems" },
-        { &sel_intValue, "intValue" },
-        { &sel_setReturnValue_1, "setReturnValue:" },
-        { &sel_selectedMenuItemColor, "selectedMenuItemColor" },
-        { &sel_editColumn_1row_1withEvent_1select_1, "editColumn:row:withEvent:select:" },
-        { &sel_descriptionWithCalendarFormat_1timeZone_1locale_1, "descriptionWithCalendarFormat:timeZone:locale:" },
-        { &sel_itemHeight, "itemHeight" },
-        { &sel_application_1openFiles_1, "application:openFiles:" },
-        { &sel_window, "window" },
-        { &sel_setShortStandaloneMonthSymbols_1, "setShortStandaloneMonthSymbols:" },
-        { &sel_setTag_1, "setTag:" },
-        { &sel_ignoredWordsInSpellDocumentWithTag_1, "ignoredWordsInSpellDocumentWithTag:" },
-        { &sel_preferredLocalizationsFromArray_1, "preferredLocalizationsFromArray:" },
-        { &sel_intersectsIndexesInRange_1, "intersectsIndexesInRange:" },
-        { &sel_scanLongLong_1, "scanLongLong:" },
-        { &sel_characterSetWithContentsOfFile_1, "characterSetWithContentsOfFile:" },
-        { &sel_elementWithName_1children_1attributes_1, "elementWithName:children:attributes:" },
-        { &sel_removeItem_1, "removeItem:" },
-        { &sel_classForKeyedArchiver, "classForKeyedArchiver" },
-        { &sel_initWithString_1locale_1, "initWithString:locale:" },
-        { &sel_initWithData_1options_1error_1, "initWithData:options:error:" },
-        { &sel_setIsPaneSplitter_1, "setIsPaneSplitter:" },
-        { &sel_URLHandle_1resourceDataDidBecomeAvailable_1, "URLHandle:resourceDataDidBecomeAvailable:" },
-        { &sel_systemDefaultPortNameServer, "systemDefaultPortNameServer" },
-        { &sel_controlTextDidEndEditing_1, "controlTextDidEndEditing:" },
-        { &sel_commandDescription, "commandDescription" },
-        { &sel_collapseItem_1, "collapseItem:" },
-        { &sel_setAutoresizesOutlineColumn_1, "setAutoresizesOutlineColumn:" },
-        { &sel_isSubsetOfHashTable_1, "isSubsetOfHashTable:" },
-        { &sel_discardEventsMatchingMask_1beforeEvent_1, "discardEventsMatchingMask:beforeEvent:" },
-        { &sel_highlightSelectionInClipRect_1, "highlightSelectionInClipRect:" },
-        { &sel_decodeSizeForKey_1, "decodeSizeForKey:" },
-        { &sel_decimalNumberByRaisingToPower_1, "decimalNumberByRaisingToPower:" },
-        { &sel_canBecomeMainWindow, "canBecomeMainWindow" },
-        { &sel_setMenuItem_1, "setMenuItem:" },
-        { &sel_contentRectForFrameRect_1styleMask_1, "contentRectForFrameRect:styleMask:" },
-        { &sel_clearGLContext, "clearGLContext" },
-        { &sel_setFileType_1, "setFileType:" },
-        { &sel_expressionForIntersectSet_1with_1, "expressionForIntersectSet:with:" },
-        { &sel_sharedHelpManager, "sharedHelpManager" },
-        { &sel_setMiniwindowTitle_1, "setMiniwindowTitle:" },
-        { &sel_fontDescriptorWithName_1size_1, "fontDescriptorWithName:size:" },
-        { &sel_cookies, "cookies" },
-        { &sel_detachNewThreadSelector_1toTarget_1withObject_1, "detachNewThreadSelector:toTarget:withObject:" },
-        { &sel_needsPanelToBecomeKey, "needsPanelToBecomeKey" },
-        { &sel_retainArguments, "retainArguments" },
-        { &sel_textStorageWillProcessEditing_1, "textStorageWillProcessEditing:" },
-        { &sel_location, "location" },
-        { &sel_shouldChangeTextInRange_1replacementString_1, "shouldChangeTextInRange:replacementString:" },
-        { &sel_textView_1doubleClickedOnCell_1inRect_1, "textView:doubleClickedOnCell:inRect:" },
-        { &sel_validateVisibleItems, "validateVisibleItems" },
-        { &sel_isOneway, "isOneway" },
-        { &sel_zone, "zone" },
-        { &sel_titleAlignment, "titleAlignment" },
-        { &sel_localNameForName_1, "localNameForName:" },
-        { &sel_loopMode, "loopMode" },
-        { &sel_setFocusRingType_1, "setFocusRingType:" },
-        { &sel_stringForKey_1, "stringForKey:" },
-        { &sel_initWithDomain_1type_1name_1, "initWithDomain:type:name:" },
-        { &sel_animationDidEnd_1, "animationDidEnd:" },
-        { &sel_addSubview_1positioned_1relativeTo_1, "addSubview:positioned:relativeTo:" },
-        { &sel_removeObjects_1, "removeObjects:" },
-        { &sel_graphicsContextWithBitmapImageRep_1, "graphicsContextWithBitmapImageRep:" },
-        { &sel_isDescendantOf_1, "isDescendantOf:" },
-        { &sel_tableView_1nextTypeSelectMatchFromRow_1toRow_1forString_1, "tableView:nextTypeSelectMatchFromRow:toRow:forString:" },
-        { &sel_initWithRequest_1delegate_1startImmediately_1, "initWithRequest:delegate:startImmediately:" },
-        { &sel_reservedThicknessForMarkers, "reservedThicknessForMarkers" },
-        { &sel_movieRect, "movieRect" },
-        { &sel_portForName_1host_1, "portForName:host:" },
-        { &sel_tabView_1willSelectTabViewItem_1, "tabView:willSelectTabViewItem:" },
-        { &sel_isOneShot, "isOneShot" },
-        { &sel_usesThreadedAnimation, "usesThreadedAnimation" },
-        { &sel_shortStandaloneQuarterSymbols, "shortStandaloneQuarterSymbols" },
-        { &sel_browser_1validateDrop_1proposedRow_1column_1dropOperation_1, "browser:validateDrop:proposedRow:column:dropOperation:" },
-        { &sel_setLineSpacing_1, "setLineSpacing:" },
-        { &sel_indexOfItemWithTitle_1, "indexOfItemWithTitle:" },
-        { &sel_subrowsKeyPath, "subrowsKeyPath" },
-        { &sel_showsResizeIndicator, "showsResizeIndicator" },
-        { &sel_setState_1, "setState:" },
-        { &sel_fileAttributesAtPath_1traverseLink_1, "fileAttributesAtPath:traverseLink:" },
-        { &sel_setHorizontal_1, "setHorizontal:" },
-        { &sel_windowDidExpose_1, "windowDidExpose:" },
-        { &sel_systemID, "systemID" },
-        { &sel_turnOffKerning_1, "turnOffKerning:" },
-        { &sel_stringByReplacingPercentEscapesUsingEncoding_1, "stringByReplacingPercentEscapesUsingEncoding:" },
-        { &sel_control_1textView_1completions_1forPartialWordRange_1indexOfSelectedItem_1, "control:textView:completions:forPartialWordRange:indexOfSelectedItem:" },
-        { &sel_selectLastTabViewItem_1, "selectLastTabViewItem:" },
-        { &sel_setKeyEquivalentFont_1, "setKeyEquivalentFont:" },
-        { &sel_invalidateCursorRectsForView_1, "invalidateCursorRectsForView:" },
-        { &sel_selectTextAtIndex_1, "selectTextAtIndex:" },
-        { &sel_showPools, "showPools" },
-        { &sel_setPlaysSelectionOnly_1, "setPlaysSelectionOnly:" },
-        { &sel_note, "note" },
-        { &sel_setDrawsCellBackground_1, "setDrawsCellBackground:" },
-        { &sel_layoutCharactersInRange_1forLayoutManager_1maximumNumberOfLineFragments_1, "layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:" },
-        { &sel_lengthOfBytesUsingEncoding_1, "lengthOfBytesUsingEncoding:" },
-        { &sel_columnResizingType, "columnResizingType" },
-        { &sel_paragraphSeparatorGlyphRange, "paragraphSeparatorGlyphRange" },
-        { &sel_floatValue, "floatValue" },
-        { &sel_setRoundingIncrement_1, "setRoundingIncrement:" },
-        { &sel_dateFromString_1, "dateFromString:" },
-        { &sel_panel_1shouldShowFilename_1, "panel:shouldShowFilename:" },
-        { &sel_isEqualToDate_1, "isEqualToDate:" },
-        { &sel_drawWithFrame_1inView_1characterIndex_1, "drawWithFrame:inView:characterIndex:" },
-        { &sel_initWithInteger_1, "initWithInteger:" },
-        { &sel_CGImage, "CGImage" },
-        { &sel_endDocument, "endDocument" },
-        { &sel_removeFile, "removeFile" },
-        { &sel_splitView_1shouldCollapseSubview_1forDoubleClickOnDividerAtIndex_1, "splitView:shouldCollapseSubview:forDoubleClickOnDividerAtIndex:" },
-        { &sel_setDefaultMiterLimit_1, "setDefaultMiterLimit:" },
-        { &sel_keyCode, "keyCode" },
-        { &sel_raise_1format_1, "raise:format:" },
-        { &sel_cellSize, "cellSize" },
-        { &sel_runModalForWindow_1, "runModalForWindow:" },
-        { &sel_colorListNamed_1, "colorListNamed:" },
-        { &sel_detachColorList_1, "detachColorList:" },
-        { &sel_postEvent_1atStart_1, "postEvent:atStart:" },
-        { &sel_setMaximumFractionDigits_1, "setMaximumFractionDigits:" },
-        { &sel_setVolatileDomain_1forName_1, "setVolatileDomain:forName:" },
-        { &sel_imageInterpolation, "imageInterpolation" },
-        { &sel_setTitlePosition_1, "setTitlePosition:" },
-        { &sel_leadingOffset, "leadingOffset" },
-        { &sel_invokeWithTarget_1, "invokeWithTarget:" },
-        { &sel_negativeFormat, "negativeFormat" },
-        { &sel_windowController, "windowController" },
-        { &sel_setVerticalPageScroll_1, "setVerticalPageScroll:" },
-        { &sel_applicationDidUpdate_1, "applicationDidUpdate:" },
-        { &sel_valueForProperty_1, "valueForProperty:" },
-        { &sel_tokenField_1hasMenuForRepresentedObject_1, "tokenField:hasMenuForRepresentedObject:" },
-        { &sel_resolveClassMethod_1, "resolveClassMethod:" },
-        { &sel_setAutomaticQuoteSubstitutionEnabled_1, "setAutomaticQuoteSubstitutionEnabled:" },
-        { &sel_ordinalityOfUnit_1inUnit_1forDate_1, "ordinalityOfUnit:inUnit:forDate:" },
-        { &sel_initWithHost_1port_1protocol_1realm_1authenticationMethod_1, "initWithHost:port:protocol:realm:authenticationMethod:" },
-        { &sel_timeIntervalSinceNow, "timeIntervalSinceNow" },
-        { &sel_showFindIndicatorForRange_1, "showFindIndicatorForRange:" },
-        { &sel_drawLabel_1inRect_1, "drawLabel:inRect:" },
-        { &sel_startQuery, "startQuery" },
-        { &sel_initWithNibNamed_1bundle_1, "initWithNibNamed:bundle:" },
-        { &sel_firstResponder, "firstResponder" },
-        { &sel_windowWillMove_1, "windowWillMove:" },
-        { &sel_dictionaryForKey_1, "dictionaryForKey:" },
-        { &sel_decodeValueOfObjCType_1at_1, "decodeValueOfObjCType:at:" },
-        { &sel_activeApplication, "activeApplication" },
-        { &sel_initWithUnsignedLongLong_1, "initWithUnsignedLongLong:" },
-        { &sel_decimalNumberWithString_1, "decimalNumberWithString:" },
-        { &sel_replaceTextStorage_1, "replaceTextStorage:" },
-        { &sel_relativePosition, "relativePosition" },
-        { &sel_objectValueOfSelectedItem, "objectValueOfSelectedItem" },
-        { &sel_timeInterval, "timeInterval" },
-        { &sel_getBytes_1range_1, "getBytes:range:" },
-        { &sel_initWithViewAnimations_1, "initWithViewAnimations:" },
-        { &sel_setHorizontalRulerView_1, "setHorizontalRulerView:" },
-        { &sel_keyPathsForValuesAffectingPreview, "keyPathsForValuesAffectingPreview" },
-        { &sel_setWithObjects_1count_1, "setWithObjects:count:" },
-        { &sel_bitsPerSample, "bitsPerSample" },
-        { &sel_dayOfYear, "dayOfYear" },
-        { &sel_maximumFractionDigits, "maximumFractionDigits" },
-        { &sel_isSelectionByRect, "isSelectionByRect" },
-        { &sel_getRed_1green_1blue_1alpha_1, "getRed:green:blue:alpha:" },
-        { &sel_glyphIsEncoded_1, "glyphIsEncoded:" },
-        { &sel_setStartSubelementIdentifier_1, "setStartSubelementIdentifier:" },
-        { &sel_connection_1didFailWithError_1, "connection:didFailWithError:" },
-        { &sel_parser_1foundExternalEntityDeclarationWithName_1publicID_1systemID_1, "parser:foundExternalEntityDeclarationWithName:publicID:systemID:" },
-        { &sel_outlineView_1shouldTypeSelectForEvent_1withCurrentSearchString_1, "outlineView:shouldTypeSelectForEvent:withCurrentSearchString:" },
-        { &sel_lowerBaseline_1, "lowerBaseline:" },
-        { &sel_outlineView_1willDisplayCell_1forTableColumn_1item_1, "outlineView:willDisplayCell:forTableColumn:item:" },
-        { &sel_notificationWithName_1object_1userInfo_1, "notificationWithName:object:userInfo:" },
-        { &sel_setMaxConcurrentOperationCount_1, "setMaxConcurrentOperationCount:" },
-        { &sel_closeSpellDocumentWithTag_1, "closeSpellDocumentWithTag:" },
-        { &sel_popUpStatusItemMenu_1, "popUpStatusItemMenu:" },
-        { &sel_itemPrototype, "itemPrototype" },
-        { &sel_commandName, "commandName" },
-        { &sel_setTextAttributesForZero_1, "setTextAttributesForZero:" },
-        { &sel_dateFromComponents_1, "dateFromComponents:" },
-        { &sel_outlineViewColumnDidResize_1, "outlineViewColumnDidResize:" },
-        { &sel_setTailIndent_1, "setTailIndent:" },
-        { &sel_setRowTemplates_1, "setRowTemplates:" },
-        { &sel_objectsForXQuery_1constants_1error_1, "objectsForXQuery:constants:error:" },
-        { &sel_mutableCopyWithZone_1, "mutableCopyWithZone:" },
-        { &sel_initWithItemIdentifier_1, "initWithItemIdentifier:" },
-        { &sel_minuteOfHour, "minuteOfHour" },
-        { &sel_setAutosavingDelay_1, "setAutosavingDelay:" },
-        { &sel_nextKeyView, "nextKeyView" },
-        { &sel_orderFront_1, "orderFront:" },
-        { &sel_encodeValueOfObjCType_1at_1, "encodeValueOfObjCType:at:" },
-        { &sel_mode, "mode" },
-        { &sel_appleEventWithEventClass_1eventID_1targetDescriptor_1returnID_1transactionID_1, "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:" },
-        { &sel_stringByDeletingPathExtension, "stringByDeletingPathExtension" },
-        { &sel_standardOutput, "standardOutput" },
-        { &sel_enumCodeValue, "enumCodeValue" },
-        { &sel_setResourceData_1, "setResourceData:" },
-        { &sel_convertRectFromBase_1, "convertRectFromBase:" },
-        { &sel_initWithContentRect_1styleMask_1backing_1defer_1screen_1, "initWithContentRect:styleMask:backing:defer:screen:" },
-        { &sel_autoenablesItems, "autoenablesItems" },
-        { &sel_textContainerForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, "textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:" },
-        { &sel_QTMovie, "QTMovie" },
-        { &sel_addObserver_1selector_1name_1object_1suspensionBehavior_1, "addObserver:selector:name:object:suspensionBehavior:" },
-        { &sel_getArgument_1atIndex_1, "getArgument:atIndex:" },
-        { &sel_replaceChildAtIndex_1withNode_1, "replaceChildAtIndex:withNode:" },
-        { &sel_beginForDirectory_1file_1types_1modelessDelegate_1didEndSelector_1contextInfo_1, "beginForDirectory:file:types:modelessDelegate:didEndSelector:contextInfo:" },
-        { &sel_supportsMode_1, "supportsMode:" },
-        { &sel_openFile_1, "openFile:" },
-        { &sel_zero, "zero" },
-        { &sel_compositingFilter, "compositingFilter" },
-        { &sel_fileGroupOwnerAccountID, "fileGroupOwnerAccountID" },
-        { &sel_tokenField_1writeRepresentedObjects_1toPasteboard_1, "tokenField:writeRepresentedObjects:toPasteboard:" },
-        { &sel_tabViewType, "tabViewType" },
-        { &sel_drawSortIndicatorWithFrame_1inView_1ascending_1priority_1, "drawSortIndicatorWithFrame:inView:ascending:priority:" },
-        { &sel_spellCheckerDocumentTag, "spellCheckerDocumentTag" },
-        { &sel_updateFromPMPageFormat, "updateFromPMPageFormat" },
-        { &sel_colorSyncProfile, "colorSyncProfile" },
-        { &sel_flushBufferedKeyEvents, "flushBufferedKeyEvents" },
-        { &sel_removeAllObjects, "removeAllObjects" },
-        { &sel_selectItemWithTitle_1, "selectItemWithTitle:" },
-        { &sel_textContainers, "textContainers" },
-        { &sel_isHorizontallyResizable, "isHorizontallyResizable" },
-        { &sel_selectionIndexPaths, "selectionIndexPaths" },
-        { &sel_setString_1forType_1, "setString:forType:" },
-        { &sel_setWraps_1, "setWraps:" },
-        { &sel_dataCell, "dataCell" },
-        { &sel_addPointer_1, "addPointer:" },
-        { &sel_invalidate, "invalidate" },
-        { &sel_draggingImageForRowsWithIndexes_1inColumn_1withEvent_1offset_1, "draggingImageForRowsWithIndexes:inColumn:withEvent:offset:" },
-        { &sel_horizontalEdgePadding, "horizontalEdgePadding" },
-        { &sel_view, "view" },
-        { &sel_showsPrintPanel, "showsPrintPanel" },
-        { &sel_hyphenationFactor, "hyphenationFactor" },
-        { &sel_setAcceptsGlyphInfo_1, "setAcceptsGlyphInfo:" },
-        { &sel_formatWidth, "formatWidth" },
-        { &sel_stringByAppendingFormat_1, "stringByAppendingFormat:" },
-        { &sel_documentForFileName_1, "documentForFileName:" },
-        { &sel_outlineView_1nextTypeSelectMatchFromItem_1toItem_1forString_1, "outlineView:nextTypeSelectMatchFromItem:toItem:forString:" },
-        { &sel_isItemExpanded_1, "isItemExpanded:" },
-        { &sel_playbackDeviceIdentifier, "playbackDeviceIdentifier" },
-        { &sel_addButtonWithTitle_1, "addButtonWithTitle:" },
-        { &sel_lowercaseLetterCharacterSet, "lowercaseLetterCharacterSet" },
-        { &sel_netService_1didNotResolve_1, "netService:didNotResolve:" },
-        { &sel_copiesOnScroll, "copiesOnScroll" },
-        { &sel_unarchiver_1willReplaceObject_1withObject_1, "unarchiver:willReplaceObject:withObject:" },
-        { &sel_setHasShadow_1, "setHasShadow:" },
-        { &sel_addObserver_1selector_1name_1object_1, "addObserver:selector:name:object:" },
-        { &sel_setDouble_1forKey_1, "setDouble:forKey:" },
-        { &sel_positionOfGlyph_1struckOverRect_1metricsExist_1, "positionOfGlyph:struckOverRect:metricsExist:" },
-        { &sel_sharedInstance, "sharedInstance" },
-        { &sel_setPaperSize_1, "setPaperSize:" },
-        { &sel_data1, "data1" },
-        { &sel_applicationWillBecomeActive_1, "applicationWillBecomeActive:" },
-        { &sel_URLProtocol_1cachedResponseIsValid_1, "URLProtocol:cachedResponseIsValid:" },
-        { &sel_mouseDown_1, "mouseDown:" },
-        { &sel_setVeryShortStandaloneWeekdaySymbols_1, "setVeryShortStandaloneWeekdaySymbols:" },
-        { &sel_setUsesStrongWriteBarrier_1, "setUsesStrongWriteBarrier:" },
-        { &sel_second, "second" },
-        { &sel_predicateWithLeftExpression_1rightExpression_1modifier_1type_1options_1, "predicateWithLeftExpression:rightExpression:modifier:type:options:" },
-        { &sel_setFloatingPanel_1, "setFloatingPanel:" },
-        { &sel_parser_1didEndElement_1namespaceURI_1qualifiedName_1, "parser:didEndElement:namespaceURI:qualifiedName:" },
-        { &sel_handlePortMessage_1, "handlePortMessage:" },
-        { &sel_filteredSetUsingPredicate_1, "filteredSetUsingPredicate:" },
-        { &sel_setLocalizedKeyDictionary_1, "setLocalizedKeyDictionary:" },
-        { &sel_drawCellInside_1, "drawCellInside:" },
-        { &sel_browserDidScroll_1, "browserDidScroll:" },
-        { &sel_isDirectory, "isDirectory" },
-        { &sel_setEnvironment_1, "setEnvironment:" },
-        { &sel_persistence, "persistence" },
-        { &sel_backingType, "backingType" },
-        { &sel_orderedDocuments, "orderedDocuments" },
-        { &sel_windowWillUseStandardFrame_1defaultFrame_1, "windowWillUseStandardFrame:defaultFrame:" },
-        { &sel_toggleTraditionalCharacterShape_1, "toggleTraditionalCharacterShape:" },
-        { &sel_fractionOfDistanceThroughGlyphForPoint_1, "fractionOfDistanceThroughGlyphForPoint:" },
-        { &sel_netServiceWillPublish_1, "netServiceWillPublish:" },
-        { &sel_drawInRect_1relativeCenterPosition_1, "drawInRect:relativeCenterPosition:" },
-        { &sel_setShowsAlpha_1, "setShowsAlpha:" },
-        { &sel_canDragRowsWithIndexes_1inColumn_1withEvent_1, "canDragRowsWithIndexes:inColumn:withEvent:" },
-        { &sel_start, "start" },
-        { &sel_imageRectInRuler, "imageRectInRuler" },
-        { &sel_TXTRecordData, "TXTRecordData" },
-        { &sel_groupingLevel, "groupingLevel" },
-        { &sel_response, "response" },
-        { &sel_insertionIndex, "insertionIndex" },
-        { &sel_cancelPreviousPerformRequestsWithTarget_1selector_1object_1, "cancelPreviousPerformRequestsWithTarget:selector:object:" },
-        { &sel_itemWithTitle_1, "itemWithTitle:" },
-        { &sel_insertRow_1, "insertRow:" },
-        { &sel_mutableChildNodes, "mutableChildNodes" },
-        { &sel_removeAllPoints, "removeAllPoints" },
-        { &sel_searchForRegistrationDomains, "searchForRegistrationDomains" },
-        { &sel_replacementObjectForCoder_1, "replacementObjectForCoder:" },
-        { &sel_tangentialPressure, "tangentialPressure" },
-        { &sel_setMaxDate_1, "setMaxDate:" },
-        { &sel_performMnemonic_1, "performMnemonic:" },
-        { &sel_maximumRecentDocumentCount, "maximumRecentDocumentCount" },
-        { &sel_stringsByAppendingPaths_1, "stringsByAppendingPaths:" },
-        { &sel_localTimeZone, "localTimeZone" },
-        { &sel_draggingLocation, "draggingLocation" },
-        { &sel_searchForAllDomains, "searchForAllDomains" },
-        { &sel_attributedStringWithAttachment_1, "attributedStringWithAttachment:" },
-        { &sel_initWithContentsOfURL_1byReference_1, "initWithContentsOfURL:byReference:" },
-        { &sel_exchangeObjectAtIndex_1withObjectAtIndex_1, "exchangeObjectAtIndex:withObjectAtIndex:" },
-        { &sel_draw, "draw" },
-        { &sel_fileIsImmutable, "fileIsImmutable" },
-        { &sel_tokenField_1styleForRepresentedObject_1, "tokenField:styleForRepresentedObject:" },
-        { &sel_setAutorecalculatesContentBorderThickness_1forEdge_1, "setAutorecalculatesContentBorderThickness:forEdge:" },
-        { &sel_firstRectForCharacterRange_1actualRange_1, "firstRectForCharacterRange:actualRange:" },
-        { &sel_targetForAction_1to_1from_1, "targetForAction:to:from:" },
-        { &sel_setShouldCloseDocument_1, "setShouldCloseDocument:" },
-        { &sel_originOffset, "originOffset" },
-        { &sel_sharedSupportPath, "sharedSupportPath" },
-        { &sel_disableScreenUpdatesUntilFlush, "disableScreenUpdatesUntilFlush" },
-        { &sel_setShortStandaloneQuarterSymbols_1, "setShortStandaloneQuarterSymbols:" },
-        { &sel_filenames, "filenames" },
-        { &sel_numberOfItemsInComboBox_1, "numberOfItemsInComboBox:" },
-        { &sel_hasBytesAvailable, "hasBytesAvailable" },
-        { &sel_currentConversation, "currentConversation" },
-        { &sel_setAllowsEditingTextAttributes_1, "setAllowsEditingTextAttributes:" },
-        { &sel_initWithName_1stringValue_1, "initWithName:stringValue:" },
-        { &sel_tableViewColumnDidResize_1, "tableViewColumnDidResize:" },
-        { &sel_knowsPageRange_1, "knowsPageRange:" },
-        { &sel_uppercaseLetterCharacterSet, "uppercaseLetterCharacterSet" },
-        { &sel_capitalizedLetterCharacterSet, "capitalizedLetterCharacterSet" },
-        { &sel_main, "main" },
-        { &sel_genericRGBColorSpace, "genericRGBColorSpace" },
-        { &sel_clearsFilterPredicateOnInsertion, "clearsFilterPredicateOnInsertion" },
-        { &sel_paragraphs, "paragraphs" },
-        { &sel_setJobDisposition_1, "setJobDisposition:" },
-        { &sel_setContainerClassDescription_1, "setContainerClassDescription:" },
-        { &sel_stringWithContentsOfURL_1, "stringWithContentsOfURL:" },
-        { &sel_setTrackingMode_1, "setTrackingMode:" },
-        { &sel_canCloseDocumentWithDelegate_1shouldCloseSelector_1contextInfo_1, "canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:" },
-        { &sel_usesItemFromMenu, "usesItemFromMenu" },
-        { &sel_shortValue, "shortValue" },
-        { &sel_readDataOfLength_1, "readDataOfLength:" },
-        { &sel_descriptorWithDescriptorType_1data_1, "descriptorWithDescriptorType:data:" },
-        { &sel_setCanRemoveAllRows_1, "setCanRemoveAllRows:" },
-        { &sel_defaultCenter, "defaultCenter" },
-        { &sel_scriptingIsGreaterThan_1, "scriptingIsGreaterThan:" },
-        { &sel_splitView_1constrainSplitPosition_1ofSubviewAt_1, "splitView:constrainSplitPosition:ofSubviewAt:" },
-        { &sel_setTokenStyle_1, "setTokenStyle:" },
-        { &sel_initWithContentRect_1styleMask_1backing_1defer_1, "initWithContentRect:styleMask:backing:defer:" },
-        { &sel_insertTabViewItem_1atIndex_1, "insertTabViewItem:atIndex:" },
-        { &sel_rowForDisplayValue_1, "rowForDisplayValue:" },
-        { &sel_isDrawingToScreen, "isDrawingToScreen" },
-        { &sel_encodeRect_1, "encodeRect:" },
-        { &sel_controlDarkShadowColor, "controlDarkShadowColor" },
-        { &sel_maxDate, "maxDate" },
-        { &sel_lock, "lock" },
-        { &sel_resetSystemTimeZone, "resetSystemTimeZone" },
-        { &sel_coerceValue_1toClass_1, "coerceValue:toClass:" },
-        { &sel_qdPort, "qdPort" },
-        { &sel_resultAtIndex_1, "resultAtIndex:" },
-        { &sel_descriptorWithBoolean_1, "descriptorWithBoolean:" },
-        { &sel_markedRange, "markedRange" },
-        { &sel_colorWithCalibratedHue_1saturation_1brightness_1alpha_1, "colorWithCalibratedHue:saturation:brightness:alpha:" },
-        { &sel_setSharedPrintInfo_1, "setSharedPrintInfo:" },
-        { &sel_setBorderColor_1, "setBorderColor:" },
-        { &sel_parser_1foundCharacters_1, "parser:foundCharacters:" },
-        { &sel_preferredPasteboardTypeFromArray_1restrictedToTypesFromArray_1, "preferredPasteboardTypeFromArray:restrictedToTypesFromArray:" },
-        { &sel_resume, "resume" },
-        { &sel_iconForFiles_1, "iconForFiles:" },
-        { &sel_drawKeyEquivalentWithFrame_1inView_1, "drawKeyEquivalentWithFrame:inView:" },
-        { &sel_boxType, "boxType" },
-        { &sel_initWithContainerClassDescription_1containerSpecifier_1key_1name_1, "initWithContainerClassDescription:containerSpecifier:key:name:" },
-        { &sel_setFill, "setFill" },
-        { &sel_setParagraphGlyphRange_1separatorGlyphRange_1, "setParagraphGlyphRange:separatorGlyphRange:" },
-        { &sel_copyWithZone_1, "copyWithZone:" },
-        { &sel_self, "self" },
-        { &sel_reservedSpaceLength, "reservedSpaceLength" },
-        { &sel_unsignedIntValue, "unsignedIntValue" },
-        { &sel_URLHandleResourceDidFinishLoading_1, "URLHandleResourceDidFinishLoading:" },
-        { &sel_menuWillOpen_1, "menuWillOpen:" },
-        { &sel_menuWillClose_1, "menuWillClose:" },
-        { &sel_pointerArrayWithWeakObjects, "pointerArrayWithWeakObjects" },
-        { &sel_fetchPredicate, "fetchPredicate" },
-        { &sel_pathToColumn_1, "pathToColumn:" },
-        { &sel_columnWithIdentifier_1, "columnWithIdentifier:" },
-        { &sel_setShouldCreateUI_1, "setShouldCreateUI:" },
-        { &sel_getGlyphs_1range_1, "getGlyphs:range:" },
-        { &sel_returnID, "returnID" },
-        { &sel_miterLimit, "miterLimit" },
-        { &sel_hidesEmptyCells, "hidesEmptyCells" },
-        { &sel_userSpaceScaleFactor, "userSpaceScaleFactor" },
-        { &sel_xHeight, "xHeight" },
-        { &sel_decimalNumberByMultiplyingBy_1withBehavior_1, "decimalNumberByMultiplyingBy:withBehavior:" },
-        { &sel_reloadData, "reloadData" },
-        { &sel_setShortWeekdaySymbols_1, "setShortWeekdaySymbols:" },
-        { &sel_containsIndexesInRange_1, "containsIndexesInRange:" },
-        { &sel_colorWithDeviceRed_1green_1blue_1alpha_1, "colorWithDeviceRed:green:blue:alpha:" },
-        { &sel_screenFontWithRenderingMode_1, "screenFontWithRenderingMode:" },
-        { &sel_suggestedFilename, "suggestedFilename" },
-        { &sel_fileNameExtensionForType_1saveOperation_1, "fileNameExtensionForType:saveOperation:" },
-        { &sel_labelFontSize, "labelFontSize" },
-        { &sel_setAlphaValue_1, "setAlphaValue:" },
-        { &sel_openGLContext, "openGLContext" },
-        { &sel_scriptingIsLessThan_1, "scriptingIsLessThan:" },
-        { &sel_keysSortedByValueUsingSelector_1, "keysSortedByValueUsingSelector:" },
-        { &sel_control_1didFailToValidatePartialString_1errorDescription_1, "control:didFailToValidatePartialString:errorDescription:" },
-        { &sel_offStateImage, "offStateImage" },
-        { &sel_bidiProcessingEnabled, "bidiProcessingEnabled" },
-        { &sel_isKeyWindow, "isKeyWindow" },
-        { &sel_initWithIconRef_1, "initWithIconRef:" },
-        { &sel_changeCurrentDirectoryPath_1, "changeCurrentDirectoryPath:" },
-        { &sel_textView, "textView" },
-        { &sel_localizedStringForStatusCode_1, "localizedStringForStatusCode:" },
-        { &sel_setWantsLayer_1, "setWantsLayer:" },
-        { &sel_positivePrefix, "positivePrefix" },
-        { &sel_setDefaultFlatness_1, "setDefaultFlatness:" },
-        { &sel_addChild_1, "addChild:" },
-        { &sel_parser_1foundAttributeDeclarationWithName_1forElement_1type_1defaultValue_1, "parser:foundAttributeDeclarationWithName:forElement:type:defaultValue:" },
-        { &sel_scannerWithString_1, "scannerWithString:" },
-        { &sel_removeFileWrapper_1, "removeFileWrapper:" },
-        { &sel_setTitleWidth_1, "setTitleWidth:" },
-        { &sel_setTabKeyTraversesCells_1, "setTabKeyTraversesCells:" },
-        { &sel_glyphRangeForBoundingRect_1inTextContainer_1, "glyphRangeForBoundingRect:inTextContainer:" },
-        { &sel_fileHandleForWritingAtPath_1, "fileHandleForWritingAtPath:" },
-        { &sel_initWithContainerClassDescription_1containerSpecifier_1key_1, "initWithContainerClassDescription:containerSpecifier:key:" },
-        { &sel_fontAttributes, "fontAttributes" },
-        { &sel_reviewUnsavedDocumentsWithAlertTitle_1cancellable_1delegate_1didReviewAllSelector_1contextInfo_1, "reviewUnsavedDocumentsWithAlertTitle:cancellable:delegate:didReviewAllSelector:contextInfo:" },
-        { &sel_minWidth, "minWidth" },
-        { &sel_getLineFragmentInsertionPointsForCharacterAtIndex_1alternatePositions_1inDisplayOrder_1positions_1characterIndexes_1, "getLineFragmentInsertionPointsForCharacterAtIndex:alternatePositions:inDisplayOrder:positions:characterIndexes:" },
-        { &sel_finishDecoding, "finishDecoding" },
-        { &sel_currentContextDrawingToScreen, "currentContextDrawingToScreen" },
-        { &sel_setKeyEquivalent_1, "setKeyEquivalent:" },
-        { &sel_smartInsertForString_1replacingRange_1beforeString_1afterString_1, "smartInsertForString:replacingRange:beforeString:afterString:" },
-        { &sel_useStandardKerning_1, "useStandardKerning:" },
-        { &sel_sharedSystemTypesetter, "sharedSystemTypesetter" },
-        { &sel_setDatePickerMode_1, "setDatePickerMode:" },
-        { &sel_encodePoint_1forKey_1, "encodePoint:forKey:" },
-        { &sel_colorSpace, "colorSpace" },
-        { &sel_pasteboardByFilteringTypesInPasteboard_1, "pasteboardByFilteringTypesInPasteboard:" },
-        { &sel_sendDoubleAction, "sendDoubleAction" },
-        { &sel_isColumnSelected_1, "isColumnSelected:" },
-        { &sel_unarchiveObjectWithFile_1, "unarchiveObjectWithFile:" },
-        { &sel_usesEPSOnResolutionMismatch, "usesEPSOnResolutionMismatch" },
-        { &sel_encodeBycopyObject_1, "encodeBycopyObject:" },
-        { &sel_removeAttributeForName_1, "removeAttributeForName:" },
-        { &sel_keyCell, "keyCell" },
-        { &sel_allocWithZone_1, "allocWithZone:" },
-        { &sel_getCompression_1factor_1, "getCompression:factor:" },
-        { &sel_insertValue_1inPropertyWithKey_1, "insertValue:inPropertyWithKey:" },
-        { &sel_drawAtPoint_1withAttributes_1, "drawAtPoint:withAttributes:" },
-        { &sel_isTrue, "isTrue" },
-        { &sel_expectedContentLength, "expectedContentLength" },
-        { &sel_setTitle_1, "setTitle:" },
-        { &sel_connection_1didReceiveAuthenticationChallenge_1, "connection:didReceiveAuthenticationChallenge:" },
-        { &sel_isEnabledForSegment_1, "isEnabledForSegment:" },
-        { &sel_speechSynthesizer_1willSpeakPhoneme_1, "speechSynthesizer:willSpeakPhoneme:" },
-        { &sel_setShowsStateColumn_1, "setShowsStateColumn:" },
-        { &sel_requiredFileType, "requiredFileType" },
-        { &sel_convertRect_1fromView_1, "convertRect:fromView:" },
-        { &sel_visibleFrame, "visibleFrame" },
-        { &sel_concludeDragOperation_1, "concludeDragOperation:" },
-        { &sel_minimumFractionDigits, "minimumFractionDigits" },
-        { &sel_reopenDocumentForURL_1withContentsOfURL_1error_1, "reopenDocumentForURL:withContentsOfURL:error:" },
-        { &sel_roundingMode, "roundingMode" },
-        { &sel_colorWithCatalogName_1colorName_1, "colorWithCatalogName:colorName:" },
-        { &sel_setWithSet_1, "setWithSet:" },
-        { &sel_fileManager_1willProcessPath_1, "fileManager:willProcessPath:" },
-        { &sel_setSuspended_1, "setSuspended:" },
-        { &sel_currentInputManager, "currentInputManager" },
-        { &sel_operatingSystemVersionString, "operatingSystemVersionString" },
-        { &sel_resetBytesInRange_1, "resetBytesInRange:" },
-        { &sel_sizeForKey_1inTable_1, "sizeForKey:inTable:" },
-        { &sel_setFloat_1forKey_1, "setFloat:forKey:" },
-        { &sel_enableUndoRegistration, "enableUndoRegistration" },
-        { &sel_initWithCGImage_1, "initWithCGImage:" },
-        { &sel_initWithCIImage_1, "initWithCIImage:" },
-        { &sel_addCharactersInRange_1, "addCharactersInRange:" },
-        { &sel_initWithRect_1options_1owner_1userInfo_1, "initWithRect:options:owner:userInfo:" },
-        { &sel_incrementalLoadFromData_1complete_1, "incrementalLoadFromData:complete:" },
-        { &sel_tableView_1acceptDrop_1row_1dropOperation_1, "tableView:acceptDrop:row:dropOperation:" },
-        { &sel_classNamed_1, "classNamed:" },
-        { &sel_setIndeterminate_1, "setIndeterminate:" },
-        { &sel_normalizeAdjacentTextNodesPreservingCDATA_1, "normalizeAdjacentTextNodesPreservingCDATA:" },
-        { &sel_validateUserInterfaceItem_1, "validateUserInterfaceItem:" },
-        { &sel_setPlaysEveryFrame_1, "setPlaysEveryFrame:" },
-        { &sel_isCompiled, "isCompiled" },
-        { &sel_tokenFieldCell_1editingStringForRepresentedObject_1, "tokenFieldCell:editingStringForRepresentedObject:" },
-        { &sel_tableView_1isGroupRow_1, "tableView:isGroupRow:" },
-        { &sel_orderFrontLinkPanel_1, "orderFrontLinkPanel:" },
-        { &sel_alphaControlAddedOrRemoved_1, "alphaControlAddedOrRemoved:" },
-        { &sel_setShadowColor_1, "setShadowColor:" },
-        { &sel_canBecomeKeyView, "canBecomeKeyView" },
-        { &sel_addTimer_1forMode_1, "addTimer:forMode:" },
-        { &sel_clickedColumn, "clickedColumn" },
-        { &sel_initWithName_1URI_1, "initWithName:URI:" },
-        { &sel_saveDocument_1, "saveDocument:" },
-        { &sel_observationInfo, "observationInfo" },
-        { &sel_readFromURL_1options_1documentAttributes_1error_1, "readFromURL:options:documentAttributes:error:" },
-        { &sel_addClient_1, "addClient:" },
-        { &sel_appleEventForSuspensionID_1, "appleEventForSuspensionID:" },
-        { &sel_setGeneratesCalendarDates_1, "setGeneratesCalendarDates:" },
-        { &sel_tableView_1sortDescriptorsDidChange_1, "tableView:sortDescriptorsDidChange:" },
-        { &sel_predicateFormat, "predicateFormat" },
-        { &sel_windowShouldZoom_1toFrame_1, "windowShouldZoom:toFrame:" },
-        { &sel_usesFontPanel, "usesFontPanel" },
-        { &sel_encodeNXObject_1, "encodeNXObject:" },
-        { &sel_colorAtX_1y_1, "colorAtX:y:" },
-        { &sel_publishWithOptions_1, "publishWithOptions:" },
-        { &sel_allHTTPHeaderFields, "allHTTPHeaderFields" },
-        { &sel_registerPort_1name_1, "registerPort:name:" },
-        { &sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, "lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:" },
-        { &sel_hour, "hour" },
-        { &sel_setTextLists_1, "setTextLists:" },
-        { &sel_maximumAdvancement, "maximumAdvancement" },
-        { &sel_setHighlightedItemIndex_1, "setHighlightedItemIndex:" },
-        { &sel_initWithMemoryCapacity_1diskCapacity_1diskPath_1, "initWithMemoryCapacity:diskCapacity:diskPath:" },
-        { &sel_setDocumentContentKind_1, "setDocumentContentKind:" },
-        { &sel_updateDragTypeRegistration, "updateDragTypeRegistration" },
-        { &sel_deviceDescription, "deviceDescription" },
-        { &sel_setMiniwindowImage_1, "setMiniwindowImage:" },
-        { &sel_sharedTypesetter, "sharedTypesetter" },
-        { &sel_deleteToEndOfLine_1, "deleteToEndOfLine:" },
-        { &sel_setState_1atRow_1column_1, "setState:atRow:column:" },
-        { &sel_validModesForFontPanel_1, "validModesForFontPanel:" },
-        { &sel_currentCalendar, "currentCalendar" },
-        { &sel_selectionIndexPath, "selectionIndexPath" },
-        { &sel_setTextFont_1, "setTextFont:" },
-        { &sel_password, "password" },
-        { &sel_words, "words" },
-        { &sel_status, "status" },
-        { &sel_typingAttributes, "typingAttributes" },
-        { &sel_handleTakeValue_1forUnboundKey_1, "handleTakeValue:forUnboundKey:" },
-        { &sel_image_1didLoadRepresentation_1withStatus_1, "image:didLoadRepresentation:withStatus:" },
-        { &sel_setBitsPerSample_1, "setBitsPerSample:" },
-        { &sel_sortSubviewsUsingFunction_1context_1, "sortSubviewsUsingFunction:context:" },
-        { &sel_initWithProtocolFamily_1socketType_1protocol_1socket_1, "initWithProtocolFamily:socketType:protocol:socket:" },
-        { &sel_numberOfItemsInMenu_1, "numberOfItemsInMenu:" },
-        { &sel_numberWithUnsignedShort_1, "numberWithUnsignedShort:" },
-        { &sel_textView_1menu_1forEvent_1atIndex_1, "textView:menu:forEvent:atIndex:" },
-        { &sel_arrowCursor, "arrowCursor" },
-        { &sel_abbreviation, "abbreviation" },
-        { &sel_moveDown_1, "moveDown:" },
-        { &sel_activateContextHelpMode_1, "activateContextHelpMode:" },
-        { &sel_properties, "properties" },
-        { &sel_setObject_1forProperty_1error_1, "setObject:forProperty:error:" },
-        { &sel_setAutodisplay_1, "setAutodisplay:" },
-        { &sel_locationInWindow, "locationInWindow" },
-        { &sel_layoutManager, "layoutManager" },
-        { &sel_hyphenCharacterForGlyphAtIndex_1, "hyphenCharacterForGlyphAtIndex:" },
-        { &sel_play, "play" },
-        { &sel_compositeToPoint_1fromRect_1operation_1fraction_1, "compositeToPoint:fromRect:operation:fraction:" },
-        { &sel_cellBackgroundColor, "cellBackgroundColor" },
-        { &sel_shouldAntialias, "shouldAntialias" },
-        { &sel_windowWillReturnFieldEditor_1toObject_1, "windowWillReturnFieldEditor:toObject:" },
-        { &sel_setValuesForKeysWithDictionary_1, "setValuesForKeysWithDictionary:" },
-        { &sel_drawsGrid, "drawsGrid" },
-        { &sel_patternPhase, "patternPhase" },
-        { &sel_setFrame_1, "setFrame:" },
-        { &sel_roundingIncrement, "roundingIncrement" },
-        { &sel_adjustScroll_1, "adjustScroll:" },
-        { &sel_alertShowHelp_1, "alertShowHelp:" },
-        { &sel_animate_1, "animate:" },
-        { &sel_tabletID, "tabletID" },
-        { &sel_selectedRowEnumerator, "selectedRowEnumerator" },
-        { &sel_XMLString, "XMLString" },
-        { &sel_setWarningValue_1, "setWarningValue:" },
-        { &sel_tableView_1validateDrop_1proposedRow_1proposedDropOperation_1, "tableView:validateDrop:proposedRow:proposedDropOperation:" },
-        { &sel_checkSpelling_1, "checkSpelling:" },
-        { &sel_setFormattingStringsFilename_1, "setFormattingStringsFilename:" },
-        { &sel_displayIfNeeded, "displayIfNeeded" },
-        { &sel_localizedName, "localizedName" },
-        { &sel_isEqualToSet_1, "isEqualToSet:" },
-        { &sel_initWithBytesNoCopy_1length_1encoding_1freeWhenDone_1, "initWithBytesNoCopy:length:encoding:freeWhenDone:" },
-        { &sel_reloadPredicate, "reloadPredicate" },
-        { &sel_setNumberOfMajorTickMarks_1, "setNumberOfMajorTickMarks:" },
-        { &sel_defaultPlaceholderForMarker_1withBinding_1, "defaultPlaceholderForMarker:withBinding:" },
-        { &sel_encodeDataObject_1, "encodeDataObject:" },
-        { &sel_writeToURL_1ofType_1, "writeToURL:ofType:" },
-        { &sel_createContext, "createContext" },
-        { &sel_verticalScroller, "verticalScroller" },
-        { &sel_setShowsInvisibleCharacters_1, "setShowsInvisibleCharacters:" },
-        { &sel_encodeConditionalObject_1forKey_1, "encodeConditionalObject:forKey:" },
-        { &sel_isEqualTo_1, "isEqualTo:" },
-        { &sel_translateXBy_1yBy_1, "translateXBy:yBy:" },
-        { &sel_customizationPaletteIsRunning, "customizationPaletteIsRunning" },
-        { &sel_dictionaryWithDictionary_1, "dictionaryWithDictionary:" },
-        { &sel_drawMarkersInRect_1, "drawMarkersInRect:" },
-        { &sel_centerSelectionInVisibleArea_1, "centerSelectionInVisibleArea:" },
-        { &sel_stringByAppendingString_1, "stringByAppendingString:" },
-        { &sel_flushWindowIfNeeded, "flushWindowIfNeeded" },
-        { &sel_lockFocusOnRepresentation_1, "lockFocusOnRepresentation:" },
-        { &sel_setNotShownAttribute_1forGlyphAtIndex_1, "setNotShownAttribute:forGlyphAtIndex:" },
-        { &sel_currentReplyAppleEvent, "currentReplyAppleEvent" },
-        { &sel_setTitleAlignment_1, "setTitleAlignment:" },
-        { &sel_removeSuiteNamed_1, "removeSuiteNamed:" },
-        { &sel_capitalizedString, "capitalizedString" },
-        { &sel_typeFromFileExtension_1, "typeFromFileExtension:" },
-        { &sel_allowsImageEditing, "allowsImageEditing" },
-        { &sel_loosenKerning_1, "loosenKerning:" },
-        { &sel_decomposableCharacterSet, "decomposableCharacterSet" },
-        { &sel_subdataWithRange_1, "subdataWithRange:" },
-        { &sel_attachPopUpWithFrame_1inView_1, "attachPopUpWithFrame:inView:" },
-        { &sel_setColumnResizingType_1, "setColumnResizingType:" },
-        { &sel_genericCMYKColorSpace, "genericCMYKColorSpace" },
-        { &sel_actionForControlCharacterAtIndex_1, "actionForControlCharacterAtIndex:" },
-        { &sel_documentRect, "documentRect" },
-        { &sel_dataWithContentsOfFile_1, "dataWithContentsOfFile:" },
-        { &sel_localizedDescriptionForType_1, "localizedDescriptionForType:" },
-        { &sel_increment, "increment" },
-        { &sel_deleteToEndOfParagraph_1, "deleteToEndOfParagraph:" },
-        { &sel_exceptionWithName_1reason_1userInfo_1, "exceptionWithName:reason:userInfo:" },
-        { &sel_postscriptName, "postscriptName" },
-        { &sel_setPreferredFilename_1, "setPreferredFilename:" },
-        { &sel_setPostsBoundsChangedNotifications_1, "setPostsBoundsChangedNotifications:" },
-        { &sel_decimalNumberHandlerWithRoundingMode_1scale_1raiseOnExactness_1raiseOnOverflow_1raiseOnUnderflow_1raiseOnDivideByZero_1, "decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:" },
-        { &sel_openDocumentWithContentsOfFile_1display_1, "openDocumentWithContentsOfFile:display:" },
-        { &sel_objectForInfoDictionaryKey_1, "objectForInfoDictionaryKey:" },
-        { &sel_setFrameOrigin_1, "setFrameOrigin:" },
-        { &sel_pathControl_1willPopUpMenu_1, "pathControl:willPopUpMenu:" },
-        { &sel_lineWidth, "lineWidth" },
-        { &sel_poseAsClass_1, "poseAsClass:" },
-        { &sel_selectPreviousKeyView_1, "selectPreviousKeyView:" },
-        { &sel_isKey_1inTable_1, "isKey:inTable:" },
-        { &sel_isZoomed, "isZoomed" },
-        { &sel_setCompletionDelay_1, "setCompletionDelay:" },
-        { &sel_mainMenu, "mainMenu" },
-        { &sel_scrollView, "scrollView" },
-        { &sel_dividerColor, "dividerColor" },
-        { &sel_requestModes, "requestModes" },
-        { &sel_setShowsResizeIndicator_1, "setShowsResizeIndicator:" },
-        { &sel_setScrollable_1, "setScrollable:" },
-        { &sel_setLineScroll_1, "setLineScroll:" },
-        { &sel_resolvePrefixForNamespaceURI_1, "resolvePrefixForNamespaceURI:" },
-        { &sel_bind_1toObject_1withKeyPath_1options_1, "bind:toObject:withKeyPath:options:" },
-        { &sel_alignCenter_1, "alignCenter:" },
-        { &sel_addTemporaryAttribute_1value_1forCharacterRange_1, "addTemporaryAttribute:value:forCharacterRange:" },
-        { &sel_expressionForConstantValue_1, "expressionForConstantValue:" },
-        { &sel_initWithContentSize_1preferredEdge_1, "initWithContentSize:preferredEdge:" },
-        { &sel_setAccessoryView_1, "setAccessoryView:" },
-        { &sel_setContentWidth_1type_1, "setContentWidth:type:" },
-        { &sel_searchMenuTemplate, "searchMenuTemplate" },
-        { &sel_imageRepClassForType_1, "imageRepClassForType:" },
-        { &sel_decimalValue, "decimalValue" },
-        { &sel_protocolSpecificInformation, "protocolSpecificInformation" },
-        { &sel_statusBar, "statusBar" },
-        { &sel_setTimeZone_1, "setTimeZone:" },
-        { &sel_setWidth_1forSegment_1, "setWidth:forSegment:" },
-        { &sel_objectIsForcedForKey_1inDomain_1, "objectIsForcedForKey:inDomain:" },
-        { &sel_evaluationErrorSpecifier, "evaluationErrorSpecifier" },
-        { &sel_application_1openFile_1, "application:openFile:" },
-        { &sel_changeDocumentBackgroundColor_1, "changeDocumentBackgroundColor:" },
-        { &sel_volatileDomainNames, "volatileDomainNames" },
-        { &sel_changeInLength, "changeInLength" },
-        { &sel_autoresizingMask, "autoresizingMask" },
-        { &sel_setRepresentedObject_1, "setRepresentedObject:" },
-        { &sel_isUndoRegistrationEnabled, "isUndoRegistrationEnabled" },
-        { &sel_alertWithError_1, "alertWithError:" },
-        { &sel_saturationComponent, "saturationComponent" },
-        { &sel_spellServer_1didLearnWord_1inLanguage_1, "spellServer:didLearnWord:inLanguage:" },
-        { &sel_performActionWithHighlightingForItemAtIndex_1, "performActionWithHighlightingForItemAtIndex:" },
-        { &sel_loadSuitesFromBundle_1, "loadSuitesFromBundle:" },
-        { &sel_firstTextView, "firstTextView" },
-        { &sel_targetForAction_1, "targetForAction:" },
-        { &sel_enterExitEventWithType_1location_1modifierFlags_1timestamp_1windowNumber_1context_1eventNumber_1trackingNumber_1userData_1, "enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:" },
-        { &sel_setHelpAnchor_1, "setHelpAnchor:" },
-        { &sel_printerWithName_1, "printerWithName:" },
-        { &sel_boundingBoxForControlGlyphAtIndex_1forTextContainer_1proposedLineFragment_1glyphPosition_1characterIndex_1, "boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:" },
-        { &sel_initWithBytesNoCopy_1length_1freeWhenDone_1, "initWithBytesNoCopy:length:freeWhenDone:" },
-        { &sel_getRow_1column_1ofCell_1, "getRow:column:ofCell:" },
-        { &sel_smartDeleteRangeForProposedRange_1, "smartDeleteRangeForProposedRange:" },
-        { &sel_getHue_1saturation_1brightness_1alpha_1, "getHue:saturation:brightness:alpha:" },
-        { &sel_automaticallyNotifiesObserversForKey_1, "automaticallyNotifiesObserversForKey:" },
-        { &sel_setAllowsImageEditing_1, "setAllowsImageEditing:" },
-        { &sel_draggingUpdated_1, "draggingUpdated:" },
-        { &sel_insertRowAtIndex_1withType_1asSubrowOfRow_1animate_1, "insertRowAtIndex:withType:asSubrowOfRow:animate:" },
-        { &sel_getRectsExposedDuringLiveResize_1count_1, "getRectsExposedDuringLiveResize:count:" },
-        { &sel_usesSignificantDigits, "usesSignificantDigits" },
-        { &sel_numberOfVirtualScreens, "numberOfVirtualScreens" },
-        { &sel_sendSynchronousRequest_1returningResponse_1error_1, "sendSynchronousRequest:returningResponse:error:" },
-        { &sel_setBecomesKeyOnlyIfNeeded_1, "setBecomesKeyOnlyIfNeeded:" },
-        { &sel_autorecalculatesKeyViewLoop, "autorecalculatesKeyViewLoop" },
-        { &sel_decodeDataObject, "decodeDataObject" },
-        { &sel_setOriginOffset_1, "setOriginOffset:" },
-        { &sel_pointingDeviceSerialNumber, "pointingDeviceSerialNumber" },
-        { &sel_drawSegment_1inFrame_1withView_1, "drawSegment:inFrame:withView:" },
-        { &sel_close, "close" },
-        { &sel_setAlignmentRect_1, "setAlignmentRect:" },
-        { &sel_paragraphSeparatorCharacterRange, "paragraphSeparatorCharacterRange" },
-        { &sel_measurementUnits, "measurementUnits" },
-        { &sel_setUsesEPSOnResolutionMismatch_1, "setUsesEPSOnResolutionMismatch:" },
-        { &sel_setLineFragmentPadding_1, "setLineFragmentPadding:" },
-        { &sel_setLastComponentOfFileName_1, "setLastComponentOfFileName:" },
-        { &sel_initWithSuiteName_1commandName_1dictionary_1, "initWithSuiteName:commandName:dictionary:" },
-        { &sel_initWithContent_1, "initWithContent:" },
-        { &sel_provideNewView_1, "provideNewView:" },
-        { &sel_pathComponentCells, "pathComponentCells" },
-        { &sel_instanceMethodForSelector_1, "instanceMethodForSelector:" },
-        { &sel_layoutManagerDidInvalidateLayout_1, "layoutManagerDidInvalidateLayout:" },
-        { &sel_helpAnchor, "helpAnchor" },
-        { &sel_URLProtocol_1wasRedirectedToRequest_1redirectResponse_1, "URLProtocol:wasRedirectedToRequest:redirectResponse:" },
-        { &sel_setIsVisible_1, "setIsVisible:" },
-        { &sel_browser_1sizeToFitWidthOfColumn_1, "browser:sizeToFitWidthOfColumn:" },
-        { &sel_handleFailureInMethod_1object_1file_1lineNumber_1description_1, "handleFailureInMethod:object:file:lineNumber:description:" },
-        { &sel_serializedRepresentation, "serializedRepresentation" },
-        { &sel_replaceTextContainer_1, "replaceTextContainer:" },
-        { &sel_speechSynthesizer_1willSpeakWord_1ofString_1, "speechSynthesizer:willSpeakWord:ofString:" },
-        { &sel_startSpeaking_1, "startSpeaking:" },
-        { &sel_setHyphenationFactor_1, "setHyphenationFactor:" },
-        { &sel_retain, "retain" },
-        { &sel_insertItem_1atIndex_1, "insertItem:atIndex:" },
-        { &sel_sortWithSortDescriptors_1recursively_1, "sortWithSortDescriptors:recursively:" },
-        { &sel_selectTabViewItem_1, "selectTabViewItem:" },
-        { &sel_clipRect_1, "clipRect:" },
-        { &sel_close_1, "close:" },
-        { &sel_didAddSubview_1, "didAddSubview:" },
-        { &sel_markedTextSelectionChanged_1client_1, "markedTextSelectionChanged:client:" },
-        { &sel_registerLanguage_1byVendor_1, "registerLanguage:byVendor:" },
-        { &sel_removeClient_1, "removeClient:" },
-        { &sel_setSendsWholeSearchString_1, "setSendsWholeSearchString:" },
-        { &sel_localName, "localName" },
-        { &sel_setSelectedSegment_1, "setSelectedSegment:" },
-        { &sel_setLineHeightMultiple_1, "setLineHeightMultiple:" },
-        { &sel_setCanCreateDirectories_1, "setCanCreateDirectories:" },
-        { &sel_setCookieAcceptPolicy_1, "setCookieAcceptPolicy:" },
-        { &sel_convertFont_1toHaveTrait_1, "convertFont:toHaveTrait:" },
-        { &sel_headerCell, "headerCell" },
-        { &sel_maximumDecimalNumber, "maximumDecimalNumber" },
-        { &sel_browser_1isColumnValid_1, "browser:isColumnValid:" },
-        { &sel_tableViewSelectionIsChanging_1, "tableViewSelectionIsChanging:" },
-        { &sel_setNotificationBatchingInterval_1, "setNotificationBatchingInterval:" },
-        { &sel_isLeaf, "isLeaf" },
-        { &sel_valuesForAttributes_1, "valuesForAttributes:" },
-        { &sel_removeTemporaryAttribute_1forCharacterRange_1, "removeTemporaryAttribute:forCharacterRange:" },
-        { &sel_pixelsWide, "pixelsWide" },
-        { &sel_orderFrontStandardAboutPanel_1, "orderFrontStandardAboutPanel:" },
-        { &sel_beginSheetModalForWindow_1modalDelegate_1didEndSelector_1contextInfo_1, "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:" },
-        { &sel_setToolTip_1forSegment_1, "setToolTip:forSegment:" },
-        { &sel_canonicalXMLStringPreservingComments_1, "canonicalXMLStringPreservingComments:" },
-        { &sel_orderFrontListPanel_1, "orderFrontListPanel:" },
-        { &sel_setIsMiniaturized_1, "setIsMiniaturized:" },
-        { &sel_download_1didReceiveDataOfLength_1, "download:didReceiveDataOfLength:" },
-        { &sel_layoutManager_1didCompleteLayoutForTextContainer_1atEnd_1, "layoutManager:didCompleteLayoutForTextContainer:atEnd:" },
-        { &sel_standardWindowButton_1forStyleMask_1, "standardWindowButton:forStyleMask:" },
-        { &sel_writeToURL_1atomically_1, "writeToURL:atomically:" },
-        { &sel_useStandardLigatures_1, "useStandardLigatures:" },
-        { &sel_currentRunLoop, "currentRunLoop" },
-        { &sel_setExtraLineFragmentRect_1usedRect_1textContainer_1, "setExtraLineFragmentRect:usedRect:textContainer:" },
-        { &sel_rootElement, "rootElement" },
-        { &sel_setContentViewMargins_1, "setContentViewMargins:" },
-        { &sel_cancelPerformSelector_1target_1argument_1, "cancelPerformSelector:target:argument:" },
-        { &sel_outputFormat, "outputFormat" },
-        { &sel_arrayWithContentsOfFile_1, "arrayWithContentsOfFile:" },
-        { &sel_applicationWillFinishLaunching_1, "applicationWillFinishLaunching:" },
-        { &sel_prefixForName_1, "prefixForName:" },
-        { &sel_decimalNumberByDividingBy_1, "decimalNumberByDividingBy:" },
-        { &sel_mouseUpOnCharacterIndex_1atCoordinate_1withModifier_1client_1, "mouseUpOnCharacterIndex:atCoordinate:withModifier:client:" },
-        { &sel_defaultVoice, "defaultVoice" },
-        { &sel_operand, "operand" },
-        { &sel_moveToEndOfLine_1, "moveToEndOfLine:" },
-        { &sel_addEntry_1, "addEntry:" },
-        { &sel_scaleBy_1, "scaleBy:" },
-        { &sel_setMnemonicLocation_1, "setMnemonicLocation:" },
-        { &sel_dateWithCalendarFormat_1timeZone_1, "dateWithCalendarFormat:timeZone:" },
-        { &sel_setUsesFontLeading_1, "setUsesFontLeading:" },
-        { &sel_CIContext, "CIContext" },
-        { &sel_isDaylightSavingTime, "isDaylightSavingTime" },
-        { &sel_setShowsBorderOnlyWhileMouseInside_1, "setShowsBorderOnlyWhileMouseInside:" },
-        { &sel_isSetOnMouseEntered, "isSetOnMouseEntered" },
-        { &sel_stringFromDate_1, "stringFromDate:" },
-        { &sel_deselectColumn_1, "deselectColumn:" },
-        { &sel_requestHeaderFieldsWithCookies_1, "requestHeaderFieldsWithCookies:" },
-        { &sel_outlineViewColumnDidMove_1, "outlineViewColumnDidMove:" },
-        { &sel_fileExtensionsFromType_1, "fileExtensionsFromType:" },
-        { &sel_setUsesScreenFonts_1, "setUsesScreenFonts:" },
-        { &sel_commandDescriptionsInSuite_1, "commandDescriptionsInSuite:" },
-        { &sel_notShownAttributeForGlyphAtIndex_1, "notShownAttributeForGlyphAtIndex:" },
-        { &sel_isRunning, "isRunning" },
-        { &sel_sharedPrintInfo, "sharedPrintInfo" },
-        { &sel_isValid, "isValid" },
-        { &sel_handleFailureInFunction_1file_1lineNumber_1description_1, "handleFailureInFunction:file:lineNumber:description:" },
-        { &sel_localizedRecoveryOptions, "localizedRecoveryOptions" },
-        { &sel_establishConnection, "establishConnection" },
-        { &sel_isMainWindow, "isMainWindow" },
-        { &sel_setDrawsBackground_1, "setDrawsBackground:" },
-        { &sel_intAttribute_1forGlyphAtIndex_1, "intAttribute:forGlyphAtIndex:" },
-        { &sel_shadowColor, "shadowColor" },
-        { &sel_keyEquivalentModifierMask, "keyEquivalentModifierMask" },
-        { &sel_textStorageDidProcessEditing_1, "textStorageDidProcessEditing:" },
-        { &sel_setType_1, "setType:" },
-        { &sel_previousSibling, "previousSibling" },
-        { &sel_dateByAddingYears_1months_1days_1hours_1minutes_1seconds_1, "dateByAddingYears:months:days:hours:minutes:seconds:" },
-        { &sel_setMinimum_1, "setMinimum:" },
-        { &sel_columnAutoresizingStyle, "columnAutoresizingStyle" },
-        { &sel_convertPointFromBase_1, "convertPointFromBase:" },
-        { &sel_layout, "layout" },
-        { &sel_textStorage, "textStorage" },
-        { &sel_values, "values" },
-        { &sel_RTFFromRange_1documentAttributes_1, "RTFFromRange:documentAttributes:" },
-        { &sel_isMiniaturizable, "isMiniaturizable" },
-        { &sel_opaqueAncestor, "opaqueAncestor" },
-        { &sel_notationName, "notationName" },
-        { &sel_setBaseWritingDirection_1range_1, "setBaseWritingDirection:range:" },
-        { &sel_setManagedObjectContext_1, "setManagedObjectContext:" },
-        { &sel_patternImage, "patternImage" },
-        { &sel_windowDidResize_1, "windowDidResize:" },
-        { &sel_setFieldEditor_1, "setFieldEditor:" },
-        { &sel_initWithContainerClassDescription_1containerSpecifier_1key_1relativePosition_1baseSpecifier_1, "initWithContainerClassDescription:containerSpecifier:key:relativePosition:baseSpecifier:" },
-        { &sel_setMainMenu_1, "setMainMenu:" },
-        { &sel_setObjectZone_1, "setObjectZone:" },
-        { &sel_localizedDescription, "localizedDescription" },
-        { &sel_setImageScaling_1, "setImageScaling:" },
-        { &sel_moveToBeginningOfLine_1, "moveToBeginningOfLine:" },
-        { &sel_transposeWords_1, "transposeWords:" },
-        { &sel_protocol, "protocol" },
-        { &sel_isHorizontallyCentered, "isHorizontallyCentered" },
-        { &sel_invert, "invert" },
-        { &sel_isEqualToValue_1, "isEqualToValue:" },
-        { &sel_registerName_1withNameServer_1, "registerName:withNameServer:" },
-        { &sel_writeToURL_1ofType_1error_1, "writeToURL:ofType:error:" },
-        { &sel_rangeForUserTextChange, "rangeForUserTextChange" },
-        { &sel_configurePersistentStoreCoordinatorForURL_1ofType_1error_1, "configurePersistentStoreCoordinatorForURL:ofType:error:" },
-        { &sel_setShouldAntialias_1, "setShouldAntialias:" },
-        { &sel_alignmentRect, "alignmentRect" },
-        { &sel_zoom_1, "zoom:" },
-        { &sel_rate, "rate" },
-        { &sel_maxVisibleColumns, "maxVisibleColumns" },
-        { &sel_splitViewDidResizeSubviews_1, "splitViewDidResizeSubviews:" },
-        { &sel_maxWidth, "maxWidth" },
-        { &sel_setData_1, "setData:" },
-        { &sel_isVisible, "isVisible" },
-        { &sel_isSelected, "isSelected" },
-        { &sel_rulerView_1shouldRemoveMarker_1, "rulerView:shouldRemoveMarker:" },
-        { &sel_setURL_1, "setURL:" },
-        { &sel_drawTitle_1withFrame_1inView_1, "drawTitle:withFrame:inView:" },
-        { &sel_usesWeakReadAndWriteBarriers, "usesWeakReadAndWriteBarriers" },
-        { &sel_elementDeclarationForName_1, "elementDeclarationForName:" },
-        { &sel_setOneShot_1, "setOneShot:" },
-        { &sel_shouldProcessNamespaces, "shouldProcessNamespaces" },
-        { &sel_isEqualToArray_1, "isEqualToArray:" },
-        { &sel_XMLStringWithOptions_1, "XMLStringWithOptions:" },
-        { &sel_initFileURLWithPath_1isDirectory_1, "initFileURLWithPath:isDirectory:" },
-        { &sel_datePickerElements, "datePickerElements" },
-        { &sel_willChange_1valuesAtIndexes_1forKey_1, "willChange:valuesAtIndexes:forKey:" },
-        { &sel_setSelected_1forSegment_1, "setSelected:forSegment:" },
-        { &sel_initWithFormat_1shareContext_1, "initWithFormat:shareContext:" },
-        { &sel_browser_1shouldSizeColumn_1forUserResize_1toWidth_1, "browser:shouldSizeColumn:forUserResize:toWidth:" },
-        { &sel_indexSetWithIndexesInRange_1, "indexSetWithIndexesInRange:" },
-        { &sel_netServiceBrowser_1didFindService_1moreComing_1, "netServiceBrowser:didFindService:moreComing:" },
-        { &sel_keyUp_1, "keyUp:" },
-        { &sel_pageHeader, "pageHeader" },
-        { &sel_isCancelled, "isCancelled" },
-        { &sel_segmentStyle, "segmentStyle" },
-        { &sel_imageRepWithContentsOfURL_1, "imageRepWithContentsOfURL:" },
-        { &sel_initWithNibName_1bundle_1, "initWithNibName:bundle:" },
-        { &sel_removeObserver_1fromObjectsAtIndexes_1forKeyPath_1, "removeObserver:fromObjectsAtIndexes:forKeyPath:" },
-        { &sel_setFetchPredicate_1, "setFetchPredicate:" },
-        { &sel_compare_1options_1range_1, "compare:options:range:" },
-        { &sel_validateVisibleColumns, "validateVisibleColumns" },
-        { &sel_initWithCGColorSpace_1, "initWithCGColorSpace:" },
-        { &sel_mountNewRemovableMedia, "mountNewRemovableMedia" },
-        { &sel_compare_1options_1range_1locale_1, "compare:options:range:locale:" },
-        { &sel_setTopMargin_1, "setTopMargin:" },
-        { &sel_maximumLengthOfBytesUsingEncoding_1, "maximumLengthOfBytesUsingEncoding:" },
-        { &sel_colorWithAlphaComponent_1, "colorWithAlphaComponent:" },
-        { &sel_appendBezierPathWithRoundedRect_1xRadius_1yRadius_1, "appendBezierPathWithRoundedRect:xRadius:yRadius:" },
-        { &sel_autosavedContentsFileURL, "autosavedContentsFileURL" },
-        { &sel_markedTextAttributes, "markedTextAttributes" },
-        { &sel_predicateWithValue_1, "predicateWithValue:" },
-        { &sel_makeFirstResponder_1, "makeFirstResponder:" },
-        { &sel_alternateTitle, "alternateTitle" },
-        { &sel_attribute, "attribute" },
-        { &sel_decodeIntegerForKey_1, "decodeIntegerForKey:" },
-        { &sel_setSeparatesColumns_1, "setSeparatesColumns:" },
-        { &sel_imageRepsWithContentsOfURL_1, "imageRepsWithContentsOfURL:" },
-        { &sel_isPlanar, "isPlanar" },
-        { &sel_download_1didReceiveAuthenticationChallenge_1, "download:didReceiveAuthenticationChallenge:" },
-        { &sel_startingRow, "startingRow" },
-        { &sel_evaluateWithObject_1substitutionVariables_1, "evaluateWithObject:substitutionVariables:" },
-        { &sel_initWithRTFD_1documentAttributes_1, "initWithRTFD:documentAttributes:" },
-        { &sel_ensureLayoutForTextContainer_1, "ensureLayoutForTextContainer:" },
-        { &sel_runModalForWindow_1relativeToWindow_1, "runModalForWindow:relativeToWindow:" },
-        { &sel_isResizable, "isResizable" },
-        { &sel_isSymbolicLink, "isSymbolicLink" },
-        { &sel_containsIndexes_1, "containsIndexes:" },
-        { &sel_splitView_1constrainMaxCoordinate_1ofSubviewAt_1, "splitView:constrainMaxCoordinate:ofSubviewAt:" },
-        { &sel_setImportsGraphics_1, "setImportsGraphics:" },
-        { &sel_action, "action" },
-        { &sel_noteNumberOfItemsChanged, "noteNumberOfItemsChanged" },
-        { &sel_drawBackgroundInClipRect_1, "drawBackgroundInClipRect:" },
-        { &sel_printInfo, "printInfo" },
-        { &sel_performSelector_1withObject_1afterDelay_1, "performSelector:withObject:afterDelay:" },
-        { &sel_boundingRectForGlyphRange_1inTextContainer_1, "boundingRectForGlyphRange:inTextContainer:" },
-        { &sel_currencyCode, "currencyCode" },
-        { &sel_splitView_1canCollapseSubview_1, "splitView:canCollapseSubview:" },
-        { &sel_hide, "hide" },
-        { &sel_setMonth_1, "setMonth:" },
-        { &sel_dataFromTXTRecordDictionary_1, "dataFromTXTRecordDictionary:" },
-        { &sel_rulerView_1didAddMarker_1, "rulerView:didAddMarker:" },
-        { &sel_deleteBackward_1, "deleteBackward:" },
-        { &sel_setMaximumLineHeight_1, "setMaximumLineHeight:" },
-        { &sel_orderedWindows, "orderedWindows" },
-        { &sel_standaloneWeekdaySymbols, "standaloneWeekdaySymbols" },
-        { &sel_isAttached, "isAttached" },
-        { &sel_resizeLeftRightCursor, "resizeLeftRightCursor" },
-        { &sel_methodSignature, "methodSignature" },
-        { &sel_setDiskCapacity_1, "setDiskCapacity:" },
-        { &sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, "lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:" },
-        { &sel_screen, "screen" },
-        { &sel_windowNumber, "windowNumber" },
-        { &sel_selectSegmentWithTag_1, "selectSegmentWithTag:" },
-        { &sel_availableFontFamilies, "availableFontFamilies" },
-        { &sel_superclass, "superclass" },
-        { &sel_registeredImageRepClasses, "registeredImageRepClasses" },
-        { &sel_needsSizing, "needsSizing" },
-        { &sel_setUsesAlternatingRowBackgroundColors_1, "setUsesAlternatingRowBackgroundColors:" },
-        { &sel_getBitmapDataPlanes_1, "getBitmapDataPlanes:" },
-        { &sel_fontWithFamily_1traits_1weight_1size_1, "fontWithFamily:traits:weight:size:" },
-        { &sel_borderColor, "borderColor" },
-        { &sel_colorUsingColorSpace_1, "colorUsingColorSpace:" },
-        { &sel_propertyForKey_1, "propertyForKey:" },
-        { &sel_setPublicID_1, "setPublicID:" },
-        { &sel_forwardInvocation_1, "forwardInvocation:" },
-        { &sel_deleteToBeginningOfLine_1, "deleteToBeginningOfLine:" },
-        { &sel_hasNonContiguousLayout, "hasNonContiguousLayout" },
-        { &sel_getObjects_1, "getObjects:" },
-        { &sel_clearRecentDocuments_1, "clearRecentDocuments:" },
-        { &sel_paletteFontOfSize_1, "paletteFontOfSize:" },
-        { &sel_rightMargin, "rightMargin" },
-        { &sel_browser_1createRowsForColumn_1inMatrix_1, "browser:createRowsForColumn:inMatrix:" },
-        { &sel_removeItemAtPath_1error_1, "removeItemAtPath:error:" },
-        { &sel_getRectsBeingDrawn_1count_1, "getRectsBeingDrawn:count:" },
-        { &sel_numberWithUnsignedInt_1, "numberWithUnsignedInt:" },
-        { &sel_complete_1, "complete:" },
-        { &sel_synchronizeTitleAndSelectedItem, "synchronizeTitleAndSelectedItem" },
-        { &sel_archiverData, "archiverData" },
-        { &sel_selectNextTabViewItem_1, "selectNextTabViewItem:" },
-        { &sel_displayNameForType_1, "displayNameForType:" },
-        { &sel_defaultNameServerPortNumber, "defaultNameServerPortNumber" },
-        { &sel_setFireDate_1, "setFireDate:" },
-        { &sel_selectFirstTabViewItem_1, "selectFirstTabViewItem:" },
-        { &sel_setRightMargin_1, "setRightMargin:" },
-        { &sel_menuView, "menuView" },
-        { &sel_removeObjectsFromIndices_1numIndices_1, "removeObjectsFromIndices:numIndices:" },
-        { &sel_tabKeyTraversesCells, "tabKeyTraversesCells" },
-        { &sel_initToBuffer_1capacity_1, "initToBuffer:capacity:" },
-        { &sel_endPage, "endPage" },
-        { &sel_setTextAttributesForNotANumber_1, "setTextAttributesForNotANumber:" },
-        { &sel_makeNextSegmentKey, "makeNextSegmentKey" },
-        { &sel_addAttributes_1range_1, "addAttributes:range:" },
-        { &sel_lineFragmentPadding, "lineFragmentPadding" },
-        { &sel_showController_1adjustingSize_1, "showController:adjustingSize:" },
-        { &sel_glyphInfoWithGlyphName_1forFont_1baseString_1, "glyphInfoWithGlyphName:forFont:baseString:" },
-        { &sel_initWithCondition_1, "initWithCondition:" },
-        { &sel_handleMachMessage_1, "handleMachMessage:" },
-        { &sel_setFontMenu_1, "setFontMenu:" },
-        { &sel_invocationWithMethodSignature_1, "invocationWithMethodSignature:" },
-        { &sel_textAttributesForPositiveValues, "textAttributesForPositiveValues" },
-        { &sel_decodePointForKey_1, "decodePointForKey:" },
-        { &sel_doubleForKey_1, "doubleForKey:" },
-        { &sel_application_1willPresentError_1, "application:willPresentError:" },
-        { &sel_setFloatingPointFormat_1left_1right_1, "setFloatingPointFormat:left:right:" },
-        { &sel_loadColumnZero, "loadColumnZero" },
-        { &sel_availableFonts, "availableFonts" },
-        { &sel_drawUnderlineForGlyphRange_1underlineType_1baselineOffset_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1, "drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:" },
-        { &sel_highlightedTableColumn, "highlightedTableColumn" },
-        { &sel_removeObjectsInRange_1, "removeObjectsInRange:" },
-        { &sel_rectForKey_1inTable_1, "rectForKey:inTable:" },
-        { &sel_canStoreColor, "canStoreColor" },
-        { &sel_windowWillMiniaturize_1, "windowWillMiniaturize:" },
-        { &sel_documentForWindow_1, "documentForWindow:" },
-        { &sel_setAttributedStringForNotANumber_1, "setAttributedStringForNotANumber:" },
-        { &sel_rangeOfString_1options_1range_1, "rangeOfString:options:range:" },
-        { &sel_pause, "pause" },
-        { &sel_continueTracking_1at_1inView_1, "continueTracking:at:inView:" },
-        { &sel_servicesProvider, "servicesProvider" },
-        { &sel_setIgnoredWords_1inSpellDocumentWithTag_1, "setIgnoredWords:inSpellDocumentWithTag:" },
-        { &sel_clear_1, "clear:" },
-        { &sel_readFromData_1options_1documentAttributes_1error_1, "readFromData:options:documentAttributes:error:" },
-        { &sel_columnNumber, "columnNumber" },
-        { &sel_components, "components" },
-        { &sel_image, "image" },
-        { &sel_setDisplayMode_1, "setDisplayMode:" },
-        { &sel_insertParagraphSeparator_1, "insertParagraphSeparator:" },
-        { &sel_setPaperName_1, "setPaperName:" },
-        { &sel_defaultFormatterBehavior, "defaultFormatterBehavior" },
-        { &sel_timeZoneWithAbbreviation_1, "timeZoneWithAbbreviation:" },
-        { &sel_setHighlighted_1, "setHighlighted:" },
-        { &sel_addFileWithPath_1, "addFileWithPath:" },
-        { &sel_allowsDocumentBackgroundColorChange, "allowsDocumentBackgroundColorChange" },
-        { &sel_initWithURL_1documentAttributes_1, "initWithURL:documentAttributes:" },
-        { &sel_allowsUndo, "allowsUndo" },
-        { &sel_localeIdentifierFromComponents_1, "localeIdentifierFromComponents:" },
-        { &sel_allowsNonContiguousLayout, "allowsNonContiguousLayout" },
-        { &sel_arrayWithArray_1, "arrayWithArray:" },
-        { &sel_setCompositingOperation_1, "setCompositingOperation:" },
-        { &sel_netServiceBrowserDidStopSearch_1, "netServiceBrowserDidStopSearch:" },
-        { &sel_setHorizontalEdgePadding_1, "setHorizontalEdgePadding:" },
-        { &sel_accessibilityActionDescription_1, "accessibilityActionDescription:" },
-        { &sel_localizedKeyDictionary, "localizedKeyDictionary" },
-        { &sel_initWithColorSyncProfile_1, "initWithColorSyncProfile:" },
-        { &sel_displayedCommandsTitle, "displayedCommandsTitle" },
-        { &sel_flatness, "flatness" },
-        { &sel_localizations, "localizations" },
-        { &sel_mountedRemovableMedia, "mountedRemovableMedia" },
-        { &sel_topAutoreleasePoolCount, "topAutoreleasePoolCount" },
-        { &sel_postsFrameChangedNotifications, "postsFrameChangedNotifications" },
-        { &sel_performZoom_1, "performZoom:" },
-        { &sel_moveBackward_1, "moveBackward:" },
-        { &sel_verticalPageScroll, "verticalPageScroll" },
-        { &sel_setToolTip_1forCell_1, "setToolTip:forCell:" },
-        { &sel_layoutManagerOwnsFirstResponderInWindow_1, "layoutManagerOwnsFirstResponderInWindow:" },
-        { &sel_jobStyleHint, "jobStyleHint" },
-        { &sel_selectionIndexes, "selectionIndexes" },
-        { &sel_segmentCount, "segmentCount" },
-        { &sel_accessibilityIsIgnored, "accessibilityIsIgnored" },
-        { &sel_hasUnautosavedChanges, "hasUnautosavedChanges" },
-        { &sel_deactivate, "deactivate" },
-        { &sel_setSelectionIndexPaths_1, "setSelectionIndexPaths:" },
-        { &sel_pathForSoundResource_1, "pathForSoundResource:" },
-        { &sel_setUsesRuler_1, "setUsesRuler:" },
-        { &sel_takeSelectedTabViewItemFromSender_1, "takeSelectedTabViewItemFromSender:" },
-        { &sel_writeToFile_1ofType_1originalFile_1saveOperation_1, "writeToFile:ofType:originalFile:saveOperation:" },
-        { &sel_numberWithLong_1, "numberWithLong:" },
-        { &sel_interiorBackgroundStyle, "interiorBackgroundStyle" },
-        { &sel_insertionPointColor, "insertionPointColor" },
-        { &sel_prompt, "prompt" },
-        { &sel_finishLaunching, "finishLaunching" },
-        { &sel_addTextContainer_1, "addTextContainer:" },
-        { &sel_setAutosavedContentsFileURL_1, "setAutosavedContentsFileURL:" },
-        { &sel_initWithFrame_1textContainer_1, "initWithFrame:textContainer:" },
-        { &sel_clearColor, "clearColor" },
-        { &sel_insertText_1, "insertText:" },
-        { &sel_sendAction, "sendAction" },
-        { &sel_innerRect, "innerRect" },
-        { &sel_pointerFunctions, "pointerFunctions" },
-        { &sel_key, "key" },
-        { &sel_comboBoxSelectionDidChange_1, "comboBoxSelectionDidChange:" },
-        { &sel_hasMarkedText, "hasMarkedText" },
-        { &sel_setDefaultLineCapStyle_1, "setDefaultLineCapStyle:" },
-        { &sel_stringListForKey_1inTable_1, "stringListForKey:inTable:" },
-        { &sel_defaultConnection, "defaultConnection" },
-        { &sel_pathContentOfSymbolicLinkAtPath_1, "pathContentOfSymbolicLinkAtPath:" },
-        { &sel_stringWithContentsOfFile_1encoding_1error_1, "stringWithContentsOfFile:encoding:error:" },
-        { &sel_detachSubmenu, "detachSubmenu" },
-        { &sel_isSecure, "isSecure" },
-        { &sel_movie, "movie" },
-        { &sel_outlineViewItemWillExpand_1, "outlineViewItemWillExpand:" },
-        { &sel_sharedScriptSuiteRegistry, "sharedScriptSuiteRegistry" },
-        { &sel_removeCharactersInString_1, "removeCharactersInString:" },
-        { &sel_setLocation_1withAdvancements_1forStartOfGlyphRange_1, "setLocation:withAdvancements:forStartOfGlyphRange:" },
-        { &sel_moveDownAndModifySelection_1, "moveDownAndModifySelection:" },
-        { &sel_fileAttributesToWriteToURL_1ofType_1forSaveOperation_1originalContentsURL_1error_1, "fileAttributesToWriteToURL:ofType:forSaveOperation:originalContentsURL:error:" },
-        { &sel_classDescriptionForKey_1, "classDescriptionForKey:" },
-        { &sel_addRequestMode_1, "addRequestMode:" },
-        { &sel_setPullsDown_1, "setPullsDown:" },
-        { &sel_setItemHeight_1, "setItemHeight:" },
-        { &sel_printerFont, "printerFont" },
-        { &sel_linkTextAttributes, "linkTextAttributes" },
-        { &sel_state, "state" },
-        { &sel_shouldCloseWindowController_1delegate_1shouldCloseSelector_1contextInfo_1, "shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:" },
-        { &sel_addIndex_1, "addIndex:" },
-        { &sel_setChildSpecifier_1, "setChildSpecifier:" },
-        { &sel_toolbarDidRemoveItem_1, "toolbarDidRemoveItem:" },
-        { &sel_displayName, "displayName" },
-        { &sel_setInsertionPointColor_1, "setInsertionPointColor:" },
-        { &sel_bezierPathByReversingPath, "bezierPathByReversingPath" },
-        { &sel_connection_1didReceiveData_1, "connection:didReceiveData:" },
-        { &sel_eraSymbols, "eraSymbols" },
-        { &sel_removeObjectsForKeys_1, "removeObjectsForKeys:" },
-        { &sel_subrowIndexesForRow_1, "subrowIndexesForRow:" },
-        { &sel_increaseLengthBy_1, "increaseLengthBy:" },
-        { &sel_viewDidEndLiveResize, "viewDidEndLiveResize" },
-        { &sel_encodeBool_1forKey_1, "encodeBool:forKey:" },
-        { &sel_handleQueryWithUnboundKey_1, "handleQueryWithUnboundKey:" },
-        { &sel_elementsForName_1, "elementsForName:" },
-        { &sel_cascadeTopLeftFromPoint_1, "cascadeTopLeftFromPoint:" },
-        { &sel_linkItemAtPath_1toPath_1error_1, "linkItemAtPath:toPath:error:" },
-        { &sel_frameSizeForContentSize_1hasHorizontalScroller_1hasVerticalScroller_1borderType_1, "frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:" },
-        { &sel_initWithString_1attributes_1, "initWithString:attributes:" },
-        { &sel_readFromData_1options_1documentAttributes_1, "readFromData:options:documentAttributes:" },
-        { &sel_setAlpha_1, "setAlpha:" },
-        { &sel_hash, "hash" },
-        { &sel_rangeForUserParagraphAttributeChange, "rangeForUserParagraphAttributeChange" },
-        { &sel_initWithData_1encoding_1, "initWithData:encoding:" },
-        { &sel_newScriptingObjectOfClass_1forValueForKey_1withContentsValue_1properties_1, "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:" },
-        { &sel_pageDown_1, "pageDown:" },
-        { &sel_hasCloseBox, "hasCloseBox" },
-        { &sel_standardizedURL, "standardizedURL" },
-        { &sel_setAttributes_1range_1, "setAttributes:range:" },
-        { &sel_setControlSize_1, "setControlSize:" },
-        { &sel_revertToInitialValues_1, "revertToInitialValues:" },
-        { &sel_setIntAttribute_1value_1forGlyphAtIndex_1, "setIntAttribute:value:forGlyphAtIndex:" },
-        { &sel_stopTracking_1at_1inView_1mouseIsUp_1, "stopTracking:at:inView:mouseIsUp:" },
-        { &sel_setParamDescriptor_1forKeyword_1, "setParamDescriptor:forKeyword:" },
-        { &sel_textShouldBeginEditing_1, "textShouldBeginEditing:" },
-        { &sel_applicationDidHide_1, "applicationDidHide:" },
-        { &sel_beginSheetWithPrintInfo_1modalForWindow_1delegate_1didEndSelector_1contextInfo_1, "beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:" },
-        { &sel_shiftIndexesStartingAtIndex_1by_1, "shiftIndexesStartingAtIndex:by:" },
-        { &sel_getStreamsToHost_1port_1inputStream_1outputStream_1, "getStreamsToHost:port:inputStream:outputStream:" },
-        { &sel_attributesOfFileSystemForPath_1error_1, "attributesOfFileSystemForPath:error:" },
-        { &sel_setTemporaryAttributes_1forCharacterRange_1, "setTemporaryAttributes:forCharacterRange:" },
-        { &sel_checkSpellingOfString_1startingAt_1language_1wrap_1inSpellDocumentWithTag_1wordCount_1, "checkSpellingOfString:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:" },
-        { &sel_insertChild_1atIndex_1, "insertChild:atIndex:" },
-        { &sel_defaultManager, "defaultManager" },
-        { &sel_invocation, "invocation" },
-        { &sel_setMinValue_1, "setMinValue:" },
-        { &sel_decodeSize, "decodeSize" },
-        { &sel_replaceObject_1withObject_1, "replaceObject:withObject:" },
-        { &sel_descriptionWithLocale_1, "descriptionWithLocale:" },
-        { &sel_setSharingType_1, "setSharingType:" },
-        { &sel_isLenient, "isLenient" },
-        { &sel_decimalNumberWithString_1locale_1, "decimalNumberWithString:locale:" },
-        { &sel_allowedTypes, "allowedTypes" },
-        { &sel_superscript_1, "superscript:" },
-        { &sel_initWithContentsOfFile_1encoding_1error_1, "initWithContentsOfFile:encoding:error:" },
-        { &sel_windowsMenu, "windowsMenu" },
-        { &sel_performSelector_1target_1argument_1order_1modes_1, "performSelector:target:argument:order:modes:" },
-        { &sel_unscheduleFromRunLoop_1forMode_1, "unscheduleFromRunLoop:forMode:" },
-        { &sel_evaluatedArguments, "evaluatedArguments" },
-        { &sel_encodeSize_1forKey_1, "encodeSize:forKey:" },
-        { &sel_sendBeforeDate_1components_1from_1reserved_1, "sendBeforeDate:components:from:reserved:" },
-        { &sel_containerSize, "containerSize" },
-        { &sel_selectedTextColor, "selectedTextColor" },
-        { &sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1, "getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:" },
-        { &sel_curveToPoint_1controlPoint1_1controlPoint2_1, "curveToPoint:controlPoint1:controlPoint2:" },
-        { &sel_mutableBytes, "mutableBytes" },
-        { &sel_rangeOfUnit_1inUnit_1forDate_1, "rangeOfUnit:inUnit:forDate:" },
-        { &sel_allowsNaturalLanguage, "allowsNaturalLanguage" },
-        { &sel_mouseLocation, "mouseLocation" },
-        { &sel_selectCellAtRow_1column_1, "selectCellAtRow:column:" },
-        { &sel_toggleBaseWritingDirection_1, "toggleBaseWritingDirection:" },
-        { &sel_maximum, "maximum" },
-        { &sel_initWithFocusedViewRect_1, "initWithFocusedViewRect:" },
-        { &sel_thickness, "thickness" },
-        { &sel_setImageOrigin_1, "setImageOrigin:" },
-        { &sel_color, "color" },
-        { &sel_capitalizeWord_1, "capitalizeWord:" },
-        { &sel_imageRepClassForData_1, "imageRepClassForData:" },
-        { &sel_outlineTableColumn, "outlineTableColumn" },
-        { &sel_runModalWithPrintInfo_1, "runModalWithPrintInfo:" },
-        { &sel_flushCachedData, "flushCachedData" },
-        { &sel_exitFullScreenModeWithOptions_1, "exitFullScreenModeWithOptions:" },
-        { &sel_alertStyle, "alertStyle" },
-        { &sel_runModalPageLayoutWithPrintInfo_1delegate_1didRunSelector_1contextInfo_1, "runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:" },
-        { &sel_setDisplayedWhenStopped_1, "setDisplayedWhenStopped:" },
-        { &sel_drawBackgroundWithFrame_1inView_1characterRange_1layoutManager_1, "drawBackgroundWithFrame:inView:characterRange:layoutManager:" },
-        { &sel_addObject_1, "addObject:" },
-        { &sel_dragPromisedFilesOfTypes_1fromRect_1source_1slideBack_1event_1, "dragPromisedFilesOfTypes:fromRect:source:slideBack:event:" },
-        { &sel_samplesPerPixel, "samplesPerPixel" },
-        { &sel_negativePrefix, "negativePrefix" },
-        { &sel_initialKey, "initialKey" },
-        { &sel_orderFrontColorPanel_1, "orderFrontColorPanel:" },
-        { &sel_hasLearnedWord_1, "hasLearnedWord:" },
-        { &sel_setLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1, "setLineFragmentRect:forGlyphRange:usedRect:baselineOffset:" },
-        { &sel_setHidesOnDeactivate_1, "setHidesOnDeactivate:" },
-        { &sel_setMsgid_1, "setMsgid:" },
-        { &sel_elementCount, "elementCount" },
-        { &sel_dateWithString_1, "dateWithString:" },
-        { &sel_rangeOfTextBlock_1atIndex_1, "rangeOfTextBlock:atIndex:" },
-        { &sel_setMenuItemCell_1forItemAtIndex_1, "setMenuItemCell:forItemAtIndex:" },
-        { &sel_defaultTimeZone, "defaultTimeZone" },
-        { &sel_gotoBeginning_1, "gotoBeginning:" },
-        { &sel_setDrawsOutsideLineFragment_1forGlyphAtIndex_1, "setDrawsOutsideLineFragment:forGlyphAtIndex:" },
-        { &sel_characterCollection, "characterCollection" },
-        { &sel_getValues_1forParameter_1, "getValues:forParameter:" },
-        { &sel_removeColumn_1, "removeColumn:" },
-        { &sel_descender, "descender" },
-        { &sel_fragment, "fragment" },
-        { &sel_setSelectionByRect_1, "setSelectionByRect:" },
-        { &sel_colorWithColorSpace_1components_1count_1, "colorWithColorSpace:components:count:" },
-        { &sel_windingRule, "windingRule" },
-        { &sel_insertColumn_1, "insertColumn:" },
-        { &sel_resumeWithSuspensionID_1, "resumeWithSuspensionID:" },
-        { &sel_seekToEndOfFile, "seekToEndOfFile" },
-        { &sel_initWithTarget_1connection_1, "initWithTarget:connection:" },
-        { &sel_symbolCharacterSet, "symbolCharacterSet" },
-        { &sel_filterPredicate, "filterPredicate" },
-        { &sel_setAutoenablesItems_1, "setAutoenablesItems:" },
-        { &sel_printShowingPrintPanel_1, "printShowingPrintPanel:" },
-        { &sel_pathForResource_1ofType_1inDirectory_1forLocalization_1, "pathForResource:ofType:inDirectory:forLocalization:" },
-        { &sel_objectByApplyingXSLTAtURL_1arguments_1error_1, "objectByApplyingXSLTAtURL:arguments:error:" },
-        { &sel_setHidesEmptyCells_1, "setHidesEmptyCells:" },
-        { &sel_date, "date" },
-        { &sel_writeToFile_1atomically_1, "writeToFile:atomically:" },
-        { &sel_locale, "locale" },
-        { &sel_localizedKeyTable, "localizedKeyTable" },
-        { &sel_absoluteURL, "absoluteURL" },
-        { &sel_bundleWithPath_1, "bundleWithPath:" },
-        { &sel_setHeaderCell_1, "setHeaderCell:" },
-        { &sel_setAutoresizesSubviews_1, "setAutoresizesSubviews:" },
-        { &sel_URI, "URI" },
-        { &sel_controlBackgroundColor, "controlBackgroundColor" },
-        { &sel_displayNameAtPath_1, "displayNameAtPath:" },
-        { &sel_decodePortObject, "decodePortObject" },
-        { &sel_alpha, "alpha" },
-        { &sel_initWithLeftExpression_1rightExpression_1customSelector_1, "initWithLeftExpression:rightExpression:customSelector:" },
-        { &sel_secondaryGroupingSize, "secondaryGroupingSize" },
-        { &sel_connectionDidFinishLoading_1, "connectionDidFinishLoading:" },
-        { &sel_localObjects, "localObjects" },
-        { &sel_enableKeyEquivalentForDefaultButtonCell, "enableKeyEquivalentForDefaultButtonCell" },
-        { &sel_drawKnobSlotInRect_1highlight_1, "drawKnobSlotInRect:highlight:" },
-        { &sel_dateWithString_1calendarFormat_1locale_1, "dateWithString:calendarFormat:locale:" },
-        { &sel_stop, "stop" },
-        { &sel_appendBezierPathWithOvalInRect_1, "appendBezierPathWithOvalInRect:" },
-        { &sel_componentsSeparatedByCharactersInSet_1, "componentsSeparatedByCharactersInSet:" },
-        { &sel_tightenKerning_1, "tightenKerning:" },
-        { &sel_verticalRulerView, "verticalRulerView" },
-        { &sel_setImageAlignment_1, "setImageAlignment:" },
-        { &sel_removeFrameUsingName_1, "removeFrameUsingName:" },
-        { &sel_insertColor_1key_1atIndex_1, "insertColor:key:atIndex:" },
-        { &sel_terminate_1, "terminate:" },
-        { &sel_textContainerChangedTextView_1, "textContainerChangedTextView:" },
-        { &sel_removeFileAtPath_1handler_1, "removeFileAtPath:handler:" },
-        { &sel_splitViewWillResizeSubviews_1, "splitViewWillResizeSubviews:" },
-        { &sel_windowDidBecomeMain_1, "windowDidBecomeMain:" },
-        { &sel_cellBaselineOffset, "cellBaselineOffset" },
-        { &sel_addEntriesFromDictionary_1, "addEntriesFromDictionary:" },
-        { &sel_setOnStateImage_1, "setOnStateImage:" },
-        { &sel_colorWithCIColor_1, "colorWithCIColor:" },
-        { &sel_getCyan_1magenta_1yellow_1black_1alpha_1, "getCyan:magenta:yellow:black:alpha:" },
-        { &sel_symbolicTraits, "symbolicTraits" },
-        { &sel_stringByAppendingPathExtension_1, "stringByAppendingPathExtension:" },
-        { &sel_horizontalScroller, "horizontalScroller" },
-        { &sel_setInitialValue_1, "setInitialValue:" },
-        { &sel_sizeForPaperName_1, "sizeForPaperName:" },
-        { &sel_CGLContextObj, "CGLContextObj" },
-        { &sel_elementWithName_1, "elementWithName:" },
-        { &sel_fileManager_1shouldMoveItemAtPath_1toPath_1, "fileManager:shouldMoveItemAtPath:toPath:" },
-        { &sel_richTextSource, "richTextSource" },
-        { &sel_unregisterDraggedTypes, "unregisterDraggedTypes" },
-        { &sel_absoluteString, "absoluteString" },
-        { &sel_spellingPanel, "spellingPanel" },
-        { &sel_launchedApplications, "launchedApplications" },
-        { &sel_initWithContentsOfFile_1byReference_1, "initWithContentsOfFile:byReference:" },
-        { &sel_setLoaded_1, "setLoaded:" },
-        { &sel_setWindowFrameAutosaveName_1, "setWindowFrameAutosaveName:" },
-        { &sel_initOrTestWithTests_1, "initOrTestWithTests:" },
-        { &sel_drawsBackground, "drawsBackground" },
-        { &sel_numberWithDouble_1, "numberWithDouble:" },
-        { &sel_textView_1writeCell_1atIndex_1toPasteboard_1type_1, "textView:writeCell:atIndex:toPasteboard:type:" },
-        { &sel_defaultMiterLimit, "defaultMiterLimit" },
-        { &sel_containsObject_1, "containsObject:" },
-        { &sel_headerTextColor, "headerTextColor" },
-        { &sel_textView_1doCommandBySelector_1, "textView:doCommandBySelector:" },
-        { &sel_drawBorderAndBackgroundWithFrame_1inView_1, "drawBorderAndBackgroundWithFrame:inView:" },
-        { &sel_quarterSymbols, "quarterSymbols" },
-        { &sel_setContainerSize_1, "setContainerSize:" },
-        { &sel_sortUsingSelector_1, "sortUsingSelector:" },
-        { &sel_setKey_1, "setKey:" },
-        { &sel_headerView, "headerView" },
-        { &sel_isRegularFile, "isRegularFile" },
-        { &sel_userData, "userData" },
-        { &sel_documentCursor, "documentCursor" },
-        { &sel_textEncodingName, "textEncodingName" },
-        { &sel_performActionForItemAtIndex_1, "performActionForItemAtIndex:" },
-        { &sel_isCaseInsensitiveLike_1, "isCaseInsensitiveLike:" },
-        { &sel_isEditing, "isEditing" },
-        { &sel_selectFile_1inFileViewerRootedAtPath_1, "selectFile:inFileViewerRootedAtPath:" },
-        { &sel_messageFontOfSize_1, "messageFontOfSize:" },
-        { &sel_independentConversationQueueing, "independentConversationQueueing" },
-        { &sel_initWithCoder_1, "initWithCoder:" },
-        { &sel_rangesForUserParagraphAttributeChange, "rangesForUserParagraphAttributeChange" },
-        { &sel_removeTrackingArea_1, "removeTrackingArea:" },
-        { &sel_glyphGenerator, "glyphGenerator" },
-        { &sel_extraLineFragmentUsedRect, "extraLineFragmentUsedRect" },
-        { &sel_isButtonBordered, "isButtonBordered" },
-        { &sel_setDefaultFormatterBehavior_1, "setDefaultFormatterBehavior:" },
-        { &sel_didChange_1valuesAtIndexes_1forKey_1, "didChange:valuesAtIndexes:forKey:" },
-        { &sel_timeoutInterval, "timeoutInterval" },
-        { &sel_initialValues, "initialValues" },
-        { &sel_getRow_1column_1forPoint_1, "getRow:column:forPoint:" },
-        { &sel_tabletPoint_1, "tabletPoint:" },
-        { &sel_setAutorecalculatesKeyViewLoop_1, "setAutorecalculatesKeyViewLoop:" },
-        { &sel_identifier, "identifier" },
-        { &sel_scheduleInRunLoop_1forMode_1, "scheduleInRunLoop:forMode:" },
-        { &sel_baseURL, "baseURL" },
-        { &sel_initWithURL_1, "initWithURL:" },
-        { &sel_setBackgroundColors_1, "setBackgroundColors:" },
-        { &sel_addTableColumn_1, "addTableColumn:" },
-        { &sel_fontDescriptorWithFontAttributes_1, "fontDescriptorWithFontAttributes:" },
-        { &sel_dataCellForRow_1, "dataCellForRow:" },
-        { &sel_speechSynthesizer_1didEncounterErrorAtIndex_1ofString_1message_1, "speechSynthesizer:didEncounterErrorAtIndex:ofString:message:" },
-        { &sel_recoveryAttempter, "recoveryAttempter" },
-        { &sel_alignJustified_1, "alignJustified:" },
-        { &sel_setCompression_1factor_1, "setCompression:factor:" },
-        { &sel_elementsForLocalName_1URI_1, "elementsForLocalName:URI:" },
-        { &sel_deviceGrayColorSpace, "deviceGrayColorSpace" },
-        { &sel_scheduledTimerWithTimeInterval_1target_1selector_1userInfo_1repeats_1, "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:" },
-        { &sel_runModalSession_1, "runModalSession:" },
-        { &sel_awakeFromNib, "awakeFromNib" },
-        { &sel_connectionWithReceivePort_1sendPort_1, "connectionWithReceivePort:sendPort:" },
-        { &sel_outlineView_1validateDrop_1proposedItem_1proposedChildIndex_1, "outlineView:validateDrop:proposedItem:proposedChildIndex:" },
-        { &sel_remove_1, "remove:" },
-        { &sel_setTimeInterval_1, "setTimeInterval:" },
-        { &sel_splitView_1effectiveRect_1forDrawnRect_1ofDividerAtIndex_1, "splitView:effectiveRect:forDrawnRect:ofDividerAtIndex:" },
-        { &sel_setUpGState, "setUpGState" },
-        { &sel_initWithResponse_1data_1, "initWithResponse:data:" },
-        { &sel_notificationCenter, "notificationCenter" },
-        { &sel_setAlternateImage_1, "setAlternateImage:" },
-        { &sel_mainWindow, "mainWindow" },
-        { &sel_substringWithRange_1, "substringWithRange:" },
-        { &sel_forgetWord_1, "forgetWord:" },
-        { &sel_shouldCascadeWindows, "shouldCascadeWindows" },
-        { &sel_updateScroller, "updateScroller" },
-        { &sel_currentDirectoryPath, "currentDirectoryPath" },
-        { &sel_isPartialStringValidationEnabled, "isPartialStringValidationEnabled" },
-        { &sel_splitView_1constrainMinCoordinate_1ofSubviewAt_1, "splitView:constrainMinCoordinate:ofSubviewAt:" },
-        { &sel_drawWithFrame_1inView_1, "drawWithFrame:inView:" },
-        { &sel_encodingScheme, "encodingScheme" },
-        { &sel_namespaceWithName_1stringValue_1, "namespaceWithName:stringValue:" },
-        { &sel_initWithLongLong_1, "initWithLongLong:" },
-        { &sel_processIdentifier, "processIdentifier" },
-        { &sel_setSubmenu_1forItem_1, "setSubmenu:forItem:" },
-        { &sel_textAttributesForNil, "textAttributesForNil" },
-        { &sel_lockWithPath_1, "lockWithPath:" },
-        { &sel_removeFromSuperviewWithoutNeedingDisplay, "removeFromSuperviewWithoutNeedingDisplay" },
-        { &sel_cut_1, "cut:" },
-        { &sel_nullDescriptor, "nullDescriptor" },
-        { &sel_menuFormRepresentation, "menuFormRepresentation" },
-        { &sel_removeObjectsAtIndexes_1, "removeObjectsAtIndexes:" },
-        { &sel_initWithSource_1, "initWithSource:" },
-        { &sel_acceptsGlyphInfo, "acceptsGlyphInfo" },
-        { &sel_borderType, "borderType" },
-        { &sel_initWithResumeData_1delegate_1path_1, "initWithResumeData:delegate:path:" },
-        { &sel_attachedMenu, "attachedMenu" },
-        { &sel_stopAnimation, "stopAnimation" },
-        { &sel_setDoubleAction_1, "setDoubleAction:" },
-        { &sel_returnType, "returnType" },
-        { &sel_fontDescriptorsInCollection_1, "fontDescriptorsInCollection:" },
-        { &sel_setMeasurementUnits_1, "setMeasurementUnits:" },
-        { &sel_baseWritingDirection, "baseWritingDirection" },
-        { &sel_currentPoint, "currentPoint" },
-        { &sel_initRemoteWithTCPPort_1host_1, "initRemoteWithTCPPort:host:" },
-        { &sel_entityDeclarationForName_1, "entityDeclarationForName:" },
-        { &sel_evaluate, "evaluate" },
-        { &sel_browser_1draggingImageForRowsWithIndexes_1inColumn_1withEvent_1offset_1, "browser:draggingImageForRowsWithIndexes:inColumn:withEvent:offset:" },
-        { &sel_turnOffLigatures_1, "turnOffLigatures:" },
-        { &sel_setTitleWithMnemonic_1, "setTitleWithMnemonic:" },
-        { &sel_deepestScreen, "deepestScreen" },
-        { &sel_connection_1shouldMakeNewConnection_1, "connection:shouldMakeNewConnection:" },
-        { &sel_selectionShouldChangeInOutlineView_1, "selectionShouldChangeInOutlineView:" },
-        { &sel_preservesSelection, "preservesSelection" },
-        { &sel_preparePageLayout_1, "preparePageLayout:" },
-        { &sel_setOpaque_1, "setOpaque:" },
-        { &sel_insertObject_1atIndex_1, "insertObject:atIndex:" },
-        { &sel_isActive, "isActive" },
-        { &sel_drawStrikethroughForGlyphRange_1strikethroughType_1baselineOffset_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1, "drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:" },
-        { &sel_insertObject_1atArrangedObjectIndex_1, "insertObject:atArrangedObjectIndex:" },
-        { &sel_initWithCStringNoCopy_1length_1freeWhenDone_1, "initWithCStringNoCopy:length:freeWhenDone:" },
-        { &sel_previousKeyView, "previousKeyView" },
-        { &sel_performMiniaturize_1, "performMiniaturize:" },
-        { &sel_decimalNumberWithDecimal_1, "decimalNumberWithDecimal:" },
-        { &sel_autosaveTableColumns, "autosaveTableColumns" },
-        { &sel_baselineOffsetInLayoutManager_1glyphIndex_1, "baselineOffsetInLayoutManager:glyphIndex:" },
-        { &sel_keyViewSelectionDirection, "keyViewSelectionDirection" },
-        { &sel_encodeBytes_1length_1, "encodeBytes:length:" },
-        { &sel_fileManager_1shouldProceedAfterError_1copyingItemAtPath_1toPath_1, "fileManager:shouldProceedAfterError:copyingItemAtPath:toPath:" },
-        { &sel_menuNeedsUpdate_1, "menuNeedsUpdate:" },
-        { &sel_paragraphSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1, "paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:" },
-        { &sel_synchronize, "synchronize" },
-        { &sel_lockFocus, "lockFocus" },
-        { &sel_toggleSmartInsertDelete_1, "toggleSmartInsertDelete:" },
-        { &sel_setMenu_1forSegment_1, "setMenu:forSegment:" },
-        { &sel_removeParamDescriptorWithKeyword_1, "removeParamDescriptorWithKeyword:" },
-        { &sel_applicationShouldOpenUntitledFile_1, "applicationShouldOpenUntitledFile:" },
-        { &sel_DTD, "DTD" },
-        { &sel_cancelTracking, "cancelTracking" },
-        { &sel_fileSystemNumber, "fileSystemNumber" },
-        { &sel_setLevel_1, "setLevel:" },
-        { &sel_setRequiredFileType_1, "setRequiredFileType:" },
-        { &sel_presentError_1, "presentError:" },
-        { &sel_allowsUserCustomization, "allowsUserCustomization" },
-        { &sel_childrenKeyPathForNode_1, "childrenKeyPathForNode:" },
-        { &sel_setYear_1, "setYear:" },
-        { &sel_movieController, "movieController" },
-        { &sel_unsignedLongValue, "unsignedLongValue" },
-        { &sel_hashTableWithOptions_1, "hashTableWithOptions:" },
-        { &sel_setVerticalAlignment_1, "setVerticalAlignment:" },
-        { &sel_cycleToNextInputServerInLanguage_1, "cycleToNextInputServerInLanguage:" },
-        { &sel_sendAction_1to_1from_1, "sendAction:to:from:" },
-        { &sel_numberFromString_1, "numberFromString:" },
-        { &sel_setUndoManager_1, "setUndoManager:" },
-        { &sel_imageDimsWhenDisabled, "imageDimsWhenDisabled" },
-        { &sel_autosavingFileType, "autosavingFileType" },
-        { &sel_unsignedLongLongValue, "unsignedLongLongValue" },
-        { &sel_initImageCell_1, "initImageCell:" },
-        { &sel_invalidateDisplayForCharacterRange_1, "invalidateDisplayForCharacterRange:" },
-        { &sel_setMaxContentSize_1, "setMaxContentSize:" },
-        { &sel_outlineView_1isItemExpandable_1, "outlineView:isItemExpandable:" },
-        { &sel_initWithUser_1password_1persistence_1, "initWithUser:password:persistence:" },
-        { &sel_setBackgroundFilters_1, "setBackgroundFilters:" },
-        { &sel_setAllowsDocumentBackgroundColorChange_1, "setAllowsDocumentBackgroundColorChange:" },
-        { &sel_decodeNXObject, "decodeNXObject" },
-        { &sel_setMaximumSignificantDigits_1, "setMaximumSignificantDigits:" },
-        { &sel_URLsFromRunningOpenPanel, "URLsFromRunningOpenPanel" },
-        { &sel_removeChildWindow_1, "removeChildWindow:" },
-        { &sel_removeObjectForKey_1, "removeObjectForKey:" },
-        { &sel_setCellSize_1, "setCellSize:" },
-        { &sel_getParagraphStart_1end_1contentsEnd_1forRange_1, "getParagraphStart:end:contentsEnd:forRange:" },
-        { &sel_connectionWithRequest_1delegate_1, "connectionWithRequest:delegate:" },
-        { &sel_setNotShownAttribute_1forGlyphRange_1, "setNotShownAttribute:forGlyphRange:" },
-        { &sel_collapsesBorders, "collapsesBorders" },
-        { &sel_setNegativeInfinitySymbol_1, "setNegativeInfinitySymbol:" },
-        { &sel_initWithKind_1, "initWithKind:" },
-        { &sel_appleEventCodeForArgumentWithName_1, "appleEventCodeForArgumentWithName:" },
-        { &sel_moveUp_1, "moveUp:" },
-        { &sel_initWithTextAlignment_1location_1options_1, "initWithTextAlignment:location:options:" },
-        { &sel_systemVersion, "systemVersion" },
-        { &sel_numberOfItemsInComboBoxCell_1, "numberOfItemsInComboBoxCell:" },
-        { &sel_readableTypes, "readableTypes" },
-        { &sel_setDraggingSourceOperationMask_1forLocal_1, "setDraggingSourceOperationMask:forLocal:" },
-        { &sel_insertLineBreak_1, "insertLineBreak:" },
-        { &sel_inLiveResize, "inLiveResize" },
-        { &sel_setCanHide_1, "setCanHide:" },
-        { &sel_nextResponder, "nextResponder" },
-        { &sel_scrollClipView_1toPoint_1, "scrollClipView:toPoint:" },
-        { &sel_positiveFormat, "positiveFormat" },
-        { &sel_redoMenuItemTitle, "redoMenuItemTitle" },
-        { &sel_addIndexesInRange_1, "addIndexesInRange:" },
-        { &sel_lockBeforeDate_1, "lockBeforeDate:" },
-        { &sel_unlockWithCondition_1, "unlockWithCondition:" },
-        { &sel_nextWordFromIndex_1forward_1, "nextWordFromIndex:forward:" },
-        { &sel_waitUntilAllOperationsAreFinished, "waitUntilAllOperationsAreFinished" },
-        { &sel_drawRow_1clipRect_1, "drawRow:clipRect:" },
-        { &sel_setPartialStringValidationEnabled_1, "setPartialStringValidationEnabled:" },
-        { &sel_methodSignatureForSelector_1, "methodSignatureForSelector:" },
-        { &sel_setSecondaryGroupingSize_1, "setSecondaryGroupingSize:" },
-        { &sel_criteriaForRow_1, "criteriaForRow:" },
-        { &sel_setShadowBlurRadius_1, "setShadowBlurRadius:" },
-        { &sel_expressionForFunction_1selectorName_1arguments_1, "expressionForFunction:selectorName:arguments:" },
-        { &sel_initWithWindowNibName_1, "initWithWindowNibName:" },
-        { &sel_selectItemWithTag_1, "selectItemWithTag:" },
-        { &sel_characterIndexForPoint_1, "characterIndexForPoint:" },
-        { &sel_validate, "validate" },
-        { &sel_setHorizontalPageScroll_1, "setHorizontalPageScroll:" },
-        { &sel_localizedColorNameComponent, "localizedColorNameComponent" },
-        { &sel_setVoice_1, "setVoice:" },
-        { &sel_setCachedSeparately_1, "setCachedSeparately:" },
-        { &sel_frameRectForContentRect_1, "frameRectForContentRect:" },
-        { &sel_bezelStyle, "bezelStyle" },
-        { &sel_setDecimalSeparator_1, "setDecimalSeparator:" },
-        { &sel_conversationIdentifier, "conversationIdentifier" },
-        { &sel_setPrompt_1, "setPrompt:" },
-        { &sel_setShowsFirstResponder_1, "setShowsFirstResponder:" },
-        { &sel_setRootObject_1, "setRootObject:" },
-        { &sel_menuBarVisible, "menuBarVisible" },
-        { &sel_netServiceBrowser_1didRemoveDomain_1moreComing_1, "netServiceBrowser:didRemoveDomain:moreComing:" },
-        { &sel_threadPriority, "threadPriority" },
-        { &sel_countKeyPath, "countKeyPath" },
-        { &sel_runCustomizationPalette_1, "runCustomizationPalette:" },
-        { &sel_fileHandleWithStandardError, "fileHandleWithStandardError" },
-        { &sel_documentContentKind, "documentContentKind" },
-        { &sel_view_1StringForToolTip_1point_1userData_1, "view:StringForToolTip:point:userData:" },
-        { &sel_nameFieldLabel, "nameFieldLabel" },
-        { &sel_miniaturizeAll_1, "miniaturizeAll:" },
-        { &sel_initWithRepresentedObject_1, "initWithRepresentedObject:" },
-        { &sel_runOperation, "runOperation" },
-        { &sel_drawBackgroundForBlock_1withFrame_1inView_1characterRange_1layoutManager_1, "drawBackgroundForBlock:withFrame:inView:characterRange:layoutManager:" },
-        { &sel_localizedInfoDictionary, "localizedInfoDictionary" },
-        { &sel_scanFloat_1, "scanFloat:" },
-        { &sel_scanHexDouble_1, "scanHexDouble:" },
-        { &sel_continueSpeaking, "continueSpeaking" },
-        { &sel_attachedMenuView, "attachedMenuView" },
-        { &sel_wantsToHandleMouseEvents, "wantsToHandleMouseEvents" },
-        { &sel_attemptRecoveryFromError_1optionIndex_1, "attemptRecoveryFromError:optionIndex:" },
-        { &sel_window_1shouldDragDocumentWithEvent_1from_1withPasteboard_1, "window:shouldDragDocumentWithEvent:from:withPasteboard:" },
-        { &sel_mouseEntered_1, "mouseEntered:" },
-        { &sel_setNameFieldLabel_1, "setNameFieldLabel:" },
-        { &sel_setIndentationPerLevel_1, "setIndentationPerLevel:" },
-        { &sel_setMinColumnWidth_1, "setMinColumnWidth:" },
-        { &sel_classNameForClass_1, "classNameForClass:" },
-        { &sel_runLoopModes, "runLoopModes" },
-        { &sel_pullsDown, "pullsDown" },
-        { &sel_setOutlineTableColumn_1, "setOutlineTableColumn:" },
-        { &sel_windowDidLoad, "windowDidLoad" },
-        { &sel_read_1maxLength_1, "read:maxLength:" },
-        { &sel_removeItemAtIndex_1, "removeItemAtIndex:" },
-        { &sel_initWithColor_1, "initWithColor:" },
-        { &sel_compare_1options_1, "compare:options:" },
-        { &sel_removeTableColumn_1, "removeTableColumn:" },
-        { &sel_isRedoing, "isRedoing" },
-        { &sel_setTitleWithRepresentedFilename_1, "setTitleWithRepresentedFilename:" },
-        { &sel_setDirectory_1, "setDirectory:" },
-        { &sel_makeDocumentWithContentsOfURL_1ofType_1error_1, "makeDocumentWithContentsOfURL:ofType:error:" },
-        { &sel_isSelectedForSegment_1, "isSelectedForSegment:" },
-        { &sel_month, "month" },
-        { &sel_addRow, "addRow" },
-        { &sel_layoutOptions, "layoutOptions" },
-        { &sel_maxNumberOfRows, "maxNumberOfRows" },
-        { &sel_setUpPrintOperationDefaultValues, "setUpPrintOperationDefaultValues" },
-        { &sel_initByReferencingURL_1, "initByReferencingURL:" },
-        { &sel_class, "class" },
-        { &sel_setFrameAutosaveName_1, "setFrameAutosaveName:" },
-        { &sel_fileWrapperFromRange_1documentAttributes_1error_1, "fileWrapperFromRange:documentAttributes:error:" },
-        { &sel_int32Value, "int32Value" },
-        { &sel_setControlView_1, "setControlView:" },
-        { &sel_setCharacterEncoding_1, "setCharacterEncoding:" },
-        { &sel_disableFlushWindow, "disableFlushWindow" },
-        { &sel_insertString_1atIndex_1, "insertString:atIndex:" },
-        { &sel_childNodes, "childNodes" },
-        { &sel_rangeContainerObject, "rangeContainerObject" },
-        { &sel_kind, "kind" },
-        { &sel_title, "title" },
-        { &sel_bundleWithIdentifier_1, "bundleWithIdentifier:" },
-        { &sel_initWithMovie_1, "initWithMovie:" },
-        { &sel_unionHashTable_1, "unionHashTable:" },
-        { &sel_setStartSpecifier_1, "setStartSpecifier:" },
-        { &sel_browser_1nextTypeSelectMatchFromRow_1toRow_1inColumn_1forString_1, "browser:nextTypeSelectMatchFromRow:toRow:inColumn:forString:" },
-        { &sel_tokenFieldCell_1representedObjectForEditingString_1, "tokenFieldCell:representedObjectForEditingString:" },
-        { &sel_initWithContentsOfFile_1, "initWithContentsOfFile:" },
-        { &sel_dataWithContentsOfURL_1, "dataWithContentsOfURL:" },
-        { &sel_firstWeekday, "firstWeekday" },
-        { &sel_setInitialValues_1, "setInitialValues:" },
-        { &sel_setIntegerValue_1, "setIntegerValue:" },
-        { &sel_calcSize, "calcSize" },
-        { &sel_setTokenizingCharacterSet_1, "setTokenizingCharacterSet:" },
-        { &sel_setRepresentedFilename_1, "setRepresentedFilename:" },
-        { &sel_colorSpaceName, "colorSpaceName" },
-        { &sel_setLineBreakMode_1, "setLineBreakMode:" },
-        { &sel_appliesImmediately, "appliesImmediately" },
-        { &sel_classDescriptionWithAppleEventCode_1, "classDescriptionWithAppleEventCode:" },
-        { &sel_eventRef, "eventRef" },
-        { &sel_textAttributesForZero, "textAttributesForZero" },
-        { &sel_setAutosavesConfiguration_1, "setAutosavesConfiguration:" },
-        { &sel_countOfIndexesInRange_1, "countOfIndexesInRange:" },
-        { &sel_count, "count" },
-        { &sel_initWithSuiteName_1className_1dictionary_1, "initWithSuiteName:className:dictionary:" },
-        { &sel_isReleasedWhenClosed, "isReleasedWhenClosed" },
-        { &sel_windowWithWindowNumber_1, "windowWithWindowNumber:" },
-        { &sel_removeNamespaceForPrefix_1, "removeNamespaceForPrefix:" },
-        { &sel_documentWithRootElement_1, "documentWithRootElement:" },
-        { &sel_pageFooter, "pageFooter" },
-        { &sel_initWithOptions_1capacity_1, "initWithOptions:capacity:" },
-        { &sel_insertBacktab_1, "insertBacktab:" },
-        { &sel_changeWindowsItem_1title_1filename_1, "changeWindowsItem:title:filename:" },
-        { &sel_changeCount, "changeCount" },
-        { &sel_paragraphCharacterRange, "paragraphCharacterRange" },
-        { &sel_currentProgress, "currentProgress" },
-        { &sel_parser_1didStartMappingPrefix_1toURI_1, "parser:didStartMappingPrefix:toURI:" },
-        { &sel_setFormatWidth_1, "setFormatWidth:" },
-        { &sel_cancelAllOperations, "cancelAllOperations" },
-        { &sel_beginLoadInBackground, "beginLoadInBackground" },
-        { &sel_draggedDistance, "draggedDistance" },
-        { &sel_setIndex_1, "setIndex:" },
-        { &sel_initWithScheme_1host_1path_1, "initWithScheme:host:path:" },
-        { &sel_toolTipForCell_1, "toolTipForCell:" },
-        { &sel_predicateForRow_1, "predicateForRow:" },
-        { &sel_predefinedEntityDeclarationForName_1, "predefinedEntityDeclarationForName:" },
-        { &sel_replacePointerAtIndex_1withPointer_1, "replacePointerAtIndex:withPointer:" },
-        { &sel_fileURLWithPath_1, "fileURLWithPath:" },
-        { &sel_currentDocument, "currentDocument" },
-        { &sel_shouldDrawInsertionPoint, "shouldDrawInsertionPoint" },
-        { &sel_saveAllDocuments_1, "saveAllDocuments:" },
-        { &sel_windowControllerWillLoadNib_1, "windowControllerWillLoadNib:" },
-        { &sel_closeAllDocumentsWithDelegate_1didCloseAllSelector_1contextInfo_1, "closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:" },
-        { &sel_tableView_1heightOfRow_1, "tableView:heightOfRow:" },
-        { &sel_postNotificationName_1object_1userInfo_1options_1, "postNotificationName:object:userInfo:options:" },
-        { &sel_imageTypes, "imageTypes" },
-        { &sel_setPreferredBackingLocation_1, "setPreferredBackingLocation:" },
-        { &sel_netServiceDidPublish_1, "netServiceDidPublish:" },
-        { &sel_diskCapacity, "diskCapacity" },
-        { &sel_initWithString_1calendarFormat_1locale_1, "initWithString:calendarFormat:locale:" },
-        { &sel_preferredEdge, "preferredEdge" },
-        { &sel_comboBoxCell_1indexOfItemWithStringValue_1, "comboBoxCell:indexOfItemWithStringValue:" },
-        { &sel_replaceCharactersInRange_1withString_1, "replaceCharactersInRange:withString:" },
-        { &sel_initWithTimeIntervalSinceReferenceDate_1, "initWithTimeIntervalSinceReferenceDate:" },
-        { &sel_secondsFromGMT, "secondsFromGMT" },
-        { &sel_hasOrderedToManyRelationshipForKey_1, "hasOrderedToManyRelationshipForKey:" },
-        { &sel_resignFirstResponder, "resignFirstResponder" },
-        { &sel_netServiceDidStop_1, "netServiceDidStop:" },
-        { &sel_absoluteY, "absoluteY" },
-        { &sel_beginModalSessionForWindow_1, "beginModalSessionForWindow:" },
-        { &sel_alignment, "alignment" },
-        { &sel_setCharactersToBeSkipped_1, "setCharactersToBeSkipped:" },
-        { &sel_requestWithURL_1cachePolicy_1timeoutInterval_1, "requestWithURL:cachePolicy:timeoutInterval:" },
-        { &sel_ruler, "ruler" },
-        { &sel_isSetOnMouseExited, "isSetOnMouseExited" },
-        { &sel_setRemovable_1, "setRemovable:" },
-        { &sel_draggingSource, "draggingSource" },
-        { &sel_textView_1clickedOnLink_1, "textView:clickedOnLink:" },
-        { &sel_canBeVisibleOnAllSpaces, "canBeVisibleOnAllSpaces" },
-        { &sel_setBadgeLabel_1, "setBadgeLabel:" },
-        { &sel_parser_1foundUnparsedEntityDeclarationWithName_1publicID_1systemID_1notationName_1, "parser:foundUnparsedEntityDeclarationWithName:publicID:systemID:notationName:" },
-        { &sel_operations, "operations" },
-        { &sel_setInteger_1forKey_1, "setInteger:forKey:" },
-        { &sel_otherMouseUp_1, "otherMouseUp:" },
-        { &sel_drawImageWithFrame_1inView_1, "drawImageWithFrame:inView:" },
-        { &sel_getPixel_1atX_1y_1, "getPixel:atX:y:" },
-        { &sel_standardError, "standardError" },
-        { &sel_setLabel_1, "setLabel:" },
-        { &sel_initWithUnsignedInt_1, "initWithUnsignedInt:" },
-        { &sel_isFinished, "isFinished" },
-        { &sel_drawSwatchInRect_1, "drawSwatchInRect:" },
-        { &sel_descriptorAtIndex_1, "descriptorAtIndex:" },
-        { &sel_cachedHandleForURL_1, "cachedHandleForURL:" },
-        { &sel_classCode, "classCode" },
-        { &sel_resolvesAliases, "resolvesAliases" },
-        { &sel_textTypes, "textTypes" },
-        { &sel_invalidateTextContainerOrigin, "invalidateTextContainerOrigin" },
-        { &sel_document, "document" },
-        { &sel_interiorBackgroundStyleForSegment_1, "interiorBackgroundStyleForSegment:" },
-        { &sel_transformedValue_1, "transformedValue:" },
-        { &sel_substringToIndex_1, "substringToIndex:" },
-        { &sel_addDocument_1, "addDocument:" },
-        { &sel_numberWithInteger_1, "numberWithInteger:" },
-        { &sel_setBoundsRotation_1, "setBoundsRotation:" },
-        { &sel_convertFont_1toFace_1, "convertFont:toFace:" },
-        { &sel_updateInsertionPointStateAndRestartTimer_1, "updateInsertionPointStateAndRestartTimer:" },
-        { &sel_tryToPerform_1with_1, "tryToPerform:with:" },
-        { &sel_defaultLineHeightForFont, "defaultLineHeightForFont" },
-        { &sel_scriptingIsEqualTo_1, "scriptingIsEqualTo:" },
-        { &sel_setDoubleValue_1, "setDoubleValue:" },
-        { &sel_AMSymbol, "AMSymbol" },
-        { &sel_valueWraps, "valueWraps" },
-        { &sel_allCredentials, "allCredentials" },
-        { &sel_editingDelegate, "editingDelegate" },
-        { &sel_maintainsInactiveSelection, "maintainsInactiveSelection" },
-        { &sel_policyDelegate, "policyDelegate" },
-        { &sel_preferences, "preferences" },
-        { &sel_registerViewClass_1representationClass_1forMIMEType_1, "registerViewClass:representationClass:forMIMEType:" },
-        { &sel_setHostWindow_1, "setHostWindow:" },
-        { &sel_hostWindow, "hostWindow" },
-        { &sel_searchFor_1direction_1caseSensitive_1wrap_1, "searchFor:direction:caseSensitive:wrap:" },
-        { &sel_initWithFrame_1frameName_1groupName_1, "initWithFrame:frameName:groupName:" },
-        { &sel_canGoBack, "canGoBack" },
-        { &sel_setFrameLoadDelegate_1, "setFrameLoadDelegate:" },
-        { &sel_takeStringURLFrom_1, "takeStringURLFrom:" },
-        { &sel_registerURLSchemeAsLocal_1, "registerURLSchemeAsLocal:" },
-        { &sel_stringByEvaluatingJavaScriptFromString_1, "stringByEvaluatingJavaScriptFromString:" },
-        { &sel_replaceSelectionWithMarkupString_1, "replaceSelectionWithMarkupString:" },
-        { &sel_setPreferences_1, "setPreferences:" },
-        { &sel_customUserAgent, "customUserAgent" },
-        { &sel_mainFrame, "mainFrame" },
-        { &sel_goToBackForwardItem_1, "goToBackForwardItem:" },
-        { &sel_pasteboardTypesForElement_1, "pasteboardTypesForElement:" },
-        { &sel_applyStyle_1, "applyStyle:" },
-        { &sel_setResourceLoadDelegate_1, "setResourceLoadDelegate:" },
-        { &sel_moveToBeginningOfSentenceAndModifySelection_1, "moveToBeginningOfSentenceAndModifySelection:" },
-        { &sel_replaceSelectionWithArchive_1, "replaceSelectionWithArchive:" },
-        { &sel_userAgentForURL_1, "userAgentForURL:" },
-        { &sel_frameLoadDelegate, "frameLoadDelegate" },
-        { &sel_windowScriptObject, "windowScriptObject" },
-        { &sel_removeDragCaret, "removeDragCaret" },
-        { &sel_editableDOMRangeForPoint_1, "editableDOMRangeForPoint:" },
-        { &sel_moveToEndOfSentence_1, "moveToEndOfSentence:" },
-        { &sel_preferencesIdentifier, "preferencesIdentifier" },
-        { &sel_setPolicyDelegate_1, "setPolicyDelegate:" },
-        { &sel_goBack, "goBack" },
-        { &sel_downloadDelegate, "downloadDelegate" },
-        { &sel_canShowMIMEType_1, "canShowMIMEType:" },
-        { &sel_elementAtPoint_1, "elementAtPoint:" },
-        { &sel_groupName, "groupName" },
-        { &sel_selectedFrame, "selectedFrame" },
-        { &sel_setMIMETypesShownAsHTML_1, "setMIMETypesShownAsHTML:" },
-        { &sel_goForward, "goForward" },
-        { &sel_makeTextStandardSize_1, "makeTextStandardSize:" },
-        { &sel_setMainFrameURL_1, "setMainFrameURL:" },
-        { &sel_pasteboardTypesForSelection, "pasteboardTypesForSelection" },
-        { &sel_customTextEncodingName, "customTextEncodingName" },
-        { &sel_MIMETypesShownAsHTML, "MIMETypesShownAsHTML" },
-        { &sel_replaceSelectionWithText_1, "replaceSelectionWithText:" },
-        { &sel_setTextSizeMultiplier_1, "setTextSizeMultiplier:" },
-        { &sel_stopLoading_1, "stopLoading:" },
-        { &sel_goBack_1, "goBack:" },
-        { &sel_canMakeTextStandardSize, "canMakeTextStandardSize" },
-        { &sel_setCustomUserAgent_1, "setCustomUserAgent:" },
-        { &sel_moveDragCaretToPoint_1, "moveDragCaretToPoint:" },
-        { &sel_makeTextSmaller_1, "makeTextSmaller:" },
-        { &sel_moveToBeginningOfSentence_1, "moveToBeginningOfSentence:" },
-        { &sel_reload_1, "reload:" },
-        { &sel_typingStyle, "typingStyle" },
-        { &sel_setShouldCloseWithWindow_1, "setShouldCloseWithWindow:" },
-        { &sel_setMediaStyle_1, "setMediaStyle:" },
-        { &sel_canMakeTextLarger, "canMakeTextLarger" },
-        { &sel_textSizeMultiplier, "textSizeMultiplier" },
-        { &sel_shouldCloseWithWindow, "shouldCloseWithWindow" },
-        { &sel_setPreferencesIdentifier_1, "setPreferencesIdentifier:" },
-        { &sel_setApplicationNameForUserAgent_1, "setApplicationNameForUserAgent:" },
-        { &sel_mainFrameURL, "mainFrameURL" },
-        { &sel_goForward_1, "goForward:" },
-        { &sel_selectedDOMRange, "selectedDOMRange" },
-        { &sel_setDownloadDelegate_1, "setDownloadDelegate:" },
-        { &sel_setEditingDelegate_1, "setEditingDelegate:" },
-        { &sel_setUIDelegate_1, "setUIDelegate:" },
-        { &sel_mainFrameTitle, "mainFrameTitle" },
-        { &sel_setSelectedDOMRange_1affinity_1, "setSelectedDOMRange:affinity:" },
-        { &sel_setTypingStyle_1, "setTypingStyle:" },
-        { &sel_backForwardList, "backForwardList" },
-        { &sel_deleteSelection, "deleteSelection" },
-        { &sel_canGoForward, "canGoForward" },
-        { &sel_styleDeclarationWithText_1, "styleDeclarationWithText:" },
-        { &sel_moveToEndOfSentenceAndModifySelection_1, "moveToEndOfSentenceAndModifySelection:" },
-        { &sel_replaceSelectionWithNode_1, "replaceSelectionWithNode:" },
-        { &sel_URLTitleFromPasteboard_1, "URLTitleFromPasteboard:" },
-        { &sel_UIDelegate, "UIDelegate" },
-        { &sel_setMaintainsBackForwardList_1, "setMaintainsBackForwardList:" },
-        { &sel_mainFrameIcon, "mainFrameIcon" },
-        { &sel_setGroupName_1, "setGroupName:" },
-        { &sel_canMakeTextSmaller, "canMakeTextSmaller" },
-        { &sel_applicationNameForUserAgent, "applicationNameForUserAgent" },
-        { &sel_supportsTextEncoding, "supportsTextEncoding" },
-        { &sel_canShowMIMETypeAsHTML_1, "canShowMIMETypeAsHTML:" },
-        { &sel_mediaStyle, "mediaStyle" },
-        { &sel_makeTextLarger_1, "makeTextLarger:" },
-        { &sel_writeElement_1withPasteboardTypes_1toPasteboard_1, "writeElement:withPasteboardTypes:toPasteboard:" },
-        { &sel_estimatedProgress, "estimatedProgress" },
-        { &sel_setCustomTextEncodingName_1, "setCustomTextEncodingName:" },
-        { &sel_mainFrameDocument, "mainFrameDocument" },
-        { &sel_isLoading, "isLoading" },
-        { &sel_selectSentence_1, "selectSentence:" },
-        { &sel_computedStyleForElement_1pseudoElement_1, "computedStyleForElement:pseudoElement:" },
-        { &sel_writeSelectionWithPasteboardTypes_1toPasteboard_1, "writeSelectionWithPasteboardTypes:toPasteboard:" },
-        { &sel_resourceLoadDelegate, "resourceLoadDelegate" },
-        { &sel_reload, "reload" },
-        { &sel_loadAlternateHTMLString_1baseURL_1forUnreachableURL_1, "loadAlternateHTMLString:baseURL:forUnreachableURL:" },
-        { &sel_loadHTMLString_1baseURL_1, "loadHTMLString:baseURL:" },
-        { &sel_loadArchive_1, "loadArchive:" },
-        { &sel_webView, "webView" },
-        { &sel_provisionalDataSource, "provisionalDataSource" },
-        { &sel_findFrameNamed_1, "findFrameNamed:" },
-        { &sel_DOMDocument, "DOMDocument" },
-        { &sel_frameView, "frameView" },
-        { &sel_globalContext, "globalContext" },
-        { &sel_windowObject, "windowObject" },
-        { &sel_childFrames, "childFrames" },
-        { &sel_loadData_1MIMEType_1textEncodingName_1baseURL_1, "loadData:MIMEType:textEncodingName:baseURL:" },
-        { &sel_initWithName_1webFrameView_1webView_1, "initWithName:webFrameView:webView:" },
-        { &sel_frameElement, "frameElement" },
-        { &sel_loadRequest_1, "loadRequest:" },
-        { &sel_parentFrame, "parentFrame" },
-        { &sel_representation, "representation" },
-        { &sel_documentSource, "documentSource" },
-        { &sel_webView_1didChangeLocationWithinPageForFrame_1, "webView:didChangeLocationWithinPageForFrame:" },
-        { &sel_webView_1didFailProvisionalLoadWithError_1forFrame_1, "webView:didFailProvisionalLoadWithError:forFrame:" },
-        { &sel_webView_1didFinishLoadForFrame_1, "webView:didFinishLoadForFrame:" },
-        { &sel_webView_1didReceiveTitle_1forFrame_1, "webView:didReceiveTitle:forFrame:" },
-        { &sel_webView_1didStartProvisionalLoadForFrame_1, "webView:didStartProvisionalLoadForFrame:" },
-        { &sel_webView_1didCommitLoadForFrame_1, "webView:didCommitLoadForFrame:" },
-        { &sel_webView_1resource_1didFinishLoadingFromDataSource_1, "webView:resource:didFinishLoadingFromDataSource:" },
-        { &sel_webView_1resource_1didFailLoadingWithError_1fromDataSource_1, "webView:resource:didFailLoadingWithError:fromDataSource:" },
-        { &sel_webView_1identifierForInitialRequest_1fromDataSource_1, "webView:identifierForInitialRequest:fromDataSource:" },
-        { &sel_webView_1resource_1willSendRequest_1redirectResponse_1fromDataSource_1, "webView:resource:willSendRequest:redirectResponse:fromDataSource:" },
-        { &sel_webView_1createWebViewWithRequest_1, "webView:createWebViewWithRequest:" },
-        { &sel_webViewShow_1, "webViewShow:" },
-        { &sel_webView_1setFrame_1, "webView:setFrame:" },
-        { &sel_webViewClose_1, "webViewClose:" },
-        { &sel_webView_1contextMenuItemsForElement_1defaultMenuItems_1, "webView:contextMenuItemsForElement:defaultMenuItems:" },
-        { &sel_webView_1setStatusBarVisible_1, "webView:setStatusBarVisible:" },
-        { &sel_webView_1setResizable_1, "webView:setResizable:" },
-        { &sel_webView_1setToolbarsVisible_1, "webView:setToolbarsVisible:" },
-        { &sel_webView_1setStatusText_1, "webView:setStatusText:" },
-        { &sel_webViewFocus_1, "webViewFocus:" },
-        { &sel_webViewUnfocus_1, "webViewUnfocus:" },
-        { &sel_webView_1runJavaScriptAlertPanelWithMessage_1, "webView:runJavaScriptAlertPanelWithMessage:" },
-        { &sel_webView_1runJavaScriptConfirmPanelWithMessage_1, "webView:runJavaScriptConfirmPanelWithMessage:" },
-        { &sel_webView_1runOpenPanelForFileButtonWithResultListener_1, "webView:runOpenPanelForFileButtonWithResultListener:" },
-        { &sel_webView_1mouseDidMoveOverElement_1modifierFlags_1, "webView:mouseDidMoveOverElement:modifierFlags:" },
-        { &sel_webView_1printFrameView_1, "webView:printFrameView:" },
-        { &sel_webView_1decidePolicyForMIMEType_1request_1frame_1decisionListener_1, "webView:decidePolicyForMIMEType:request:frame:decisionListener:" },
-        { &sel_webView_1decidePolicyForNewWindowAction_1request_1newFrameName_1decisionListener_1, "webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:" },
-        { &sel_webView_1unableToImplementPolicyWithError_1frame_1, "webView:unableToImplementPolicyWithError:frame:" },
-        { &sel_webView_1decidePolicyForNavigationAction_1request_1frame_1decisionListener_1, "webView:decidePolicyForNavigationAction:request:frame:decisionListener::" },
-        { &sel_standardPreferences, "standardPreferences" },
-        { &sel_setJavaEnabled_1, "setJavaEnabled:" },
-        { &sel_use, "use" },
-        { &sel_download, "download" },
-        { &sel_ignore, "ignore" },
-        { &sel_pageTitle, "pageTitle" },
-        { &sel_webFrame, "webFrame" },
-        { &sel_chooseFilename_1, "chooseFilename:" },
-        { &sel_addEventListener_1listener_1useCapture_1, "addEventListener:listener:useCapture:" },
-        { &sel_handleEvent_1, "handleEvent:" },
-        { &sel_cancelable, "cancelable" },
-        { &sel_timeStamp, "timeStamp" },
-        { &sel_initEvent_1_1_1, "initEvent:::" },
-        { &sel_bubbles, "bubbles" },
-        { &sel_stopPropagation, "stopPropagation" },
-        { &sel_initEvent_1canBubbleArg_1cancelableArg_1, "initEvent:canBubbleArg:cancelableArg:" },
-        { &sel_eventPhase, "eventPhase" },
-        { &sel_currentTarget, "currentTarget" },
-        { &sel_preventDefault, "preventDefault" },
-        { &sel_screenX, "screenX" },
-        { &sel_initMouseEvent_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1, "initMouseEvent:::::::::::::::" },
-        { &sel_clientY, "clientY" },
-        { &sel_charCode, "charCode" },
-        { &sel_relatedTarget, "relatedTarget" },
-        { &sel_button, "button" },
-        { &sel_clientX, "clientX" },
-        { &sel_initMouseEvent_1canBubble_1cancelable_1view_1detail_1screenX_1screenY_1clientX_1clientY_1ctrlKey_1altKey_1shiftKey_1metaKey_1button_1relatedTarget_1, "initMouseEvent:canBubble:cancelable:view:detail:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:button:relatedTarget:" },
-        { &sel_shiftKey, "shiftKey" },
-        { &sel_ctrlKey, "ctrlKey" },
-        { &sel_metaKey, "metaKey" },
-        { &sel_altKey, "altKey" },
-        { &sel_keyLocation, "keyLocation" },
-        { &sel_getModifierState_1, "getModifierState:" },
-        { &sel_screenY, "screenY" },
-        { &sel_detail, "detail" },
-        { &sel_handleNotification_1, "handleNotification:" },
-        { &sel_setAllowsScrolling_1, "setAllowsScrolling:" },
-        { &sel_allowsScrolling, "allowsScrolling" },
-        { &sel_printDocumentView, "printDocumentView" },
-        { &sel_documentViewShouldHandlePrint, "documentViewShouldHandlePrint" },
-        { &sel_printOperationWithPrintInfo_1, "printOperationWithPrintInfo:" },
-        { &sel_canPrintHeadersAndFooters, "canPrintHeadersAndFooters" },
-        { &sel_wheelDelta, "wheelDelta" },
-    ];
+    static this ()
+    {
+        
+    }
+
+/** JNI natives */
+
+/** @method flags=jni */
+static char* NewGlobalRef (Object object)
+{
+    return cast(char*) object;
+}
+/**
+ * @method flags=jni
+ * @param globalRef cast=(jobject)
+ */
+//public static final native void DeleteGlobalRef(int /*long*/ globalRef);
+/** @method flags=no_gen */
+static Object JNIGetObject (char* globalRef)
+{
+    return cast(Object) globalRef;
+}
+
+/** Carbon calls */
+
+alias Carbon.Gestalt Gestalt;
+/** @param psn cast=(ProcessSerialNumber *) */
+alias Carbon.GetCurrentProcess GetCurrentProcess;
+/** @param psn cast=(ProcessSerialNumber *) */
+alias Carbon.SetFrontProcess SetFrontProcess;
+/** @param psn cast=(ProcessSerialNumber *) */
+alias Carbon.TransformProcessType TransformProcessType;
+alias Carbon.CPSSetProcessName CPSSetProcessName;
+/** @method flags=dynamic */
+alias Carbon.SetThemeCursor SetThemeCursor;
+/** @method flags=dynamic */
+alias Carbon.GetCurrentButtonState GetCurrentButtonState;
+
+alias Carbon.ThemeCursor ThemeCursor;
+
+public static const ThemeCursor kThemeCopyArrowCursor = ThemeCursor.kThemeCopyArrowCursor;
+public static const ThemeCursor kThemeNotAllowedCursor = ThemeCursor.kThemeNotAllowedCursor;
+public static const ThemeCursor kThemeAliasArrowCursor = ThemeCursor.kThemeAliasArrowCursor;
+
+/** C calls */
+
+alias unistd.getpid getpid;
+
+/** QuickDraw calls */
+
+/** @method flags=dynamic */
+alias Carbon.NewRgn NewRgn;
+/** @method flags=dynamic */
+alias Carbon.RectRgn RectRgn;
+/** @method flags=dynamic */
+alias Carbon.OpenRgn OpenRgn;
+/** @method flags=dynamic */
+alias Carbon.OffsetRgn OffsetRgn;
+/** @method flags=dynamic */
+alias Carbon.MoveTo MoveTo;
+/** @method flags=dynamic */
+alias Carbon.LineTo LineTo;
+/** @method flags=dynamic */
+alias Carbon.UnionRgn UnionRgn;
+/** @method flags=dynamic */
+alias Carbon.CloseRgn CloseRgn;
+/** @method flags=dynamic */
+alias Carbon.DisposeRgn DisposeRgn;
+/** @method flags=dynamic */
+alias Carbon.PtInRgn PtInRgn;
+/** @method flags=dynamic */
+alias Carbon.GetRegionBounds GetRegionBounds;
+/** @method flags=dynamic */
+alias Carbon.SectRgn SectRgn;
+/** @method flags=dynamic */
+alias Carbon.EmptyRgn EmptyRgn;
+/** @method flags=dynamic */
+alias Carbon.DiffRgn DiffRgn;
+/** @method flags=dynamic */
+alias Carbon.RectInRgn RectInRgn;
+/** @method flags=dynamic */
+alias Carbon.QDRegionToRects QDRegionToRects;
+/** @method flags=dynamic */
+alias Carbon.CopyRgn CopyRgn;
+/** @method flags=dynamic */
+alias Carbon.SetRect SetRect;
+public static const int kQDParseRegionFromTop = (1 << 0);
+public static const int kQDParseRegionFromBottom = (1 << 1);
+public static const int kQDParseRegionFromLeft = (1 << 2);
+public static const int kQDParseRegionFromRight = (1 << 3);
+public static const int kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft;
+public static const int kQDRegionToRectsMsgParse = 2;
+
+/** Custom callbacks */
 
-    /** Constants */
-    public static const int NSAWTEventType = 16;
-    public static const int NSAboveBottom = 4;
-    public static const int NSAboveTop = 1;
-    public static const int NSAddTraitFontAction = 2;
-    public static const int NSAdobeCNS1CharacterCollection = 1;
-    public static const int NSAdobeGB1CharacterCollection = 2;
-    public static const int NSAdobeJapan1CharacterCollection = 3;
-    public static const int NSAdobeJapan2CharacterCollection = 4;
-    public static const int NSAdobeKorea1CharacterCollection = 5;
-    public static const int NSAlertAlternateReturn = 0;
-    public static const int NSAlertDefaultReturn = 1;
-    public static const int NSAlertErrorReturn = -2;
-    public static const int NSAlertFirstButtonReturn = 1000;
-    public static const int NSAlertOtherReturn = -1;
-    public static const int NSAlertSecondButtonReturn = 1001;
-    public static const int NSAlertThirdButtonReturn = 1002;
-    public static const int NSAllScrollerParts = 2;
-    public static const int NSAlphaFirstBitmapFormat = 1;
-    public static const int NSAlphaNonpremultipliedBitmapFormat = 2;
-    public static const int NSAlphaShiftKeyMask = 65536;
-    public static const int NSAlternateKeyMask = 524288;
-    public static const int NSAnimationBlocking = 0;
-    public static const int NSAnimationEaseIn = 1;
-    public static const int NSAnimationEaseInOut = 0;
-    public static const int NSAnimationEaseOut = 2;
-    public static const int NSAnimationEffectDisappearingItemDefault = 0;
-    public static const int NSAnimationEffectPoof = 10;
-    public static const int NSAnimationLinear = 3;
-    public static const int NSAnimationNonblocking = 1;
-    public static const int NSAnimationNonblockingThreaded = 2;
-    public static const int NSAnyEventMask = -1;
-    public static const int NSAnyType = 0;
-    public static const int NSAppKitDefined = 13;
-    public static const int NSAppKitDefinedMask = 8192;
-    public static const int NSAppKitVersionNumber10_0 = 577;
-    public static const int NSAppKitVersionNumber10_1 = 620;
-    public static const int NSAppKitVersionNumber10_2 = 663;
-    public static const double NSAppKitVersionNumber10_2_3 = 663.60000000000002;
-    public static const int NSAppKitVersionNumber10_3 = 743;
-    public static const double NSAppKitVersionNumber10_3_2 = 743.13999999999999;
-    public static const double NSAppKitVersionNumber10_3_3 = 743.20000000000005;
-    public static const double NSAppKitVersionNumber10_3_5 = 743.24000000000001;
-    public static const double NSAppKitVersionNumber10_3_7 = 743.33000000000004;
-    public static const double NSAppKitVersionNumber10_3_9 = 743.36000000000001;
-    public static const int NSAppKitVersionNumber10_4 = 824;
-    public static const double NSAppKitVersionNumberWithColumnResizingBrowser = 685.00000000000000;
-    public static const double NSAppKitVersionNumberWithContinuousScrollingBrowser = 680.00000000000000;
-    public static const double NSAppKitVersionNumberWithCursorSizeSupport = 682.00000000000000;
-    public static const double NSAppKitVersionNumberWithCustomSheetPosition = 686.00000000000000;
-    public static const double NSAppKitVersionNumberWithDirectionalTabs = 631.00000000000000;
-    public static const double NSAppKitVersionNumberWithPatternColorLeakFix = 641.00000000000000;
-    public static const int NSApplicationActivatedEventType = 1;
-    public static const int NSApplicationDeactivatedEventType = 2;
-    public static const int NSApplicationDefined = 15;
-    public static const int NSApplicationDefinedMask = 32768;
-    public static const int NSApplicationDelegateReplyCancel = 1;
-    public static const int NSApplicationDelegateReplyFailure = 2;
-    public static const int NSApplicationDelegateReplySuccess = 0;
-    public static const int NSAscendingPageOrder = 1;
-    public static const int NSAtBottom = 5;
-    public static const int NSAtTop = 2;
-    public static const int NSAttachmentCharacter = 65532;
-    public static const int NSAutoPagination = 0;
-    public static const int NSAutosaveOperation = 3;
-    public static const int NSBMPFileType = 1;
-    public static const int NSBackTabCharacter = 25;
-    public static const int NSBackgroundStyleDark = 1;
-    public static const int NSBackgroundStyleLight = 0;
-    public static const int NSBackgroundStyleLowered = 3;
-    public static const int NSBackgroundStyleRaised = 2;
-    public static const int NSBackgroundTab = 1;
-    public static const int NSBackingStoreBuffered = 2;
-    public static const int NSBackingStoreNonretained = 1;
-    public static const int NSBackingStoreRetained = 0;
-    public static const int NSBackspaceCharacter = 8;
-    public static const int NSBacktabTextMovement = 18;
-    public static const int NSBeginFunctionKey = 63274;
-    public static const int NSBelowBottom = 6;
-    public static const int NSBelowTop = 3;
-    public static const int NSBevelLineJoinStyle = 2;
-    public static const int NSBezelBorder = 2;
-    public static const int NSBlueControlTint = 1;
-    public static const int NSBoldFontMask = 2;
-    public static const int NSBorderlessWindowMask = 0;
-    public static const int NSBottomTabsBezelBorder = 2;
-    public static const int NSBoxCustom = 4;
-    public static const int NSBoxOldStyle = 3;
-    public static const int NSBoxPrimary = 0;
-    public static const int NSBoxSecondary = 1;
-    public static const int NSBoxSeparator = 2;
-    public static const int NSBreakFunctionKey = 63282;
-    public static const int NSBrowserAutoColumnResizing = 1;
-    public static const int NSBrowserDropAbove = 1;
-    public static const int NSBrowserDropOn = 0;
-    public static const int NSBrowserNoColumnResizing = 0;
-    public static const int NSBrowserUserColumnResizing = 2;
-    public static const int NSButtLineCapStyle = 0;
-    public static const int NSCMYKColorSpaceModel = 2;
-    public static const int NSCMYKModeColorPanel = 2;
-    public static const int NSCancelButton = 0;
-    public static const int NSCancelTextMovement = 23;
-    public static const int NSCarriageReturnCharacter = 13;
-    public static const int NSCellAllowsMixedState = 16;
-    public static const int NSCellChangesContents = 14;
-    public static const int NSCellDisabled = 0;
-    public static const int NSCellEditable = 3;
-    public static const int NSCellHasImageHorizontal = 12;
-    public static const int NSCellHasImageOnLeftOrBottom = 13;
-    public static const int NSCellHasOverlappingImage = 11;
-    public static const int NSCellHighlighted = 5;
-    public static const int NSCellHitContentArea = 1;
-    public static const int NSCellHitEditableTextArea = 2;
-    public static const int NSCellHitNone = 0;
-    public static const int NSCellHitTrackableArea = 4;
-    public static const int NSCellIsBordered = 10;
-    public static const int NSCellIsInsetButton = 15;
-    public static const int NSCellLightsByBackground = 9;
-    public static const int NSCellLightsByContents = 6;
-    public static const int NSCellLightsByGray = 7;
-    public static const int NSCellState = 1;
-    public static const int NSCenterTabStopType = 2;
-    public static const int NSCenterTextAlignment = 2;
-    public static const int NSChangeAutosaved = 4;
-    public static const int NSChangeBackgroundCell = 8;
-    public static const int NSChangeBackgroundCellMask = 8;
-    public static const int NSChangeCleared = 2;
-    public static const int NSChangeDone = 0;
-    public static const int NSChangeGrayCell = 4;
-    public static const int NSChangeGrayCellMask = 4;
-    public static const int NSChangeReadOtherContents = 3;
-    public static const int NSChangeRedone = 5;
-    public static const int NSChangeUndone = 1;
-    public static const int NSCircularBezelStyle = 7;
-    public static const int NSCircularSlider = 1;
-    public static const int NSClearControlTint = 7;
-    public static const int NSClearDisplayFunctionKey = 63290;
-    public static const int NSClearLineFunctionKey = 63289;
-    public static const int NSClipPagination = 2;
-    public static const int NSClockAndCalendarDatePickerStyle = 1;
-    public static const int NSClosableWindowMask = 2;
-    public static const int NSClosePathBezierPathElement = 3;
-    public static const int NSColorListModeColorPanel = 5;
-    public static const int NSColorPanelAllModesMask = 65535;
-    public static const int NSColorPanelCMYKModeMask = 4;
-    public static const int NSColorPanelColorListModeMask = 32;
-    public static const int NSColorPanelCrayonModeMask = 128;
-    public static const int NSColorPanelCustomPaletteModeMask = 16;
-    public static const int NSColorPanelGrayModeMask = 1;
-    public static const int NSColorPanelHSBModeMask = 8;
-    public static const int NSColorPanelRGBModeMask = 2;
-    public static const int NSColorPanelWheelModeMask = 64;
-    public static const int NSColorRenderingIntentAbsoluteColorimetric = 1;
-    public static const int NSColorRenderingIntentDefault = 0;
-    public static const int NSColorRenderingIntentPerceptual = 3;
-    public static const int NSColorRenderingIntentRelativeColorimetric = 2;
-    public static const int NSColorRenderingIntentSaturation = 4;
-    public static const int NSCommandKeyMask = 1048576;
-    public static const int NSCompositeClear = 0;
-    public static const int NSCompositeCopy = 1;
-    public static const int NSCompositeDestinationAtop = 9;
-    public static const int NSCompositeDestinationIn = 7;
-    public static const int NSCompositeDestinationOut = 8;
-    public static const int NSCompositeDestinationOver = 6;
-    public static const int NSCompositeHighlight = 12;
-    public static const int NSCompositePlusDarker = 11;
-    public static const int NSCompositePlusLighter = 13;
-    public static const int NSCompositeSourceAtop = 5;
-    public static const int NSCompositeSourceIn = 3;
-    public static const int NSCompositeSourceOut = 4;
-    public static const int NSCompositeSourceOver = 2;
-    public static const int NSCompositeXOR = 10;
-    public static const int NSCompressedFontMask = 512;
-    public static const int NSCondensedFontMask = 64;
-    public static const int NSContentsCellMask = 1;
-    public static const int NSContinuousCapacityLevelIndicatorStyle = 1;
-    public static const int NSControlGlyph = 16777215;
-    public static const int NSControlKeyMask = 262144;
-    public static const int NSCrayonModeColorPanel = 7;
-    public static const int NSCriticalAlertStyle = 2;
-    public static const int NSCriticalRequest = 0;
-    public static const int NSCursorPointingDevice = 2;
-    public static const int NSCursorUpdate = 17;
-    public static const int NSCursorUpdateMask = 131072;
-    public static const int NSCurveToBezierPathElement = 2;
-    public static const int NSCustomPaletteModeColorPanel = 4;
-    public static const int NSDecimalTabStopType = 3;
-    public static const int NSDefaultControlTint = 0;
-    public static const int NSDefaultTokenStyle = 0;
-    public static const int NSDeleteCharFunctionKey = 63294;
-    public static const int NSDeleteCharacter = 127;
-    public static const int NSDeleteFunctionKey = 63272;
-    public static const int NSDeleteLineFunctionKey = 63292;
-    public static const int NSDescendingPageOrder = -1;
-    public static const int NSDeviceIndependentModifierFlagsMask = -65536;
-    public static const int NSDeviceNColorSpaceModel = 4;
-    public static const int NSDirectSelection = 0;
-    public static const int NSDisclosureBezelStyle = 5;
-    public static const int NSDiscreteCapacityLevelIndicatorStyle = 2;
-    public static const int NSDisplayWindowRunLoopOrdering = 600000;
-    public static const int NSDocModalWindowMask = 64;
-    public static const int NSDockWindowLevel = 20;
-    public static const int NSDoubleType = 6;
-    public static const int NSDownArrowFunctionKey = 63233;
-    public static const int NSDownTextMovement = 22;
-    public static const int NSDragOperationAll = 15;
-    public static const int NSDragOperationAll_Obsolete = 15;
-    public static const int NSDragOperationCopy = 1;
-    public static const int NSDragOperationDelete = 32;
-    public static const int NSDragOperationEvery = -1;
-    public static const int NSDragOperationGeneric = 4;
-    public static const int NSDragOperationLink = 2;
-    public static const int NSDragOperationMove = 16;
-    public static const int NSDragOperationNone = 0;
-    public static const int NSDragOperationPrivate = 8;
-    public static const int NSDrawerClosedState = 0;
-    public static const int NSDrawerClosingState = 3;
-    public static const int NSDrawerOpenState = 2;
-    public static const int NSDrawerOpeningState = 1;
-    public static const int NSEndFunctionKey = 63275;
-    public static const int NSEnterCharacter = 3;
-    public static const int NSEraDatePickerElementFlag = 256;
-    public static const int NSEraserPointingDevice = 3;
-    public static const int NSEvenOddWindingRule = 1;
-    public static const int NSExclude10_4ElementsIconCreationOption = 4;
-    public static const int NSExcludeQuickDrawElementsIconCreationOption = 2;
-    public static const int NSExecuteFunctionKey = 63298;
-    public static const int NSExpandedFontMask = 32;
-    public static const int NSF10FunctionKey = 63245;
-    public static const int NSF11FunctionKey = 63246;
-    public static const int NSF12FunctionKey = 63247;
-    public static const int NSF13FunctionKey = 63248;
-    public static const int NSF14FunctionKey = 63249;
-    public static const int NSF15FunctionKey = 63250;
-    public static const int NSF16FunctionKey = 63251;
-    public static const int NSF17FunctionKey = 63252;
-    public static const int NSF18FunctionKey = 63253;
-    public static const int NSF19FunctionKey = 63254;
-    public static const int NSF1FunctionKey = 63236;
-    public static const int NSF20FunctionKey = 63255;
-    public static const int NSF21FunctionKey = 63256;
-    public static const int NSF22FunctionKey = 63257;
-    public static const int NSF23FunctionKey = 63258;
-    public static const int NSF24FunctionKey = 63259;
-    public static const int NSF25FunctionKey = 63260;
-    public static const int NSF26FunctionKey = 63261;
-    public static const int NSF27FunctionKey = 63262;
-    public static const int NSF28FunctionKey = 63263;
-    public static const int NSF29FunctionKey = 63264;
-    public static const int NSF2FunctionKey = 63237;
-    public static const int NSF30FunctionKey = 63265;
-    public static const int NSF31FunctionKey = 63266;
-    public static const int NSF32FunctionKey = 63267;
-    public static const int NSF33FunctionKey = 63268;
-    public static const int NSF34FunctionKey = 63269;
-    public static const int NSF35FunctionKey = 63270;
-    public static const int NSF3FunctionKey = 63238;
-    public static const int NSF4FunctionKey = 63239;
-    public static const int NSF5FunctionKey = 63240;
-    public static const int NSF6FunctionKey = 63241;
-    public static const int NSF7FunctionKey = 63242;
-    public static const int NSF8FunctionKey = 63243;
-    public static const int NSF9FunctionKey = 63244;
-    public static const int NSFPCurrentField = 134;
-    public static const int NSFPPreviewButton = 131;
-    public static const int NSFPPreviewField = 128;
-    public static const int NSFPRevertButton = 130;
-    public static const int NSFPSetButton = 132;
-    public static const int NSFPSizeField = 129;
-    public static const int NSFPSizeTitle = 133;
-    public static const int NSFileHandlingPanelCancelButton = 0;
-    public static const int NSFileHandlingPanelOKButton = 1;
-    public static const int NSFindFunctionKey = 63301;
-    public static const int NSFindPanelActionNext = 2;
-    public static const int NSFindPanelActionPrevious = 3;
-    public static const int NSFindPanelActionReplace = 5;
-    public static const int NSFindPanelActionReplaceAll = 4;
-    public static const int NSFindPanelActionReplaceAllInSelection = 8;
-    public static const int NSFindPanelActionReplaceAndFind = 6;
-    public static const int NSFindPanelActionSelectAll = 9;
-    public static const int NSFindPanelActionSelectAllInSelection = 10;
-    public static const int NSFindPanelActionSetFindString = 7;
-    public static const int NSFindPanelActionShowFindPanel = 1;
-    public static const int NSFindPanelSubStringMatchTypeContains = 0;
-    public static const int NSFindPanelSubStringMatchTypeEndsWith = 3;
-    public static const int NSFindPanelSubStringMatchTypeFullWord = 2;
-    public static const int NSFindPanelSubStringMatchTypeStartsWith = 1;
-    public static const int NSFitPagination = 1;
-    public static const int NSFixedPitchFontMask = 1024;
-    public static const int NSFlagsChanged = 12;
-    public static const int NSFlagsChangedMask = 4096;
-    public static const int NSFloatType = 3;
-    public static const int NSFloatingPointSamplesBitmapFormat = 4;
-    public static const int NSFloatingWindowLevel = 3;
-    public static const int NSFocusRingAbove = 2;
-    public static const int NSFocusRingBelow = 1;
-    public static const int NSFocusRingOnly = 0;
-    public static const int NSFocusRingTypeDefault = 0;
-    public static const int NSFocusRingTypeExterior = 2;
-    public static const int NSFocusRingTypeNone = 1;
-    public static const int NSFontAntialiasedIntegerAdvancementsRenderingMode = 3;
-    public static const int NSFontAntialiasedRenderingMode = 1;
-    public static const int NSFontBoldTrait = 2;
-    public static const int NSFontClarendonSerifsClass = 1073741824;
-    public static const int NSFontCollectionApplicationOnlyMask = 1;
-    public static const int NSFontCondensedTrait = 64;
-    public static const int NSFontDefaultRenderingMode = 0;
-    public static const int NSFontExpandedTrait = 32;
-    public static const int NSFontFamilyClassMask = -268435456;
-    public static const int NSFontFreeformSerifsClass = 1879048192;
-    public static const int NSFontIntegerAdvancementsRenderingMode = 2;
-    public static const int NSFontItalicTrait = 1;
-    public static const int NSFontModernSerifsClass = 805306368;
-    public static const int NSFontMonoSpaceTrait = 1024;
-    public static const int NSFontOldStyleSerifsClass = 268435456;
-    public static const int NSFontOrnamentalsClass = -1879048192;
-    public static const int NSFontPanelAllEffectsModeMask = 1048320;
-    public static const int NSFontPanelAllModesMask = -1;
-    public static const int NSFontPanelCollectionModeMask = 4;
-    public static const int NSFontPanelDocumentColorEffectModeMask = 2048;
-    public static const int NSFontPanelFaceModeMask = 1;
-    public static const int NSFontPanelShadowEffectModeMask = 4096;
-    public static const int NSFontPanelSizeModeMask = 2;
-    public static const int NSFontPanelStandardModesMask = 65535;
-    public static const int NSFontPanelStrikethroughEffectModeMask = 512;
-    public static const int NSFontPanelTextColorEffectModeMask = 1024;
-    public static const int NSFontPanelUnderlineEffectModeMask = 256;
-    public static const int NSFontSansSerifClass = -2147483648;
-    public static const int NSFontScriptsClass = -1610612736;
-    public static const int NSFontSlabSerifsClass = 1342177280;
-    public static const int NSFontSymbolicClass = -1073741824;
-    public static const int NSFontTransitionalSerifsClass = 536870912;
-    public static const int NSFontUIOptimizedTrait = 4096;
-    public static const int NSFontUnknownClass = 0;
-    public static const int NSFontVerticalTrait = 2048;
-    public static const int NSFormFeedCharacter = 12;
-    public static const int NSFunctionKeyMask = 8388608;
-    public static const int NSGIFFileType = 2;
-    public static const int NSGlyphAttributeBidiLevel = 2;
-    public static const int NSGlyphAttributeElastic = 1;
-    public static const int NSGlyphAttributeInscribe = 5;
-    public static const int NSGlyphAttributeSoft = 0;
-    public static const int NSGlyphInscribeAbove = 2;
-    public static const int NSGlyphInscribeBase = 0;
-    public static const int NSGlyphInscribeBelow = 1;
-    public static const int NSGlyphInscribeOverBelow = 4;
-    public static const int NSGlyphInscribeOverstrike = 3;
-    public static const int NSGradientConcaveStrong = 2;
-    public static const int NSGradientConcaveWeak = 1;
-    public static const int NSGradientConvexStrong = 4;
-    public static const int NSGradientConvexWeak = 3;
-    public static const int NSGradientDrawsAfterEndingLocation = 2;
-    public static const int NSGradientDrawsBeforeStartingLocation = 1;
-    public static const int NSGradientNone = 0;
-    public static const int NSGraphiteControlTint = 6;
-    public static const int NSGrayColorSpaceModel = 0;
-    public static const int NSGrayModeColorPanel = 0;
-    public static const int NSGrooveBorder = 3;
-    public static const int NSHSBModeColorPanel = 3;
-    public static const int NSHUDWindowMask = 8192;
-    public static const int NSHeavierFontAction = 5;
-    public static const int NSHelpButtonBezelStyle = 9;
-    public static const int NSHelpFunctionKey = 63302;
-    public static const int NSHelpKeyMask = 4194304;
-    public static const int NSHighlightModeMatrix = 1;
-    public static const int NSHomeFunctionKey = 63273;
-    public static const int NSHorizontalRuler = 0;
-    public static const int NSHourMinuteDatePickerElementFlag = 12;
-    public static const int NSHourMinuteSecondDatePickerElementFlag = 14;
-    public static const int NSIdentityMappingCharacterCollection = 0;
-    public static const int NSIllegalTextMovement = 0;
-    public static const int NSImageAbove = 5;
-    public static const int NSImageAlignBottom = 5;
-    public static const int NSImageAlignBottomLeft = 6;
-    public static const int NSImageAlignBottomRight = 7;
-    public static const int NSImageAlignCenter = 0;
-    public static const int NSImageAlignLeft = 4;
-    public static const int NSImageAlignRight = 8;
-    public static const int NSImageAlignTop = 1;
-    public static const int NSImageAlignTopLeft = 2;
-    public static const int NSImageAlignTopRight = 3;
-    public static const int NSImageBelow = 4;
-    public static const int NSImageCacheAlways = 1;
-    public static const int NSImageCacheBySize = 2;
-    public static const int NSImageCacheDefault = 0;
-    public static const int NSImageCacheNever = 3;
-    public static const int NSImageCellType = 2;
-    public static const int NSImageFrameButton = 4;
-    public static const int NSImageFrameGrayBezel = 2;
-    public static const int NSImageFrameGroove = 3;
-    public static const int NSImageFrameNone = 0;
-    public static const int NSImageFramePhoto = 1;
-    public static const int NSImageInterpolationDefault = 0;
-    public static const int NSImageInterpolationHigh = 3;
-    public static const int NSImageInterpolationLow = 2;
-    public static const int NSImageInterpolationNone = 1;
-    public static const int NSImageLeft = 2;
-    public static const int NSImageLoadStatusCancelled = 1;
-    public static const int NSImageLoadStatusCompleted = 0;
-    public static const int NSImageLoadStatusInvalidData = 2;
-    public static const int NSImageLoadStatusReadError = 4;
-    public static const int NSImageLoadStatusUnexpectedEOF = 3;
-    public static const int NSImageOnly = 1;
-    public static const int NSImageOverlaps = 6;
-    public static const int NSImageRepLoadStatusCompleted = -6;
-    public static const int NSImageRepLoadStatusInvalidData = -4;
-    public static const int NSImageRepLoadStatusReadingHeader = -2;
-    public static const int NSImageRepLoadStatusUnexpectedEOF = -5;
-    public static const int NSImageRepLoadStatusUnknownType = -1;
-    public static const int NSImageRepLoadStatusWillNeedAllData = -3;
-    public static const int NSImageRepMatchesDevice = 0;
-    public static const int NSImageRight = 3;
-    public static const int NSImageScaleAxesIndependently = 1;
-    public static const int NSImageScaleNone = 2;
-    public static const int NSImageScaleProportionallyDown = 0;
-    public static const int NSImageScaleProportionallyUpOrDown = 3;
-    public static const int NSIndexedColorSpaceModel = 5;
-    public static const int NSInformationalAlertStyle = 1;
-    public static const int NSInformationalRequest = 10;
-    public static const int NSInsertCharFunctionKey = 63293;
-    public static const int NSInsertFunctionKey = 63271;
-    public static const int NSInsertLineFunctionKey = 63291;
-    public static const int NSIntType = 1;
-    public static const int NSItalicFontMask = 1;
-    public static const int NSJPEG2000FileType = 5;
-    public static const int NSJPEGFileType = 3;
-    public static const int NSJustifiedTextAlignment = 3;
-    public static const int NSKeyDown = 10;
-    public static const int NSKeyDownMask = 1024;
-    public static const int NSKeyUp = 11;
-    public static const int NSKeyUpMask = 2048;
-    public static const int NSLABColorSpaceModel = 3;
-    public static const int NSLandscapeOrientation = 1;
-    public static const int NSLeftArrowFunctionKey = 63234;
-    public static const int NSLeftMouseDown = 1;
-    public static const int NSLeftMouseDownMask = 2;
-    public static const int NSLeftMouseDragged = 6;
-    public static const int NSLeftMouseDraggedMask = 64;
-    public static const int NSLeftMouseUp = 2;
-    public static const int NSLeftMouseUpMask = 4;
-    public static const int NSLeftTabStopType = 0;
-    public static const int NSLeftTabsBezelBorder = 1;
-    public static const int NSLeftTextAlignment = 0;
-    public static const int NSLeftTextMovement = 19;
-    public static const int NSLighterFontAction = 6;
-    public static const int NSLineBorder = 1;
-    public static const int NSLineBreakByCharWrapping = 1;
-    public static const int NSLineBreakByClipping = 2;
-    public static const int NSLineBreakByTruncatingHead = 3;
-    public static const int NSLineBreakByTruncatingMiddle = 5;
-    public static const int NSLineBreakByTruncatingTail = 4;
-    public static const int NSLineBreakByWordWrapping = 0;
-    public static const int NSLineDoesntMove = 0;
-    public static const int NSLineMovesDown = 3;
-    public static const int NSLineMovesLeft = 1;
-    public static const int NSLineMovesRight = 2;
-    public static const int NSLineMovesUp = 4;
-    public static const int NSLineSeparatorCharacter = 8232;
-    public static const int NSLineSweepDown = 2;
-    public static const int NSLineSweepLeft = 0;
-    public static const int NSLineSweepRight = 1;
-    public static const int NSLineSweepUp = 3;
-    public static const int NSLineToBezierPathElement = 1;
-    public static const int NSLinearSlider = 0;
-    public static const int NSListModeMatrix = 2;
-    public static const int NSMacintoshInterfaceStyle = 3;
-    public static const int NSMainMenuWindowLevel = 24;
-    public static const int NSMenuFunctionKey = 63285;
-    public static const int NSMiniControlSize = 2;
-    public static const int NSMiniaturizableWindowMask = 4;
-    public static const int NSMiterLineJoinStyle = 0;
-    public static const int NSMixedState = -1;
-    public static const int NSModalPanelWindowLevel = 8;
-    public static const int NSModeSwitchFunctionKey = 63303;
-    public static const int NSMomentaryChangeButton = 5;
-    public static const int NSMomentaryLight = 7;
-    public static const int NSMomentaryLightButton = 0;
-    public static const int NSMomentaryPushButton = 0;
-    public static const int NSMomentaryPushInButton = 7;
-    public static const int NSMouseEntered = 8;
-    public static const int NSMouseEnteredMask = 256;
-    public static const int NSMouseEventSubtype = 0;
-    public static const int NSMouseExited = 9;
-    public static const int NSMouseExitedMask = 512;
-    public static const int NSMouseMoved = 5;
-    public static const int NSMouseMovedMask = 32;
-    public static const int NSMoveToBezierPathElement = 0;
-    public static const int NSNarrowFontMask = 16;
-    public static const int NSNativeShortGlyphPacking = 5;
-    public static const int NSNaturalTextAlignment = 4;
-    public static const int NSNewlineCharacter = 10;
-    public static const int NSNextFunctionKey = 63296;
-    public static const int NSNextStepInterfaceStyle = 1;
-    public static const int NSNoBorder = 0;
-    public static const int NSNoCellMask = 0;
-    public static const int NSNoFontChangeAction = 0;
-    public static const int NSNoImage = 0;
-    public static const int NSNoInterfaceStyle = 0;
-    public static const int NSNoModeColorPanel = -1;
-    public static const int NSNoScrollerParts = 0;
-    public static const int NSNoTabsBezelBorder = 4;
-    public static const int NSNoTabsLineBorder = 5;
-    public static const int NSNoTabsNoBorder = 6;
-    public static const int NSNoTitle = 0;
-    public static const int NSNoUnderlineStyle = 0;
-    public static const int NSNonStandardCharacterSetFontMask = 8;
-    public static const int NSNonZeroWindingRule = 0;
-    public static const int NSNonactivatingPanelMask = 128;
-    public static const int NSNormalWindowLevel = 0;
-    public static const int NSNullCellType = 0;
-    public static const int NSNullGlyph = 0;
-    public static const int NSNumericPadKeyMask = 2097152;
-    public static const int NSOKButton = 1;
-    public static const int NSOPENGL_CURRENT_VERSION = 1;
-    public static const int NSOffState = 0;
-    public static const int NSOnOffButton = 6;
-    public static const int NSOnState = 1;
-    public static const int NSOnlyScrollerArrows = 1;
-    public static const int NSOpenGLCPRasterizationEnable = 221;
-    public static const int NSOpenGLCPStateValidation = 301;
-    public static const int NSOpenGLCPSurfaceOpacity = 236;
-    public static const int NSOpenGLCPSurfaceOrder = 235;
-    public static const int NSOpenGLCPSwapInterval = 222;
-    public static const int NSOpenGLCPSwapRectangle = 200;
-    public static const int NSOpenGLCPSwapRectangleEnable = 201;
-    public static const int NSOpenGLGOClearFormatCache = 502;
-    public static const int NSOpenGLGOFormatCacheSize = 501;
-    public static const int NSOpenGLGOResetLibrary = 504;
-    public static const int NSOpenGLGORetainRenderers = 503;
-    public static const int NSOpenGLPFAAccelerated = 73;
-    public static const int NSOpenGLPFAAccumSize = 14;
-    public static const int NSOpenGLPFAAllRenderers = 1;
-    public static const int NSOpenGLPFAAllowOfflineRenderers = 96;
-    public static const int NSOpenGLPFAAlphaSize = 11;
-    public static const int NSOpenGLPFAAuxBuffers = 7;
-    public static const int NSOpenGLPFAAuxDepthStencil = 57;
-    public static const int NSOpenGLPFABackingStore = 76;
-    public static const int NSOpenGLPFAClosestPolicy = 74;
-    public static const int NSOpenGLPFAColorFloat = 58;
-    public static const int NSOpenGLPFAColorSize = 8;
-    public static const int NSOpenGLPFACompliant = 83;
-    public static const int NSOpenGLPFADepthSize = 12;
-    public static const int NSOpenGLPFADoubleBuffer = 5;
-    public static const int NSOpenGLPFAFullScreen = 54;
-    public static const int NSOpenGLPFAMPSafe = 78;
-    public static const int NSOpenGLPFAMaximumPolicy = 52;
-    public static const int NSOpenGLPFAMinimumPolicy = 51;
-    public static const int NSOpenGLPFAMultiScreen = 81;
-    public static const int NSOpenGLPFAMultisample = 59;
-    public static const int NSOpenGLPFANoRecovery = 72;
-    public static const int NSOpenGLPFAOffScreen = 53;
-    public static const int NSOpenGLPFAPixelBuffer = 90;
-    public static const int NSOpenGLPFARendererID = 70;
-    public static const int NSOpenGLPFARobust = 75;
-    public static const int NSOpenGLPFASampleAlpha = 61;
-    public static const int NSOpenGLPFASampleBuffers = 55;
-    public static const int NSOpenGLPFASamples = 56;
-    public static const int NSOpenGLPFAScreenMask = 84;
-    public static const int NSOpenGLPFASingleRenderer = 71;
-    public static const int NSOpenGLPFAStencilSize = 13;
-    public static const int NSOpenGLPFAStereo = 6;
-    public static const int NSOpenGLPFASupersample = 60;
-    public static const int NSOpenGLPFAVirtualScreenCount = 128;
-    public static const int NSOpenGLPFAWindow = 80;
-    public static const int NSOtherMouseDown = 25;
-    public static const int NSOtherMouseDownMask = 33554432;
-    public static const int NSOtherMouseDragged = 27;
-    public static const int NSOtherMouseDraggedMask = 134217728;
-    public static const int NSOtherMouseUp = 26;
-    public static const int NSOtherMouseUpMask = 67108864;
-    public static const int NSOtherTextMovement = 0;
-    public static const int NSOutlineViewDropOnItemIndex = -1;
-    public static const int NSPNGFileType = 4;
-    public static const int NSPageDownFunctionKey = 63277;
-    public static const int NSPageUpFunctionKey = 63276;
-    public static const int NSParagraphSeparatorCharacter = 8233;
-    public static const int NSPathStyleNavigationBar = 1;
-    public static const int NSPathStylePopUp = 2;
-    public static const int NSPathStyleStandard = 0;
-    public static const int NSPatternColorSpaceModel = 6;
-    public static const int NSPauseFunctionKey = 63280;
-    public static const int NSPenLowerSideMask = 2;
-    public static const int NSPenPointingDevice = 1;
-    public static const int NSPenTipMask = 1;
-    public static const int NSPenUpperSideMask = 4;
-    public static const int NSPeriodic = 16;
-    public static const int NSPeriodicMask = 65536;
-    public static const int NSPlainTextTokenStyle = 1;
-    public static const int NSPopUpArrowAtBottom = 2;
-    public static const int NSPopUpArrowAtCenter = 1;
-    public static const int NSPopUpMenuWindowLevel = 101;
-    public static const int NSPopUpNoArrow = 0;
-    public static const int NSPortraitOrientation = 0;
-    public static const int NSPositiveDoubleType = 7;
-    public static const int NSPositiveFloatType = 4;
-    public static const int NSPositiveIntType = 2;
-    public static const int NSPosterFontMask = 256;
-    public static const int NSPowerOffEventType = 1;
-    public static const int NSPressedTab = 2;
-    public static const int NSPrevFunctionKey = 63295;
-    public static const int NSPrintFunctionKey = 63288;
-    public static const int NSPrintPanelShowsCopies = 1;
-    public static const int NSPrintPanelShowsOrientation = 8;
-    public static const int NSPrintPanelShowsPageRange = 2;
-    public static const int NSPrintPanelShowsPageSetupAccessory = 256;
-    public static const int NSPrintPanelShowsPaperSize = 4;
-    public static const int NSPrintPanelShowsPreview = 131072;
-    public static const int NSPrintPanelShowsScaling = 16;
-    public static const int NSPrintScreenFunctionKey = 63278;
-    public static const int NSPrinterTableError = 2;
-    public static const int NSPrinterTableNotFound = 1;
-    public static const int NSPrinterTableOK = 0;
-    public static const int NSPrintingCancelled = 0;
-    public static const int NSPrintingFailure = 3;
-    public static const int NSPrintingReplyLater = 2;
-    public static const int NSPrintingSuccess = 1;
-    public static const int NSProgressIndicatorBarStyle = 0;
-    public static const int NSProgressIndicatorPreferredAquaThickness = 12;
-    public static const int NSProgressIndicatorPreferredLargeThickness = 18;
-    public static const int NSProgressIndicatorPreferredSmallThickness = 10;
-    public static const int NSProgressIndicatorPreferredThickness = 14;
-    public static const int NSProgressIndicatorSpinningStyle = 1;
-    public static const int NSPushInCell = 2;
-    public static const int NSPushInCellMask = 2;
-    public static const int NSPushOnPushOffButton = 1;
-    public static const int NSQTMovieLoopingBackAndForthPlayback = 2;
-    public static const int NSQTMovieLoopingPlayback = 1;
-    public static const int NSQTMovieNormalPlayback = 0;
-    public static const int NSRGBColorSpaceModel = 1;
-    public static const int NSRGBModeColorPanel = 1;
-    public static const int NSRadioButton = 4;
-    public static const int NSRadioModeMatrix = 0;
-    public static const int NSRangeDateMode = 1;
-    public static const int NSRatingLevelIndicatorStyle = 3;
-    public static const int NSRecessedBezelStyle = 13;
-    public static const int NSRedoFunctionKey = 63300;
-    public static const int NSRegularControlSize = 0;
-    public static const int NSRegularSquareBezelStyle = 2;
-    public static const int NSRelevancyLevelIndicatorStyle = 0;
-    public static const int NSRemoveTraitFontAction = 7;
-    public static const int NSResetCursorRectsRunLoopOrdering = 700000;
-    public static const int NSResetFunctionKey = 63283;
-    public static const int NSResizableWindowMask = 8;
-    public static const int NSReturnTextMovement = 16;
-    public static const int NSRightArrowFunctionKey = 63235;
-    public static const int NSRightMouseDown = 3;
-    public static const int NSRightMouseDownMask = 8;
-    public static const int NSRightMouseDragged = 7;
-    public static const int NSRightMouseDraggedMask = 128;
-    public static const int NSRightMouseUp = 4;
-    public static const int NSRightMouseUpMask = 16;
-    public static const int NSRightTabStopType = 1;
-    public static const int NSRightTabsBezelBorder = 3;
-    public static const int NSRightTextAlignment = 1;
-    public static const int NSRightTextMovement = 20;
-    public static const int NSRoundLineCapStyle = 1;
-    public static const int NSRoundLineJoinStyle = 1;
-    public static const int NSRoundRectBezelStyle = 12;
-    public static const int NSRoundedBezelStyle = 1;
-    public static const int NSRoundedDisclosureBezelStyle = 14;
-    public static const int NSRoundedTokenStyle = 2;
-    public static const int NSRuleEditorNestingModeCompound = 2;
-    public static const int NSRuleEditorNestingModeList = 1;
-    public static const int NSRuleEditorNestingModeSimple = 3;
-    public static const int NSRuleEditorNestingModeSingle = 0;
-    public static const int NSRuleEditorRowTypeCompound = 1;
-    public static const int NSRuleEditorRowTypeSimple = 0;
-    public static const int NSRunAbortedResponse = -1001;
-    public static const int NSRunContinuesResponse = -1002;
-    public static const int NSRunStoppedResponse = -1000;
-    public static const int NSSaveAsOperation = 1;
-    public static const int NSSaveOperation = 0;
-    public static const int NSSaveToOperation = 2;
-    public static const int NSScaleNone = 2;
-    public static const int NSScaleProportionally = 0;
-    public static const int NSScaleToFit = 1;
-    public static const int NSScreenChangedEventType = 8;
-    public static const int NSScreenSaverWindowLevel = 1000;
-    public static const int NSScrollLockFunctionKey = 63279;
-    public static const int NSScrollWheel = 22;
-    public static const int NSScrollWheelMask = 4194304;
-    public static const int NSScrollerArrowsDefaultSetting = 0;
-    public static const int NSScrollerArrowsMaxEnd = 0;
-    public static const int NSScrollerArrowsMinEnd = 1;
-    public static const int NSScrollerArrowsNone = 2;
-    public static const int NSScrollerDecrementArrow = 1;
-//    public static const int NSScrollerDecrementLine = 4;
-//    public static const int NSScrollerDecrementPage = 1;
-    public static const int NSScrollerIncrementArrow = 0;
-//    public static const int NSScrollerIncrementLine = 5;
-//    public static const int NSScrollerIncrementPage = 3;
-//    public static const int NSScrollerKnob = 2;
-    public static const int NSScrollerKnobSlot = 6;
-    public static const int NSScrollerNoPart = 0;
-    public static const int NSSearchFieldClearRecentsMenuItemTag = 1002;
-    public static const int NSSearchFieldNoRecentsMenuItemTag = 1003;
-    public static const int NSSearchFieldRecentsMenuItemTag = 1001;
-    public static const int NSSearchFieldRecentsTitleMenuItemTag = 1000;
-    public static const int NSSegmentStyleAutomatic = 0;
-    public static const int NSSegmentStyleCapsule = 5;
-    public static const int NSSegmentStyleRoundRect = 3;
-    public static const int NSSegmentStyleRounded = 1;
-    public static const int NSSegmentStyleSmallSquare = 6;
-    public static const int NSSegmentStyleTexturedRounded = 2;
-    public static const int NSSegmentStyleTexturedSquare = 4;
-    public static const int NSSegmentSwitchTrackingMomentary = 2;
-    public static const int NSSegmentSwitchTrackingSelectAny = 1;
-    public static const int NSSegmentSwitchTrackingSelectOne = 0;
-    public static const int NSSelectByCharacter = 0;
-    public static const int NSSelectByParagraph = 2;
-    public static const int NSSelectByWord = 1;
-    public static const int NSSelectFunctionKey = 63297;
-    public static const int NSSelectedTab = 0;
-    public static const int NSSelectingNext = 1;
-    public static const int NSSelectingPrevious = 2;
-    public static const int NSSelectionAffinityDownstream = 1;
-    public static const int NSSelectionAffinityUpstream = 0;
-    public static const int NSServiceApplicationLaunchFailedError = 66561;
-    public static const int NSServiceApplicationNotFoundError = 66560;
-    public static const int NSServiceErrorMaximum = 66817;
-    public static const int NSServiceErrorMinimum = 66560;
-    public static const int NSServiceInvalidPasteboardDataError = 66563;
-    public static const int NSServiceMalformedServiceDictionaryError = 66564;
-    public static const int NSServiceMiscellaneousError = 66800;
-    public static const int NSServiceRequestTimedOutError = 66562;
-    public static const int NSShadowlessSquareBezelStyle = 6;
-    public static const int NSShiftKeyMask = 131072;
-    public static const int NSShowControlGlyphs = 1;
-    public static const int NSShowInvisibleGlyphs = 2;
-    public static const int NSSingleDateMode = 0;
-    public static const int NSSingleUnderlineStyle = 1;
-    public static const int NSSizeDownFontAction = 4;
-    public static const int NSSizeUpFontAction = 3;
-    public static const int NSSmallCapsFontMask = 128;
-    public static const int NSSmallControlSize = 1;
-    public static const int NSSmallIconButtonBezelStyle = 2;
-    public static const int NSSmallSquareBezelStyle = 10;
-    public static const int NSSpecialPageOrder = 0;
-    public static const int NSSpeechImmediateBoundary = 0;
-    public static const int NSSpeechSentenceBoundary = 2;
-    public static const int NSSpeechWordBoundary = 1;
-    public static const int NSSpellingStateGrammarFlag = 2;
-    public static const int NSSpellingStateSpellingFlag = 1;
-    public static const int NSSplitViewDividerStyleThick = 1;
-    public static const int NSSplitViewDividerStyleThin = 2;
-    public static const int NSSquareLineCapStyle = 2;
-    public static const int NSSquareStatusItemLength = -2;
-    public static const int NSStatusWindowLevel = 25;
-    public static const int NSStopFunctionKey = 63284;
-    public static const int NSStringDrawingDisableScreenFontSubstitution = 4;
-    public static const int NSStringDrawingOneShot = 16;
-    public static const int NSStringDrawingTruncatesLastVisibleLine = 32;
-    public static const int NSStringDrawingUsesDeviceMetrics = 8;
-    public static const int NSStringDrawingUsesFontLeading = 2;
-    public static const int NSStringDrawingUsesLineFragmentOrigin = 1;
-    public static const int NSSubmenuWindowLevel = 3;
-    public static const int NSSwitchButton = 3;
-    public static const int NSSysReqFunctionKey = 63281;
-    public static const int NSSystemDefined = 14;
-    public static const int NSSystemDefinedMask = 16384;
-    public static const int NSSystemFunctionKey = 63287;
-    public static const int NSTIFFCompressionCCITTFAX3 = 3;
-    public static const int NSTIFFCompressionCCITTFAX4 = 4;
-    public static const int NSTIFFCompressionJPEG = 6;
-    public static const int NSTIFFCompressionLZW = 5;
-    public static const int NSTIFFCompressionNEXT = 32766;
-    public static const int NSTIFFCompressionNone = 1;
-    public static const int NSTIFFCompressionOldJPEG = 32865;
-    public static const int NSTIFFCompressionPackBits = 32773;
-    public static const int NSTIFFFileType = 0;
-    public static const int NSTabCharacter = 9;
-    public static const int NSTabTextMovement = 17;
-    public static const int NSTableColumnAutoresizingMask = 1;
-    public static const int NSTableColumnNoResizing = 0;
-    public static const int NSTableColumnUserResizingMask = 2;
-    public static const int NSTableViewDropAbove = 1;
-    public static const int NSTableViewDropOn = 0;
-    public static const int NSTableViewFirstColumnOnlyAutoresizingStyle = 5;
-    public static const int NSTableViewGridNone = 0;
-    public static const int NSTableViewLastColumnOnlyAutoresizingStyle = 4;
-    public static const int NSTableViewNoColumnAutoresizing = 0;
-    public static const int NSTableViewReverseSequentialColumnAutoresizingStyle = 3;
-    public static const int NSTableViewSelectionHighlightStyleRegular = 0;
-    public static const int NSTableViewSelectionHighlightStyleSourceList = 1;
-    public static const int NSTableViewSequentialColumnAutoresizingStyle = 2;
-    public static const int NSTableViewSolidHorizontalGridLineMask = 2;
-    public static const int NSTableViewSolidVerticalGridLineMask = 1;
-    public static const int NSTableViewUniformColumnAutoresizingStyle = 1;
-    public static const int NSTabletPoint = 23;
-    public static const int NSTabletPointEventSubtype = 1;
-    public static const int NSTabletPointMask = 8388608;
-    public static const int NSTabletProximity = 24;
-    public static const int NSTabletProximityEventSubtype = 2;
-    public static const int NSTabletProximityMask = 16777216;
-    public static const int NSTerminateCancel = 0;
-    public static const int NSTerminateLater = 2;
-    public static const int NSTerminateNow = 1;
-    public static const int NSTextBlockAbsoluteValueType = 0;
-    public static const int NSTextBlockBaselineAlignment = 3;
-    public static const int NSTextBlockBorder = 0;
-    public static const int NSTextBlockBottomAlignment = 2;
-    public static const int NSTextBlockHeight = 4;
-    public static const int NSTextBlockMargin = 1;
-    public static const int NSTextBlockMaximumHeight = 6;
-    public static const int NSTextBlockMaximumWidth = 2;
-    public static const int NSTextBlockMiddleAlignment = 1;
-    public static const int NSTextBlockMinimumHeight = 5;
-    public static const int NSTextBlockMinimumWidth = 1;
-    public static const int NSTextBlockPadding = -1;
-    public static const int NSTextBlockPercentageValueType = 1;
-    public static const int NSTextBlockTopAlignment = 0;
-    public static const int NSTextBlockWidth = 0;
-    public static const int NSTextCellType = 1;
-    public static const int NSTextFieldAndStepperDatePickerStyle = 0;
-    public static const int NSTextFieldDatePickerStyle = 2;
-    public static const int NSTextFieldRoundedBezel = 1;
-    public static const int NSTextFieldSquareBezel = 0;
-    public static const int NSTextListPrependEnclosingMarker = 1;
-    public static const int NSTextReadInapplicableDocumentTypeError = 65806;
-    public static const int NSTextReadWriteErrorMaximum = 66303;
-    public static const int NSTextReadWriteErrorMinimum = 65792;
-    public static const int NSTextStorageEditedAttributes = 1;
-    public static const int NSTextStorageEditedCharacters = 2;
-    public static const int NSTextTableAutomaticLayoutAlgorithm = 0;
-    public static const int NSTextTableFixedLayoutAlgorithm = 1;
-    public static const int NSTextWriteInapplicableDocumentTypeError = 66062;
-    public static const int NSTexturedBackgroundWindowMask = 256;
-    public static const int NSTexturedRoundedBezelStyle = 11;
-    public static const int NSTexturedSquareBezelStyle = 8;
-    public static const int NSThickSquareBezelStyle = 3;
-    public static const int NSThickerSquareBezelStyle = 4;
-    public static const int NSTickMarkAbove = 1;
-    public static const int NSTickMarkBelow = 0;
-    public static const int NSTickMarkLeft = 1;
-    public static const int NSTickMarkRight = 0;
-    public static const int NSTimeZoneDatePickerElementFlag = 16;
-    public static const int NSTitledWindowMask = 1;
-    public static const int NSToggleButton = 2;
-    public static const int NSToolbarDisplayModeDefault = 0;
-    public static const int NSToolbarDisplayModeIconAndLabel = 1;
-    public static const int NSToolbarDisplayModeIconOnly = 2;
-    public static const int NSToolbarDisplayModeLabelOnly = 3;
-    public static const int NSToolbarItemVisibilityPriorityHigh = 1000;
-    public static const int NSToolbarItemVisibilityPriorityLow = -1000;
-    public static const int NSToolbarItemVisibilityPriorityStandard = 0;
-    public static const int NSToolbarItemVisibilityPriorityUser = 2000;
-    public static const int NSToolbarSizeModeDefault = 0;
-    public static const int NSToolbarSizeModeRegular = 1;
-    public static const int NSToolbarSizeModeSmall = 2;
-    public static const int NSTopTabsBezelBorder = 0;
-    public static const int NSTornOffMenuWindowLevel = 3;
-    public static const int NSTrackModeMatrix = 3;
-    public static const int NSTrackingActiveAlways = 128;
-    public static const int NSTrackingActiveInActiveApp = 64;
-    public static const int NSTrackingActiveInKeyWindow = 32;
-    public static const int NSTrackingActiveWhenFirstResponder = 16;
-    public static const int NSTrackingAssumeInside = 256;
-    public static const int NSTrackingCursorUpdate = 4;
-    public static const int NSTrackingEnabledDuringMouseDrag = 1024;
-    public static const int NSTrackingInVisibleRect = 512;
-    public static const int NSTrackingMouseEnteredAndExited = 1;
-    public static const int NSTrackingMouseMoved = 2;
-    public static const int NSTypesetterBehavior_10_2 = 2;
-    public static const int NSTypesetterBehavior_10_2_WithCompatibility = 1;
-    public static const int NSTypesetterBehavior_10_3 = 3;
-    public static const int NSTypesetterBehavior_10_4 = 4;
-    public static const int NSTypesetterContainerBreakAction = 32;
-    public static const int NSTypesetterHorizontalTabAction = 4;
-    public static const int NSTypesetterLatestBehavior = -1;
-    public static const int NSTypesetterLineBreakAction = 8;
-    public static const int NSTypesetterOriginalBehavior = 0;
-    public static const int NSTypesetterParagraphBreakAction = 16;
-    public static const int NSTypesetterWhitespaceAction = 2;
-    public static const int NSTypesetterZeroAdvancementAction = 1;
-    public static const int NSUnboldFontMask = 4;
-    public static const int NSUnderlinePatternDash = 512;
-    public static const int NSUnderlinePatternDashDot = 768;
-    public static const int NSUnderlinePatternDashDotDot = 1024;
-    public static const int NSUnderlinePatternDot = 256;
-    public static const int NSUnderlinePatternSolid = 0;
-    public static const int NSUnderlineStyleDouble = 9;
-    public static const int NSUnderlineStyleNone = 0;
-    public static const int NSUnderlineStyleSingle = 1;
-    public static const int NSUnderlineStyleThick = 2;
-    public static const int NSUndoFunctionKey = 63299;
-    public static const int NSUnifiedTitleAndToolbarWindowMask = 4096;
-    public static const int NSUnitalicFontMask = 16777216;
-    public static const int NSUnknownColorSpaceModel = -1;
-    public static const int NSUnknownPageOrder = 2;
-    public static const int NSUnknownPointingDevice = 0;
-    public static const int NSUnscaledWindowMask = 2048;
-    public static const int NSUpArrowFunctionKey = 63232;
-    public static const int NSUpTextMovement = 21;
-    public static const int NSUpdateWindowsRunLoopOrdering = 500000;
-    public static const int NSUserFunctionKey = 63286;
-    public static const int NSUtilityWindowMask = 16;
-    public static const int NSVariableStatusItemLength = -1;
-    public static const int NSVerticalRuler = 1;
-    public static const int NSViaPanelFontAction = 1;
-    public static const int NSViewHeightSizable = 16;
-    public static const int NSViewMaxXMargin = 4;
-    public static const int NSViewMaxYMargin = 32;
-    public static const int NSViewMinXMargin = 1;
-    public static const int NSViewMinYMargin = 8;
-    public static const int NSViewNotSizable = 0;
-    public static const int NSViewWidthSizable = 2;
-    public static const int NSWantsBidiLevels = 4;
-    public static const int NSWarningAlertStyle = 0;
-    public static const int NSWheelModeColorPanel = 6;
-    public static const int NSWindowAbove = 1;
-    public static const int NSWindowBackingLocationDefault = 0;
-    public static const int NSWindowBackingLocationMainMemory = 2;
-    public static const int NSWindowBackingLocationVideoMemory = 1;
-    public static const int NSWindowBelow = -1;
-    public static const int NSWindowCloseButton = 0;
-    public static const int NSWindowCollectionBehaviorCanJoinAllSpaces = 1;
-    public static const int NSWindowCollectionBehaviorDefault = 0;
-    public static const int NSWindowCollectionBehaviorMoveToActiveSpace = 2;
-    public static const int NSWindowDocumentIconButton = 4;
-    public static const int NSWindowExposedEventType = 0;
-    public static const int NSWindowMiniaturizeButton = 1;
-    public static const int NSWindowMovedEventType = 4;
-    public static const int NSWindowOut = 0;
-    public static const int NSWindowSharingNone = 0;
-    public static const int NSWindowSharingReadOnly = 1;
-    public static const int NSWindowSharingReadWrite = 2;
-    public static const int NSWindowToolbarButton = 3;
-    public static const int NSWindowZoomButton = 2;
-    public static const int NSWindows95InterfaceStyle = 2;
-    public static const int NSWorkspaceLaunchAllowingClassicStartup = 131072;
-    public static const int NSWorkspaceLaunchAndHide = 1048576;
-    public static const int NSWorkspaceLaunchAndHideOthers = 2097152;
-    public static const int NSWorkspaceLaunchAndPrint = 2;
-    public static const int NSWorkspaceLaunchAsync = 65536;
-    public static const int NSWorkspaceLaunchDefault = 196608;
-    public static const int NSWorkspaceLaunchInhibitingBackgroundOnly = 128;
-    public static const int NSWorkspaceLaunchNewInstance = 524288;
-    public static const int NSWorkspaceLaunchPreferringClassic = 262144;
-    public static const int NSWorkspaceLaunchWithoutActivation = 512;
-    public static const int NSWorkspaceLaunchWithoutAddingToRecents = 256;
-    public static const int NSWritingDirectionLeftToRight = 0;
-    public static const int NSWritingDirectionNatural = -1;
-    public static const int NSWritingDirectionRightToLeft = 1;
-    public static const int NSYearMonthDatePickerElementFlag = 192;
-    public static const int NSYearMonthDayDatePickerElementFlag = 224;
-    public static const int NSASCIIStringEncoding = 1;
-    public static const int NSAdminApplicationDirectory = 4;
-    public static const int NSAggregateExpressionType = 14;
-    public static const int NSAllApplicationsDirectory = 100;
-    public static const int NSAllDomainsMask = 65535;
-    public static const int NSAllLibrariesDirectory = 101;
-    public static const int NSAllPredicateModifier = 1;
-    public static const int NSAnchoredSearch = 8;
-    public static const int NSAndPredicateType = 1;
-    public static const int NSAnyPredicateModifier = 2;
-    public static const int NSApplicationDirectory = 1;
-    public static const int NSApplicationSupportDirectory = 14;
-    public static const int NSArgumentEvaluationScriptError = 3;
-    public static const int NSArgumentsWrongScriptError = 6;
-    public static const int NSAtomicWrite = 1;
-    public static const int NSBackwardsSearch = 4;
-    public static const int NSBeginsWithComparison = 5;
-    public static const int NSBeginsWithPredicateOperatorType = 8;
-    public static const int NSBetweenPredicateOperatorType = 100;
-    public static const int NSBundleExecutableArchitectureI386 = 7;
-    public static const int NSBundleExecutableArchitecturePPC = 18;
-    public static const int NSBundleExecutableArchitecturePPC64 = 16777234;
-    public static const int NSBundleExecutableArchitectureX86_64 = 16777223;
-    public static const int NSCachesDirectory = 13;
-    public static const int NSCalculationDivideByZero = 4;
-    public static const int NSCalculationLossOfPrecision = 1;
-    public static const int NSCalculationNoError = 0;
-    public static const int NSCalculationOverflow = 3;
-    public static const int NSCalculationUnderflow = 2;
-    public static const int NSCannotCreateScriptCommandError = 10;
-    public static const int NSCaseInsensitivePredicateOption = 1;
-    public static const int NSCaseInsensitiveSearch = 1;
-    public static const int NSCollectorDisabledOption = 2;
-    public static const int NSConstantValueExpressionType = 0;
-    public static const int NSContainerSpecifierError = 2;
-    public static const int NSContainsComparison = 7;
-    public static const int NSContainsPredicateOperatorType = 99;
-    public static const int NSCoreServiceDirectory = 10;
-    public static const int NSCustomSelectorPredicateOperatorType = 11;
-    public static const int NSDateFormatterBehavior10_0 = 1000;
-    public static const int NSDateFormatterBehavior10_4 = 1040;
-    public static const int NSDateFormatterBehaviorDefault = 0;
-    public static const int NSDateFormatterFullStyle = 4;
-    public static const int NSDateFormatterLongStyle = 3;
-    public static const int NSDateFormatterMediumStyle = 2;
-    public static const int NSDateFormatterNoStyle = 0;
-    public static const int NSDateFormatterShortStyle = 1;
-    public static const int NSDayCalendarUnit = 16;
-    public static const int NSDecimalMaxSize = 8;
-    public static const int NSDecimalNoScale = 32767;
-    public static const int NSDemoApplicationDirectory = 2;
-    public static const int NSDesktopDirectory = 12;
-    public static const int NSDeveloperApplicationDirectory = 3;
-    public static const int NSDeveloperDirectory = 6;
-    public static const int NSDiacriticInsensitivePredicateOption = 2;
-    public static const int NSDiacriticInsensitiveSearch = 128;
-    public static const int NSDirectPredicateModifier = 0;
-    public static const int NSDocumentDirectory = 9;
-    public static const int NSDocumentationDirectory = 8;
-    public static const int NSDownloadsDirectory = 15;
-    public static const int NSEndsWithComparison = 6;
-    public static const int NSEndsWithPredicateOperatorType = 9;
-    public static const int NSEqualToComparison = 0;
-    public static const int NSEqualToPredicateOperatorType = 4;
-    public static const int NSEraCalendarUnit = 2;
-    public static const int NSEvaluatedObjectExpressionType = 1;
-    public static const int NSEverySubelement = 1;
-    public static const int NSExecutableArchitectureMismatchError = 3585;
-    public static const int NSExecutableErrorMaximum = 3839;
-    public static const int NSExecutableErrorMinimum = 3584;
-    public static const int NSExecutableLinkError = 3588;
-    public static const int NSExecutableLoadError = 3587;
-    public static const int NSExecutableNotLoadableError = 3584;
-    public static const int NSExecutableRuntimeMismatchError = 3586;
-    public static const int NSFileErrorMaximum = 1023;
-    public static const int NSFileErrorMinimum = 0;
-    public static const int NSFileLockingError = 255;
-    public static const int NSFileNoSuchFileError = 4;
-    public static const int NSFileReadCorruptFileError = 259;
-    public static const int NSFileReadInapplicableStringEncodingError = 261;
-    public static const int NSFileReadInvalidFileNameError = 258;
-    public static const int NSFileReadNoPermissionError = 257;
-    public static const int NSFileReadNoSuchFileError = 260;
-    public static const int NSFileReadTooLargeError = 263;
-    public static const int NSFileReadUnknownError = 256;
-    public static const int NSFileReadUnknownStringEncodingError = 264;
-    public static const int NSFileReadUnsupportedSchemeError = 262;
-    public static const int NSFileWriteInapplicableStringEncodingError = 517;
-    public static const int NSFileWriteInvalidFileNameError = 514;
-    public static const int NSFileWriteNoPermissionError = 513;
-    public static const int NSFileWriteOutOfSpaceError = 640;
-    public static const int NSFileWriteUnknownError = 512;
-    public static const int NSFileWriteUnsupportedSchemeError = 518;
-    public static const int NSForcedOrderingSearch = 512;
-    public static const int NSFormattingError = 2048;
-    public static const int NSFormattingErrorMaximum = 2559;
-    public static const int NSFormattingErrorMinimum = 2048;
-    public static const double NSFoundationVersionNumber10_0 = 397.39999999999998;
-    public static const double NSFoundationVersionNumber10_1 = 425.00000000000000;
-    public static const double NSFoundationVersionNumber10_1_1 = 425.00000000000000;
-    public static const double NSFoundationVersionNumber10_1_2 = 425.00000000000000;
-    public static const double NSFoundationVersionNumber10_1_3 = 425.00000000000000;
-    public static const double NSFoundationVersionNumber10_1_4 = 425.00000000000000;
-    public static const double NSFoundationVersionNumber10_2 = 462.00000000000000;
-    public static const double NSFoundationVersionNumber10_2_1 = 462.00000000000000;
-    public static const double NSFoundationVersionNumber10_2_2 = 462.00000000000000;
-    public static const double NSFoundationVersionNumber10_2_3 = 462.00000000000000;
-    public static const double NSFoundationVersionNumber10_2_4 = 462.00000000000000;
-    public static const double NSFoundationVersionNumber10_2_5 = 462.00000000000000;
-    public static const double NSFoundationVersionNumber10_2_6 = 462.00000000000000;
-    public static const double NSFoundationVersionNumber10_2_7 = 462.69999999999999;
-    public static const double NSFoundationVersionNumber10_2_8 = 462.69999999999999;
-    public static const double NSFoundationVersionNumber10_3 = 500.00000000000000;
-    public static const double NSFoundationVersionNumber10_3_1 = 500.00000000000000;
-    public static const double NSFoundationVersionNumber10_3_2 = 500.30000000000001;
-    public static const double NSFoundationVersionNumber10_3_3 = 500.54000000000002;
-    public static const double NSFoundationVersionNumber10_3_4 = 500.56000000000000;
-    public static const double NSFoundationVersionNumber10_3_5 = 500.56000000000000;
-    public static const double NSFoundationVersionNumber10_3_6 = 500.56000000000000;
-    public static const double NSFoundationVersionNumber10_3_7 = 500.56000000000000;
-    public static const double NSFoundationVersionNumber10_3_8 = 500.56000000000000;
-    public static const double NSFoundationVersionNumber10_3_9 = 500.57999999999998;
-    public static const double NSFoundationVersionNumber10_4 = 567.00000000000000;
-    public static const double NSFoundationVersionNumber10_4_1 = 567.00000000000000;
-    public static const double NSFoundationVersionNumber10_4_10 = 567.28999999999996;
-    public static const double NSFoundationVersionNumber10_4_11 = 567.36000000000001;
-    public static const double NSFoundationVersionNumber10_4_2 = 567.12000000000000;
-    public static const double NSFoundationVersionNumber10_4_3 = 567.21000000000004;
-    public static const double NSFoundationVersionNumber10_4_4_Intel = 567.23000000000002;
-    public static const double NSFoundationVersionNumber10_4_4_PowerPC = 567.21000000000004;
-    public static const double NSFoundationVersionNumber10_4_5 = 567.25000000000000;
-    public static const double NSFoundationVersionNumber10_4_6 = 567.25999999999999;
-    public static const double NSFoundationVersionNumber10_4_7 = 567.26999999999998;
-    public static const double NSFoundationVersionNumber10_4_8 = 567.27999999999997;
-    public static const double NSFoundationVersionNumber10_4_9 = 567.28999999999996;
-    public static const int NSFoundationVersionWithFileManagerResourceForkSupport = 412;
-    public static const int NSFunctionExpressionType = 4;
-    public static const int NSGreaterThanComparison = 4;
-    public static const int NSGreaterThanOrEqualToComparison = 3;
-    public static const int NSGreaterThanOrEqualToPredicateOperatorType = 3;
-    public static const int NSGreaterThanPredicateOperatorType = 2;
-    public static const int NSHPUXOperatingSystem = 4;
-    public static const int NSHTTPCookieAcceptPolicyAlways = 0;
-    public static const int NSHTTPCookieAcceptPolicyNever = 1;
-    public static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2;
-    public static const int NSHashTableCopyIn = 65536;
-    public static const int NSHashTableObjectPointerPersonality = 512;
-    public static const int NSHashTableStrongMemory = 0;
-    public static const int NSHashTableZeroingWeakMemory = 1;
-    public static const int NSHourCalendarUnit = 32;
-    public static const int NSINTEGER_DEFINED = 1;
-    public static const int NSISO2022JPStringEncoding = 21;
-    public static const int NSISOLatin1StringEncoding = 5;
-    public static const int NSISOLatin2StringEncoding = 9;
-    public static const int NSInPredicateOperatorType = 10;
-    public static const int NSIndexSubelement = 0;
-    public static const int NSIntegerMax = 2147483647;
-    public static const int NSIntegerMin = -2147483648;
-    public static const int NSInternalScriptError = 8;
-    public static const int NSInternalSpecifierError = 5;
-    public static const int NSIntersectSetExpressionType = 6;
-    public static const int NSInvalidIndexSpecifierError = 4;
-    public static const int NSJapaneseEUCStringEncoding = 3;
-    public static const int NSKeyPathExpressionType = 3;
-    public static const int NSKeySpecifierEvaluationScriptError = 2;
-    public static const int NSKeyValueChangeInsertion = 2;
-    public static const int NSKeyValueChangeRemoval = 3;
-    public static const int NSKeyValueChangeReplacement = 4;
-    public static const int NSKeyValueChangeSetting = 1;
-    public static const int NSKeyValueIntersectSetMutation = 3;
-    public static const int NSKeyValueMinusSetMutation = 2;
-    public static const int NSKeyValueObservingOptionInitial = 4;
-    public static const int NSKeyValueObservingOptionNew = 1;
-    public static const int NSKeyValueObservingOptionOld = 2;
-    public static const int NSKeyValueObservingOptionPrior = 8;
-    public static const int NSKeyValueSetSetMutation = 4;
-    public static const int NSKeyValueUnionSetMutation = 1;
-    public static const int NSKeyValueValidationError = 1024;
-    public static const int NSLessThanComparison = 2;
-    public static const int NSLessThanOrEqualToComparison = 1;
-    public static const int NSLessThanOrEqualToPredicateOperatorType = 1;
-    public static const int NSLessThanPredicateOperatorType = 0;
-    public static const int NSLibraryDirectory = 5;
-    public static const int NSLikePredicateOperatorType = 7;
-    public static const int NSLiteralSearch = 2;
-    public static const int NSLocalDomainMask = 2;
-    public static const int NSMACHOperatingSystem = 5;
-    public static const int NSMacOSRomanStringEncoding = 30;
-    public static const int NSMachPortDeallocateNone = 0;
-    public static const int NSMachPortDeallocateReceiveRight = 2;
-    public static const int NSMachPortDeallocateSendRight = 1;
-    public static const int NSMapTableCopyIn = 65536;
-    public static const int NSMapTableObjectPointerPersonality = 512;
-    public static const int NSMapTableStrongMemory = 0;
-    public static const int NSMapTableZeroingWeakMemory = 1;
-    public static const int NSMappedRead = 1;
-    public static const int NSMatchesPredicateOperatorType = 6;
-    public static const int NSMaxXEdge = 2;
-    public static const int NSMaxYEdge = 3;
-    public static const int NSMiddleSubelement = 2;
-    public static const int NSMinXEdge = 0;
-    public static const int NSMinYEdge = 1;
-    public static const int NSMinusSetExpressionType = 7;
-    public static const int NSMinuteCalendarUnit = 64;
-    public static const int NSMonthCalendarUnit = 8;
-    public static const int NSNEXTSTEPStringEncoding = 2;
-    public static const int NSNetServiceNoAutoRename = 1;
-    public static const int NSNetServicesActivityInProgress = -72003;
-    public static const int NSNetServicesBadArgumentError = -72004;
-    public static const int NSNetServicesCancelledError = -72005;
-    public static const int NSNetServicesCollisionError = -72001;
-    public static const int NSNetServicesInvalidError = -72006;
-    public static const int NSNetServicesNotFoundError = -72002;
-    public static const int NSNetServicesTimeoutError = -72007;
-    public static const int NSNetServicesUnknownError = -72000;
-    public static const int NSNetworkDomainMask = 4;
-    public static const int NSNoScriptError = 0;
-    public static const int NSNoSpecifierError = 0;
-    public static const int NSNoSubelement = 4;
-    public static const int NSNoTopLevelContainersSpecifierError = 1;
-    public static const int NSNonLossyASCIIStringEncoding = 7;
-    public static const int NSNotEqualToPredicateOperatorType = 5;
-    public static const int NSNotFound = 2147483647;
-    public static const int NSNotPredicateType = 0;
-    public static const int NSNotificationCoalescingOnName = 1;
-    public static const int NSNotificationCoalescingOnSender = 2;
-    public static const int NSNotificationDeliverImmediately = 1;
-    public static const int NSNotificationNoCoalescing = 0;
-    public static const int NSNotificationPostToAllSessions = 2;
-    public static const int NSNotificationSuspensionBehaviorCoalesce = 2;
-    public static const int NSNotificationSuspensionBehaviorDeliverImmediately = 4;
-    public static const int NSNotificationSuspensionBehaviorDrop = 1;
-    public static const int NSNotificationSuspensionBehaviorHold = 3;
-    public static const int NSNumberFormatterBehavior10_0 = 1000;
-    public static const int NSNumberFormatterBehavior10_4 = 1040;
-    public static const int NSNumberFormatterBehaviorDefault = 0;
-    public static const int NSNumberFormatterCurrencyStyle = 2;
-    public static const int NSNumberFormatterDecimalStyle = 1;
-    public static const int NSNumberFormatterNoStyle = 0;
-    public static const int NSNumberFormatterPadAfterPrefix = 1;
-    public static const int NSNumberFormatterPadAfterSuffix = 3;
-    public static const int NSNumberFormatterPadBeforePrefix = 0;
-    public static const int NSNumberFormatterPadBeforeSuffix = 2;
-    public static const int NSNumberFormatterPercentStyle = 3;
-    public static const int NSNumberFormatterRoundCeiling = 0;
-    public static const int NSNumberFormatterRoundDown = 2;
-    public static const int NSNumberFormatterRoundFloor = 1;
-    public static const int NSNumberFormatterRoundHalfDown = 5;
-    public static const int NSNumberFormatterRoundHalfEven = 4;
-    public static const int NSNumberFormatterRoundHalfUp = 6;
-    public static const int NSNumberFormatterRoundUp = 3;
-    public static const int NSNumberFormatterScientificStyle = 4;
-    public static const int NSNumberFormatterSpellOutStyle = 5;
-    public static const int NSNumericSearch = 64;
-    public static const int NSOSF1OperatingSystem = 7;
-    public static const int NSObjCArrayType = 91;
-    public static const int NSObjCBitfield = 98;
-    public static const int NSObjCBoolType = 66;
-    public static const int NSObjCCharType = 99;
-    public static const int NSObjCDoubleType = 100;
-    public static const int NSObjCFloatType = 102;
-    public static const int NSObjCLongType = 108;
-    public static const int NSObjCLonglongType = 113;
-    public static const int NSObjCNoType = 0;
-    public static const int NSObjCObjectType = 64;
-    public static const int NSObjCPointerType = 94;
-    public static const int NSObjCSelectorType = 58;
-    public static const int NSObjCShortType = 115;
-    public static const int NSObjCStringType = 42;
-    public static const int NSObjCStructType = 123;
-    public static const int NSObjCUnionType = 40;
-    public static const int NSObjCVoidType = 118;
-    public static const int NSObjectAutoreleasedEvent = 3;
-    public static const int NSObjectExtraRefDecrementedEvent = 5;
-    public static const int NSObjectExtraRefIncrementedEvent = 4;
-    public static const int NSObjectInternalRefDecrementedEvent = 7;
-    public static const int NSObjectInternalRefIncrementedEvent = 6;
-    public static const int NSOpenStepUnicodeReservedBase = 62464;
-    public static const int NSOperationNotSupportedForKeyScriptError = 9;
-    public static const int NSOperationNotSupportedForKeySpecifierError = 6;
-    public static const int NSOperationQueueDefaultMaxConcurrentOperationCount = -1;
-    public static const int NSOperationQueuePriorityHigh = 4;
-    public static const int NSOperationQueuePriorityLow = -4;
-    public static const int NSOperationQueuePriorityNormal = 0;
-    public static const int NSOperationQueuePriorityVeryHigh = 8;
-    public static const int NSOperationQueuePriorityVeryLow = -8;
-    public static const int NSOrPredicateType = 2;
-    public static const int NSOrderedAscending = -1;
-    public static const int NSOrderedDescending = 1;
-    public static const int NSOrderedSame = 0;
-    public static const int NSPointerFunctionsCStringPersonality = 768;
-    public static const int NSPointerFunctionsCopyIn = 65536;
-    public static const int NSPointerFunctionsIntegerPersonality = 1280;
-    public static const int NSPointerFunctionsMachVirtualMemory = 4;
-    public static const int NSPointerFunctionsMallocMemory = 3;
-    public static const int NSPointerFunctionsObjectPersonality = 0;
-    public static const int NSPointerFunctionsObjectPointerPersonality = 512;
-    public static const int NSPointerFunctionsOpaqueMemory = 2;
-    public static const int NSPointerFunctionsOpaquePersonality = 256;
-    public static const int NSPointerFunctionsStrongMemory = 0;
-    public static const int NSPointerFunctionsStructPersonality = 1024;
-    public static const int NSPointerFunctionsZeroingWeakMemory = 1;
-    public static const int NSPositionAfter = 0;
-    public static const int NSPositionBefore = 1;
-    public static const int NSPositionBeginning = 2;
-    public static const int NSPositionEnd = 3;
-    public static const int NSPositionReplace = 4;
-    public static const int NSPostASAP = 2;
-    public static const int NSPostNow = 3;
-    public static const int NSPostWhenIdle = 1;
-    public static const int NSPropertyListBinaryFormat_v1_0 = 200;
-    public static const int NSPropertyListImmutable = 0;
-    public static const int NSPropertyListMutableContainers = 1;
-    public static const int NSPropertyListMutableContainersAndLeaves = 2;
-    public static const int NSPropertyListOpenStepFormat = 1;
-    public static const int NSPropertyListXMLFormat_v1_0 = 100;
-    public static const int NSRandomSubelement = 3;
-    public static const int NSReceiverEvaluationScriptError = 1;
-    public static const int NSReceiversCantHandleCommandScriptError = 4;
-    public static const int NSRelativeAfter = 0;
-    public static const int NSRelativeBefore = 1;
-    public static const int NSRequiredArgumentsMissingScriptError = 5;
-    public static const int NSRoundBankers = 3;
-    public static const int NSRoundDown = 1;
-    public static const int NSRoundPlain = 0;
-    public static const int NSRoundUp = 2;
-    public static const int NSSaveOptionsAsk = 2;
-    public static const int NSSaveOptionsNo = 1;
-    public static const int NSSaveOptionsYes = 0;
-    public static const int NSScannedOption = 1;
-    public static const int NSSecondCalendarUnit = 128;
-    public static const int NSShiftJISStringEncoding = 8;
-    public static const int NSSolarisOperatingSystem = 3;
-    public static const int NSStreamEventEndEncountered = 16;
-    public static const int NSStreamEventErrorOccurred = 8;
-    public static const int NSStreamEventHasBytesAvailable = 2;
-    public static const int NSStreamEventHasSpaceAvailable = 4;
-    public static const int NSStreamEventNone = 0;
-    public static const int NSStreamEventOpenCompleted = 1;
-    public static const int NSStreamStatusAtEnd = 5;
-    public static const int NSStreamStatusClosed = 6;
-    public static const int NSStreamStatusError = 7;
-    public static const int NSStreamStatusNotOpen = 0;
-    public static const int NSStreamStatusOpen = 2;
-    public static const int NSStreamStatusOpening = 1;
-    public static const int NSStreamStatusReading = 3;
-    public static const int NSStreamStatusWriting = 4;
-    public static const int NSStringEncodingConversionAllowLossy = 1;
-    public static const int NSStringEncodingConversionExternalRepresentation = 2;
-    public static const int NSSubqueryExpressionType = 13;
-    public static const int NSSunOSOperatingSystem = 6;
-    public static const int NSSymbolStringEncoding = 6;
-    public static const int NSSystemDomainMask = 8;
-    public static const double NSTimeIntervalSince1970 = 978307200.00000000;
-    public static const int NSTimeZoneNameStyleDaylightSaving = 2;
-    public static const int NSTimeZoneNameStyleShortDaylightSaving = 3;
-    public static const int NSTimeZoneNameStyleShortStandard = 1;
-    public static const int NSTimeZoneNameStyleStandard = 0;
-    public static const long NSUIntegerMax = 4294967295L;
-    public static const int NSURLCacheStorageAllowed = 0;
-    public static const int NSURLCacheStorageAllowedInMemoryOnly = 1;
-    public static const int NSURLCacheStorageNotAllowed = 2;
-    public static const int NSURLCredentialPersistenceForSession = 1;
-    public static const int NSURLCredentialPersistenceNone = 0;
-    public static const int NSURLCredentialPersistencePermanent = 2;
-    public static const int NSURLErrorBadServerResponse = -1011;
-    public static const int NSURLErrorBadURL = -1000;
-    public static const int NSURLErrorCancelled = -999;
-    public static const int NSURLErrorCannotCloseFile = -3002;
-    public static const int NSURLErrorCannotConnectToHost = -1004;
-    public static const int NSURLErrorCannotCreateFile = -3000;
-    public static const int NSURLErrorCannotDecodeContentData = -1016;
-    public static const int NSURLErrorCannotDecodeRawData = -1015;
-    public static const int NSURLErrorCannotFindHost = -1003;
-    public static const int NSURLErrorCannotLoadFromNetwork = -2000;
-    public static const int NSURLErrorCannotMoveFile = -3005;
-    public static const int NSURLErrorCannotOpenFile = -3001;
-    public static const int NSURLErrorCannotParseResponse = -1017;
-    public static const int NSURLErrorCannotRemoveFile = -3004;
-    public static const int NSURLErrorCannotWriteToFile = -3003;
-    public static const int NSURLErrorClientCertificateRejected = -1205;
-    public static const int NSURLErrorDNSLookupFailed = -1006;
-    public static const int NSURLErrorDataLengthExceedsMaximum = -1103;
-    public static const int NSURLErrorDownloadDecodingFailedMidStream = -3006;
-    public static const int NSURLErrorDownloadDecodingFailedToComplete = -3007;
-    public static const int NSURLErrorFileDoesNotExist = -1100;
-    public static const int NSURLErrorFileIsDirectory = -1101;
-    public static const int NSURLErrorHTTPTooManyRedirects = -1007;
-    public static const int NSURLErrorNetworkConnectionLost = -1005;
-    public static const int NSURLErrorNoPermissionsToReadFile = -1102;
-    public static const int NSURLErrorNotConnectedToInternet = -1009;
-    public static const int NSURLErrorRedirectToNonExistentLocation = -1010;
-    public static const int NSURLErrorResourceUnavailable = -1008;
-    public static const int NSURLErrorSecureConnectionFailed = -1200;
-    public static const int NSURLErrorServerCertificateHasBadDate = -1201;
-    public static const int NSURLErrorServerCertificateHasUnknownRoot = -1203;
-    public static const int NSURLErrorServerCertificateNotYetValid = -1204;
-    public static const int NSURLErrorServerCertificateUntrusted = -1202;
-    public static const int NSURLErrorTimedOut = -1001;
-    public static const int NSURLErrorUnknown = -1;
-    public static const int NSURLErrorUnsupportedURL = -1002;
-    public static const int NSURLErrorUserAuthenticationRequired = -1013;
-    public static const int NSURLErrorUserCancelledAuthentication = -1012;
-    public static const int NSURLErrorZeroByteResource = -1014;
-    public static const int NSURLHandleLoadFailed = 3;
-    public static const int NSURLHandleLoadInProgress = 2;
-    public static const int NSURLHandleLoadSucceeded = 1;
-    public static const int NSURLHandleNotLoaded = 0;
-    public static const int NSURLRequestReloadIgnoringCacheData = 1;
-    public static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4;
-    public static const int NSURLRequestReloadIgnoringLocalCacheData = 1;
-    public static const int NSURLRequestReloadRevalidatingCacheData = 5;
-    public static const int NSURLRequestReturnCacheDataDontLoad = 3;
-    public static const int NSURLRequestReturnCacheDataElseLoad = 2;
-    public static const int NSURLRequestUseProtocolCachePolicy = 0;
-    public static const int NSUTF16BigEndianStringEncoding = -1879047936;
-    public static const int NSUTF16LittleEndianStringEncoding = -1811939072;
-    public static const int NSUTF16StringEncoding = 10;
-    public static const int NSUTF32BigEndianStringEncoding = -1744830208;
-    public static const int NSUTF32LittleEndianStringEncoding = -1677721344;
-    public static const int NSUTF32StringEncoding = -1946156800;
-    public static const int NSUTF8StringEncoding = 4;
-    public static const int NSUncachedRead = 2;
-    public static const int NSUndefinedDateComponent = 2147483647;
-    public static const int NSUndoCloseGroupingRunLoopOrdering = 350000;
-    public static const int NSUnicodeStringEncoding = 10;
-    public static const int NSUnionSetExpressionType = 5;
-    public static const int NSUnknownKeyScriptError = 7;
-    public static const int NSUnknownKeySpecifierError = 3;
-    public static const int NSUserCancelledError = 3072;
-    public static const int NSUserDirectory = 7;
-    public static const int NSUserDomainMask = 1;
-    public static const int NSValidationErrorMaximum = 2047;
-    public static const int NSValidationErrorMinimum = 1024;
-    public static const int NSVariableExpressionType = 2;
-    public static const int NSWeekCalendarUnit = 256;
-    public static const int NSWeekdayCalendarUnit = 512;
-    public static const int NSWeekdayOrdinalCalendarUnit = 1024;
-    public static const int NSWidthInsensitiveSearch = 256;
-    public static const int NSWindows95OperatingSystem = 2;
-    public static const int NSWindowsCP1250StringEncoding = 15;
-    public static const int NSWindowsCP1251StringEncoding = 11;
-    public static const int NSWindowsCP1252StringEncoding = 12;
-    public static const int NSWindowsCP1253StringEncoding = 13;
-    public static const int NSWindowsCP1254StringEncoding = 14;
-    public static const int NSWindowsNTOperatingSystem = 1;
-    public static const int NSWrapCalendarComponents = 1;
-    public static const int NSXMLAttributeCDATAKind = 6;
-    public static const int NSXMLAttributeDeclarationKind = 10;
-    public static const int NSXMLAttributeEntitiesKind = 11;
-    public static const int NSXMLAttributeEntityKind = 10;
-    public static const int NSXMLAttributeEnumerationKind = 14;
-    public static const int NSXMLAttributeIDKind = 7;
-    public static const int NSXMLAttributeIDRefKind = 8;
-    public static const int NSXMLAttributeIDRefsKind = 9;
-    public static const int NSXMLAttributeKind = 3;
-    public static const int NSXMLAttributeNMTokenKind = 12;
-    public static const int NSXMLAttributeNMTokensKind = 13;
-    public static const int NSXMLAttributeNotationKind = 15;
-    public static const int NSXMLCommentKind = 6;
-    public static const int NSXMLDTDKind = 8;
-    public static const int NSXMLDocumentHTMLKind = 2;
-    public static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144;
-    public static const int NSXMLDocumentKind = 1;
-    public static const int NSXMLDocumentTextKind = 3;
-    public static const int NSXMLDocumentTidyHTML = 512;
-    public static const int NSXMLDocumentTidyXML = 1024;
-    public static const int NSXMLDocumentValidate = 8192;
-    public static const int NSXMLDocumentXHTMLKind = 1;
-    public static const int NSXMLDocumentXInclude = 65536;
-    public static const int NSXMLDocumentXMLKind = 0;
-    public static const int NSXMLElementDeclarationAnyKind = 18;
-    public static const int NSXMLElementDeclarationElementKind = 20;
-    public static const int NSXMLElementDeclarationEmptyKind = 17;
-    public static const int NSXMLElementDeclarationKind = 11;
-    public static const int NSXMLElementDeclarationMixedKind = 19;
-    public static const int NSXMLElementDeclarationUndefinedKind = 16;
-    public static const int NSXMLElementKind = 2;
-    public static const int NSXMLEntityDeclarationKind = 9;
-    public static const int NSXMLEntityGeneralKind = 1;
-    public static const int NSXMLEntityParameterKind = 4;
-    public static const int NSXMLEntityParsedKind = 2;
-    public static const int NSXMLEntityPredefined = 5;
-    public static const int NSXMLEntityUnparsedKind = 3;
-    public static const int NSXMLInvalidKind = 0;
-    public static const int NSXMLNamespaceKind = 4;
-    public static const int NSXMLNodeCompactEmptyElement = 4;
-    public static const int NSXMLNodeExpandEmptyElement = 2;
-    public static const int NSXMLNodeIsCDATA = 1;
-    public static const int NSXMLNodeOptionsNone = 0;
-    public static const int NSXMLNodePreserveAll = -1048546;
-    public static const int NSXMLNodePreserveAttributeOrder = 2097152;
-    public static const int NSXMLNodePreserveCDATA = 16777216;
-    public static const int NSXMLNodePreserveCharacterReferences = 134217728;
-    public static const int NSXMLNodePreserveDTD = 67108864;
-    public static const int NSXMLNodePreserveEmptyElements = 6;
-    public static const int NSXMLNodePreserveEntities = 4194304;
-    public static const int NSXMLNodePreserveNamespaceOrder = 1048576;
-    public static const int NSXMLNodePreservePrefixes = 8388608;
-    public static const int NSXMLNodePreserveQuotes = 24;
-    public static const int NSXMLNodePreserveWhitespace = 33554432;
-    public static const int NSXMLNodePrettyPrint = 131072;
-    public static const int NSXMLNodeUseDoubleQuotes = 16;
-    public static const int NSXMLNodeUseSingleQuotes = 8;
-    public static const int NSXMLNotationDeclarationKind = 12;
-    public static const int NSXMLParserAttributeHasNoValueError = 41;
-    public static const int NSXMLParserAttributeListNotFinishedError = 51;
-    public static const int NSXMLParserAttributeListNotStartedError = 50;
-    public static const int NSXMLParserAttributeNotFinishedError = 40;
-    public static const int NSXMLParserAttributeNotStartedError = 39;
-    public static const int NSXMLParserAttributeRedefinedError = 42;
-    public static const int NSXMLParserCDATANotFinishedError = 63;
-    public static const int NSXMLParserCharacterRefAtEOFError = 10;
-    public static const int NSXMLParserCharacterRefInDTDError = 13;
-    public static const int NSXMLParserCharacterRefInEpilogError = 12;
-    public static const int NSXMLParserCharacterRefInPrologError = 11;
-    public static const int NSXMLParserCommentContainsDoubleHyphenError = 80;
-    public static const int NSXMLParserCommentNotFinishedError = 45;
-    public static const int NSXMLParserConditionalSectionNotFinishedError = 59;
-    public static const int NSXMLParserConditionalSectionNotStartedError = 58;
-    public static const int NSXMLParserDOCTYPEDeclNotFinishedError = 61;
-    public static const int NSXMLParserDelegateAbortedParseError = 512;
-    public static const int NSXMLParserDocumentStartError = 3;
-    public static const int NSXMLParserElementContentDeclNotFinishedError = 55;
-    public static const int NSXMLParserElementContentDeclNotStartedError = 54;
-    public static const int NSXMLParserEmptyDocumentError = 4;
-    public static const int NSXMLParserEncodingNotSupportedError = 32;
-    public static const int NSXMLParserEntityBoundaryError = 90;
-    public static const int NSXMLParserEntityIsExternalError = 29;
-    public static const int NSXMLParserEntityIsParameterError = 30;
-    public static const int NSXMLParserEntityNotFinishedError = 37;
-    public static const int NSXMLParserEntityNotStartedError = 36;
-    public static const int NSXMLParserEntityRefAtEOFError = 14;
-    public static const int NSXMLParserEntityRefInDTDError = 17;
-    public static const int NSXMLParserEntityRefInEpilogError = 16;
-    public static const int NSXMLParserEntityRefInPrologError = 15;
-    public static const int NSXMLParserEntityRefLoopError = 89;
-    public static const int NSXMLParserEntityReferenceMissingSemiError = 23;
-    public static const int NSXMLParserEntityReferenceWithoutNameError = 22;
-    public static const int NSXMLParserEntityValueRequiredError = 84;
-    public static const int NSXMLParserEqualExpectedError = 75;
-    public static const int NSXMLParserExternalStandaloneEntityError = 82;
-    public static const int NSXMLParserExternalSubsetNotFinishedError = 60;
-    public static const int NSXMLParserExtraContentError = 86;
-    public static const int NSXMLParserGTRequiredError = 73;
-    public static const int NSXMLParserInternalError = 1;
-    public static const int NSXMLParserInvalidCharacterError = 9;
-    public static const int NSXMLParserInvalidCharacterInEntityError = 87;
-    public static const int NSXMLParserInvalidCharacterRefError = 8;
-    public static const int NSXMLParserInvalidConditionalSectionError = 83;
-    public static const int NSXMLParserInvalidDecimalCharacterRefError = 7;
-    public static const int NSXMLParserInvalidEncodingError = 81;
-    public static const int NSXMLParserInvalidEncodingNameError = 79;
-    public static const int NSXMLParserInvalidHexCharacterRefError = 6;
-    public static const int NSXMLParserInvalidURIError = 91;
-    public static const int NSXMLParserLTRequiredError = 72;
-    public static const int NSXMLParserLTSlashRequiredError = 74;
-    public static const int NSXMLParserLessThanSymbolInAttributeError = 38;
-    public static const int NSXMLParserLiteralNotFinishedError = 44;
-    public static const int NSXMLParserLiteralNotStartedError = 43;
-    public static const int NSXMLParserMisplacedCDATAEndStringError = 62;
-    public static const int NSXMLParserMisplacedXMLDeclarationError = 64;
-    public static const int NSXMLParserMixedContentDeclNotFinishedError = 53;
-    public static const int NSXMLParserMixedContentDeclNotStartedError = 52;
-    public static const int NSXMLParserNAMERequiredError = 68;
-    public static const int NSXMLParserNMTOKENRequiredError = 67;
-    public static const int NSXMLParserNamespaceDeclarationError = 35;
-    public static const int NSXMLParserNoDTDError = 94;
-    public static const int NSXMLParserNotWellBalancedError = 85;
-    public static const int NSXMLParserNotationNotFinishedError = 49;
-    public static const int NSXMLParserNotationNotStartedError = 48;
-    public static const int NSXMLParserOutOfMemoryError = 2;
-    public static const int NSXMLParserPCDATARequiredError = 69;
-    public static const int NSXMLParserParsedEntityRefAtEOFError = 18;
-    public static const int NSXMLParserParsedEntityRefInEpilogError = 20;
-    public static const int NSXMLParserParsedEntityRefInInternalError = 88;
-    public static const int NSXMLParserParsedEntityRefInInternalSubsetError = 21;
-    public static const int NSXMLParserParsedEntityRefInPrologError = 19;
-    public static const int NSXMLParserParsedEntityRefMissingSemiError = 25;
-    public static const int NSXMLParserParsedEntityRefNoNameError = 24;
-    public static const int NSXMLParserPrematureDocumentEndError = 5;
-    public static const int NSXMLParserProcessingInstructionNotFinishedError = 47;
-    public static const int NSXMLParserProcessingInstructionNotStartedError = 46;
-    public static const int NSXMLParserPublicIdentifierRequiredError = 71;
-    public static const int NSXMLParserSeparatorRequiredError = 66;
-    public static const int NSXMLParserSpaceRequiredError = 65;
-    public static const int NSXMLParserStandaloneValueError = 78;
-    public static const int NSXMLParserStringNotClosedError = 34;
-    public static const int NSXMLParserStringNotStartedError = 33;
-    public static const int NSXMLParserTagNameMismatchError = 76;
-    public static const int NSXMLParserURIFragmentError = 92;
-    public static const int NSXMLParserURIRequiredError = 70;
-    public static const int NSXMLParserUndeclaredEntityError = 26;
-    public static const int NSXMLParserUnfinishedTagError = 77;
-    public static const int NSXMLParserUnknownEncodingError = 31;
-    public static const int NSXMLParserUnparsedEntityError = 28;
-    public static const int NSXMLParserXMLDeclNotFinishedError = 57;
-    public static const int NSXMLParserXMLDeclNotStartedError = 56;
-    public static const int NSXMLProcessingInstructionKind = 5;
-    public static const int NSXMLTextKind = 7;
-    public static const int NSYearCalendarUnit = 4;
-    public static const int NS_BigEndian = 2;
-    public static const int NS_LittleEndian = 1;
-    public static const int NS_UNICHAR_IS_EIGHT_BIT = 0;
-    public static const int NS_UnknownByteOrder = 0;
-    public static const int DOM_ADDITION = 2;
-    public static const int DOM_ANY_TYPE = 0;
-    public static const int DOM_ANY_UNORDERED_NODE_TYPE = 8;
-    public static const int DOM_ATTRIBUTE_NODE = 2;
-    public static const int DOM_AT_TARGET = 2;
-    public static const int DOM_BAD_BOUNDARYPOINTS_ERR = 1;
-    public static const int DOM_BOOLEAN_TYPE = 3;
-    public static const int DOM_BOTH = 2;
-    public static const int DOM_BUBBLING_PHASE = 3;
-    public static const int DOM_CAPTURING_PHASE = 1;
-    public static const int DOM_CDATA_SECTION_NODE = 4;
-    public static const int DOM_CHARSET_RULE = 2;
-    public static const int DOM_COMMENT_NODE = 8;
-    public static const int DOM_CSS_ATTR = 22;
-    public static const int DOM_CSS_CM = 6;
-    public static const int DOM_CSS_COUNTER = 23;
-    public static const int DOM_CSS_CUSTOM = 3;
-    public static const int DOM_CSS_DEG = 11;
-    public static const int DOM_CSS_DIMENSION = 18;
-    public static const int DOM_CSS_EMS = 3;
-    public static const int DOM_CSS_EXS = 4;
-    public static const int DOM_CSS_GRAD = 13;
-    public static const int DOM_CSS_HZ = 16;
-    public static const int DOM_CSS_IDENT = 21;
-    public static const int DOM_CSS_IN = 8;
-    public static const int DOM_CSS_INHERIT = 0;
-    public static const int DOM_CSS_KHZ = 17;
-    public static const int DOM_CSS_MM = 7;
-    public static const int DOM_CSS_MS = 14;
-    public static const int DOM_CSS_NUMBER = 1;
-    public static const int DOM_CSS_PC = 10;
-    public static const int DOM_CSS_PERCENTAGE = 2;
-    public static const int DOM_CSS_PRIMITIVE_VALUE = 1;
-    public static const int DOM_CSS_PT = 9;
-    public static const int DOM_CSS_PX = 5;
-    public static const int DOM_CSS_RAD = 12;
-    public static const int DOM_CSS_RECT = 24;
-    public static const int DOM_CSS_RGBCOLOR = 25;
-    public static const int DOM_CSS_S = 15;
-    public static const int DOM_CSS_STRING = 19;
-    public static const int DOM_CSS_UNKNOWN = 0;
-    public static const int DOM_CSS_URI = 20;
-    public static const int DOM_CSS_VALUE_LIST = 2;
-    public static const int DOM_DOCUMENT_FRAGMENT_NODE = 11;
-    public static const int DOM_DOCUMENT_NODE = 9;
-    public static const int DOM_DOCUMENT_TYPE_NODE = 10;
-    public static const int DOM_DOMSTRING_SIZE_ERR = 2;
-    public static const int DOM_ELEMENT_NODE = 1;
-    public static const int DOM_END_TO_END = 2;
-    public static const int DOM_END_TO_START = 3;
-    public static const int DOM_ENTITY_NODE = 6;
-    public static const int DOM_ENTITY_REFERENCE_NODE = 5;
-    public static const int DOM_FILTER_ACCEPT = 1;
-    public static const int DOM_FILTER_REJECT = 2;
-    public static const int DOM_FILTER_SKIP = 3;
-    public static const int DOM_FIRST_ORDERED_NODE_TYPE = 9;
-    public static const int DOM_FONT_FACE_RULE = 5;
-    public static const int DOM_HIERARCHY_REQUEST_ERR = 3;
-    public static const int DOM_HORIZONTAL = 0;
-    public static const int DOM_IMPORT_RULE = 3;
-    public static const int DOM_INDEX_SIZE_ERR = 1;
-    public static const int DOM_INUSE_ATTRIBUTE_ERR = 10;
-    public static const int DOM_INVALID_ACCESS_ERR = 15;
-    public static const int DOM_INVALID_CHARACTER_ERR = 5;
-    public static const int DOM_INVALID_EXPRESSION_ERR = 51;
-    public static const int DOM_INVALID_MODIFICATION_ERR = 13;
-    public static const int DOM_INVALID_NODE_TYPE_ERR = 2;
-    public static const int DOM_INVALID_STATE_ERR = 11;
-    public static const int DOM_KEY_LOCATION_LEFT = 1;
-    public static const int DOM_KEY_LOCATION_NUMPAD = 3;
-    public static const int DOM_KEY_LOCATION_RIGHT = 2;
-    public static const int DOM_KEY_LOCATION_STANDARD = 0;
-    public static const int DOM_MEDIA_RULE = 4;
-    public static const int DOM_MODIFICATION = 1;
-    public static const int DOM_NAMESPACE_ERR = 14;
-    public static const int DOM_NODE_AFTER = 1;
-    public static const int DOM_NODE_BEFORE = 0;
-    public static const int DOM_NODE_BEFORE_AND_AFTER = 2;
-    public static const int DOM_NODE_INSIDE = 3;
-    public static const int DOM_NOTATION_NODE = 12;
-    public static const int DOM_NOT_FOUND_ERR = 8;
-    public static const int DOM_NOT_SUPPORTED_ERR = 9;
-    public static const int DOM_NO_DATA_ALLOWED_ERR = 6;
-    public static const int DOM_NO_MODIFICATION_ALLOWED_ERR = 7;
-    public static const int DOM_NUMBER_TYPE = 1;
-    public static const int DOM_ORDERED_NODE_ITERATOR_TYPE = 5;
-    public static const int DOM_ORDERED_NODE_SNAPSHOT_TYPE = 7;
-    public static const int DOM_PAGE_RULE = 6;
-    public static const int DOM_PROCESSING_INSTRUCTION_NODE = 7;
-    public static const int DOM_REMOVAL = 3;
-    public static const int DOM_SHOW_ALL = -1;
-    public static const int DOM_SHOW_ATTRIBUTE = 2;
-    public static const int DOM_SHOW_CDATA_SECTION = 8;
-    public static const int DOM_SHOW_COMMENT = 128;
-    public static const int DOM_SHOW_DOCUMENT = 256;
-    public static const int DOM_SHOW_DOCUMENT_FRAGMENT = 1024;
-    public static const int DOM_SHOW_DOCUMENT_TYPE = 512;
-    public static const int DOM_SHOW_ELEMENT = 1;
-    public static const int DOM_SHOW_ENTITY = 32;
-    public static const int DOM_SHOW_ENTITY_REFERENCE = 16;
-    public static const int DOM_SHOW_NOTATION = 2048;
-    public static const int DOM_SHOW_PROCESSING_INSTRUCTION = 64;
-    public static const int DOM_SHOW_TEXT = 4;
-    public static const int DOM_START_TO_END = 1;
-    public static const int DOM_START_TO_START = 0;
-    public static const int DOM_STRING_TYPE = 2;
-    public static const int DOM_STYLE_RULE = 1;
-    public static const int DOM_SYNTAX_ERR = 12;
-    public static const int DOM_TEXT_NODE = 3;
-    public static const int DOM_TYPE_ERR = 52;
-    public static const int DOM_UNKNOWN_RULE = 0;
-    public static const int DOM_UNORDERED_NODE_ITERATOR_TYPE = 4;
-    public static const int DOM_UNORDERED_NODE_SNAPSHOT_TYPE = 6;
-    public static const int DOM_UNSPECIFIED_EVENT_TYPE_ERR = 0;
-    public static const int DOM_VERTICAL = 1;
-    public static const int DOM_WRONG_DOCUMENT_ERR = 4;
-    public static const int WebCacheModelDocumentBrowser = 1;
-    public static const int WebCacheModelDocumentViewer = 0;
-    public static const int WebCacheModelPrimaryWebBrowser = 2;
-    public static const int WebDragDestinationActionAny = -1;
-    public static const int WebDragDestinationActionDHTML = 1;
-    public static const int WebDragDestinationActionEdit = 2;
-    public static const int WebDragDestinationActionLoad = 4;
-    public static const int WebDragDestinationActionNone = 0;
-    public static const int WebDragSourceActionAny = -1;
-    public static const int WebDragSourceActionDHTML = 1;
-    public static const int WebDragSourceActionImage = 2;
-    public static const int WebDragSourceActionLink = 4;
-    public static const int WebDragSourceActionNone = 0;
-    public static const int WebDragSourceActionSelection = 8;
-    public static const int WebJNIReturnTypeBoolean = 3;
-    public static const int WebJNIReturnTypeByte = 4;
-    public static const int WebJNIReturnTypeChar = 5;
-    public static const int WebJNIReturnTypeDouble = 10;
-    public static const int WebJNIReturnTypeFloat = 9;
-    public static const int WebJNIReturnTypeInt = 7;
-    public static const int WebJNIReturnTypeInvalid = 0;
-    public static const int WebJNIReturnTypeLong = 8;
-    public static const int WebJNIReturnTypeObject = 2;
-    public static const int WebJNIReturnTypeShort = 6;
-    public static const int WebJNIReturnTypeVoid = 1;
-    public static const int WebKitErrorCannotFindPlugIn = 200;
-    public static const int WebKitErrorCannotLoadPlugIn = 201;
-    public static const int WebKitErrorCannotShowMIMEType = 100;
-    public static const int WebKitErrorCannotShowURL = 101;
-    public static const int WebKitErrorFrameLoadInterruptedByPolicyChange = 102;
-    public static const int WebKitErrorJavaUnavailable = 202;
-    public static const int WebMenuItemPDFActualSize = 24;
-    public static const int WebMenuItemPDFAutoSize = 27;
-    public static const int WebMenuItemPDFContinuous = 30;
-    public static const int WebMenuItemPDFFacingPages = 29;
-    public static const int WebMenuItemPDFNextPage = 31;
-    public static const int WebMenuItemPDFPreviousPage = 32;
-    public static const int WebMenuItemPDFSinglePage = 28;
-    public static const int WebMenuItemPDFZoomIn = 25;
-    public static const int WebMenuItemPDFZoomOut = 26;
-    public static const int WebMenuItemTagCopy = 8;
-    public static const int WebMenuItemTagCopyImageToClipboard = 6;
-    public static const int WebMenuItemTagCopyLinkToClipboard = 3;
-    public static const int WebMenuItemTagCut = 13;
-    public static const int WebMenuItemTagDownloadImageToDisk = 5;
-    public static const int WebMenuItemTagDownloadLinkToDisk = 2;
-    public static const int WebMenuItemTagGoBack = 9;
-    public static const int WebMenuItemTagGoForward = 10;
-    public static const int WebMenuItemTagIgnoreSpelling = 17;
-    public static const int WebMenuItemTagLearnSpelling = 18;
-    public static const int WebMenuItemTagLookUpInDictionary = 22;
-    public static const int WebMenuItemTagNoGuessesFound = 16;
-    public static const int WebMenuItemTagOpenFrameInNewWindow = 7;
-    public static const int WebMenuItemTagOpenImageInNewWindow = 4;
-    public static const int WebMenuItemTagOpenLinkInNewWindow = 1;
-    public static const int WebMenuItemTagOpenWithDefaultApplication = 23;
-    public static const int WebMenuItemTagOther = 19;
-    public static const int WebMenuItemTagPaste = 14;
-    public static const int WebMenuItemTagReload = 12;
-    public static const int WebMenuItemTagSearchInSpotlight = 20;
-    public static const int WebMenuItemTagSearchWeb = 21;
-    public static const int WebMenuItemTagSpellingGuess = 15;
-    public static const int WebMenuItemTagStop = 11;
-    public static const int WebNavigationTypeBackForward = 2;
-    public static const int WebNavigationTypeFormResubmitted = 4;
-    public static const int WebNavigationTypeFormSubmitted = 1;
-    public static const int WebNavigationTypeLinkClicked = 0;
-    public static const int WebNavigationTypeOther = 5;
-    public static const int WebNavigationTypeReload = 3;
-    public static const int WebViewInsertActionDropped = 2;
-    public static const int WebViewInsertActionPasted = 1;
-    public static const int WebViewInsertActionTyped = 0;
+/** @method flags=no_gen */
+alias custom.drawRect_CALLBACK drawRect_CALLBACK;
+/** @method flags=no_gen */
+alias custom.drawInteriorWithFrame_inView_CALLBACK drawInteriorWithFrame_inView_CALLBACK;
+/** @method flags=no_gen */
+alias custom.setFrame_CALLBACK setFrame_CALLBACK;
+/** @method flags=no_gen */
+alias custom.setFrameOrigin_CALLBACK setFrameOrigin_CALLBACK;
+/** @method flags=no_gen */
+alias custom.setFrameSize_CALLBACK setFrameSize_CALLBACK;
+/** @method flags=no_gen */
+alias custom.hitTest_CALLBACK hitTest_CALLBACK;
+/** @method flags=no_gen */
+alias custom.webView_setFrame_CALLBACK webView_setFrame_CALLBACK;
+/** @method flags=no_gen */
+alias custom.markedRange_CALLBACK markedRange_CALLBACK;
+/** @method flags=no_gen */
+alias custom.selectedRange_CALLBACK selectedRange_CALLBACK;
+/** @method flags=no_gen */
+alias custom.highlightSelectionInClipRect_CALLBACK highlightSelectionInClipRect_CALLBACK;
+/** @method flags=no_gen */
+alias custom.attributedSubstringFromRange_CALLBACK attributedSubstringFromRange_CALLBACK;
+/** @method flags=no_gen */
+alias custom.setMarkedText_selectedRange_CALLBACK setMarkedText_selectedRange_CALLBACK;
+/** @method flags=no_gen */
+alias custom.characterIndexForPoint_CALLBACK characterIndexForPoint_CALLBACK;
+/** @method flags=no_gen */
+alias custom.firstRectForCharacterRange_CALLBACK firstRectForCharacterRange_CALLBACK;
+/** @method flags=no_gen */
+alias custom.textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK;
+/** @method flags=no_gen */
+alias custom.draggedImage_movedTo_CALLBACK draggedImage_movedTo_CALLBACK;
+/** @method flags=no_gen */
+alias custom.draggedImage_beganAt_CALLBACK draggedImage_beganAt_CALLBACK;
+/** @method flags=no_gen */
+alias custom.draggedImage_endedAt_operation_CALLBACK draggedImage_endedAt_operation_CALLBACK;
+/** @method flags=no_gen */
+alias custom.accessibilityHitTest_CALLBACK accessibilityHitTest_CALLBACK;
+/** @method flags=no_gen */
+alias custom.dragSelectionWithEvent_offset_slideBack_CALLBACK dragSelectionWithEvent_offset_slideBack_CALLBACK;
+/** Custom structure return */
+
+/** @method flags=no_gen */
+alias Cocoa.NSIntersectionRect NSIntersectionRect;
+
+/** Objective-C runtime */
+
+/** @param cls cast=(Class) */
+alias objc.class_addIvar class_addIvar;
+/**
+ * @param cls cast=(Class)
+ * @param name cast=(SEL)
+ * @param imp cast=(IMP)
+ */
+alias objc.class_addMethod class_addMethod;
+/**
+ * @param cls cast=(Class)
+ * @param protocol cast=(Protocol *)
+ */
+alias objc.class_addProtocol class_addProtocol;
+/**
+ * @param cls cast=(Class)
+ * @param name cast=(SEL)
+ */
+alias objc.class_getMethodImplementation class_getMethodImplementation;
+/** @method flags=no_gen */
+alias objc.class_getName class_getName;
+/** @method flags=dynamic */
+alias objc.instrumentObjcMessageSends instrumentObjcMessageSends;
+/** @param superclass cast=(Class) */
+alias objc.objc_allocateClassPair objc_allocateClassPair;
+alias objc.objc_getClass objc_getClass;
+alias objc.objc_getProtocol objc_getProtocol;
+alias objc.objc_lookUpClass objc_lookUpClass;
+/** @method flags=cast */
+alias objc.objc_msgSendSuper objc_msgSendSuper;
+/** @param cls cast=(Class) */
+alias objc.objc_registerClassPair objc_registerClassPair;
+/** @param obj cast=(id) */
+alias objc.object_getClassName object_getClassName;
+/** @param obj cast=(id) */
+alias objc.object_getClass object_getClass;
+
+/**
+ * @param obj cast=(id)
+ * @param outValue cast=(void **)
+ */
+alias objc.object_getInstanceVariable object_getInstanceVariable;
+/**
+ * @param obj cast=(id)
+ * @param value cast=(void *)
+ */
+alias objc.object_setInstanceVariable object_setInstanceVariable;
+/**
+ * @param obj cast=(id)
+ * @param clazz cast=(Class) 
+ */
+alias objc.object_setClass object_setClass;
+alias objc.sel_registerName sel_registerName;
+size_t objc_super_sizeof ()
+{
+    return objc.objc_super.sizeof;
+}
 
 
-    /** Globals */
-//  public static const native int NSAbortModalException();
-//  public static const native int NSAbortPrintingException();
-//  public static const native int NSAccessibilityAllowedValuesAttribute();
-//  public static const native int NSAccessibilityApplicationActivatedNotification();
-//  public static const native int NSAccessibilityApplicationDeactivatedNotification();
-//  public static const native int NSAccessibilityApplicationHiddenNotification();
-//  public static const native int NSAccessibilityApplicationRole();
-//  public static const native int NSAccessibilityApplicationShownNotification();
-//  public static const native int NSAccessibilityAscendingSortDirectionValue();
-//  public static const native int NSAccessibilityAttachmentTextAttribute();
-//  public static const native int NSAccessibilityAttributedStringForRangeParameterizedAttribute();
-//  public static const native int NSAccessibilityBackgroundColorTextAttribute();
-//  public static const native int NSAccessibilityBoundsForRangeParameterizedAttribute();
-//  public static const native int NSAccessibilityBrowserRole();
-//  public static const native int NSAccessibilityBusyIndicatorRole();
-//  public static const native int NSAccessibilityButtonRole();
-//  public static const native int NSAccessibilityCancelAction();
-//  public static const native int NSAccessibilityCancelButtonAttribute();
-//  public static const native int NSAccessibilityCenterTabStopMarkerTypeValue();
-//  public static const native int NSAccessibilityCentimetersUnitValue();
-//  public static const native int NSAccessibilityCheckBoxRole();
-//  public static const native int NSAccessibilityChildrenAttribute();
-//  public static const native int NSAccessibilityClearButtonAttribute();
-//  public static const native int NSAccessibilityCloseButtonAttribute();
-//  public static const native int NSAccessibilityCloseButtonSubrole();
-//  public static const native int NSAccessibilityColorWellRole();
-//  public static const native int NSAccessibilityColumnCountAttribute();
-//  public static const native int NSAccessibilityColumnRole();
-//  public static const native int NSAccessibilityColumnTitlesAttribute();
-//  public static const native int NSAccessibilityColumnsAttribute();
-//  public static const native int NSAccessibilityComboBoxRole();
-//  public static const native int NSAccessibilityConfirmAction();
-//  public static const native int NSAccessibilityContentsAttribute();
-//  public static const native int NSAccessibilityCreatedNotification();
-//  public static const native int NSAccessibilityDecimalTabStopMarkerTypeValue();
-//  public static const native int NSAccessibilityDecrementAction();
-//  public static const native int NSAccessibilityDecrementArrowSubrole();
-//  public static const native int NSAccessibilityDecrementButtonAttribute();
-//  public static const native int NSAccessibilityDecrementPageSubrole();
-//  public static const native int NSAccessibilityDefaultButtonAttribute();
-//  public static const native int NSAccessibilityDeleteAction();
-//  public static const native int NSAccessibilityDescendingSortDirectionValue();
-//  public static const native int NSAccessibilityDescriptionAttribute();
-//  public static const native int NSAccessibilityDialogSubrole();
-//  public static const native int NSAccessibilityDisclosedByRowAttribute();
-//  public static const native int NSAccessibilityDisclosedRowsAttribute();
-//  public static const native int NSAccessibilityDisclosingAttribute();
-//  public static const native int NSAccessibilityDisclosureLevelAttribute();
-//  public static const native int NSAccessibilityDisclosureTriangleRole();
-//  public static const native int NSAccessibilityDocumentAttribute();
-//  public static const native int NSAccessibilityDrawerCreatedNotification();
-//  public static const native int NSAccessibilityDrawerRole();
-//  public static const native int NSAccessibilityEditedAttribute();
-//  public static const native int NSAccessibilityEnabledAttribute();
-//  public static const native int NSAccessibilityErrorCodeExceptionInfo();
-//  public static const native int NSAccessibilityException();
-//  public static const native int NSAccessibilityExpandedAttribute();
-//  public static const native int NSAccessibilityFilenameAttribute();
-//  public static const native int NSAccessibilityFirstLineIndentMarkerTypeValue();
-//  public static const native int NSAccessibilityFloatingWindowSubrole();
-//  public static const native int NSAccessibilityFocusedAttribute();
-//  public static const native int NSAccessibilityFocusedUIElementAttribute();
-//  public static const native int NSAccessibilityFocusedUIElementChangedNotification();
-//  public static const native int NSAccessibilityFocusedWindowAttribute();
-//  public static const native int NSAccessibilityFocusedWindowChangedNotification();
-//  public static const native int NSAccessibilityFontFamilyKey();
-//  public static const native int NSAccessibilityFontNameKey();
-//  public static const native int NSAccessibilityFontSizeKey();
-//  public static const native int NSAccessibilityFontTextAttribute();
-//  public static const native int NSAccessibilityForegroundColorTextAttribute();
-//  public static const native int NSAccessibilityFrontmostAttribute();
-//  public static const native int NSAccessibilityGridRole();
-//  public static const native int NSAccessibilityGroupRole();
-//  public static const native int NSAccessibilityGrowAreaAttribute();
-//  public static const native int NSAccessibilityGrowAreaRole();
-//  public static const native int NSAccessibilityHeadIndentMarkerTypeValue();
-//  public static const native int NSAccessibilityHeaderAttribute();
-//  public static const native int NSAccessibilityHelpAttribute();
-//  public static const native int NSAccessibilityHelpTagCreatedNotification();
-//  public static const native int NSAccessibilityHelpTagRole();
-//  public static const native int NSAccessibilityHiddenAttribute();
-//  public static const native int NSAccessibilityHorizontalOrientationValue();
-//  public static const native int NSAccessibilityHorizontalScrollBarAttribute();
-//  public static const native int NSAccessibilityImageRole();
-//  public static const native int NSAccessibilityInchesUnitValue();
-//  public static const native int NSAccessibilityIncrementAction();
-//  public static const native int NSAccessibilityIncrementArrowSubrole();
-//  public static const native int NSAccessibilityIncrementButtonAttribute();
-//  public static const native int NSAccessibilityIncrementPageSubrole();
-//  public static const native int NSAccessibilityIncrementorRole();
-//  public static const native int NSAccessibilityIndexAttribute();
-//  public static const native int NSAccessibilityInsertionPointLineNumberAttribute();
-//  public static const native int NSAccessibilityLabelUIElementsAttribute();
-//  public static const native int NSAccessibilityLabelValueAttribute();
-//  public static const native int NSAccessibilityLeftTabStopMarkerTypeValue();
-//  public static const native int NSAccessibilityLineForIndexParameterizedAttribute();
-//  public static const native int NSAccessibilityLinkRole();
-//  public static const native int NSAccessibilityLinkTextAttribute();
-//  public static const native int NSAccessibilityLinkedUIElementsAttribute();
-//  public static const native int NSAccessibilityListRole();
-//  public static const native int NSAccessibilityMainAttribute();
-//  public static const native int NSAccessibilityMainWindowAttribute();
-//  public static const native int NSAccessibilityMainWindowChangedNotification();
-//  public static const native int NSAccessibilityMarkerGroupUIElementAttribute();
-//  public static const native int NSAccessibilityMarkerTypeAttribute();
-//  public static const native int NSAccessibilityMarkerTypeDescriptionAttribute();
-//  public static const native int NSAccessibilityMarkerUIElementsAttribute();
-//  public static const native int NSAccessibilityMarkerValuesAttribute();
-//  public static const native int NSAccessibilityMatteContentUIElementAttribute();
-//  public static const native int NSAccessibilityMatteHoleAttribute();
-//  public static const native int NSAccessibilityMatteRole();
-//  public static const native int NSAccessibilityMaxValueAttribute();
-//  public static const native int NSAccessibilityMenuBarAttribute();
-//  public static const native int NSAccessibilityMenuBarRole();
-//  public static const native int NSAccessibilityMenuButtonRole();
-//  public static const native int NSAccessibilityMenuItemRole();
-//  public static const native int NSAccessibilityMenuRole();
-//  public static const native int NSAccessibilityMinValueAttribute();
-//  public static const native int NSAccessibilityMinimizeButtonAttribute();
-//  public static const native int NSAccessibilityMinimizeButtonSubrole();
-//  public static const native int NSAccessibilityMinimizedAttribute();
-//  public static const native int NSAccessibilityMisspelledTextAttribute();
-//  public static const native int NSAccessibilityModalAttribute();
-//  public static const native int NSAccessibilityMovedNotification();
-//  public static const native int NSAccessibilityNextContentsAttribute();
-//  public static const native int NSAccessibilityNumberOfCharactersAttribute();
-//  public static const native int NSAccessibilityOrderedByRowAttribute();
-//  public static const native int NSAccessibilityOrientationAttribute();
-//  public static const native int NSAccessibilityOutlineRole();
-//  public static const native int NSAccessibilityOutlineRowSubrole();
-//  public static const native int NSAccessibilityOverflowButtonAttribute();
-//  public static const native int NSAccessibilityParentAttribute();
-//  public static const native int NSAccessibilityPicasUnitValue();
-//  public static const native int NSAccessibilityPickAction();
-//  public static const native int NSAccessibilityPointsUnitValue();
-//  public static const native int NSAccessibilityPopUpButtonRole();
-    alias dwt.internal.objc.appkit.NSAccessibility.NSAccessibilityPositionAttribute NSAccessibilityPositionAttribute;
-//  public static const native int NSAccessibilityPressAction();
-//  public static const native int NSAccessibilityPreviousContentsAttribute();
-//  public static const native int NSAccessibilityProgressIndicatorRole();
-//  public static const native int NSAccessibilityProxyAttribute();
-//  public static const native int NSAccessibilityRTFForRangeParameterizedAttribute();
-//  public static const native int NSAccessibilityRadioButtonRole();
-//  public static const native int NSAccessibilityRadioGroupRole();
-//  public static const native int NSAccessibilityRaiseAction();
-//  public static const native int NSAccessibilityRangeForIndexParameterizedAttribute();
-//  public static const native int NSAccessibilityRangeForLineParameterizedAttribute();
-//  public static const native int NSAccessibilityRangeForPositionParameterizedAttribute();
-//  public static const native int NSAccessibilityResizedNotification();
-//  public static const native int NSAccessibilityRightTabStopMarkerTypeValue();
-//  public static const native int NSAccessibilityRoleAttribute();
-//  public static const native int NSAccessibilityRoleDescriptionAttribute();
-//  public static const native int NSAccessibilityRowCountAttribute();
-//  public static const native int NSAccessibilityRowCountChangedNotification();
-//  public static const native int NSAccessibilityRowRole();
-//  public static const native int NSAccessibilityRowsAttribute();
-//  public static const native int NSAccessibilityRulerMarkerRole();
-//  public static const native int NSAccessibilityRulerRole();
-//  public static const native int NSAccessibilityScrollAreaRole();
-//  public static const native int NSAccessibilityScrollBarRole();
-//  public static const native int NSAccessibilitySearchButtonAttribute();
-//  public static const native int NSAccessibilitySearchFieldSubrole();
-//  public static const native int NSAccessibilitySearchMenuAttribute();
-//  public static const native int NSAccessibilitySecureTextFieldSubrole();
-//  public static const native int NSAccessibilitySelectedAttribute();
-//  public static const native int NSAccessibilitySelectedChildrenAttribute();
-//  public static const native int NSAccessibilitySelectedChildrenChangedNotification();
-//  public static const native int NSAccessibilitySelectedColumnsAttribute();
-//  public static const native int NSAccessibilitySelectedColumnsChangedNotification();
-//  public static const native int NSAccessibilitySelectedRowsAttribute();
-//  public static const native int NSAccessibilitySelectedRowsChangedNotification();
-//  public static const native int NSAccessibilitySelectedTextAttribute();
-//  public static const native int NSAccessibilitySelectedTextChangedNotification();
-//  public static const native int NSAccessibilitySelectedTextRangeAttribute();
-//  public static const native int NSAccessibilitySelectedTextRangesAttribute();
-//  public static const native int NSAccessibilityServesAsTitleForUIElementsAttribute();
-//  public static const native int NSAccessibilityShadowTextAttribute();
-//  public static const native int NSAccessibilitySharedCharacterRangeAttribute();
-//  public static const native int NSAccessibilitySharedTextUIElementsAttribute();
-//  public static const native int NSAccessibilitySheetCreatedNotification();
-//  public static const native int NSAccessibilitySheetRole();
-//  public static const native int NSAccessibilityShowMenuAction();
-//  public static const native int NSAccessibilityShownMenuAttribute();
-    alias dwt.internal.objc.appkit.NSAccessibility.NSAccessibilitySizeAttribute NSAccessibilitySizeAttribute;
-//  public static const native int NSAccessibilitySliderRole();
-//  public static const native int NSAccessibilitySortButtonRole();
-//  public static const native int NSAccessibilitySortDirectionAttribute();
-//  public static const native int NSAccessibilitySplitGroupRole();
-//  public static const native int NSAccessibilitySplitterRole();
-//  public static const native int NSAccessibilitySplittersAttribute();
-//  public static const native int NSAccessibilityStandardWindowSubrole();
-//  public static const native int NSAccessibilityStaticTextRole();
-//  public static const native int NSAccessibilityStrikethroughColorTextAttribute();
-//  public static const native int NSAccessibilityStrikethroughTextAttribute();
-//  public static const native int NSAccessibilityStringForRangeParameterizedAttribute();
-//  public static const native int NSAccessibilityStyleRangeForIndexParameterizedAttribute();
-//  public static const native int NSAccessibilitySubroleAttribute();
-//  public static const native int NSAccessibilitySuperscriptTextAttribute();
-//  public static const native int NSAccessibilitySystemDialogSubrole();
-//  public static const native int NSAccessibilitySystemFloatingWindowSubrole();
-//  public static const native int NSAccessibilitySystemWideRole();
-//  public static const native int NSAccessibilityTabGroupRole();
-//  public static const native int NSAccessibilityTableRole();
-//  public static const native int NSAccessibilityTableRowSubrole();
-//  public static const native int NSAccessibilityTabsAttribute();
-//  public static const native int NSAccessibilityTailIndentMarkerTypeValue();
-//  public static const native int NSAccessibilityTextAreaRole();
-//  public static const native int NSAccessibilityTextAttachmentSubrole();
-//  public static const native int NSAccessibilityTextFieldRole();
-//  public static const native int NSAccessibilityTextLinkSubrole();
-//  public static const native int NSAccessibilityTimelineSubrole();
-//  public static const native int NSAccessibilityTitleAttribute();
-//  public static const native int NSAccessibilityTitleChangedNotification();
-//  public static const native int NSAccessibilityTitleUIElementAttribute();
-//  public static const native int NSAccessibilityToolbarButtonAttribute();
-//  public static const native int NSAccessibilityToolbarButtonSubrole();
-//  public static const native int NSAccessibilityToolbarRole();
-//  public static const native int NSAccessibilityTopLevelUIElementAttribute();
-//  public static const native int NSAccessibilityUIElementDestroyedNotification();
-//  public static const native int NSAccessibilityURLAttribute();
-//  public static const native int NSAccessibilityUnderlineColorTextAttribute();
-//  public static const native int NSAccessibilityUnderlineTextAttribute();
-//  public static const native int NSAccessibilityUnitDescriptionAttribute();
-//  public static const native int NSAccessibilityUnitsAttribute();
-//  public static const native int NSAccessibilityUnknownMarkerTypeValue();
-//  public static const native int NSAccessibilityUnknownRole();
-//  public static const native int NSAccessibilityUnknownSortDirectionValue();
-//  public static const native int NSAccessibilityUnknownSubrole();
-//  public static const native int NSAccessibilityUnknownUnitValue();
-//  public static const native int NSAccessibilityValueAttribute();
-//  public static const native int NSAccessibilityValueChangedNotification();
-//  public static const native int NSAccessibilityValueDescriptionAttribute();
-//  public static const native int NSAccessibilityValueIndicatorRole();
-//  public static const native int NSAccessibilityVerticalOrientationValue();
-//  public static const native int NSAccessibilityVerticalScrollBarAttribute();
-//  public static const native int NSAccessibilityVisibleCharacterRangeAttribute();
-//  public static const native int NSAccessibilityVisibleChildrenAttribute();
-//  public static const native int NSAccessibilityVisibleColumnsAttribute();
-//  public static const native int NSAccessibilityVisibleNameKey();
-//  public static const native int NSAccessibilityVisibleRowsAttribute();
-//  public static const native int NSAccessibilityWindowAttribute();
-//  public static const native int NSAccessibilityWindowCreatedNotification();
-//  public static const native int NSAccessibilityWindowDeminiaturizedNotification();
-//  public static const native int NSAccessibilityWindowMiniaturizedNotification();
-//  public static const native int NSAccessibilityWindowMovedNotification();
-//  public static const native int NSAccessibilityWindowResizedNotification();
-//  public static const native int NSAccessibilityWindowRole();
-//  public static const native int NSAccessibilityWindowsAttribute();
-//  public static const native int NSAccessibilityZoomButtonAttribute();
-//  public static const native int NSAccessibilityZoomButtonSubrole();
-//  public static const native int NSAlignmentBinding();
-//  public static const native int NSAllRomanInputSourcesLocaleIdentifier();
-//  public static const native int NSAllowsEditingMultipleValuesSelectionBindingOption();
-//  public static const native int NSAllowsNullArgumentBindingOption();
-//  public static const native int NSAlternateImageBinding();
-//  public static const native int NSAlternateTitleBinding();
-//  public static const native int NSAlwaysPresentsApplicationModalAlertsBindingOption();
-//  public static const native int NSAnimateBinding();
-//  public static const native int NSAnimationDelayBinding();
-//  public static const native int NSAnimationProgressMark();
-//  public static const native int NSAnimationProgressMarkNotification();
-//  public static const native int NSAnimationTriggerOrderIn();
-//  public static const native int NSAnimationTriggerOrderOut();
-//  public static const native int NSAntialiasThresholdChangedNotification();
-//  public static const native int NSApp();
-//  public static const native int NSAppKitIgnoredException();
-//  public static const native int NSAppKitVersionNumber();
-//  public static const native int NSAppKitVirtualMemoryException();
-//  public static const native int NSApplicationDidBecomeActiveNotification();
-//  public static const native int NSApplicationDidChangeScreenParametersNotification();
-//  public static const native int NSApplicationDidFinishLaunchingNotification();
-//  public static const native int NSApplicationDidHideNotification();
-//  public static const native int NSApplicationDidResignActiveNotification();
-//  public static const native int NSApplicationDidUnhideNotification();
-//  public static const native int NSApplicationDidUpdateNotification();
-//  public static const native int NSApplicationFileType();
-//  public static const native int NSApplicationWillBecomeActiveNotification();
-//  public static const native int NSApplicationWillFinishLaunchingNotification();
-//  public static const native int NSApplicationWillHideNotification();
-//  public static const native int NSApplicationWillResignActiveNotification();
-//  public static const native int NSApplicationWillTerminateNotification();
-//  public static const native int NSApplicationWillUnhideNotification();
-//  public static const native int NSApplicationWillUpdateNotification();
-//  public static const native int NSArgumentBinding();
-//  public static const native int NSAttachmentAttributeName();
-//  public static const native int NSAttributedStringBinding();
-//  public static const native int NSAuthorDocumentAttribute();
-    public static const NSString NSBackgroundColorAttributeName;
-    alias dwt.internal.objc.appkit.NSAttributedString.NSBackgroundColorAttributeName FuncNSBackgroundColorAttributeName;
-//  public static const native int NSBackgroundColorDocumentAttribute();
-//  public static const native int NSBadBitmapParametersException();
-//  public static const native int NSBadComparisonException();
-//  public static const native int NSBadRTFColorTableException();
-//  public static const native int NSBadRTFDirectiveException();
-//  public static const native int NSBadRTFFontTableException();
-//  public static const native int NSBadRTFStyleSheetException();
-//  public static const native int NSBaseURLDocumentOption();
-    alias dwt.internal.objc.appkit.NSAttributedString.NSBaselineOffsetAttributeName NSBaselineOffsetAttributeName;
-//  public static const native int NSBlack();
-//  public static const native int NSBottomMarginDocumentAttribute();
-//  public static const native int NSBrowserColumnConfigurationDidChangeNotification();
-//  public static const native int NSBrowserIllegalDelegateException();
-//  public static const native int NSCalibratedBlackColorSpace();
-//  public static const native int NSCalibratedRGBColorSpace();
-//  public static const native int NSCalibratedWhiteColorSpace();
-//  public static const native int NSCharacterEncodingDocumentAttribute();
-//  public static const native int NSCharacterEncodingDocumentOption();
-//  public static const native int NSCharacterShapeAttributeName();
-//  public static const native int NSCocoaVersionDocumentAttribute();
-//  public static const native int NSColorListDidChangeNotification();
-//  public static const native int NSColorListIOException();
-//  public static const native int NSColorListNotEditableException();
-//  public static const native int NSColorPanelColorDidChangeNotification();
-//  public static const native int NSColorPboardType();
-//  public static const native int NSComboBoxSelectionDidChangeNotification();
-//  public static const native int NSComboBoxSelectionIsChangingNotification();
-//  public static const native int NSComboBoxWillDismissNotification();
-//  public static const native int NSComboBoxWillPopUpNotification();
-//  public static const native int NSCommentDocumentAttribute();
-//  public static const native int NSCompanyDocumentAttribute();
-//  public static const native int NSConditionallySetsEditableBindingOption();
-//  public static const native int NSConditionallySetsEnabledBindingOption();
-//  public static const native int NSConditionallySetsHiddenBindingOption();
-//  public static const native int NSContentArrayBinding();
-//  public static const native int NSContentArrayForMultipleSelectionBinding();
-//  public static const native int NSContentBinding();
-//  public static const native int NSContentDictionaryBinding();
-//  public static const native int NSContentHeightBinding();
-//  public static const native int NSContentObjectBinding();
-//  public static const native int NSContentObjectsBinding();
-//  public static const native int NSContentPlacementTagBindingOption();
-//  public static const native int NSContentSetBinding();
-//  public static const native int NSContentValuesBinding();
-//  public static const native int NSContentWidthBinding();
-//  public static const native int NSContextHelpModeDidActivateNotification();
-//  public static const native int NSContextHelpModeDidDeactivateNotification();
-//  public static const native int NSContinuouslyUpdatesValueBindingOption();
-//  public static const native int NSControlTextDidBeginEditingNotification();
-//  public static const native int NSControlTextDidChangeNotification();
-//  public static const native int NSControlTextDidEndEditingNotification();
-//  public static const native int NSControlTintDidChangeNotification();
-//  public static const native int NSConvertedDocumentAttribute();
-//  public static const native int NSCopyrightDocumentAttribute();
-//  public static const native int NSCreatesSortDescriptorBindingOption();
-//  public static const native int NSCreationTimeDocumentAttribute();
-//  public static const native int NSCriticalValueBinding();
-//  public static const native int NSCursorAttributeName();
-//  public static const native int NSCustomColorSpace();
-//  public static const native int NSDarkGray();
-//  public static const native int NSDataBinding();
-//  public static const native int NSDefaultAttributesDocumentOption();
-//  public static const native int NSDefaultTabIntervalDocumentAttribute();
-//  public static const native int NSDeletesObjectsOnRemoveBindingsOption();
-//  public static const native int NSDeviceBitsPerSample();
-//  public static const native int NSDeviceBlackColorSpace();
-//  public static const native int NSDeviceCMYKColorSpace();
-//  public static const native int NSDeviceColorSpaceName();
-//  public static const native int NSDeviceIsPrinter();
-//  public static const native int NSDeviceIsScreen();
-    alias dwt.internal.objc.appkit.NSGraphics.NSDeviceRGBColorSpace NSDeviceRGBColorSpace;
-    alias dwt.internal.objc.appkit.NSGraphics.NSDeviceResolution NSDeviceResolution;
-//  public static const native int NSDeviceSize();
-//  public static const native int NSDeviceWhiteColorSpace();
-//  public static const native int NSDirectoryFileType();
-//  public static const native int NSDisplayNameBindingOption();
-//  public static const native int NSDisplayPatternBindingOption();
-//  public static const native int NSDisplayPatternTitleBinding();
-//  public static const native int NSDisplayPatternValueBinding();
-//  public static const native int NSDocFormatTextDocumentType();
-//  public static const native int NSDocumentEditedBinding();
-//  public static const native int NSDocumentTypeDocumentAttribute();
-//  public static const native int NSDocumentTypeDocumentOption();
-//  public static const native int NSDoubleClickArgumentBinding();
-//  public static const native int NSDoubleClickTargetBinding();
-//  public static const native int NSDragPboard();
-//  public static const native int NSDraggingException();
-//  public static const native int NSDrawerDidCloseNotification();
-//  public static const native int NSDrawerDidOpenNotification();
-//  public static const native int NSDrawerWillCloseNotification();
-//  public static const native int NSDrawerWillOpenNotification();
-//  public static const native int NSEditableBinding();
-//  public static const native int NSEditorDocumentAttribute();
-//  public static const native int NSEnabledBinding();
-//  public static const native int NSEventTrackingRunLoopMode();
-//  public static const native int NSExcludedElementsDocumentAttribute();
-//  public static const native int NSExcludedKeysBinding();
-//  public static const native int NSExpansionAttributeName();
-//  public static const native int NSFileContentsPboardType();
-//  public static const native int NSFilenamesPboardType();
-//  public static const native int NSFilesPromisePboardType();
-//  public static const native int NSFilesystemFileType();
-//  public static const native int NSFilterPredicateBinding();
-//  public static const native int NSFindPanelCaseInsensitiveSearch();
-//  public static const native int NSFindPanelSearchOptionsPboardType();
-//  public static const native int NSFindPanelSubStringMatch();
-//  public static const native int NSFindPboard();
-    alias dwt.internal.objc.appkit.NSAttributedString.NSFontAttributeName NSFontAttributeName;
-//  public static const native int NSFontBinding();
-//  public static const native int NSFontBoldBinding();
-//  public static const native int NSFontCascadeListAttribute();
-//  public static const native int NSFontCharacterSetAttribute();
-//  public static const native int NSFontFaceAttribute();
-//  public static const native int NSFontFamilyAttribute();
-//  public static const native int NSFontFamilyNameBinding();
-//  public static const native int NSFontFeatureSelectorIdentifierKey();
-//  public static const native int NSFontFeatureSettingsAttribute();
-//  public static const native int NSFontFeatureTypeIdentifierKey();
-//  public static const native int NSFontFixedAdvanceAttribute();
-//  public static const native int NSFontIdentityMatrix();
-//  public static const native int NSFontItalicBinding();
-//  public static const native int NSFontMatrixAttribute();
-//  public static const native int NSFontNameAttribute();
-//  public static const native int NSFontNameBinding();
-//  public static const native int NSFontPboard();
-//  public static const native int NSFontPboardType();
-//  public static const native int NSFontSetChangedNotification();
-//  public static const native int NSFontSizeAttribute();
-//  public static const native int NSFontSizeBinding();
-//  public static const native int NSFontSlantTrait();
-//  public static const native int NSFontSymbolicTrait();
-//  public static const native int NSFontTraitsAttribute();
-//  public static const native int NSFontUnavailableException();
-//  public static const native int NSFontVariationAttribute();
-//  public static const native int NSFontVariationAxisDefaultValueKey();
-//  public static const native int NSFontVariationAxisIdentifierKey();
-//  public static const native int NSFontVariationAxisMaximumValueKey();
-//  public static const native int NSFontVariationAxisMinimumValueKey();
-//  public static const native int NSFontVariationAxisNameKey();
-//  public static const native int NSFontVisibleNameAttribute();
-//  public static const native int NSFontWeightTrait();
-//  public static const native int NSFontWidthTrait();
-    alias dwt.internal.objc.appkit.NSAttributedString.NSForegroundColorAttributeName NSForegroundColorAttributeName;
-//  public static const native int NSFullScreenModeAllScreens();
-//  public static const native int NSFullScreenModeSetting();
-//  public static const native int NSFullScreenModeWindowLevel();
-//  public static const native int NSGeneralPboard();
-//  public static const native int NSGlyphInfoAttributeName();
-//  public static const native int NSGraphicsContextDestinationAttributeName();
-//  public static const native int NSGraphicsContextPDFFormat();
-//  public static const native int NSGraphicsContextPSFormat();
-//  public static const native int NSGraphicsContextRepresentationFormatAttributeName();
-//  public static const native int NSHTMLPboardType();
-//  public static const native int NSHTMLTextDocumentType();
-//  public static const native int NSHandlesContentAsCompoundValueBindingOption();
-//  public static const native int NSHeaderTitleBinding();
-//  public static const native int NSHiddenBinding();
-//  public static const native int NSHyphenationFactorDocumentAttribute();
-//  public static const native int NSIllegalSelectorException();
-//  public static const native int NSImageBinding();
-//  public static const native int NSImageCacheException();
-//  public static const native int NSImageColorSyncProfileData();
-//  public static const native int NSImageCompressionFactor();
-//  public static const native int NSImageCompressionMethod();
-//  public static const native int NSImageCurrentFrame();
-//  public static const native int NSImageCurrentFrameDuration();
-//  public static const native int NSImageDitherTransparency();
-//  public static const native int NSImageEXIFData();
-//  public static const native int NSImageFallbackBackgroundColor();
-//  public static const native int NSImageFrameCount();
-//  public static const native int NSImageGamma();
-//  public static const native int NSImageInterlaced();
-//  public static const native int NSImageLoopCount();
-//  public static const native int NSImageNameActionTemplate();
-//  public static const native int NSImageNameAddTemplate();
-//  public static const native int NSImageNameAdvanced();
-//  public static const native int NSImageNameBluetoothTemplate();
-//  public static const native int NSImageNameBonjour();
-//  public static const native int NSImageNameColorPanel();
-//  public static const native int NSImageNameColumnViewTemplate();
-//  public static const native int NSImageNameComputer();
-//  public static const native int NSImageNameDotMac();
-//  public static const native int NSImageNameEnterFullScreenTemplate();
-//  public static const native int NSImageNameEveryone();
-//  public static const native int NSImageNameExitFullScreenTemplate();
-//  public static const native int NSImageNameFlowViewTemplate();
-//  public static const native int NSImageNameFolderBurnable();
-//  public static const native int NSImageNameFolderSmart();
-//  public static const native int NSImageNameFollowLinkFreestandingTemplate();
-//  public static const native int NSImageNameFontPanel();
-//  public static const native int NSImageNameGoLeftTemplate();
-//  public static const native int NSImageNameGoRightTemplate();
-//  public static const native int NSImageNameIChatTheaterTemplate();
-//  public static const native int NSImageNameIconViewTemplate();
-//  public static const native int NSImageNameInfo();
-//  public static const native int NSImageNameInvalidDataFreestandingTemplate();
-//  public static const native int NSImageNameLeftFacingTriangleTemplate();
-//  public static const native int NSImageNameListViewTemplate();
-//  public static const native int NSImageNameLockLockedTemplate();
-//  public static const native int NSImageNameLockUnlockedTemplate();
-//  public static const native int NSImageNameMultipleDocuments();
-//  public static const native int NSImageNameNetwork();
-//  public static const native int NSImageNamePathTemplate();
-//  public static const native int NSImageNamePreferencesGeneral();
-//  public static const native int NSImageNameQuickLookTemplate();
-//  public static const native int NSImageNameRefreshFreestandingTemplate();
-//  public static const native int NSImageNameRefreshTemplate();
-//  public static const native int NSImageNameRemoveTemplate();
-//  public static const native int NSImageNameRevealFreestandingTemplate();
-//  public static const native int NSImageNameRightFacingTriangleTemplate();
-//  public static const native int NSImageNameSlideshowTemplate();
-//  public static const native int NSImageNameSmartBadgeTemplate();
-//  public static const native int NSImageNameStopProgressFreestandingTemplate();
-//  public static const native int NSImageNameStopProgressTemplate();
-//  public static const native int NSImageNameUser();
-//  public static const native int NSImageNameUserAccounts();
-//  public static const native int NSImageNameUserGroup();
-//  public static const native int NSImageProgressive();
-//  public static const native int NSImageRGBColorTable();
-//  public static const native int NSImageRepRegistryDidChangeNotification();
-//  public static const native int NSIncludedKeysBinding();
-//  public static const native int NSInitialKeyBinding();
-//  public static const native int NSInitialValueBinding();
-//  public static const native int NSInkTextPboardType();
-//  public static const native int NSInsertsNullPlaceholderBindingOption();
-//  public static const native int NSInterfaceStyleDefault();
-//  public static const native int NSInvokesSeparatelyWithArrayObjectsBindingOption();
-//  public static const native int NSIsIndeterminateBinding();
-//  public static const native int NSKernAttributeName();
-//  public static const native int NSKeywordsDocumentAttribute();
-//  public static const native int NSLabelBinding();
-//  public static const native int NSLeftMarginDocumentAttribute();
-//  public static const native int NSLigatureAttributeName();
-//  public static const native int NSLightGray();
-    alias dwt.internal.objc.appkit.NSAttributedString.NSLinkAttributeName NSLinkAttributeName;
-//  public static const native int NSLocalizedKeyDictionaryBinding();
-//  public static const native int NSMacSimpleTextDocumentType();
-//  public static const native int NSManagedObjectContextBinding();
-//  public static const native int NSMarkedClauseSegmentAttributeName();
-//  public static const native int NSMaxValueBinding();
-//  public static const native int NSMaxWidthBinding();
-//  public static const native int NSMaximumRecentsBinding();
-//  public static const native int NSMenuDidAddItemNotification();
-//  public static const native int NSMenuDidBeginTrackingNotification();
-//  public static const native int NSMenuDidChangeItemNotification();
-//  public static const native int NSMenuDidEndTrackingNotification();
-//  public static const native int NSMenuDidRemoveItemNotification();
-//  public static const native int NSMenuDidSendActionNotification();
-//  public static const native int NSMenuWillSendActionNotification();
-//  public static const native int NSMinValueBinding();
-//  public static const native int NSMinWidthBinding();
-//  public static const native int NSMixedStateImageBinding();
-//  public static const native int NSModalPanelRunLoopMode();
-//  public static const native int NSModificationTimeDocumentAttribute();
-//  public static const native int NSMultipleTextSelectionPboardType();
-//  public static const native int NSMultipleValuesMarker();
-//  public static const native int NSMultipleValuesPlaceholderBindingOption();
-//  public static const native int NSNamedColorSpace();
-//  public static const native int NSNibLoadingException();
-//  public static const native int NSNibOwner();
-//  public static const native int NSNibTopLevelObjects();
-//  public static const native int NSNoSelectionMarker();
-//  public static const native int NSNoSelectionPlaceholderBindingOption();
-//  public static const native int NSNotApplicableMarker();
-//  public static const native int NSNotApplicablePlaceholderBindingOption();
-//  public static const native int NSNullPlaceholderBindingOption();
-//  public static const native int NSObliquenessAttributeName();
-//  public static const native int NSObservedKeyPathKey();
-//  public static const native int NSObservedObjectKey();
-//  public static const native int NSOffStateImageBinding();
-//  public static const native int NSOfficeOpenXMLTextDocumentType();
-//  public static const native int NSOnStateImageBinding();
-//  public static const native int NSOpenDocumentTextDocumentType();
-//  public static const native int NSOptionsKey();
-//  public static const native int NSOutlineViewColumnDidMoveNotification();
-//  public static const native int NSOutlineViewColumnDidResizeNotification();
-//  public static const native int NSOutlineViewItemDidCollapseNotification();
-//  public static const native int NSOutlineViewItemDidExpandNotification();
-//  public static const native int NSOutlineViewItemWillCollapseNotification();
-//  public static const native int NSOutlineViewItemWillExpandNotification();
-//  public static const native int NSOutlineViewSelectionDidChangeNotification();
-//  public static const native int NSOutlineViewSelectionIsChangingNotification();
-//  public static const native int NSPDFPboardType();
-//  public static const native int NSPICTPboardType();
-//  public static const native int NSPPDIncludeNotFoundException();
-//  public static const native int NSPPDIncludeStackOverflowException();
-//  public static const native int NSPPDIncludeStackUnderflowException();
-//  public static const native int NSPPDParseException();
-//  public static const native int NSPaperSizeDocumentAttribute();
-    alias dwt.internal.objc.appkit.NSAttributedString.NSParagraphStyleAttributeName NSParagraphStyleAttributeName;
-//  public static const native int NSPasteboardCommunicationException();
-//  public static const native int NSPatternColorSpace();
-//  public static const native int NSPlainFileType();
-//  public static const native int NSPlainTextDocumentType();
-//  public static const native int NSPopUpButtonCellWillPopUpNotification();
-//  public static const native int NSPopUpButtonWillPopUpNotification();
-//  public static const native int NSPostScriptPboardType();
-//  public static const native int NSPredicateBinding();
-//  public static const native int NSPredicateFormatBindingOption();
-//  public static const native int NSPrefixSpacesDocumentAttribute();
-//  public static const native int NSPrintAllPages();
-//  public static const native int NSPrintBottomMargin();
-//  public static const native int NSPrintCancelJob();
-//  public static const native int NSPrintCopies();
-//  public static const native int NSPrintDetailedErrorReporting();
-//  public static const native int NSPrintFaxCoverSheetName();
-//  public static const native int NSPrintFaxHighResolution();
-//  public static const native int NSPrintFaxJob();
-//  public static const native int NSPrintFaxModem();
-//  public static const native int NSPrintFaxNumber();
-//  public static const native int NSPrintFaxReceiverNames();
-//  public static const native int NSPrintFaxReceiverNumbers();
-//  public static const native int NSPrintFaxReturnReceipt();
-//  public static const native int NSPrintFaxSendTime();
-//  public static const native int NSPrintFaxTrimPageEnds();
-//  public static const native int NSPrintFaxUseCoverSheet();
-//  public static const native int NSPrintFirstPage();
-//  public static const native int NSPrintFormName();
-//  public static const native int NSPrintHeaderAndFooter();
-//  public static const native int NSPrintHorizontalPagination();
-//  public static const native int NSPrintHorizontallyCentered();
-//  public static const native int NSPrintJobDisposition();
-//  public static const native int NSPrintJobFeatures();
-//  public static const native int NSPrintLastPage();
-//  public static const native int NSPrintLeftMargin();
-//  public static const native int NSPrintManualFeed();
-//  public static const native int NSPrintMustCollate();
-//  public static const native int NSPrintOperationExistsException();
-//  public static const native int NSPrintOrientation();
-//  public static const native int NSPrintPackageException();
-//  public static const native int NSPrintPagesAcross();
-//  public static const native int NSPrintPagesDown();
-//  public static const native int NSPrintPagesPerSheet();
-//  public static const native int NSPrintPanelAccessorySummaryItemDescriptionKey();
-//  public static const native int NSPrintPanelAccessorySummaryItemNameKey();
-//  public static const native int NSPrintPaperFeed();
-//  public static const native int NSPrintPaperName();
-//  public static const native int NSPrintPaperSize();
-//  public static const native int NSPrintPhotoJobStyleHint();
-//  public static const native int NSPrintPreviewJob();
-//  public static const native int NSPrintPrinter();
-//  public static const native int NSPrintPrinterName();
-//  public static const native int NSPrintReversePageOrder();
-//  public static const native int NSPrintRightMargin();
-//  public static const native int NSPrintSaveJob();
-//  public static const native int NSPrintSavePath();
-//  public static const native int NSPrintScalingFactor();
-//  public static const native int NSPrintSpoolJob();
-//  public static const native int NSPrintTime();
-//  public static const native int NSPrintTopMargin();
-//  public static const native int NSPrintVerticalPagination();
-//  public static const native int NSPrintVerticallyCentered();
-//  public static const native int NSPrintingCommunicationException();
-//  public static const native int NSRTFDPboardType();
-//  public static const native int NSRTFDTextDocumentType();
-//  public static const native int NSRTFPboardType();
-//  public static const native int NSRTFPropertyStackOverflowException();
-//  public static const native int NSRTFTextDocumentType();
-//  public static const native int NSRaisesForNotApplicableKeysBindingOption();
-//  public static const native int NSReadOnlyDocumentAttribute();
-//  public static const native int NSRecentSearchesBinding();
-//  public static const native int NSRepresentedFilenameBinding();
-//  public static const native int NSRightMarginDocumentAttribute();
-//  public static const native int NSRowHeightBinding();
-//  public static const native int NSRuleEditorPredicateComparisonModifier();
-//  public static const native int NSRuleEditorPredicateCompoundType();
-//  public static const native int NSRuleEditorPredicateCustomSelector();
-//  public static const native int NSRuleEditorPredicateLeftExpression();
-//  public static const native int NSRuleEditorPredicateOperatorType();
-//  public static const native int NSRuleEditorPredicateOptions();
-//  public static const native int NSRuleEditorPredicateRightExpression();
-//  public static const native int NSRuleEditorRowsDidChangeNotification();
-//  public static const native int NSRulerPboard();
-//  public static const native int NSRulerPboardType();
-//  public static const native int NSSelectedIdentifierBinding();
-//  public static const native int NSSelectedIndexBinding();
-//  public static const native int NSSelectedLabelBinding();
-//  public static const native int NSSelectedObjectBinding();
-//  public static const native int NSSelectedObjectsBinding();
-//  public static const native int NSSelectedTagBinding();
-//  public static const native int NSSelectedValueBinding();
-//  public static const native int NSSelectedValuesBinding();
-//  public static const native int NSSelectionIndexPathsBinding();
-//  public static const native int NSSelectionIndexesBinding();
-//  public static const native int NSSelectorNameBindingOption();
-//  public static const native int NSSelectsAllWhenSettingContentBindingOption();
-//  public static const native int NSShadowAttributeName();
-//  public static const native int NSShellCommandFileType();
-//  public static const native int NSSortDescriptorsBinding();
-//  public static const native int NSSoundPboardType();
-//  public static const native int NSSpeechCharacterModeProperty();
-//  public static const native int NSSpeechCommandDelimiterProperty();
-//  public static const native int NSSpeechCommandPrefix();
-//  public static const native int NSSpeechCommandSuffix();
-//  public static const native int NSSpeechCurrentVoiceProperty();
-//  public static const native int NSSpeechDictionaryAbbreviations();
-//  public static const native int NSSpeechDictionaryEntryPhonemes();
-//  public static const native int NSSpeechDictionaryEntrySpelling();
-//  public static const native int NSSpeechDictionaryLocaleIdentifier();
-//  public static const native int NSSpeechDictionaryModificationDate();
-//  public static const native int NSSpeechDictionaryPronunciations();
-//  public static const native int NSSpeechErrorCount();
-//  public static const native int NSSpeechErrorNewestCharacterOffset();
-//  public static const native int NSSpeechErrorNewestCode();
-//  public static const native int NSSpeechErrorOldestCharacterOffset();
-//  public static const native int NSSpeechErrorOldestCode();
-//  public static const native int NSSpeechErrorsProperty();
-//  public static const native int NSSpeechInputModeProperty();
-//  public static const native int NSSpeechModeLiteral();
-//  public static const native int NSSpeechModeNormal();
-//  public static const native int NSSpeechModePhoneme();
-//  public static const native int NSSpeechModeText();
-//  public static const native int NSSpeechNumberModeProperty();
-//  public static const native int NSSpeechOutputToFileURLProperty();
-//  public static const native int NSSpeechPhonemeInfoExample();
-//  public static const native int NSSpeechPhonemeInfoHiliteEnd();
-//  public static const native int NSSpeechPhonemeInfoHiliteStart();
-//  public static const native int NSSpeechPhonemeInfoOpcode();
-//  public static const native int NSSpeechPhonemeInfoSymbol();
-//  public static const native int NSSpeechPhonemeSymbolsProperty();
-//  public static const native int NSSpeechPitchBaseProperty();
-//  public static const native int NSSpeechPitchModProperty();
-//  public static const native int NSSpeechRateProperty();
-//  public static const native int NSSpeechRecentSyncProperty();
-//  public static const native int NSSpeechResetProperty();
-//  public static const native int NSSpeechStatusNumberOfCharactersLeft();
-//  public static const native int NSSpeechStatusOutputBusy();
-//  public static const native int NSSpeechStatusOutputPaused();
-//  public static const native int NSSpeechStatusPhonemeCode();
-//  public static const native int NSSpeechStatusProperty();
-//  public static const native int NSSpeechSynthesizerInfoIdentifier();
-//  public static const native int NSSpeechSynthesizerInfoProperty();
-//  public static const native int NSSpeechSynthesizerInfoVersion();
-//  public static const native int NSSpeechVolumeProperty();
-//  public static const native int NSSpellingStateAttributeName();
-//  public static const native int NSSplitViewDidResizeSubviewsNotification();
-//  public static const native int NSSplitViewWillResizeSubviewsNotification();
-    alias dwt.internal.objc.appkit.NSAttributedString.NSStrikethroughColorAttributeName NSStrikethroughColorAttributeName;
-    alias dwt.internal.objc.appkit.NSAttributedString.NSStrikethroughStyleAttributeName NSStrikethroughStyleAttributeName;
-//  public static const native int NSStringPboardType();
-//  public static const native int NSStrokeColorAttributeName();
-//  public static const native int NSStrokeWidthAttributeName();
-//  public static const native int NSSubjectDocumentAttribute();
-//  public static const native int NSSuperscriptAttributeName();
-//  public static const native int NSSystemColorsDidChangeNotification();
-//  public static const native int NSTIFFException();
-//  public static const native int NSTIFFPboardType();
-//  public static const native int NSTabColumnTerminatorsAttributeName();
-//  public static const native int NSTableViewColumnDidMoveNotification();
-//  public static const native int NSTableViewColumnDidResizeNotification();
-//  public static const native int NSTableViewSelectionDidChangeNotification();
-//  public static const native int NSTableViewSelectionIsChangingNotification();
-//  public static const native int NSTabularTextPboardType();
-//  public static const native int NSTargetBinding();
-//  public static const native int NSTextColorBinding();
-//  public static const native int NSTextDidBeginEditingNotification();
-//  public static const native int NSTextDidChangeNotification();
-//  public static const native int NSTextDidEndEditingNotification();
-//  public static const native int NSTextEncodingNameDocumentAttribute();
-//  public static const native int NSTextEncodingNameDocumentOption();
-//  public static const native int NSTextLineTooLongException();
-//  public static const native int NSTextNoSelectionException();
-//  public static const native int NSTextReadException();
-//  public static const native int NSTextSizeMultiplierDocumentOption();
-//  public static const native int NSTextStorageDidProcessEditingNotification();
-//  public static const native int NSTextStorageWillProcessEditingNotification();
-//  public static const native int NSTextViewDidChangeSelectionNotification();
-//  public static const native int NSTextViewDidChangeTypingAttributesNotification();
-//  public static const native int NSTextViewWillChangeNotifyingTextViewNotification();
-//  public static const native int NSTextWriteException();
-//  public static const native int NSTimeoutDocumentOption();
-//  public static const native int NSTitleBinding();
-//  public static const native int NSTitleDocumentAttribute();
-//  public static const native int NSToolTipAttributeName();
-//  public static const native int NSToolTipBinding();
-//  public static const native int NSToolbarCustomizeToolbarItemIdentifier();
-//  public static const native int NSToolbarDidRemoveItemNotification();
-//  public static const native int NSToolbarFlexibleSpaceItemIdentifier();
-//  public static const native int NSToolbarPrintItemIdentifier();
-//  public static const native int NSToolbarSeparatorItemIdentifier();
-//  public static const native int NSToolbarShowColorsItemIdentifier();
-//  public static const native int NSToolbarShowFontsItemIdentifier();
-//  public static const native int NSToolbarSpaceItemIdentifier();
-//  public static const native int NSToolbarWillAddItemNotification();
-//  public static const native int NSTopMarginDocumentAttribute();
-//  public static const native int NSTransparentBinding();
-//  public static const native int NSTypedStreamVersionException();
-//  public static const native int NSURLPboardType();
-//  public static const native int NSUnderlineByWordMask();
-    alias dwt.internal.objc.appkit.NSAttributedString.NSUnderlineColorAttributeName NSUnderlineColorAttributeName;
-//  public static const native int NSUnderlineStrikethroughMask();
-    alias dwt.internal.objc.appkit.NSAttributedString.NSUnderlineStyleAttributeName NSUnderlineStyleAttributeName;
-//  public static const native int NSVCardPboardType();
-//  public static const native int NSValidatesImmediatelyBindingOption();
-//  public static const native int NSValueBinding();
-//  public static const native int NSValuePathBinding();
-//  public static const native int NSValueTransformerBindingOption();
-//  public static const native int NSValueTransformerNameBindingOption();
-//  public static const native int NSValueURLBinding();
-//  public static const native int NSViewAnimationEffectKey();
-//  public static const native int NSViewAnimationEndFrameKey();
-//  public static const native int NSViewAnimationFadeInEffect();
-//  public static const native int NSViewAnimationFadeOutEffect();
-//  public static const native int NSViewAnimationStartFrameKey();
-//  public static const native int NSViewAnimationTargetKey();
-//  public static const native int NSViewBoundsDidChangeNotification();
-//  public static const native int NSViewDidUpdateTrackingAreasNotification();
-//  public static const native int NSViewFocusDidChangeNotification();
-//  public static const native int NSViewFrameDidChangeNotification();
-//  public static const native int NSViewGlobalFrameDidChangeNotification();
-//  public static const native int NSViewModeDocumentAttribute();
-//  public static const native int NSViewSizeDocumentAttribute();
-//  public static const native int NSViewZoomDocumentAttribute();
-//  public static const native int NSVisibleBinding();
-//  public static const native int NSVoiceAge();
-//  public static const native int NSVoiceDemoText();
-//  public static const native int NSVoiceGender();
-//  public static const native int NSVoiceGenderFemale();
-//  public static const native int NSVoiceGenderMale();
-//  public static const native int NSVoiceGenderNeuter();
-//  public static const native int NSVoiceIdentifier();
-//  public static const native int NSVoiceIndividuallySpokenCharacters();
-//  public static const native int NSVoiceLocaleIdentifier();
-//  public static const native int NSVoiceName();
-//  public static const native int NSVoiceSupportedCharacters();
-//  public static const native int NSWarningValueBinding();
-//  public static const native int NSWebArchiveTextDocumentType();
-//  public static const native int NSWebPreferencesDocumentOption();
-//  public static const native int NSWebResourceLoadDelegateDocumentOption();
-//  public static const native int NSWhite();
-//  public static const native int NSWidthBinding();
-//  public static const native int NSWindowDidBecomeKeyNotification();
-//  public static const native int NSWindowDidBecomeMainNotification();
-//  public static const native int NSWindowDidChangeScreenNotification();
-//  public static const native int NSWindowDidChangeScreenProfileNotification();
-//  public static const native int NSWindowDidDeminiaturizeNotification();
-//  public static const native int NSWindowDidEndSheetNotification();
-//  public static const native int NSWindowDidExposeNotification();
-//  public static const native int NSWindowDidMiniaturizeNotification();
-//  public static const native int NSWindowDidMoveNotification();
-//  public static const native int NSWindowDidResignKeyNotification();
-//  public static const native int NSWindowDidResignMainNotification();
-//  public static const native int NSWindowDidResizeNotification();
-//  public static const native int NSWindowDidUpdateNotification();
-//  public static const native int NSWindowServerCommunicationException();
-//  public static const native int NSWindowWillBeginSheetNotification();
-//  public static const native int NSWindowWillCloseNotification();
-//  public static const native int NSWindowWillMiniaturizeNotification();
-//  public static const native int NSWindowWillMoveNotification();
-//  public static const native int NSWordMLTextDocumentType();
-//  public static const native int NSWordTablesReadException();
-//  public static const native int NSWordTablesWriteException();
-//  public static const native int NSWorkspaceCompressOperation();
-//  public static const native int NSWorkspaceCopyOperation();
-//  public static const native int NSWorkspaceDecompressOperation();
-//  public static const native int NSWorkspaceDecryptOperation();
-//  public static const native int NSWorkspaceDestroyOperation();
-//  public static const native int NSWorkspaceDidLaunchApplicationNotification();
-//  public static const native int NSWorkspaceDidMountNotification();
-//  public static const native int NSWorkspaceDidPerformFileOperationNotification();
-//  public static const native int NSWorkspaceDidTerminateApplicationNotification();
-//  public static const native int NSWorkspaceDidUnmountNotification();
-//  public static const native int NSWorkspaceDidWakeNotification();
-//  public static const native int NSWorkspaceDuplicateOperation();
-//  public static const native int NSWorkspaceEncryptOperation();
-//  public static const native int NSWorkspaceLinkOperation();
-//  public static const native int NSWorkspaceMoveOperation();
-//  public static const native int NSWorkspaceRecycleOperation();
-//  public static const native int NSWorkspaceSessionDidBecomeActiveNotification();
-//  public static const native int NSWorkspaceSessionDidResignActiveNotification();
-//  public static const native int NSWorkspaceWillLaunchApplicationNotification();
-//  public static const native int NSWorkspaceWillPowerOffNotification();
-//  public static const native int NSWorkspaceWillSleepNotification();
-//  public static const native int NSWorkspaceWillUnmountNotification();
-//  public static const native int NSAppleEventManagerWillProcessFirstEventNotification();
-//  public static const native int NSAppleEventTimeOutDefault();
-//  public static const native int NSAppleEventTimeOutNone();
-//  public static const native int NSAppleScriptErrorAppName();
-//  public static const native int NSAppleScriptErrorBriefMessage();
-//  public static const native int NSAppleScriptErrorMessage();
-//  public static const native int NSAppleScriptErrorNumber();
-//  public static const native int NSAppleScriptErrorRange();
-//  public static const native int NSArgumentDomain();
-//  public static const native int NSAverageKeyValueOperator();
-//  public static const native int NSBuddhistCalendar();
-//  public static const native int NSBundleDidLoadNotification();
-//  public static const native int NSCharacterConversionException();
-//  public static const native int NSChineseCalendar();
-//  public static const native int NSClassDescriptionNeededForClassNotification();
-//  public static const native int NSCocoaErrorDomain();
-//  public static const native int NSConnectionDidDieNotification();
-//  public static const native int NSConnectionDidInitializeNotification();
-//  public static const native int NSConnectionReplyMode();
-//  public static const native int NSCountKeyValueOperator();
-//  public static const native int NSCurrentLocaleDidChangeNotification();
-//  public static const native int NSDeallocateZombies();
-//  public static const native int NSDebugEnabled();
-//  public static const native int NSDecimalNumberDivideByZeroException();
-//  public static const native int NSDecimalNumberExactnessException();
-//  public static const native int NSDecimalNumberOverflowException();
-//  public static const native int NSDecimalNumberUnderflowException();
-    public static const NSString NSDefaultRunLoopMode;
-    alias dwt.internal.objc.foundation.NSRunLoop.NSDefaultRunLoopMode FuncNSDefaultRunLoopMode;
-//  public static const native int NSDestinationInvalidException();
-//  public static const native int NSDidBecomeSingleThreadedNotification();
-//  public static const native int NSDistinctUnionOfArraysKeyValueOperator();
-//  public static const native int NSDistinctUnionOfObjectsKeyValueOperator();
-//  public static const native int NSDistinctUnionOfSetsKeyValueOperator();
-//  public static const native int NSErrorFailingURLStringKey();
-//  public static const native int NSFailedAuthenticationException();
-//  public static const native int NSFileAppendOnly();
-//  public static const native int NSFileBusy();
-//  public static const native int NSFileCreationDate();
-//  public static const native int NSFileDeviceIdentifier();
-//  public static const native int NSFileExtensionHidden();
-//  public static const native int NSFileGroupOwnerAccountID();
-//  public static const native int NSFileGroupOwnerAccountName();
-//  public static const native int NSFileHFSCreatorCode();
-//  public static const native int NSFileHFSTypeCode();
-//  public static const native int NSFileHandleConnectionAcceptedNotification();
-//  public static const native int NSFileHandleDataAvailableNotification();
-//  public static const native int NSFileHandleNotificationDataItem();
-//  public static const native int NSFileHandleNotificationFileHandleItem();
-//  public static const native int NSFileHandleNotificationMonitorModes();
-//  public static const native int NSFileHandleOperationException();
-//  public static const native int NSFileHandleReadCompletionNotification();
-//  public static const native int NSFileHandleReadToEndOfFileCompletionNotification();
-//  public static const native int NSFileImmutable();
-//  public static const native int NSFileModificationDate();
-//  public static const native int NSFileOwnerAccountID();
-//  public static const native int NSFileOwnerAccountName();
-//  public static const native int NSFilePathErrorKey();
-//  public static const native int NSFilePosixPermissions();
-//  public static const native int NSFileReferenceCount();
-//  public static const native int NSFileSize();
-//  public static const native int NSFileSystemFileNumber();
-//  public static const native int NSFileSystemFreeNodes();
-//  public static const native int NSFileSystemFreeSize();
-//  public static const native int NSFileSystemNodes();
-//  public static const native int NSFileSystemNumber();
-//  public static const native int NSFileSystemSize();
-//  public static const native int NSFileType();
-//  public static const native int NSFileTypeBlockSpecial();
-//  public static const native int NSFileTypeCharacterSpecial();
-//  public static const native int NSFileTypeDirectory();
-//  public static const native int NSFileTypeRegular();
-//  public static const native int NSFileTypeSocket();
-//  public static const native int NSFileTypeSymbolicLink();
-//  public static const native int NSFileTypeUnknown();
-//  public static const native int NSFoundationVersionNumber();
-//  public static const native int NSGenericException();
-//  public static const native int NSGlobalDomain();
-//  public static const native int NSGrammarCorrections();
-//  public static const native int NSGrammarRange();
-//  public static const native int NSGrammarUserDescription();
-//  public static const native int NSGregorianCalendar();
-//  public static const native int NSHTTPCookieComment();
-//  public static const native int NSHTTPCookieCommentURL();
-//  public static const native int NSHTTPCookieDiscard();
-//  public static const native int NSHTTPCookieDomain();
-//  public static const native int NSHTTPCookieExpires();
-//  public static const native int NSHTTPCookieManagerAcceptPolicyChangedNotification();
-//  public static const native int NSHTTPCookieManagerCookiesChangedNotification();
-//  public static const native int NSHTTPCookieMaximumAge();
-//  public static const native int NSHTTPCookieName();
-//  public static const native int NSHTTPCookieOriginURL();
-//  public static const native int NSHTTPCookiePath();
-//  public static const native int NSHTTPCookiePort();
-//  public static const native int NSHTTPCookieSecure();
-//  public static const native int NSHTTPCookieValue();
-//  public static const native int NSHTTPCookieVersion();
-//  public static const native int NSHangOnUncaughtException();
-//  public static const native int NSHebrewCalendar();
-//  public static const native int NSInconsistentArchiveException();
-//  public static const native int NSIntegerHashCallBacks();
-//  public static const native int NSIntegerMapKeyCallBacks();
-//  public static const native int NSIntegerMapValueCallBacks();
-//  public static const native int NSInternalInconsistencyException();
-//  public static const native int NSInvalidArchiveOperationException();
-//  public static const native int NSInvalidArgumentException();
-//  public static const native int NSInvalidReceivePortException();
-//  public static const native int NSInvalidSendPortException();
-//  public static const native int NSInvalidUnarchiveOperationException();
-//  public static const native int NSInvocationOperationCancelledException();
-//  public static const native int NSInvocationOperationVoidResultException();
-//  public static const native int NSIsNilTransformerName();
-//  public static const native int NSIsNotNilTransformerName();
-//  public static const native int NSIslamicCalendar();
-//  public static const native int NSIslamicCivilCalendar();
-//  public static const native int NSJapaneseCalendar();
-//  public static const native int NSKeepAllocationStatistics();
-//  public static const native int NSKeyValueChangeIndexesKey();
-//  public static const native int NSKeyValueChangeKindKey();
-//  public static const native int NSKeyValueChangeNewKey();
-//  public static const native int NSKeyValueChangeNotificationIsPriorKey();
-//  public static const native int NSKeyValueChangeOldKey();
-//  public static const native int NSKeyedUnarchiveFromDataTransformerName();
-//  public static const native int NSLoadedClasses();
-//  public static const native int NSLocalNotificationCenterType();
-//  public static const native int NSLocaleCalendar();
-//  public static const native int NSLocaleCollationIdentifier();
-//  public static const native int NSLocaleCountryCode();
-//  public static const native int NSLocaleCurrencyCode();
-//  public static const native int NSLocaleCurrencySymbol();
-//  public static const native int NSLocaleDecimalSeparator();
-//  public static const native int NSLocaleExemplarCharacterSet();
-//  public static const native int NSLocaleGroupingSeparator();
-//  public static const native int NSLocaleIdentifier();
-//  public static const native int NSLocaleLanguageCode();
-//  public static const native int NSLocaleMeasurementSystem();
-//  public static const native int NSLocaleScriptCode();
-//  public static const native int NSLocaleUsesMetricSystem();
-//  public static const native int NSLocaleVariantCode();
-//  public static const native int NSLocalizedDescriptionKey();
-//  public static const native int NSLocalizedFailureReasonErrorKey();
-//  public static const native int NSLocalizedRecoveryOptionsErrorKey();
-//  public static const native int NSLocalizedRecoverySuggestionErrorKey();
-//  public static const native int NSMachErrorDomain();
-//  public static const native int NSMallocException();
-//  public static const native int NSMaximumKeyValueOperator();
-//  public static const native int NSMetadataQueryDidFinishGatheringNotification();
-//  public static const native int NSMetadataQueryDidStartGatheringNotification();
-//  public static const native int NSMetadataQueryDidUpdateNotification();
-//  public static const native int NSMetadataQueryGatheringProgressNotification();
-//  public static const native int NSMetadataQueryLocalComputerScope();
-//  public static const native int NSMetadataQueryNetworkScope();
-//  public static const native int NSMetadataQueryResultContentRelevanceAttribute();
-//  public static const native int NSMetadataQueryUserHomeScope();
-//  public static const native int NSMinimumKeyValueOperator();
-//  public static const native int NSNegateBooleanTransformerName();
-//  public static const native int NSNetServicesErrorCode();
-//  public static const native int NSNetServicesErrorDomain();
-//  public static const native int NSNonOwnedPointerHashCallBacks();
-//  public static const native int NSNonOwnedPointerMapKeyCallBacks();
-//  public static const native int NSNonOwnedPointerMapValueCallBacks();
-//  public static const native int NSNonOwnedPointerOrNullMapKeyCallBacks();
-//  public static const native int NSNonRetainedObjectHashCallBacks();
-//  public static const native int NSNonRetainedObjectMapKeyCallBacks();
-//  public static const native int NSNonRetainedObjectMapValueCallBacks();
-//  public static const native int NSOSStatusErrorDomain();
-//  public static const native int NSObjectHashCallBacks();
-//  public static const native int NSObjectInaccessibleException();
-//  public static const native int NSObjectMapKeyCallBacks();
-//  public static const native int NSObjectMapValueCallBacks();
-//  public static const native int NSObjectNotAvailableException();
-//  public static const native int NSOldStyleException();
-//  public static const native int NSOperationNotSupportedForKeyException();
-//  public static const native int NSOwnedObjectIdentityHashCallBacks();
-//  public static const native int NSOwnedPointerHashCallBacks();
-//  public static const native int NSOwnedPointerMapKeyCallBacks();
-//  public static const native int NSOwnedPointerMapValueCallBacks();
-//  public static const native int NSPOSIXErrorDomain();
-//  public static const native int NSParseErrorException();
-//  public static const native int NSPointerToStructHashCallBacks();
-//  public static const native int NSPortDidBecomeInvalidNotification();
-//  public static const native int NSPortReceiveException();
-//  public static const native int NSPortSendException();
-//  public static const native int NSPortTimeoutException();
-//  public static const native int NSRangeException();
-//  public static const native int NSRecoveryAttempterErrorKey();
-//  public static const native int NSRegistrationDomain();
-//  public static const native int NSRunLoopCommonModes();
-//  public static const native int NSStreamDataWrittenToMemoryStreamKey();
-//  public static const native int NSStreamFileCurrentOffsetKey();
-//  public static const native int NSStreamSOCKSErrorDomain();
-//  public static const native int NSStreamSOCKSProxyConfigurationKey();
-//  public static const native int NSStreamSOCKSProxyHostKey();
-//  public static const native int NSStreamSOCKSProxyPasswordKey();
-//  public static const native int NSStreamSOCKSProxyPortKey();
-//  public static const native int NSStreamSOCKSProxyUserKey();
-//  public static const native int NSStreamSOCKSProxyVersion4();
-//  public static const native int NSStreamSOCKSProxyVersion5();
-//  public static const native int NSStreamSOCKSProxyVersionKey();
-//  public static const native int NSStreamSocketSSLErrorDomain();
-//  public static const native int NSStreamSocketSecurityLevelKey();
-//  public static const native int NSStreamSocketSecurityLevelNegotiatedSSL();
-//  public static const native int NSStreamSocketSecurityLevelNone();
-//  public static const native int NSStreamSocketSecurityLevelSSLv2();
-//  public static const native int NSStreamSocketSecurityLevelSSLv3();
-//  public static const native int NSStreamSocketSecurityLevelTLSv1();
-//  public static const native int NSStringEncodingErrorKey();
-//  public static const native int NSSumKeyValueOperator();
-//  public static const native int NSSystemTimeZoneDidChangeNotification();
-//  public static const native int NSTaskDidTerminateNotification();
-//  public static const native int NSThreadWillExitNotification();
-//  public static const native int NSURLAuthenticationMethodDefault();
-//  public static const native int NSURLAuthenticationMethodHTMLForm();
-//  public static const native int NSURLAuthenticationMethodHTTPBasic();
-//  public static const native int NSURLAuthenticationMethodHTTPDigest();
-//  public static const native int NSURLCredentialStorageChangedNotification();
-//  public static const native int NSURLErrorDomain();
-//  public static const native int NSURLErrorKey();
-//  public static const native int NSURLFileScheme();
-//  public static const native int NSURLProtectionSpaceFTPProxy();
-//  public static const native int NSURLProtectionSpaceHTTPProxy();
-//  public static const native int NSURLProtectionSpaceHTTPSProxy();
-//  public static const native int NSURLProtectionSpaceSOCKSProxy();
-//  public static const native int NSUnarchiveFromDataTransformerName();
-//  public static const native int NSUndefinedKeyException();
-//  public static const native int NSUnderlyingErrorKey();
-//  public static const native int NSUndoManagerCheckpointNotification();
-//  public static const native int NSUndoManagerDidOpenUndoGroupNotification();
-//  public static const native int NSUndoManagerDidRedoChangeNotification();
-//  public static const native int NSUndoManagerDidUndoChangeNotification();
-//  public static const native int NSUndoManagerWillCloseUndoGroupNotification();
-//  public static const native int NSUndoManagerWillRedoChangeNotification();
-//  public static const native int NSUndoManagerWillUndoChangeNotification();
-//  public static const native int NSUnionOfArraysKeyValueOperator();
-//  public static const native int NSUnionOfObjectsKeyValueOperator();
-//  public static const native int NSUnionOfSetsKeyValueOperator();
-//  public static const native int NSUserDefaultsDidChangeNotification();
-//  public static const native int NSWillBecomeMultiThreadedNotification();
-//  public static const native int NSXMLParserErrorDomain();
-//  public static const native int NSZeroPoint();
-//  public static const native int NSZeroRect();
-//  public static const native int NSZeroSize();
-//  public static const native int NSZombieEnabled();
-//  public static const native int DOMEventException();
-//  public static const native int DOMException();
-//  public static const native int DOMRangeException();
-//  public static const native int DOMXPathException();
-//  public static const native int WebActionButtonKey();
-//  public static const native int WebActionElementKey();
-//  public static const native int WebActionModifierFlagsKey();
-//  public static const native int WebActionNavigationTypeKey();
-//  public static const native int WebActionOriginalURLKey();
-//  public static const native int WebArchivePboardType();
-//  public static const native int WebElementDOMNodeKey();
-//  public static const native int WebElementFrameKey();
-//  public static const native int WebElementImageAltStringKey();
-//  public static const native int WebElementImageKey();
-//  public static const native int WebElementImageRectKey();
-//  public static const native int WebElementImageURLKey();
-//  public static const native int WebElementIsSelectedKey();
-//  public static const native int WebElementLinkLabelKey();
-//  public static const native int WebElementLinkTargetFrameKey();
-//  public static const native int WebElementLinkTitleKey();
-//  public static const native int WebElementLinkURLKey();
-//  public static const native int WebHistoryAllItemsRemovedNotification();
-//  public static const native int WebHistoryItemChangedNotification();
-//  public static const native int WebHistoryItemsAddedNotification();
-//  public static const native int WebHistoryItemsKey();
-//  public static const native int WebHistoryItemsRemovedNotification();
-//  public static const native int WebHistoryLoadedNotification();
-//  public static const native int WebHistorySavedNotification();
-//  public static const native int WebKitErrorDomain();
-//  public static const native int WebKitErrorMIMETypeKey();
-//  public static const native int WebKitErrorPlugInNameKey();
-//  public static const native int WebKitErrorPlugInPageURLStringKey();
-//  public static const native int WebPlugInAttributesKey();
-//  public static const native int WebPlugInBaseURLKey();
-//  public static const native int WebPlugInContainerKey();
-//  public static const native int WebPlugInContainingElementKey();
-//  public static const native int WebPreferencesChangedNotification();
-//  public static const native int WebViewDidBeginEditingNotification();
-//  public static const native int WebViewDidChangeNotification();
-//  public static const native int WebViewDidChangeSelectionNotification();
-//  public static const native int WebViewDidChangeTypingStyleNotification();
-//  public static const native int WebViewDidEndEditingNotification();
-//  public static const native int WebViewProgressEstimateChangedNotification();
-//  public static const native int WebViewProgressFinishedNotification();
-//  public static const native int WebViewProgressStartedNotification();
+/** This section is auto generated */
+
+/** Classes */
+public static const objc.id class_DOMDocument;
+public static const objc.id class_DOMEvent;
+public static const objc.id class_DOMKeyboardEvent;
+public static const objc.id class_DOMMouseEvent;
+public static const objc.id class_DOMUIEvent;
+public static const objc.id class_DOMWheelEvent;
+public static const objc.id class_NSActionCell;
+public static const objc.id class_NSAffineTransform;
+public static const objc.id class_NSAlert;
+public static const objc.id class_NSAppleEventDescriptor;
+public static const objc.id class_NSApplication;
+public static const objc.id class_NSArray;
+public static const objc.id class_NSAttributedString;
+public static const objc.id class_NSAutoreleasePool;
+public static const objc.id class_NSBezierPath;
+public static const objc.id class_NSBitmapImageRep;
+public static const objc.id class_NSBox;
+public static const objc.id class_NSBrowserCell;
+public static const objc.id class_NSBundle;
+public static const objc.id class_NSButton;
+public static const objc.id class_NSButtonCell;
+public static const objc.id class_NSCalendarDate;
+public static const objc.id class_NSCell;
+public static const objc.id class_NSCharacterSet;
+public static const objc.id class_NSClipView;
+public static const objc.id class_NSCoder;
+public static const objc.id class_NSColor;
+public static const objc.id class_NSColorPanel;
+public static const objc.id class_NSColorSpace;
+public static const objc.id class_NSComboBox;
+public static const objc.id class_NSControl;
+public static const objc.id class_NSCursor;
+public static const objc.id class_NSData;
+public static const objc.id class_NSDate;
+public static const objc.id class_NSDatePicker;
+public static const objc.id class_NSDictionary;
+public static const objc.id class_NSDirectoryEnumerator;
+public static const objc.id class_NSEnumerator;
+public static const objc.id class_NSError;
+public static const objc.id class_NSEvent;
+public static const objc.id class_NSFileManager;
+public static const objc.id class_NSFont;
+public static const objc.id class_NSFontManager;
+public static const objc.id class_NSFontPanel;
+public static const objc.id class_NSFormatter;
+public static const objc.id class_NSGradient;
+public static const objc.id class_NSGraphicsContext;
+public static const objc.id class_NSHTTPCookie;
+public static const objc.id class_NSHTTPCookieStorage;
+public static const objc.id class_NSImage;
+public static const objc.id class_NSImageRep;
+public static const objc.id class_NSImageView;
+public static const objc.id class_NSIndexSet;
+public static const objc.id class_NSInputManager;
+public static const objc.id class_NSKeyedArchiver;
+public static const objc.id class_NSKeyedUnarchiver;
+public static const objc.id class_NSLayoutManager;
+public static const objc.id class_NSMenu;
+public static const objc.id class_NSMenuItem;
+public static const objc.id class_NSMutableArray;
+public static const objc.id class_NSMutableAttributedString;
+public static const objc.id class_NSMutableDictionary;
+public static const objc.id class_NSMutableIndexSet;
+public static const objc.id class_NSMutableParagraphStyle;
+public static const objc.id class_NSMutableSet;
+public static const objc.id class_NSMutableString;
+public static const objc.id class_NSMutableURLRequest;
+public static const objc.id class_NSNotification;
+public static const objc.id class_NSNotificationCenter;
+public static const objc.id class_NSNumber;
+public static const objc.id class_NSNumberFormatter;
+public static const objc.id class_NSObject;
+public static const objc.id class_NSOpenGLContext;
+public static const objc.id class_NSOpenGLPixelFormat;
+public static const objc.id class_NSOpenGLView;
+public static const objc.id class_NSOpenPanel;
+public static const objc.id class_NSOutlineView;
+public static const objc.id class_NSPanel;
+public static const objc.id class_NSParagraphStyle;
+public static const objc.id class_NSPasteboard;
+public static const objc.id class_NSPopUpButton;
+public static const objc.id class_NSPrintInfo;
+public static const objc.id class_NSPrintOperation;
+public static const objc.id class_NSPrintPanel;
+public static const objc.id class_NSPrinter;
+public static const objc.id class_NSProgressIndicator;
+public static const objc.id class_NSResponder;
+public static const objc.id class_NSRunLoop;
+public static const objc.id class_NSSavePanel;
+public static const objc.id class_NSScreen;
+public static const objc.id class_NSScrollView;
+public static const objc.id class_NSScroller;
+public static const objc.id class_NSSearchField;
+public static const objc.id class_NSSecureTextField;
+public static const objc.id class_NSSet;
+public static const objc.id class_NSSlider;
+public static const objc.id class_NSStatusBar;
+public static const objc.id class_NSStatusItem;
+public static const objc.id class_NSStepper;
+public static const objc.id class_NSString;
+public static const objc.id class_NSTabView;
+public static const objc.id class_NSTabViewItem;
+public static const objc.id class_NSTableColumn;
+public static const objc.id class_NSTableHeaderCell;
+public static const objc.id class_NSTableHeaderView;
+public static const objc.id class_NSTableView;
+public static const objc.id class_NSText;
+public static const objc.id class_NSTextContainer;
+public static const objc.id class_NSTextField;
+public static const objc.id class_NSTextFieldCell;
+public static const objc.id class_NSTextStorage;
+public static const objc.id class_NSTextTab;
+public static const objc.id class_NSTextView;
+public static const objc.id class_NSThread;
+public static const objc.id class_NSTimeZone;
+public static const objc.id class_NSTimer;
+public static const objc.id class_NSTypesetter;
+public static const objc.id class_NSURL;
+public static const objc.id class_NSURLDownload;
+public static const objc.id class_NSURLRequest;
+public static const objc.id class_NSValue;
+public static const objc.id class_NSView;
+public static const objc.id class_NSWindow;
+public static const objc.id class_NSWorkspace;
+public static const objc.id class_WebDataSource;
+public static const objc.id class_WebFrame;
+public static const objc.id class_WebFrameView;
+public static const objc.id class_WebPreferences;
+public static const objc.id class_WebView;
+
+/** Protocols */
+public static const objc.Protocol* protocol_NSAccessibility;
+public static const objc.Protocol* protocol_NSAccessibilityAdditions;
+public static const objc.Protocol* protocol_NSApplicationDelegate;
+public static const objc.Protocol* protocol_NSApplicationNotifications;
+public static const objc.Protocol* protocol_NSColorPanelResponderMethod;
+public static const objc.Protocol* protocol_NSComboBoxNotifications;
+public static const objc.Protocol* protocol_NSDraggingDestination;
+public static const objc.Protocol* protocol_NSDraggingSource;
+public static const objc.Protocol* protocol_NSFontManagerResponderMethod;
+public static const objc.Protocol* protocol_NSMenuDelegate;
+public static const objc.Protocol* protocol_NSOutlineViewDataSource;
+public static const objc.Protocol* protocol_NSOutlineViewDelegate;
+public static const objc.Protocol* protocol_NSOutlineViewNotifications;
+public static const objc.Protocol* protocol_NSPasteboardOwner;
+public static const objc.Protocol* protocol_NSTabViewDelegate;
+public static const objc.Protocol* protocol_NSTableDataSource;
+public static const objc.Protocol* protocol_NSTableViewDelegate;
+public static const objc.Protocol* protocol_NSTableViewNotifications;
+public static const objc.Protocol* protocol_NSTextDelegate;
+public static const objc.Protocol* protocol_NSTextInput;
+public static const objc.Protocol* protocol_NSTextViewDelegate;
+public static const objc.Protocol* protocol_NSURLDownloadDelegate;
+public static const objc.Protocol* protocol_NSWindowDelegate;
+public static const objc.Protocol* protocol_NSWindowNotifications;
+public static const objc.Protocol* protocol_WebDocumentRepresentation;
+public static const objc.Protocol* protocol_WebFrameLoadDelegate;
+public static const objc.Protocol* protocol_WebOpenPanelResultListener;
+public static const objc.Protocol* protocol_WebPolicyDecisionListener;
+public static const objc.Protocol* protocol_WebPolicyDelegate;
+public static const objc.Protocol* protocol_WebResourceLoadDelegate;
+public static const objc.Protocol* protocol_WebUIDelegate;
+
+/** Selectors */
+public static const objc.SEL sel_DOMDocument;
+public static const objc.SEL sel_IBeamCursor;
+public static const objc.SEL sel_TIFFRepresentation;
+public static const objc.SEL sel_URL;
+public static const objc.SEL sel_URLFromPasteboard_;
+public static const objc.SEL sel_URLWithString_;
+public static const objc.SEL sel_UTF8String;
+public static const objc.SEL sel_absoluteString;
+public static const objc.SEL sel_acceptsFirstResponder;
+public static const objc.SEL sel_accessibilityActionDescription_;
+public static const objc.SEL sel_accessibilityActionNames;
+public static const objc.SEL sel_accessibilityAttributeNames;
+public static const objc.SEL sel_accessibilityAttributeValue_;
+public static const objc.SEL sel_accessibilityAttributeValue_forParameter_;
+public static const objc.SEL sel_accessibilityFocusedUIElement;
+public static const objc.SEL sel_accessibilityHitTest_;
+public static const objc.SEL sel_accessibilityIsAttributeSettable_;
+public static const objc.SEL sel_accessibilityIsIgnored;
+public static const objc.SEL sel_accessibilityParameterizedAttributeNames;
+public static const objc.SEL sel_accessibilityPerformAction_;
+public static const objc.SEL sel_accessibilitySetOverrideValue_forAttribute_;
+public static const objc.SEL sel_accessibilitySetValue_forAttribute_;
+public static const objc.SEL sel_action;
+public static const objc.SEL sel_activateIgnoringOtherApps_;
+public static const objc.SEL sel_addAttribute_value_range_;
+public static const objc.SEL sel_addClip;
+public static const objc.SEL sel_addEventListener_listener_useCapture_;
+public static const objc.SEL sel_addIndex_;
+public static const objc.SEL sel_addItem_;
+public static const objc.SEL sel_addItemWithObjectValue_;
+public static const objc.SEL sel_addLayoutManager_;
+public static const objc.SEL sel_addObject_;
+public static const objc.SEL sel_addObjectsFromArray_;
+public static const objc.SEL sel_addObserver_selector_name_object_;
+public static const objc.SEL sel_addRepresentation_;
+public static const objc.SEL sel_addSubview_;
+public static const objc.SEL sel_addSubview_positioned_relativeTo_;
+public static const objc.SEL sel_addTabStop_;
+public static const objc.SEL sel_addTabViewItem_;
+public static const objc.SEL sel_addTableColumn_;
+public static const objc.SEL sel_addTemporaryAttribute_value_forCharacterRange_;
+public static const objc.SEL sel_addTextContainer_;
+public static const objc.SEL sel_addTypes_owner_;
+public static const objc.SEL sel_alertWithMessageText_defaultButton_alternateButton_otherButton_informativeTextWithFormat_;
+public static const objc.SEL sel_alignment;
+public static const objc.SEL sel_allKeys;
+public static const objc.SEL sel_alloc;
+public static const objc.SEL sel_allowsFloats;
+public static const objc.SEL sel_alphaComponent;
+public static const objc.SEL sel_alphaValue;
+public static const objc.SEL sel_altKey;
+public static const objc.SEL sel_alternateSelectedControlTextColor;
+public static const objc.SEL sel_alwaysShowsDecimalSeparator;
+public static const objc.SEL sel_appendBezierPath_;
+public static const objc.SEL sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_;
+public static const objc.SEL sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_;
+public static const objc.SEL sel_appendBezierPathWithGlyphs_count_inFont_;
+public static const objc.SEL sel_appendBezierPathWithOvalInRect_;
+public static const objc.SEL sel_appendBezierPathWithRect_;
+public static const objc.SEL sel_appendBezierPathWithRoundedRect_xRadius_yRadius_;
+public static const objc.SEL sel_appendString_;
+public static const objc.SEL sel_applicationShouldTerminate_;
+public static const objc.SEL sel_applicationWillFinishLaunching_;
+public static const objc.SEL sel_applicationWillResignActive_;
+public static const objc.SEL sel_applicationWillTerminate_;
+public static const objc.SEL sel_archivedDataWithRootObject_;
+public static const objc.SEL sel_array;
+public static const objc.SEL sel_arrayWithCapacity_;
+public static const objc.SEL sel_arrayWithObject_;
+public static const objc.SEL sel_arrowCursor;
+public static const objc.SEL sel_ascender;
+public static const objc.SEL sel_attributedSubstringFromRange_;
+public static const objc.SEL sel_attributesAtIndex_longestEffectiveRange_inRange_;
+public static const objc.SEL sel_autorelease;
+public static const objc.SEL sel_availableFontFamilies;
+public static const objc.SEL sel_availableFonts;
+public static const objc.SEL sel_availableMembersOfFontFamily_;
+public static const objc.SEL sel_availableTypeFromArray_;
+public static const objc.SEL sel_baselineOffsetInLayoutManager_glyphIndex_;
+public static const objc.SEL sel_becomeFirstResponder;
+public static const objc.SEL sel_beginDocument;
+public static const objc.SEL sel_beginEditing;
+public static const objc.SEL sel_beginPageInRect_atPlacement_;
+public static const objc.SEL sel_bestRepresentationForDevice_;
+public static const objc.SEL sel_bezierPath;
+public static const objc.SEL sel_bezierPathByFlatteningPath;
+public static const objc.SEL sel_bezierPathWithRect_;
+public static const objc.SEL sel_bitmapData;
+public static const objc.SEL sel_bitsPerPixel;
+public static const objc.SEL sel_bitsPerSample;
+public static const objc.SEL sel_blackColor;
+public static const objc.SEL sel_blueComponent;
+public static const objc.SEL sel_borderWidth;
+public static const objc.SEL sel_boundingRectForGlyphRange_inTextContainer_;
+public static const objc.SEL sel_bounds;
+public static const objc.SEL sel_bundleIdentifier;
+public static const objc.SEL sel_bundlePath;
+public static const objc.SEL sel_bundleWithPath_;
+public static const objc.SEL sel_button;
+public static const objc.SEL sel_buttonNumber;
+public static const objc.SEL sel_bytes;
+public static const objc.SEL sel_bytesPerPlane;
+public static const objc.SEL sel_bytesPerRow;
+public static const objc.SEL sel_calendarDate;
+public static const objc.SEL sel_canBecomeKeyWindow;
+public static const objc.SEL sel_canGoBack;
+public static const objc.SEL sel_canGoForward;
+public static const objc.SEL sel_canShowMIMEType_;
+public static const objc.SEL sel_cancel;
+public static const objc.SEL sel_cancelTracking;
+public static const objc.SEL sel_cascadeTopLeftFromPoint_;
+public static const objc.SEL sel_cell;
+public static const objc.SEL sel_cellClass;
+public static const objc.SEL sel_cellSizeForBounds_;
+public static const objc.SEL sel_changeColor_;
+public static const objc.SEL sel_changeFont_;
+public static const objc.SEL sel_charCode;
+public static const objc.SEL sel_characterAtIndex_;
+public static const objc.SEL sel_characterIndexForGlyphAtIndex_;
+public static const objc.SEL sel_characterIndexForPoint_;
+public static const objc.SEL sel_characterIsMember_;
+public static const objc.SEL sel_characters;
+public static const objc.SEL sel_charactersIgnoringModifiers;
+public static const objc.SEL sel_chooseFilename_;
+public static const objc.SEL sel_className;
+public static const objc.SEL sel_cleanUpOperation;
+public static const objc.SEL sel_clearColor;
+public static const objc.SEL sel_clearCurrentContext;
+public static const objc.SEL sel_clearGLContext;
+public static const objc.SEL sel_clickCount;
+public static const objc.SEL sel_clientX;
+public static const objc.SEL sel_clientY;
+public static const objc.SEL sel_close;
+public static const objc.SEL sel_closePath;
+public static const objc.SEL sel_code;
+public static const objc.SEL sel_collapseItem_;
+public static const objc.SEL sel_color;
+public static const objc.SEL sel_colorUsingColorSpace_;
+public static const objc.SEL sel_colorUsingColorSpaceName_;
+public static const objc.SEL sel_colorWithDeviceRed_green_blue_alpha_;
+public static const objc.SEL sel_colorWithPatternImage_;
+public static const objc.SEL sel_columnAtPoint_;
+public static const objc.SEL sel_columnAutoresizingStyle;
+public static const objc.SEL sel_columnIndexesInRect_;
+public static const objc.SEL sel_columnWithIdentifier_;
+public static const objc.SEL sel_comboBoxSelectionDidChange_;
+public static const objc.SEL sel_concat;
+public static const objc.SEL sel_conformsToProtocol_;
+public static const objc.SEL sel_containerSize;
+public static const objc.SEL sel_containsObject_;
+public static const objc.SEL sel_containsPoint_;
+public static const objc.SEL sel_contentRect;
+public static const objc.SEL sel_contentRectForFrameRect_;
+public static const objc.SEL sel_contentSize;
+public static const objc.SEL sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_;
+public static const objc.SEL sel_contentView;
+public static const objc.SEL sel_contentViewMargins;
+public static const objc.SEL sel_context;
+public static const objc.SEL sel_controlDarkShadowColor;
+public static const objc.SEL sel_controlHighlightColor;
+public static const objc.SEL sel_controlLightHighlightColor;
+public static const objc.SEL sel_controlPointBounds;
+public static const objc.SEL sel_controlShadowColor;
+public static const objc.SEL sel_controlTextColor;
+public static const objc.SEL sel_convertBaseToScreen_;
+public static const objc.SEL sel_convertPoint_fromView_;
+public static const objc.SEL sel_convertPoint_toView_;
+public static const objc.SEL sel_convertPointFromBase_;
+public static const objc.SEL sel_convertPointToBase_;
+public static const objc.SEL sel_convertRect_fromView_;
+public static const objc.SEL sel_convertRect_toView_;
+public static const objc.SEL sel_convertRectFromBase_;
+public static const objc.SEL sel_convertRectToBase_;
+public static const objc.SEL sel_convertScreenToBase_;
+public static const objc.SEL sel_convertSize_fromView_;
+public static const objc.SEL sel_convertSize_toView_;
+public static const objc.SEL sel_convertSizeFromBase_;
+public static const objc.SEL sel_convertSizeToBase_;
+public static const objc.SEL sel_cookies;
+public static const objc.SEL sel_copy;
+public static const objc.SEL sel_copy_;
+public static const objc.SEL sel_count;
+public static const objc.SEL sel_createContext;
+public static const objc.SEL sel_createFileAtPath_contents_attributes_;
+public static const objc.SEL sel_crosshairCursor;
+public static const objc.SEL sel_ctrlKey;
+public static const objc.SEL sel_currentContext;
+public static const objc.SEL sel_currentEditor;
+public static const objc.SEL sel_currentEvent;
+public static const objc.SEL sel_currentInputManager;
+public static const objc.SEL sel_currentPoint;
+public static const objc.SEL sel_currentRunLoop;
+public static const objc.SEL sel_currentThread;
+public static const objc.SEL sel_curveToPoint_controlPoint1_controlPoint2_;
+public static const objc.SEL sel_cut_;
+public static const objc.SEL sel_dataForType_;
+public static const objc.SEL sel_dataSource;
+public static const objc.SEL sel_dataWithBytes_length_;
+public static const objc.SEL sel_dateValue;
+public static const objc.SEL sel_dateWithCalendarFormat_timeZone_;
+public static const objc.SEL sel_dateWithTimeIntervalSinceNow_;
+public static const objc.SEL sel_dateWithYear_month_day_hour_minute_second_timeZone_;
+public static const objc.SEL sel_dayOfMonth;
+public static const objc.SEL sel_decimalDigitCharacterSet;
+public static const objc.SEL sel_decimalSeparator;
+public static const objc.SEL sel_declareTypes_owner_;
+public static const objc.SEL sel_defaultCenter;
+public static const objc.SEL sel_defaultFlatness;
+public static const objc.SEL sel_defaultLineHeightForFont_;
+public static const objc.SEL sel_defaultManager;
+public static const objc.SEL sel_defaultPrinter;
+public static const objc.SEL sel_defaultTimeZone;
+public static const objc.SEL sel_deleteCookie_;
+public static const objc.SEL sel_deliverResult;
+public static const objc.SEL sel_deltaX;
+public static const objc.SEL sel_deltaY;
+public static const objc.SEL sel_depth;
+public static const objc.SEL sel_descender;
+public static const objc.SEL sel_description;
+public static const objc.SEL sel_deselectAll_;
+public static const objc.SEL sel_deselectItemAtIndex_;
+public static const objc.SEL sel_deselectRow_;
+public static const objc.SEL sel_destroyContext;
+public static const objc.SEL sel_detail;
+public static const objc.SEL sel_deviceDescription;
+public static const objc.SEL sel_deviceRGBColorSpace;
+public static const objc.SEL sel_dictionary;
+public static const objc.SEL sel_dictionaryWithCapacity_;
+public static const objc.SEL sel_dictionaryWithObject_forKey_;
+public static const objc.SEL sel_disableCursorRects;
+public static const objc.SEL sel_disabledControlTextColor;
+public static const objc.SEL sel_displayIfNeeded;
+public static const objc.SEL sel_distantFuture;
+public static const objc.SEL sel_doCommandBySelector_;
+public static const objc.SEL sel_documentSource;
+public static const objc.SEL sel_documentView;
+public static const objc.SEL sel_documentViewShouldHandlePrint;
+public static const objc.SEL sel_documentVisibleRect;
+public static const objc.SEL sel_doubleClickAtIndex_;
+public static const objc.SEL sel_doubleValue;
+public static const objc.SEL sel_download;
+public static const objc.SEL sel_download_decideDestinationWithSuggestedFilename_;
+public static const objc.SEL sel_dragImage_at_offset_event_pasteboard_source_slideBack_;
+public static const objc.SEL sel_draggedImage;
+public static const objc.SEL sel_draggedImage_beganAt_;
+public static const objc.SEL sel_draggedImage_endedAt_operation_;
+public static const objc.SEL sel_draggedImageLocation;
+public static const objc.SEL sel_draggingDestinationWindow;
+public static const objc.SEL sel_draggingEnded_;
+public static const objc.SEL sel_draggingEntered_;
+public static const objc.SEL sel_draggingExited_;
+public static const objc.SEL sel_draggingLocation;
+public static const objc.SEL sel_draggingPasteboard;
+public static const objc.SEL sel_draggingSequenceNumber;
+public static const objc.SEL sel_draggingSource;
+public static const objc.SEL sel_draggingSourceOperationMask;
+public static const objc.SEL sel_draggingSourceOperationMaskForLocal_;
+public static const objc.SEL sel_draggingUpdated_;
+public static const objc.SEL sel_drawAtPoint_;
+public static const objc.SEL sel_drawAtPoint_fromRect_operation_fraction_;
+public static const objc.SEL sel_drawBackgroundForGlyphRange_atPoint_;
+public static const objc.SEL sel_drawFromPoint_toPoint_options_;
+public static const objc.SEL sel_drawGlyphsForGlyphRange_atPoint_;
+public static const objc.SEL sel_drawInRect_;
+public static const objc.SEL sel_drawInRect_angle_;
+public static const objc.SEL sel_drawInRect_fromRect_operation_fraction_;
+public static const objc.SEL sel_drawInteriorWithFrame_inView_;
+public static const objc.SEL sel_drawRect_;
+public static const objc.SEL sel_drawSortIndicatorWithFrame_inView_ascending_priority_;
+public static const objc.SEL sel_drawStatusBarBackgroundInRect_withHighlight_;
+public static const objc.SEL sel_drawingRectForBounds_;
+public static const objc.SEL sel_elementAtIndex_associatedPoints_;
+public static const objc.SEL sel_elementCount;
+public static const objc.SEL sel_enableFreedObjectCheck_;
+public static const objc.SEL sel_endDocument;
+public static const objc.SEL sel_endEditing;
+public static const objc.SEL sel_endPage;
+public static const objc.SEL sel_enumeratorAtPath_;
+public static const objc.SEL sel_expandItem_;
+public static const objc.SEL sel_familyName;
+public static const objc.SEL sel_fieldEditor_forObject_;
+public static const objc.SEL sel_fileURLWithPath_;
+public static const objc.SEL sel_filename;
+public static const objc.SEL sel_filenames;
+public static const objc.SEL sel_fill;
+public static const objc.SEL sel_fillRect_;
+public static const objc.SEL sel_finishLaunching;
+public static const objc.SEL sel_firstIndex;
+public static const objc.SEL sel_firstRectForCharacterRange_;
+public static const objc.SEL sel_firstResponder;
+public static const objc.SEL sel_flagsChanged_;
+public static const objc.SEL sel_flushBuffer;
+public static const objc.SEL sel_flushGraphics;
+public static const objc.SEL sel_font;
+public static const objc.SEL sel_fontName;
+public static const objc.SEL sel_fontWithName_size_;
+public static const objc.SEL sel_frame;
+public static const objc.SEL sel_frameOfCellAtColumn_row_;
+public static const objc.SEL sel_frameRectForContentRect_;
+public static const objc.SEL sel_frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType_;
+public static const objc.SEL sel_fullPathForApplication_;
+public static const objc.SEL sel_generalPasteboard;
+public static const objc.SEL sel_getBytes_;
+public static const objc.SEL sel_getBytes_length_;
+public static const objc.SEL sel_getCharacters_;
+public static const objc.SEL sel_getCharacters_range_;
+public static const objc.SEL sel_getComponents_;
+public static const objc.SEL sel_getGlyphs_range_;
+public static const objc.SEL sel_getIndexes_maxCount_inIndexRange_;
+public static const objc.SEL sel_getInfoForFile_application_type_;
+public static const objc.SEL sel_glyphIndexForCharacterAtIndex_;
+public static const objc.SEL sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_;
+public static const objc.SEL sel_glyphRangeForTextContainer_;
+public static const objc.SEL sel_goBack;
+public static const objc.SEL sel_goForward;
+public static const objc.SEL sel_graphicsContext;
+public static const objc.SEL sel_graphicsContextWithBitmapImageRep_;
+public static const objc.SEL sel_graphicsContextWithWindow_;
+public static const objc.SEL sel_greenComponent;
+public static const objc.SEL sel_handleEvent_;
+public static const objc.SEL sel_handleMouseEvent_;
+public static const objc.SEL sel_hasAlpha;
+public static const objc.SEL sel_hasMarkedText;
+public static const objc.SEL sel_headerCell;
+public static const objc.SEL sel_headerRectOfColumn_;
+public static const objc.SEL sel_headerView;
+public static const objc.SEL sel_helpRequested_;
+public static const objc.SEL sel_hide_;
+public static const objc.SEL sel_hideOtherApplications_;
+public static const objc.SEL sel_highlightColorInView_;
+public static const objc.SEL sel_highlightSelectionInClipRect_;
+public static const objc.SEL sel_hitPart;
+public static const objc.SEL sel_hitTest_;
+public static const objc.SEL sel_hourOfDay;
+public static const objc.SEL sel_iconForFile_;
+public static const objc.SEL sel_iconForFileType_;
+public static const objc.SEL sel_ignore;
+public static const objc.SEL sel_ignoreModifierKeysWhileDragging;
+public static const objc.SEL sel_imageInterpolation;
+public static const objc.SEL sel_imageablePageBounds;
+public static const objc.SEL sel_increment;
+public static const objc.SEL sel_indentationPerLevel;
+public static const objc.SEL sel_indexOfSelectedItem;
+public static const objc.SEL sel_infoDictionary;
+public static const objc.SEL sel_init;
+public static const objc.SEL sel_initByReferencingFile_;
+public static const objc.SEL sel_initListDescriptor;
+public static const objc.SEL sel_initWithAttributes_;
+public static const objc.SEL sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_;
+public static const objc.SEL sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_;
+public static const objc.SEL sel_initWithContainerSize_;
+public static const objc.SEL sel_initWithContentRect_styleMask_backing_defer_;
+public static const objc.SEL sel_initWithContentRect_styleMask_backing_defer_screen_;
+public static const objc.SEL sel_initWithData_;
+public static const objc.SEL sel_initWithDictionary_;
+public static const objc.SEL sel_initWithFrame_;
+public static const objc.SEL sel_initWithFrame_frameName_groupName_;
+public static const objc.SEL sel_initWithFrame_pixelFormat_;
+public static const objc.SEL sel_initWithFrame_pullsDown_;
+public static const objc.SEL sel_initWithIdentifier_;
+public static const objc.SEL sel_initWithImage_hotSpot_;
+public static const objc.SEL sel_initWithIndex_;
+public static const objc.SEL sel_initWithIndexesInRange_;
+public static const objc.SEL sel_initWithSize_;
+public static const objc.SEL sel_initWithStartingColor_endingColor_;
+public static const objc.SEL sel_initWithString_;
+public static const objc.SEL sel_initWithString_attributes_;
+public static const objc.SEL sel_initWithTitle_;
+public static const objc.SEL sel_initWithTitle_action_keyEquivalent_;
+public static const objc.SEL sel_initWithTransform_;
+public static const objc.SEL sel_initWithType_location_;
+public static const objc.SEL sel_initWithURL_;
+public static const objc.SEL sel_insertItem_atIndex_;
+public static const objc.SEL sel_insertItemWithObjectValue_atIndex_;
+public static const objc.SEL sel_insertTabViewItem_atIndex_;
+public static const objc.SEL sel_insertText_;
+public static const objc.SEL sel_intValue;
+public static const objc.SEL sel_intercellSpacing;
+public static const objc.SEL sel_interpretKeyEvents_;
+public static const objc.SEL sel_invalidate;
+public static const objc.SEL sel_invert;
+public static const objc.SEL sel_isEmpty;
+public static const objc.SEL sel_isEqual_;
+public static const objc.SEL sel_isEqualTo_;
+public static const objc.SEL sel_isEqualToString_;
+public static const objc.SEL sel_isFilePackageAtPath_;
+public static const objc.SEL sel_isFlipped;
+public static const objc.SEL sel_isHidden;
+public static const objc.SEL sel_isKeyWindow;
+public static const objc.SEL sel_isKindOfClass_;
+public static const objc.SEL sel_isMainThread;
+public static const objc.SEL sel_isOpaque;
+public static const objc.SEL sel_isPlanar;
+public static const objc.SEL sel_isRowSelected_;
+public static const objc.SEL sel_isRunning;
+public static const objc.SEL sel_isSessionOnly;
+public static const objc.SEL sel_isVisible;
+public static const objc.SEL sel_itemArray;
+public static const objc.SEL sel_itemAtIndex_;
+public static const objc.SEL sel_itemAtRow_;
+public static const objc.SEL sel_itemObjectValueAtIndex_;
+public static const objc.SEL sel_itemTitleAtIndex_;
+public static const objc.SEL sel_jobDisposition;
+public static const objc.SEL sel_keyCode;
+public static const objc.SEL sel_keyDown_;
+public static const objc.SEL sel_keyEquivalent;
+public static const objc.SEL sel_keyEquivalentModifierMask;
+public static const objc.SEL sel_keyUp_;
+public static const objc.SEL sel_keyWindow;
+public static const objc.SEL sel_lastPathComponent;
+public static const objc.SEL sel_leading;
+public static const objc.SEL sel_length;
+public static const objc.SEL sel_levelForItem_;
+public static const objc.SEL sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_;
+public static const objc.SEL sel_lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_;
+public static const objc.SEL sel_lineToPoint_;
+public static const objc.SEL sel_loadHTMLString_baseURL_;
+public static const objc.SEL sel_loadNibFile_externalNameTable_withZone_;
+public static const objc.SEL sel_loadRequest_;
+public static const objc.SEL sel_localizedDescription;
+public static const objc.SEL sel_location;
+public static const objc.SEL sel_locationForGlyphAtIndex_;
+public static const objc.SEL sel_locationInWindow;
+public static const objc.SEL sel_lowercaseString;
+public static const objc.SEL sel_mainFrame;
+public static const objc.SEL sel_mainMenu;
+public static const objc.SEL sel_mainRunLoop;
+public static const objc.SEL sel_mainScreen;
+public static const objc.SEL sel_makeCurrentContext;
+public static const objc.SEL sel_makeFirstResponder_;
+public static const objc.SEL sel_makeKeyAndOrderFront_;
+public static const objc.SEL sel_markedRange;
+public static const objc.SEL sel_markedTextAttributes;
+public static const objc.SEL sel_maxValue;
+public static const objc.SEL sel_maximum;
+public static const objc.SEL sel_maximumFractionDigits;
+public static const objc.SEL sel_maximumIntegerDigits;
+public static const objc.SEL sel_menu;
+public static const objc.SEL sel_menu_willHighlightItem_;
+public static const objc.SEL sel_menuDidClose_;
+public static const objc.SEL sel_menuForEvent_;
+public static const objc.SEL sel_menuNeedsUpdate_;
+public static const objc.SEL sel_menuWillOpen_;
+public static const objc.SEL sel_metaKey;
+public static const objc.SEL sel_minValue;
+public static const objc.SEL sel_minimum;
+public static const objc.SEL sel_minimumSize;
+public static const objc.SEL sel_minuteOfHour;
+public static const objc.SEL sel_modifierFlags;
+public static const objc.SEL sel_monthOfYear;
+public static const objc.SEL sel_mouseDown_;
+public static const objc.SEL sel_mouseDragged_;
+public static const objc.SEL sel_mouseEntered_;
+public static const objc.SEL sel_mouseExited_;
+public static const objc.SEL sel_mouseLocation;
+public static const objc.SEL sel_mouseLocationOutsideOfEventStream;
+public static const objc.SEL sel_mouseMoved_;
+public static const objc.SEL sel_mouseUp_;
+public static const objc.SEL sel_moveColumn_toColumn_;
+public static const objc.SEL sel_moveToBeginningOfParagraph_;
+public static const objc.SEL sel_moveToEndOfParagraph_;
+public static const objc.SEL sel_moveToPoint_;
+public static const objc.SEL sel_moveUp_;
+public static const objc.SEL sel_mutableString;
+public static const objc.SEL sel_name;
+public static const objc.SEL sel_namesOfPromisedFilesDroppedAtDestination_;
+public static const objc.SEL sel_nextEventMatchingMask_untilDate_inMode_dequeue_;
+public static const objc.SEL sel_nextObject;
+public static const objc.SEL sel_nextWordFromIndex_forward_;
+public static const objc.SEL sel_noteNumberOfRowsChanged;
+public static const objc.SEL sel_numberOfColumns;
+public static const objc.SEL sel_numberOfComponents;
+public static const objc.SEL sel_numberOfGlyphs;
+public static const objc.SEL sel_numberOfItems;
+public static const objc.SEL sel_numberOfRows;
+public static const objc.SEL sel_numberOfRowsInTableView_;
+public static const objc.SEL sel_numberOfSelectedRows;
+public static const objc.SEL sel_numberOfVisibleItems;
+public static const objc.SEL sel_numberWithBool_;
+public static const objc.SEL sel_numberWithInt_;
+public static const objc.SEL sel_numberWithInteger_;
+public static const objc.SEL sel_object;
+public static const objc.SEL sel_objectAtIndex_;
+public static const objc.SEL sel_objectEnumerator;
+public static const objc.SEL sel_objectForInfoDictionaryKey_;
+public static const objc.SEL sel_objectForKey_;
+public static const objc.SEL sel_openFile_withApplication_;
+public static const objc.SEL sel_openGLContext;
+public static const objc.SEL sel_openPanel;
+public static const objc.SEL sel_openURL_;
+public static const objc.SEL sel_openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers_;
+public static const objc.SEL sel_options;
+public static const objc.SEL sel_orderFront_;
+public static const objc.SEL sel_orderFrontRegardless;
+public static const objc.SEL sel_orderFrontStandardAboutPanel_;
+public static const objc.SEL sel_orderOut_;
+public static const objc.SEL sel_orderedWindows;
+public static const objc.SEL sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_;
+public static const objc.SEL sel_otherMouseDown_;
+public static const objc.SEL sel_otherMouseDragged_;
+public static const objc.SEL sel_otherMouseUp_;
+public static const objc.SEL sel_outlineTableColumn;
+public static const objc.SEL sel_outlineView_child_ofItem_;
+public static const objc.SEL sel_outlineView_didClickTableColumn_;
+public static const objc.SEL sel_outlineView_isItemExpandable_;
+public static const objc.SEL sel_outlineView_numberOfChildrenOfItem_;
+public static const objc.SEL sel_outlineView_objectValueForTableColumn_byItem_;
+public static const objc.SEL sel_outlineView_setObjectValue_forTableColumn_byItem_;
+public static const objc.SEL sel_outlineView_shouldCollapseItem_;
+public static const objc.SEL sel_outlineView_shouldExpandItem_;
+public static const objc.SEL sel_outlineView_willDisplayCell_forTableColumn_item_;
+public static const objc.SEL sel_outlineViewColumnDidMove_;
+public static const objc.SEL sel_outlineViewColumnDidResize_;
+public static const objc.SEL sel_outlineViewItemDidExpand_;
+public static const objc.SEL sel_outlineViewSelectionDidChange_;
+public static const objc.SEL sel_pageDown_;
+public static const objc.SEL sel_pageTitle;
+public static const objc.SEL sel_pageUp_;
+public static const objc.SEL sel_panelConvertFont_;
+public static const objc.SEL sel_paperSize;
+public static const objc.SEL sel_paragraphs;
+public static const objc.SEL sel_paste_;
+public static const objc.SEL sel_pasteboard_provideDataForType_;
+public static const objc.SEL sel_pasteboardWithName_;
+public static const objc.SEL sel_performDragOperation_;
+public static const objc.SEL sel_performSelectorOnMainThread_withObject_waitUntilDone_;
+public static const objc.SEL sel_pixelsHigh;
+public static const objc.SEL sel_pixelsWide;
+public static const objc.SEL sel_pointSize;
+public static const objc.SEL sel_pointValue;
+public static const objc.SEL sel_pointingHandCursor;
+public static const objc.SEL sel_popUpContextMenu_withEvent_forView_;
+public static const objc.SEL sel_prependTransform_;
+public static const objc.SEL sel_preventDefault;
+public static const objc.SEL sel_printDocumentView;
+public static const objc.SEL sel_printOperationWithPrintInfo_;
+public static const objc.SEL sel_printOperationWithView_printInfo_;
+public static const objc.SEL sel_printPanel;
+public static const objc.SEL sel_printer;
+public static const objc.SEL sel_printerNames;
+public static const objc.SEL sel_printerWithName_;
+public static const objc.SEL sel_propertyListForType_;
+public static const objc.SEL sel_rangeValue;
+public static const objc.SEL sel_recentSearches;
+public static const objc.SEL sel_rectOfColumn_;
+public static const objc.SEL sel_rectOfRow_;
+public static const objc.SEL sel_redComponent;
+public static const objc.SEL sel_reflectScrolledClipView_;
+public static const objc.SEL sel_registerForDraggedTypes_;
+public static const objc.SEL sel_release;
+public static const objc.SEL sel_reload_;
+public static const objc.SEL sel_reloadData;
+public static const objc.SEL sel_reloadItem_;
+public static const objc.SEL sel_reloadItem_reloadChildren_;
+public static const objc.SEL sel_removeAllItems;
+public static const objc.SEL sel_removeAllPoints;
+public static const objc.SEL sel_removeFromSuperview;
+public static const objc.SEL sel_removeItem_;
+public static const objc.SEL sel_removeItemAtIndex_;
+public static const objc.SEL sel_removeItemAtPath_error_;
+public static const objc.SEL sel_removeObject_;
+public static const objc.SEL sel_removeObjectAtIndex_;
+public static const objc.SEL sel_removeObserver_;
+public static const objc.SEL sel_removeStatusItem_;
+public static const objc.SEL sel_removeTabViewItem_;
+public static const objc.SEL sel_removeTableColumn_;
+public static const objc.SEL sel_removeTemporaryAttribute_forCharacterRange_;
+public static const objc.SEL sel_replaceCharactersInRange_withString_;
+public static const objc.SEL sel_representation;
+public static const objc.SEL sel_request;
+public static const objc.SEL sel_requestWithURL_;
+public static const objc.SEL sel_resignFirstResponder;
+public static const objc.SEL sel_resizeDownCursor;
+public static const objc.SEL sel_resizeLeftCursor;
+public static const objc.SEL sel_resizeLeftRightCursor;
+public static const objc.SEL sel_resizeRightCursor;
+public static const objc.SEL sel_resizeUpCursor;
+public static const objc.SEL sel_resizeUpDownCursor;
+public static const objc.SEL sel_resizingMask;
+public static const objc.SEL sel_respondsToSelector_;
+public static const objc.SEL sel_restoreGraphicsState;
+public static const objc.SEL sel_retain;
+public static const objc.SEL sel_retainCount;
+public static const objc.SEL sel_rightMouseDown_;
+public static const objc.SEL sel_rightMouseDragged_;
+public static const objc.SEL sel_rightMouseUp_;
+public static const objc.SEL sel_rotateByDegrees_;
+public static const objc.SEL sel_rowAtPoint_;
+public static const objc.SEL sel_rowForItem_;
+public static const objc.SEL sel_rowHeight;
+public static const objc.SEL sel_rowsInRect_;
+public static const objc.SEL sel_run;
+public static const objc.SEL sel_runModal;
+public static const objc.SEL sel_runModalForWindow_;
+public static const objc.SEL sel_runModalWithPrintInfo_;
+public static const objc.SEL sel_runMode_beforeDate_;
+public static const objc.SEL sel_runOperation;
+public static const objc.SEL sel_samplesPerPixel;
+public static const objc.SEL sel_saveGraphicsState;
+public static const objc.SEL sel_savePanel;
+public static const objc.SEL sel_scaleXBy_yBy_;
+public static const objc.SEL sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_;
+public static const objc.SEL sel_screen;
+public static const objc.SEL sel_screens;
+public static const objc.SEL sel_scrollColumnToVisible_;
+public static const objc.SEL sel_scrollRangeToVisible_;
+public static const objc.SEL sel_scrollRectToVisible_;
+public static const objc.SEL sel_scrollRowToVisible_;
+public static const objc.SEL sel_scrollToPoint_;
+public static const objc.SEL sel_scrollWheel_;
+public static const objc.SEL sel_scrollerWidth;
+public static const objc.SEL sel_secondOfMinute;
+public static const objc.SEL sel_secondarySelectedControlColor;
+public static const objc.SEL sel_selectAll_;
+public static const objc.SEL sel_selectItem_;
+public static const objc.SEL sel_selectItemAtIndex_;
+public static const objc.SEL sel_selectRow_byExtendingSelection_;
+public static const objc.SEL sel_selectRowIndexes_byExtendingSelection_;
+public static const objc.SEL sel_selectTabViewItemAtIndex_;
+public static const objc.SEL sel_selectedControlTextColor;
+public static const objc.SEL sel_selectedRange;
+public static const objc.SEL sel_selectedRow;
+public static const objc.SEL sel_selectedRowIndexes;
+public static const objc.SEL sel_selectedTabViewItem;
+public static const objc.SEL sel_selectedTextBackgroundColor;
+public static const objc.SEL sel_selectedTextColor;
+public static const objc.SEL sel_sendAction_to_;
+public static const objc.SEL sel_sendEvent_;
+public static const objc.SEL sel_separatorItem;
+public static const objc.SEL sel_set;
+public static const objc.SEL sel_setAcceptsMouseMovedEvents_;
+public static const objc.SEL sel_setAction_;
+public static const objc.SEL sel_setAlertStyle_;
+public static const objc.SEL sel_setAlignment_;
+public static const objc.SEL sel_setAllowsColumnReordering_;
+public static const objc.SEL sel_setAllowsFloats_;
+public static const objc.SEL sel_setAllowsMixedState_;
+public static const objc.SEL sel_setAllowsMultipleSelection_;
+public static const objc.SEL sel_setAlphaValue_;
+public static const objc.SEL sel_setApplicationIconImage_;
+public static const objc.SEL sel_setApplicationNameForUserAgent_;
+public static const objc.SEL sel_setAttributedStringValue_;
+public static const objc.SEL sel_setAttributedTitle_;
+public static const objc.SEL sel_setAutoenablesItems_;
+public static const objc.SEL sel_setAutohidesScrollers_;
+public static const objc.SEL sel_setAutoresizesOutlineColumn_;
+public static const objc.SEL sel_setAutoresizesSubviews_;
+public static const objc.SEL sel_setAutoresizingMask_;
+public static const objc.SEL sel_setAutosaveExpandedItems_;
+public static const objc.SEL sel_setBackgroundColor_;
+public static const objc.SEL sel_setBezelStyle_;
+public static const objc.SEL sel_setBorderType_;
+public static const objc.SEL sel_setBorderWidth_;
+public static const objc.SEL sel_setBordered_;
+public static const objc.SEL sel_setBoxType_;
+public static const objc.SEL sel_setButtonType_;
+public static const objc.SEL sel_setCacheMode_;
+public static const objc.SEL sel_setCanChooseDirectories_;
+public static const objc.SEL sel_setCanChooseFiles_;
+public static const objc.SEL sel_setCellClass_;
+public static const objc.SEL sel_setClip;
+public static const objc.SEL sel_setColor_;
+public static const objc.SEL sel_setColumnAutoresizingStyle_;
+public static const objc.SEL sel_setCompositingOperation_;
+public static const objc.SEL sel_setContainerSize_;
+public static const objc.SEL sel_setContentView_;
+public static const objc.SEL sel_setContentViewMargins_;
+public static const objc.SEL sel_setCurrentContext_;
+public static const objc.SEL sel_setCurrentOperation_;
+public static const objc.SEL sel_setData_forType_;
+public static const objc.SEL sel_setDataCell_;
+public static const objc.SEL sel_setDataSource_;
+public static const objc.SEL sel_setDatePickerElements_;
+public static const objc.SEL sel_setDatePickerStyle_;
+public static const objc.SEL sel_setDateValue_;
+public static const objc.SEL sel_setDefaultFlatness_;
+public static const objc.SEL sel_setDefaultTabInterval_;
+public static const objc.SEL sel_setDelegate_;
+public static const objc.SEL sel_setDestination_allowOverwrite_;
+public static const objc.SEL sel_setDirectory_;
+public static const objc.SEL sel_setDocumentView_;
+public static const objc.SEL sel_setDoubleAction_;
+public static const objc.SEL sel_setDoubleValue_;
+public static const objc.SEL sel_setDownloadDelegate_;
+public static const objc.SEL sel_setDrawsBackground_;
+public static const objc.SEL sel_setEditable_;
+public static const objc.SEL sel_setEnabled_;
+public static const objc.SEL sel_setFill;
+public static const objc.SEL sel_setFireDate_;
+public static const objc.SEL sel_setFirstLineHeadIndent_;
+public static const objc.SEL sel_setFloatValue_knobProportion_;
+public static const objc.SEL sel_setFocusRingType_;
+public static const objc.SEL sel_setFont_;
+public static const objc.SEL sel_setFormatter_;
+public static const objc.SEL sel_setFrame_;
+public static const objc.SEL sel_setFrame_display_;
+public static const objc.SEL sel_setFrameLoadDelegate_;
+public static const objc.SEL sel_setFrameOrigin_;
+public static const objc.SEL sel_setFrameSize_;
+public static const objc.SEL sel_setHasHorizontalScroller_;
+public static const objc.SEL sel_setHasShadow_;
+public static const objc.SEL sel_setHasVerticalScroller_;
+public static const objc.SEL sel_setHeaderCell_;
+public static const objc.SEL sel_setHeaderView_;
+public static const objc.SEL sel_setHidden_;
+public static const objc.SEL sel_setHiddenUntilMouseMoves_;
+public static const objc.SEL sel_setHighlightMode_;
+public static const objc.SEL sel_setHighlighted_;
+public static const objc.SEL sel_setHorizontalScroller_;
+public static const objc.SEL sel_setHorizontallyResizable_;
+public static const objc.SEL sel_setIdentifier_;
+public static const objc.SEL sel_setImage_;
+public static const objc.SEL sel_setImageAlignment_;
+public static const objc.SEL sel_setImageInterpolation_;
+public static const objc.SEL sel_setImagePosition_;
+public static const objc.SEL sel_setImageScaling_;
+public static const objc.SEL sel_setIncrement_;
+public static const objc.SEL sel_setIndentationPerLevel_;
+public static const objc.SEL sel_setIndeterminate_;
+public static const objc.SEL sel_setJavaEnabled_;
+public static const objc.SEL sel_setJobDisposition_;
+public static const objc.SEL sel_setJobTitle_;
+public static const objc.SEL sel_setKeyEquivalent_;
+public static const objc.SEL sel_setKeyEquivalentModifierMask_;
+public static const objc.SEL sel_setLabel_;
+public static const objc.SEL sel_setLeaf_;
+public static const objc.SEL sel_setLength_;
+public static const objc.SEL sel_setLevel_;
+public static const objc.SEL sel_setLineBreakMode_;
+public static const objc.SEL sel_setLineCapStyle_;
+public static const objc.SEL sel_setLineDash_count_phase_;
+public static const objc.SEL sel_setLineFragmentPadding_;
+public static const objc.SEL sel_setLineFragmentRect_forGlyphRange_usedRect_;
+public static const objc.SEL sel_setLineJoinStyle_;
+public static const objc.SEL sel_setLineSpacing_;
+public static const objc.SEL sel_setLineWidth_;
+public static const objc.SEL sel_setMarkedText_selectedRange_;
+public static const objc.SEL sel_setMaxSize_;
+public static const objc.SEL sel_setMaxValue_;
+public static const objc.SEL sel_setMaximum_;
+public static const objc.SEL sel_setMaximumFractionDigits_;
+public static const objc.SEL sel_setMaximumIntegerDigits_;
+public static const objc.SEL sel_setMenu_;
+public static const objc.SEL sel_setMinSize_;
+public static const objc.SEL sel_setMinValue_;
+public static const objc.SEL sel_setMinWidth_;
+public static const objc.SEL sel_setMinimum_;
+public static const objc.SEL sel_setMinimumFractionDigits_;
+public static const objc.SEL sel_setMinimumIntegerDigits_;
+public static const objc.SEL sel_setMiterLimit_;
+public static const objc.SEL sel_setNeedsDisplay_;
+public static const objc.SEL sel_setNeedsDisplayInRect_;
+public static const objc.SEL sel_setNumberOfVisibleItems_;
+public static const objc.SEL sel_setNumberStyle_;
+public static const objc.SEL sel_setObject_forKey_;
+public static const objc.SEL sel_setOnMouseEntered_;
+public static const objc.SEL sel_setOpaque_;
+public static const objc.SEL sel_setOptions_;
+public static const objc.SEL sel_setOutlineTableColumn_;
+public static const objc.SEL sel_setPanelFont_isMultiple_;
+public static const objc.SEL sel_setPartialStringValidationEnabled_;
+public static const objc.SEL sel_setPatternPhase_;
+public static const objc.SEL sel_setPixelFormat_;
+public static const objc.SEL sel_setPolicyDelegate_;
+public static const objc.SEL sel_setPrinter_;
+public static const objc.SEL sel_setPropertyList_forType_;
+public static const objc.SEL sel_setPullsDown_;
+public static const objc.SEL sel_setReleasedWhenClosed_;
+public static const objc.SEL sel_setResizingMask_;
+public static const objc.SEL sel_setResourceLoadDelegate_;
+public static const objc.SEL sel_setRichText_;
+public static const objc.SEL sel_setRowHeight_;
+public static const objc.SEL sel_setSelectable_;
+public static const objc.SEL sel_setSelectedRange_;
+public static const objc.SEL sel_setShouldAntialias_;
+public static const objc.SEL sel_setShowsPrintPanel_;
+public static const objc.SEL sel_setShowsProgressPanel_;
+public static const objc.SEL sel_setSize_;
+public static const objc.SEL sel_setState_;
+public static const objc.SEL sel_setString_;
+public static const objc.SEL sel_setString_forType_;
+public static const objc.SEL sel_setStringValue_;
+public static const objc.SEL sel_setStroke;
+public static const objc.SEL sel_setSubmenu_;
+public static const objc.SEL sel_setTabStops_;
+public static const objc.SEL sel_setTabViewType_;
+public static const objc.SEL sel_setTarget_;
+public static const objc.SEL sel_setTextColor_;
+public static const objc.SEL sel_setTitle_;
+public static const objc.SEL sel_setTitleFont_;
+public static const objc.SEL sel_setTitlePosition_;
+public static const objc.SEL sel_setToolTip_;
+public static const objc.SEL sel_setTransformStruct_;
+public static const objc.SEL sel_setUIDelegate_;
+public static const objc.SEL sel_setURL_;
+public static const objc.SEL sel_setUpPrintOperationDefaultValues;
+public static const objc.SEL sel_setUsesAlternatingRowBackgroundColors_;
+public static const objc.SEL sel_setUsesThreadedAnimation_;
+public static const objc.SEL sel_setValue_forKey_;
+public static const objc.SEL sel_setValueWraps_;
+public static const objc.SEL sel_setVerticalScroller_;
+public static const objc.SEL sel_setView_;
+public static const objc.SEL sel_setWidth_;
+public static const objc.SEL sel_setWidthTracksTextView_;
+public static const objc.SEL sel_setWindingRule_;
+public static const objc.SEL sel_setWorksWhenModal_;
+public static const objc.SEL sel_setWraps_;
+public static const objc.SEL sel_sharedApplication;
+public static const objc.SEL sel_sharedColorPanel;
+public static const objc.SEL sel_sharedFontManager;
+public static const objc.SEL sel_sharedFontPanel;
+public static const objc.SEL sel_sharedHTTPCookieStorage;
+public static const objc.SEL sel_sharedPrintInfo;
+public static const objc.SEL sel_sharedWorkspace;
+public static const objc.SEL sel_shiftKey;
+public static const objc.SEL sel_size;
+public static const objc.SEL sel_sizeToFit;
+public static const objc.SEL sel_sizeValue;
+public static const objc.SEL sel_skipDescendents;
+public static const objc.SEL sel_smallSystemFontSize;
+public static const objc.SEL sel_sortIndicatorRectForBounds_;
+public static const objc.SEL sel_standardPreferences;
+public static const objc.SEL sel_startAnimation_;
+public static const objc.SEL sel_state;
+public static const objc.SEL sel_statusItemWithLength_;
+public static const objc.SEL sel_stop_;
+public static const objc.SEL sel_stopLoading_;
+public static const objc.SEL sel_string;
+public static const objc.SEL sel_stringByAddingPercentEscapesUsingEncoding_;
+public static const objc.SEL sel_stringByAppendingPathComponent_;
+public static const objc.SEL sel_stringByAppendingString_;
+public static const objc.SEL sel_stringByDeletingLastPathComponent;
+public static const objc.SEL sel_stringByDeletingPathExtension;
+public static const objc.SEL sel_stringByEvaluatingJavaScriptFromString_;
+public static const objc.SEL sel_stringByReplacingOccurrencesOfString_withString_;
+public static const objc.SEL sel_stringForObjectValue_;
+public static const objc.SEL sel_stringForType_;
+public static const objc.SEL sel_stringValue;
+public static const objc.SEL sel_stringWithCharacters_length_;
+public static const objc.SEL sel_stringWithUTF8String_;
+public static const objc.SEL sel_stroke;
+public static const objc.SEL sel_strokeRect_;
+public static const objc.SEL sel_styleMask;
+public static const objc.SEL sel_submenu;
+public static const objc.SEL sel_subviews;
+public static const objc.SEL sel_superclass;
+public static const objc.SEL sel_superview;
+public static const objc.SEL sel_systemFontOfSize_;
+public static const objc.SEL sel_systemFontSize;
+public static const objc.SEL sel_systemFontSizeForControlSize_;
+public static const objc.SEL sel_systemStatusBar;
+public static const objc.SEL sel_systemVersion;
+public static const objc.SEL sel_tabStopType;
+public static const objc.SEL sel_tabStops;
+public static const objc.SEL sel_tabView_didSelectTabViewItem_;
+public static const objc.SEL sel_tabView_willSelectTabViewItem_;
+public static const objc.SEL sel_tabViewItemAtPoint_;
+public static const objc.SEL sel_tableColumns;
+public static const objc.SEL sel_tableView_didClickTableColumn_;
+public static const objc.SEL sel_tableView_objectValueForTableColumn_row_;
+public static const objc.SEL sel_tableView_setObjectValue_forTableColumn_row_;
+public static const objc.SEL sel_tableView_shouldEditTableColumn_row_;
+public static const objc.SEL sel_tableView_willDisplayCell_forTableColumn_row_;
+public static const objc.SEL sel_tableViewColumnDidMove_;
+public static const objc.SEL sel_tableViewColumnDidResize_;
+public static const objc.SEL sel_tableViewSelectionDidChange_;
+public static const objc.SEL sel_target;
+public static const objc.SEL sel_terminate_;
+public static const objc.SEL sel_textBackgroundColor;
+public static const objc.SEL sel_textColor;
+public static const objc.SEL sel_textContainer;
+public static const objc.SEL sel_textDidChange_;
+public static const objc.SEL sel_textStorage;
+public static const objc.SEL sel_textView_clickedOnLink_atIndex_;
+public static const objc.SEL sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_;
+public static const objc.SEL sel_textViewDidChangeSelection_;
+public static const objc.SEL sel_threadDictionary;
+public static const objc.SEL sel_tile;
+public static const objc.SEL sel_timeZone;
+public static const objc.SEL sel_title;
+public static const objc.SEL sel_titleCell;
+public static const objc.SEL sel_titleOfSelectedItem;
+public static const objc.SEL sel_titleRectForBounds_;
+public static const objc.SEL sel_transform;
+public static const objc.SEL sel_transformPoint_;
+public static const objc.SEL sel_transformSize_;
+public static const objc.SEL sel_transformStruct;
+public static const objc.SEL sel_transformUsingAffineTransform_;
+public static const objc.SEL sel_translateXBy_yBy_;
+public static const objc.SEL sel_type;
+public static const objc.SEL sel_types;
+public static const objc.SEL sel_typesetter;
+public static const objc.SEL sel_unarchiveObjectWithData_;
+public static const objc.SEL sel_unhideAllApplications_;
+public static const objc.SEL sel_unmarkText;
+public static const objc.SEL sel_unregisterDraggedTypes;
+public static const objc.SEL sel_use;
+public static const objc.SEL sel_usedRectForTextContainer_;
+public static const objc.SEL sel_userInfo;
+public static const objc.SEL sel_usesAlternatingRowBackgroundColors;
+public static const objc.SEL sel_validAttributesForMarkedText;
+public static const objc.SEL sel_valueForKey_;
+public static const objc.SEL sel_valueWithPoint_;
+public static const objc.SEL sel_valueWithRange_;
+public static const objc.SEL sel_valueWithRect_;
+public static const objc.SEL sel_valueWithSize_;
+public static const objc.SEL sel_visibleFrame;
+public static const objc.SEL sel_visibleRect;
+public static const objc.SEL sel_wantsPeriodicDraggingUpdates;
+public static const objc.SEL sel_wantsToHandleMouseEvents;
+public static const objc.SEL sel_webFrame;
+public static const objc.SEL sel_webView_contextMenuItemsForElement_defaultMenuItems_;
+public static const objc.SEL sel_webView_createWebViewWithRequest_;
+public static const objc.SEL sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_;
+public static const objc.SEL sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_;
+public static const objc.SEL sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_;
+public static const objc.SEL sel_webView_didChangeLocationWithinPageForFrame_;
+public static const objc.SEL sel_webView_didCommitLoadForFrame_;
+public static const objc.SEL sel_webView_didFailProvisionalLoadWithError_forFrame_;
+public static const objc.SEL sel_webView_didFinishLoadForFrame_;
+public static const objc.SEL sel_webView_didReceiveTitle_forFrame_;
+public static const objc.SEL sel_webView_didStartProvisionalLoadForFrame_;
+public static const objc.SEL sel_webView_identifierForInitialRequest_fromDataSource_;
+public static const objc.SEL sel_webView_mouseDidMoveOverElement_modifierFlags_;
+public static const objc.SEL sel_webView_printFrameView_;
+public static const objc.SEL sel_webView_resource_didFailLoadingWithError_fromDataSource_;
+public static const objc.SEL sel_webView_resource_didFinishLoadingFromDataSource_;
+public static const objc.SEL sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_;
+public static const objc.SEL sel_webView_runJavaScriptAlertPanelWithMessage_;
+public static const objc.SEL sel_webView_runJavaScriptConfirmPanelWithMessage_;
+public static const objc.SEL sel_webView_runOpenPanelForFileButtonWithResultListener_;
+public static const objc.SEL sel_webView_setFrame_;
+public static const objc.SEL sel_webView_setResizable_;
+public static const objc.SEL sel_webView_setStatusBarVisible_;
+public static const objc.SEL sel_webView_setStatusText_;
+public static const objc.SEL sel_webView_setToolbarsVisible_;
+public static const objc.SEL sel_webView_unableToImplementPolicyWithError_frame_;
+public static const objc.SEL sel_webViewClose_;
+public static const objc.SEL sel_webViewFocus_;
+public static const objc.SEL sel_webViewShow_;
+public static const objc.SEL sel_webViewUnfocus_;
+public static const objc.SEL sel_wheelDelta;
+public static const objc.SEL sel_width;
+public static const objc.SEL sel_window;
+public static const objc.SEL sel_windowBackgroundColor;
+public static const objc.SEL sel_windowDidBecomeKey_;
+public static const objc.SEL sel_windowDidMove_;
+public static const objc.SEL sel_windowDidResignKey_;
+public static const objc.SEL sel_windowDidResize_;
+public static const objc.SEL sel_windowFrameColor;
+public static const objc.SEL sel_windowFrameTextColor;
+public static const objc.SEL sel_windowNumber;
+public static const objc.SEL sel_windowShouldClose_;
+public static const objc.SEL sel_windowWillClose_;
+public static const objc.SEL sel_windows;
+public static const objc.SEL sel_worksWhenModal;
+public static const objc.SEL sel_wraps;
+public static const objc.SEL sel_writeToPasteboard_;
+public static const objc.SEL sel_yearOfCommonEra;
 
-    /** Functions */
-//  public static const native int NSAccessibilityActionDescription(int action);
-//  public static const native void NSAccessibilityPostNotification(int element, int notification);
-//  public static const native void NSAccessibilityRaiseBadArgumentException(int element, int attribute, int value);
-//  public static const native int NSAccessibilityRoleDescription(int role, int subrole);
-//  public static const native int NSAccessibilityRoleDescriptionForUIElement(int element);
-//  public static const native int NSAccessibilityUnignoredAncestor(int element);
-//  public static const native int NSAccessibilityUnignoredChildren(int originalChildren);
-//  public static const native int NSAccessibilityUnignoredChildrenForOnlyChild(int originalChild);
-//  public static const native int NSAccessibilityUnignoredDescendant(int element);
-//  public static const native bool NSApplicationLoad();
-//  public static const native int NSApplicationMain(int argc, int argv);
-//  public static const native int NSAvailableWindowDepths();
-//  public static const native void NSBeep();
-//  public static const native void NSBeginAlertSheet(int title, int defaultButton, int alternateButton, int otherButton, int docWindow, int modalDelegate, int didEndSelector, int didDismissSelector, int contextInfo, int msgFormat);
-//  public static const native void NSBeginCriticalAlertSheet(int title, int defaultButton, int alternateButton, int otherButton, int docWindow, int modalDelegate, int didEndSelector, int didDismissSelector, int contextInfo, int msgFormat);
-//  public static const native void NSBeginInformationalAlertSheet(int title, int defaultButton, int alternateButton, int otherButton, int docWindow, int modalDelegate, int didEndSelector, int didDismissSelector, int contextInfo, int msgFormat);
-//  public static const native int NSBestDepth(int colorSpace, int bps, int bpp, bool planar, int exactMatch);
-    alias dwt.internal.objc.appkit.NSGraphics.NSBitsPerPixelFromDepth NSBitsPerPixelFromDepth;
-//  public static const native int NSBitsPerSampleFromDepth(int depth);
-//  public static const native int NSColorSpaceFromDepth(int depth);
-//  public static const native int NSConvertGlyphsToPackedGlyphs(int glBuf, int count, int packing, int packedGlyphs);
-//  public static const native void NSCopyBits(int srcGState, NSRect srcRect, NSPoint destPoint);
-//  public static const native void NSCountWindows(int count);
-//  public static const native void NSCountWindowsForContext(int context, int count);
-//  public static const native int NSCreateFileContentsPboardType(int fileType);
-//  public static const native int NSCreateFilenamePboardType(int fileType);
-//  public static const native void NSDisableScreenUpdates();
-//  public static const native void NSDottedFrameRect(NSRect aRect);
-//  public static const native void NSDrawBitmap(NSRect rect, int width, int height, int bps, int spp, int bpp, int bpr, bool isPlanar, bool hasAlpha, int colorSpaceName, int data);
-//  public static const native void NSDrawButton(NSRect aRect, NSRect clipRect);
-////    public static const native NSRect NSDrawColorTiledRects(NSRect boundsRect, NSRect clipRect, int sides, int colors, int count);
-//  public static const native void NSDrawDarkBezel(NSRect aRect, NSRect clipRect);
-//  public static const native void NSDrawGrayBezel(NSRect aRect, NSRect clipRect);
-//  public static const native void NSDrawGroove(NSRect aRect, NSRect clipRect);
-//  public static const native void NSDrawLightBezel(NSRect aRect, NSRect clipRect);
-//  public static const native void NSDrawNinePartImage(NSRect frame, int topLeftCorner, int topEdgeFill, int topRightCorner, int leftEdgeFill, int centerFill, int rightEdgeFill, int bottomLeftCorner, int bottomEdgeFill, int bottomRightCorner, int op, float alphaFraction, bool flipped);
-//  public static const native void NSDrawThreePartImage(NSRect frame, int startCap, int centerFill, int endCap, bool vertical, int op, float alphaFraction, bool flipped);
-////    public static const native NSRect NSDrawTiledRects(NSRect boundsRect, NSRect clipRect, int sides, int grays, int count);
-//  public static const native void NSDrawWhiteBezel(NSRect aRect, NSRect clipRect);
-//  public static const native void NSDrawWindowBackground(NSRect aRect);
-//  public static const native void NSEnableScreenUpdates();
-//  public static const native void NSEraseRect(NSRect aRect);
-//  public static const native int NSEventMaskFromType(int type);
-//  public static const native void NSFrameRect(NSRect aRect);
-//  public static const native void NSFrameRectWithWidth(NSRect aRect, float frameWidth);
-//  public static const native void NSFrameRectWithWidthUsingOperation(NSRect aRect, float frameWidth, int op);
-//  public static const native int NSGetAlertPanel(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton);
-//  public static const native int NSGetCriticalAlertPanel(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton);
-//  public static const native int NSGetFileType(int pboardType);
-//  public static const native int NSGetFileTypes(int pboardTypes);
-//  public static const native int NSGetInformationalAlertPanel(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton);
-//  public static const native int NSGetWindowServerMemory(int context, int virtualMemory, int windowBackingMemory, int windowDumpString);
-//  public static const native void NSHighlightRect(NSRect aRect);
-//  public static const native int NSInterfaceStyleForKey(int key, int responder);
-//  public static const native bool NSIsControllerMarker(int object);
-//  public static const native int NSNumberOfColorComponents(int colorSpaceName);
-//  public static const native void NSOpenGLGetOption(int pname, int param);
-//  public static const native void NSOpenGLGetVersion(int major, int minor);
-//  public static const native void NSOpenGLSetOption(int pname, int param);
-//  public static const native bool NSPerformService(int itemName, int pboard);
-//  public static const native bool NSPlanarFromDepth(int depth);
-//  public static const native int NSReadPixel(NSPoint passedPoint);
-//  public static const native void NSRectClip(NSRect aRect);
-//  public static const native void NSRectClipList(int rects, int count);
-//  public static const native void NSRectFill(NSRect aRect);
-//  public static const native void NSRectFillList(int rects, int count);
-//  public static const native void NSRectFillListUsingOperation(int rects, int count, int op);
-//  public static const native void NSRectFillListWithColors(int rects, int colors, int num);
-//  public static const native void NSRectFillListWithColorsUsingOperation(int rects, int colors, int num, int op);
-//  public static const native void NSRectFillListWithGrays(int rects, int grays, int num);
-//  public static const native void NSRectFillUsingOperation(NSRect aRect, int op);
-//  public static const native void NSRegisterServicesProvider(int provider, int name);
-//  public static const native void NSReleaseAlertPanel(int panel);
-//  public static const native int NSRunAlertPanel(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton);
-//  public static const native int NSRunAlertPanelRelativeToWindow(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton, int docWindow);
-//  public static const native int NSRunCriticalAlertPanel(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton);
-//  public static const native int NSRunCriticalAlertPanelRelativeToWindow(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton, int docWindow);
-//  public static const native int NSRunInformationalAlertPanel(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton);
-//  public static const native int NSRunInformationalAlertPanelRelativeToWindow(int title, int msgFormat, int defaultButton, int alternateButton, int otherButton, int docWindow);
-//  public static const native void NSSetFocusRingStyle(int placement);
-//  public static const native int NSSetShowsServicesMenuItem(int itemName, bool enabled);
-////    public static const native void NSShowAnimationEffect(int animationEffect, NSPoint centerLocation, NSSize size, int animationDelegate, int didEndSelector, int contextInfo);
-//  public static const native bool NSShowsServicesMenuItem(int itemName);
-//  public static const native void NSUnregisterServicesProvider(int name);
-//  public static const native void NSUpdateDynamicServices();
-//  public static const native void NSWindowList(int size, int list);
-//  public static const native void NSWindowListForContext(int context, int size, int list);
-//  public static const native int NSAllHashTableObjects(int table);
-//  public static const native int NSAllMapTableKeys(int table);
-//  public static const native int NSAllMapTableValues(int table);
-//  public static const native int NSAllocateCollectable(int size, int options);
-//  public static const native int NSAllocateMemoryPages(int bytes);
-//  public static const native int NSAllocateObject(int aClass, int extraBytes, int zone);
-//  public static const native int NSClassFromString(int aClassName);
-//  public static const native bool NSCompareHashTables(int table1, int table2);
-//  public static const native bool NSCompareMapTables(int table1, int table2);
-//  public static const native bool NSContainsRect(NSRect aRect, NSRect bRect);
-////    public static const native NSSwappedDouble NSConvertHostDoubleToSwapped(double x);
-////    public static const native NSSwappedFloat NSConvertHostFloatToSwapped(float x);
-//  public static const native double NSConvertSwappedDoubleToHost(NSSwappedDouble x);
-//  public static const native float NSConvertSwappedFloatToHost(NSSwappedFloat x);
-//  public static const native int NSCopyHashTableWithZone(int table, int zone);
-//  public static const native int NSCopyMapTableWithZone(int table, int zone);
-//  public static const native void NSCopyMemoryPages(int source, int dest, int bytes);
-//  public static const native int NSCopyObject(int object, int extraBytes, int zone);
-//  public static const native int NSCountFrames();
-//  public static const native int NSCountHashTable(int table);
-//  public static const native int NSCountMapTable(int table);
-//  public static const native int NSCreateHashTable(NSHashTableCallBacks callBacks, int capacity);
-//  public static const native int NSCreateHashTableWithZone(NSHashTableCallBacks callBacks, int capacity, int zone);
-//  public static const native int NSCreateMapTable(NSMapTableKeyCallBacks keyCallBacks, NSMapTableValueCallBacks valueCallBacks, int capacity);
-//  public static const native int NSCreateMapTableWithZone(NSMapTableKeyCallBacks keyCallBacks, NSMapTableValueCallBacks valueCallBacks, int capacity, int zone);
-//  public static const native int NSCreateZone(int startSize, int granularity, bool canFree);
-//  public static const native void NSDeallocateMemoryPages(int ptr, int bytes);
-//  public static const native void NSDeallocateObject(int object);
-//  public static const native int NSDecimalAdd(int result, int leftOperand, int rightOperand, int roundingMode);
-//  public static const native void NSDecimalCompact(int number);
-//  public static const native int NSDecimalCompare(int leftOperand, int rightOperand);
-//  public static const native void NSDecimalCopy(int destination, int source);
-//  public static const native int NSDecimalDivide(int result, int leftOperand, int rightOperand, int roundingMode);
-//  public static const native bool NSDecimalIsNotANumber(int dcm);
-//  public static const native int NSDecimalMultiply(int result, int leftOperand, int rightOperand, int roundingMode);
-//  public static const native int NSDecimalMultiplyByPowerOf10(int result, int number, short power, int roundingMode);
-//  public static const native int NSDecimalNormalize(int number1, int number2, int roundingMode);
-//  public static const native int NSDecimalPower(int result, int number, int power, int roundingMode);
-//  public static const native void NSDecimalRound(int result, int number, int scale, int roundingMode);
-//  public static const native int NSDecimalString(int dcm, int locale);
-//  public static const native int NSDecimalSubtract(int result, int leftOperand, int rightOperand, int roundingMode);
-//  public static const native bool NSDecrementExtraRefCountWasZero(int object);
-//  public static const native int NSDefaultMallocZone();
-//  public static const native void NSDivideRect(NSRect inRect, int slice, int rem, float amount, int edge);
-//  public static const native void NSEndHashTableEnumeration(int enumerator);
-//  public static const native void NSEndMapTableEnumeration(int enumerator);
-////    public static const native NSHashEnumerator NSEnumerateHashTable(int table);
-////    public static const native NSMapEnumerator NSEnumerateMapTable(int table);
-//  public static const native bool NSEqualPoints(NSPoint aPoint, NSPoint bPoint);
-//  public static const native bool NSEqualRanges(NSRange range1, NSRange range2);
-//  public static const native bool NSEqualRects(NSRect aRect, NSRect bRect);
-//  public static const native bool NSEqualSizes(NSSize aSize, NSSize bSize);
-//  public static const native int NSExtraRefCount(int object);
-    alias dwt.internal.objc.foundation.NSHFSFileTypes.NSFileTypeForHFSTypeCode NSFileTypeForHFSTypeCode;
-//  public static const native int NSFrameAddress(int frame);
-//  public static const native void NSFreeHashTable(int table);
-//  public static const native void NSFreeMapTable(int table);
-//  public static const native int NSFullUserName();
-//  public static const native int NSGetSizeAndAlignment(int typePtr, int sizep, int alignp);
-//  public static const native int NSGetUncaughtExceptionHandler();
-//  public static const native int NSHFSTypeCodeFromFileType(int fileTypeString);
-//  public static const native int NSHFSTypeOfFile(int fullFilePath);
-//  public static const native int NSHashGet(int table, int pointer);
-//  public static const native void NSHashInsert(int table, int pointer);
-//  public static const native int NSHashInsertIfAbsent(int table, int pointer);
-//  public static const native void NSHashInsertKnownAbsent(int table, int pointer);
-//  public static const native void NSHashRemove(int table, int pointer);
-//  public static const native float NSHeight(NSRect aRect);
-//  public static const native int NSHomeDirectory();
-//  public static const native int NSHomeDirectoryForUser(int userName);
-//  public static const native int NSHostByteOrder();
-//  public static const native void NSIncrementExtraRefCount(int object);
-////    public static const native NSRect NSInsetRect(NSRect aRect, float dX, float dY);
-////    public static const native NSRect NSIntegralRect(NSRect aRect);
-////    public static const native NSRange NSIntersectionRange(NSRange range1, NSRange range2);
-////    public static const native NSRect NSIntersectionRect(NSRect aRect, NSRect bRect);
-//  public static const native bool NSIntersectsRect(NSRect aRect, NSRect bRect);
-//  public static const native bool NSIsEmptyRect(NSRect aRect);
-//  public static const native bool NSIsFreedObject(int anObject);
-//  public static const native bool NSLocationInRange(int loc, NSRange range);
-//  public static const native void NSLog(int format);
-//  public static const native int NSLogPageSize();
-//  public static const native void NSLogv(int format, int args);
-//  public static const native int NSMakeCollectable(int cf);
-////    public static const native NSPoint NSMakePoint(float x, float y);
-////    public static const native NSRange NSMakeRange(int loc, int len);
-////    public static const native NSRect NSMakeRect(float x, float y, float w, float h);
-////    public static const native NSSize NSMakeSize(float w, float h);
-//  public static const native int NSMapGet(int table, int key);
-//  public static const native void NSMapInsert(int table, int key, int value);
-//  public static const native int NSMapInsertIfAbsent(int table, int key, int value);
-//  public static const native void NSMapInsertKnownAbsent(int table, int key, int value);
-//  public static const native bool NSMapMember(int table, int key, int originalKey, int value);
-//  public static const native void NSMapRemove(int table, int key);
-//  public static const native int NSMaxRange(NSRange range);
-//  public static const native float NSMaxX(NSRect aRect);
-//  public static const native float NSMaxY(NSRect aRect);
-//  public static const native float NSMidX(NSRect aRect);
-//  public static const native float NSMidY(NSRect aRect);
-//  public static const native float NSMinX(NSRect aRect);
-//  public static const native float NSMinY(NSRect aRect);
-//  public static const native bool NSMouseInRect(NSPoint aPoint, NSRect aRect, bool flipped);
-//  public static const native int NSNextHashEnumeratorItem(int enumerator);
-//  public static const native bool NSNextMapEnumeratorPair(int enumerator, int key, int value);
-////    public static const native NSRect NSOffsetRect(NSRect aRect, float dX, float dY);
-//  public static const native int NSOpenStepRootDirectory();
-//  public static const native int NSPageSize();
-////    public static const native NSPoint NSPointFromCGPoint(CGPoint cgpoint);
-////    public static const native NSPoint NSPointFromString(int aString);
-//  public static const native bool NSPointInRect(NSPoint aPoint, NSRect aRect);
-////    public static const native CGPoint NSPointToCGPoint(NSPoint nspoint);
-//  public static const native int NSProtocolFromString(int namestr);
-////    public static const native NSRange NSRangeFromString(int aString);
-//  public static const native int NSRealMemoryAvailable();
-//  public static const native int NSReallocateCollectable(int ptr, int size, int options);
-//  public static const native void NSRecordAllocationEvent(int eventType, int object);
-////    public static const native NSRect NSRectFromCGRect(CGRect cgrect);
-////    public static const native NSRect NSRectFromString(int aString);
-////    public static const native CGRect NSRectToCGRect(NSRect nsrect);
-//  public static const native void NSRecycleZone(int zone);
-//  public static const native void NSResetHashTable(int table);
-//  public static const native void NSResetMapTable(int table);
-//  public static const native int NSReturnAddress(int frame);
-//  public static const native int NSRoundDownToMultipleOfPageSize(int bytes);
-//  public static const native int NSRoundUpToMultipleOfPageSize(int bytes);
-//  public static const native int NSSearchPathForDirectoriesInDomains(int directory, int domainMask, bool expandTilde);
-//  public static const native int NSSelectorFromString(int aSelectorName);
-//  public static const native void NSSetUncaughtExceptionHandler(int dummy);
-//  public static const native void NSSetZoneName(int zone, int name);
-//  public static const native bool NSShouldRetainWithZone(int anObject, int requestedZone);
-////    public static const native NSSize NSSizeFromCGSize(CGSize cgsize);
-////    public static const native NSSize NSSizeFromString(int aString);
-////    public static const native CGSize NSSizeToCGSize(NSSize nssize);
-//  public static const native int NSStringFromClass(int aClass);
-//  public static const native int NSStringFromHashTable(int table);
-//  public static const native int NSStringFromMapTable(int table);
-//  public static const native int NSStringFromPoint(NSPoint aPoint);
-//  public static const native int NSStringFromProtocol(int proto);
-//  public static const native int NSStringFromRange(NSRange range);
-//  public static const native int NSStringFromRect(NSRect aRect);
-//  public static const native int NSStringFromSelector(int aSelector);
-//  public static const native int NSStringFromSize(NSSize aSize);
-//  public static const native double NSSwapBigDoubleToHost(NSSwappedDouble x);
-//  public static const native float NSSwapBigFloatToHost(NSSwappedFloat x);
-//  public static const native int NSSwapBigIntToHost(int x);
-//  public static const native long NSSwapBigLongLongToHost(long x);
-//  public static const native int NSSwapBigLongToHost(int x);
-//  public static const native short NSSwapBigShortToHost(short x);
-////    public static const native NSSwappedDouble NSSwapDouble(NSSwappedDouble x);
-////    public static const native NSSwappedFloat NSSwapFloat(NSSwappedFloat x);
-////    public static const native NSSwappedDouble NSSwapHostDoubleToBig(double x);
-////    public static const native NSSwappedDouble NSSwapHostDoubleToLittle(double x);
-////    public static const native NSSwappedFloat NSSwapHostFloatToBig(float x);
-////    public static const native NSSwappedFloat NSSwapHostFloatToLittle(float x);
-//  public static const native int NSSwapHostIntToBig(int x);
-//  public static const native int NSSwapHostIntToLittle(int x);
-//  public static const native long NSSwapHostLongLongToBig(long x);
-//  public static const native long NSSwapHostLongLongToLittle(long x);
-//  public static const native int NSSwapHostLongToBig(int x);
-//  public static const native int NSSwapHostLongToLittle(int x);
-//  public static const native short NSSwapHostShortToBig(short x);
-//  public static const native short NSSwapHostShortToLittle(short x);
-//  public static const native int NSSwapInt(int inv);
-//  public static const native double NSSwapLittleDoubleToHost(NSSwappedDouble x);
-//  public static const native float NSSwapLittleFloatToHost(NSSwappedFloat x);
-//  public static const native int NSSwapLittleIntToHost(int x);
-//  public static const native long NSSwapLittleLongLongToHost(long x);
-//  public static const native int NSSwapLittleLongToHost(int x);
-//  public static const native short NSSwapLittleShortToHost(short x);
-//  public static const native int NSSwapLong(int inv);
-//  public static const native long NSSwapLongLong(long inv);
-//  public static const native short NSSwapShort(short inv);
-//  public static const native int NSTemporaryDirectory();
-//  public static const native NSRange NSUnionRange(NSRange range1, NSRange range2);
-//  public static const native NSRect NSUnionRect(NSRect aRect, NSRect bRect);
-//  public static const native int NSUserName();
-//  public static const native float NSWidth(NSRect aRect);
-//  public static const native int NSZoneCalloc(int zone, int numElems, int byteSize);
-//  public static const native void NSZoneFree(int zone, int ptr);
-//  public static const native int NSZoneFromPointer(int ptr);
-//  public static const native int NSZoneMalloc(int zone, int size);
-//  public static const native int NSZoneName(int zone);
-//  public static const native int NSZoneRealloc(int zone, int ptr, int size);
-//  public static const native int NXReadNSObjectFromCoder(int decoder);
+/** Constants */
+public static final int NSAWTEventType = 16;
+public static final int NSAboveBottom = 4;
+public static final int NSAboveTop = 1;
+public static final int NSAddTraitFontAction = 2;
+public static final int NSAdobeCNS1CharacterCollection = 1;
+public static final int NSAdobeGB1CharacterCollection = 2;
+public static final int NSAdobeJapan1CharacterCollection = 3;
+public static final int NSAdobeJapan2CharacterCollection = 4;
+public static final int NSAdobeKorea1CharacterCollection = 5;
+public static final int NSAlertAlternateReturn = 0;
+public static final int NSAlertDefaultReturn = 1;
+public static final int NSAlertErrorReturn = -2;
+public static final int NSAlertFirstButtonReturn = 1000;
+public static final int NSAlertOtherReturn = -1;
+public static final int NSAlertSecondButtonReturn = 1001;
+public static final int NSAlertThirdButtonReturn = 1002;
+public static final int NSAllScrollerParts = 2;
+public static final int NSAlphaFirstBitmapFormat = 1;
+public static final int NSAlphaNonpremultipliedBitmapFormat = 2;
+public static final int NSAlphaShiftKeyMask = 65536;
+public static final int NSAlternateKeyMask = 524288;
+public static final int NSAnimationBlocking = 0;
+public static final int NSAnimationEaseIn = 1;
+public static final int NSAnimationEaseInOut = 0;
+public static final int NSAnimationEaseOut = 2;
+public static final int NSAnimationEffectDisappearingItemDefault = 0;
+public static final int NSAnimationEffectPoof = 10;
+public static final int NSAnimationLinear = 3;
+public static final int NSAnimationNonblocking = 1;
+public static final int NSAnimationNonblockingThreaded = 2;
+public static final int NSAnyEventMask = -1;
+public static final int NSAnyType = 0;
+public static final int NSAppKitDefined = 13;
+public static final int NSAppKitDefinedMask = 8192;
+public static final int NSAppKitVersionNumber10_0 = 577;
+public static final int NSAppKitVersionNumber10_1 = 620;
+public static final int NSAppKitVersionNumber10_2 = 663;
+public static final double NSAppKitVersionNumber10_2_3 = 663.60000000000002;
+public static final int NSAppKitVersionNumber10_3 = 743;
+public static final double NSAppKitVersionNumber10_3_2 = 743.13999999999999;
+public static final double NSAppKitVersionNumber10_3_3 = 743.20000000000005;
+public static final double NSAppKitVersionNumber10_3_5 = 743.24000000000001;
+public static final double NSAppKitVersionNumber10_3_7 = 743.33000000000004;
+public static final double NSAppKitVersionNumber10_3_9 = 743.36000000000001;
+public static final int NSAppKitVersionNumber10_4 = 824;
+public static final double NSAppKitVersionNumberWithColumnResizingBrowser = 685.00000000000000;
+public static final double NSAppKitVersionNumberWithContinuousScrollingBrowser = 680.00000000000000;
+public static final double NSAppKitVersionNumberWithCursorSizeSupport = 682.00000000000000;
+public static final double NSAppKitVersionNumberWithCustomSheetPosition = 686.00000000000000;
+public static final double NSAppKitVersionNumberWithDirectionalTabs = 631.00000000000000;
+public static final double NSAppKitVersionNumberWithPatternColorLeakFix = 641.00000000000000;
+public static final int NSApplicationActivatedEventType = 1;
+public static final int NSApplicationDeactivatedEventType = 2;
+public static final int NSApplicationDefined = 15;
+public static final int NSApplicationDefinedMask = 32768;
+public static final int NSApplicationDelegateReplyCancel = 1;
+public static final int NSApplicationDelegateReplyFailure = 2;
+public static final int NSApplicationDelegateReplySuccess = 0;
+public static final int NSAscendingPageOrder = 1;
+public static final int NSAtBottom = 5;
+public static final int NSAtTop = 2;
+public static final int NSAttachmentCharacter = 65532;
+public static final int NSAutoPagination = 0;
+public static final int NSAutosaveOperation = 3;
+public static final int NSBMPFileType = 1;
+public static final int NSBackTabCharacter = 25;
+public static final int NSBackgroundStyleDark = 1;
+public static final int NSBackgroundStyleLight = 0;
+public static final int NSBackgroundStyleLowered = 3;
+public static final int NSBackgroundStyleRaised = 2;
+public static final int NSBackgroundTab = 1;
+public static final int NSBackingStoreBuffered = 2;
+public static final int NSBackingStoreNonretained = 1;
+public static final int NSBackingStoreRetained = 0;
+public static final int NSBackspaceCharacter = 8;
+public static final int NSBacktabTextMovement = 18;
+public static final int NSBeginFunctionKey = 63274;
+public static final int NSBelowBottom = 6;
+public static final int NSBelowTop = 3;
+public static final int NSBevelLineJoinStyle = 2;
+public static final int NSBezelBorder = 2;
+public static final int NSBlueControlTint = 1;
+public static final int NSBoldFontMask = 2;
+public static final int NSBorderlessWindowMask = 0;
+public static final int NSBottomTabsBezelBorder = 2;
+public static final int NSBoxCustom = 4;
+public static final int NSBoxOldStyle = 3;
+public static final int NSBoxPrimary = 0;
+public static final int NSBoxSecondary = 1;
+public static final int NSBoxSeparator = 2;
+public static final int NSBreakFunctionKey = 63282;
+public static final int NSBrowserAutoColumnResizing = 1;
+public static final int NSBrowserDropAbove = 1;
+public static final int NSBrowserDropOn = 0;
+public static final int NSBrowserNoColumnResizing = 0;
+public static final int NSBrowserUserColumnResizing = 2;
+public static final int NSButtLineCapStyle = 0;
+public static final int NSCMYKColorSpaceModel = 2;
+public static final int NSCMYKModeColorPanel = 2;
+public static final int NSCancelButton = 0;
+public static final int NSCancelTextMovement = 23;
+public static final int NSCarriageReturnCharacter = 13;
+public static final int NSCellAllowsMixedState = 16;
+public static final int NSCellChangesContents = 14;
+public static final int NSCellDisabled = 0;
+public static final int NSCellEditable = 3;
+public static final int NSCellHasImageHorizontal = 12;
+public static final int NSCellHasImageOnLeftOrBottom = 13;
+public static final int NSCellHasOverlappingImage = 11;
+public static final int NSCellHighlighted = 5;
+public static final int NSCellHitContentArea = 1;
+public static final int NSCellHitEditableTextArea = 2;
+public static final int NSCellHitNone = 0;
+public static final int NSCellHitTrackableArea = 4;
+public static final int NSCellIsBordered = 10;
+public static final int NSCellIsInsetButton = 15;
+public static final int NSCellLightsByBackground = 9;
+public static final int NSCellLightsByContents = 6;
+public static final int NSCellLightsByGray = 7;
+public static final int NSCellState = 1;
+public static final int NSCenterTabStopType = 2;
+public static final int NSCenterTextAlignment = 2;
+public static final int NSChangeAutosaved = 4;
+public static final int NSChangeBackgroundCell = 8;
+public static final int NSChangeBackgroundCellMask = 8;
+public static final int NSChangeCleared = 2;
+public static final int NSChangeDone = 0;
+public static final int NSChangeGrayCell = 4;
+public static final int NSChangeGrayCellMask = 4;
+public static final int NSChangeReadOtherContents = 3;
+public static final int NSChangeRedone = 5;
+public static final int NSChangeUndone = 1;
+public static final int NSCircularBezelStyle = 7;
+public static final int NSCircularSlider = 1;
+public static final int NSClearControlTint = 7;
+public static final int NSClearDisplayFunctionKey = 63290;
+public static final int NSClearLineFunctionKey = 63289;
+public static final int NSClipPagination = 2;
+public static final int NSClockAndCalendarDatePickerStyle = 1;
+public static final int NSClosableWindowMask = 2;
+public static final int NSClosePathBezierPathElement = 3;
+public static final int NSColorListModeColorPanel = 5;
+public static final int NSColorPanelAllModesMask = 65535;
+public static final int NSColorPanelCMYKModeMask = 4;
+public static final int NSColorPanelColorListModeMask = 32;
+public static final int NSColorPanelCrayonModeMask = 128;
+public static final int NSColorPanelCustomPaletteModeMask = 16;
+public static final int NSColorPanelGrayModeMask = 1;
+public static final int NSColorPanelHSBModeMask = 8;
+public static final int NSColorPanelRGBModeMask = 2;
+public static final int NSColorPanelWheelModeMask = 64;
+public static final int NSColorRenderingIntentAbsoluteColorimetric = 1;
+public static final int NSColorRenderingIntentDefault = 0;
+public static final int NSColorRenderingIntentPerceptual = 3;
+public static final int NSColorRenderingIntentRelativeColorimetric = 2;
+public static final int NSColorRenderingIntentSaturation = 4;
+public static final int NSCommandKeyMask = 1048576;
+public static final int NSCompositeClear = 0;
+public static final int NSCompositeCopy = 1;
+public static final int NSCompositeDestinationAtop = 9;
+public static final int NSCompositeDestinationIn = 7;
+public static final int NSCompositeDestinationOut = 8;
+public static final int NSCompositeDestinationOver = 6;
+public static final int NSCompositeHighlight = 12;
+public static final int NSCompositePlusDarker = 11;
+public static final int NSCompositePlusLighter = 13;
+public static final int NSCompositeSourceAtop = 5;
+public static final int NSCompositeSourceIn = 3;
+public static final int NSCompositeSourceOut = 4;
+public static final int NSCompositeSourceOver = 2;
+public static final int NSCompositeXOR = 10;
+public static final int NSCompressedFontMask = 512;
+public static final int NSCondensedFontMask = 64;
+public static final int NSContentsCellMask = 1;
+public static final int NSContinuousCapacityLevelIndicatorStyle = 1;
+public static final int NSControlGlyph = 16777215;
+public static final int NSControlKeyMask = 262144;
+public static final int NSCrayonModeColorPanel = 7;
+public static final int NSCriticalAlertStyle = 2;
+public static final int NSCriticalRequest = 0;
+public static final int NSCursorPointingDevice = 2;
+public static final int NSCursorUpdate = 17;
+public static final int NSCursorUpdateMask = 131072;
+public static final int NSCurveToBezierPathElement = 2;
+public static final int NSCustomPaletteModeColorPanel = 4;
+public static final int NSDecimalTabStopType = 3;
+public static final int NSDefaultControlTint = 0;
+public static final int NSDefaultTokenStyle = 0;
+public static final int NSDeleteCharFunctionKey = 63294;
+public static final int NSDeleteCharacter = 127;
+public static final int NSDeleteFunctionKey = 63272;
+public static final int NSDeleteLineFunctionKey = 63292;
+public static final int NSDescendingPageOrder = -1;
+public static final int NSDeviceIndependentModifierFlagsMask = -65536;
+public static final int NSDeviceNColorSpaceModel = 4;
+public static final int NSDirectSelection = 0;
+public static final int NSDisclosureBezelStyle = 5;
+public static final int NSDiscreteCapacityLevelIndicatorStyle = 2;
+public static final int NSDisplayWindowRunLoopOrdering = 600000;
+public static final int NSDocModalWindowMask = 64;
+public static final int NSDockWindowLevel = 20;
+public static final int NSDoubleType = 6;
+public static final int NSDownArrowFunctionKey = 63233;
+public static final int NSDownTextMovement = 22;
+public static final int NSDragOperationAll = 15;
+public static final int NSDragOperationAll_Obsolete = 15;
+public static final int NSDragOperationCopy = 1;
+public static final int NSDragOperationDelete = 32;
+public static final int NSDragOperationEvery = -1;
+public static final int NSDragOperationGeneric = 4;
+public static final int NSDragOperationLink = 2;
+public static final int NSDragOperationMove = 16;
+public static final int NSDragOperationNone = 0;
+public static final int NSDragOperationPrivate = 8;
+public static final int NSDrawerClosedState = 0;
+public static final int NSDrawerClosingState = 3;
+public static final int NSDrawerOpenState = 2;
+public static final int NSDrawerOpeningState = 1;
+public static final int NSEndFunctionKey = 63275;
+public static final int NSEnterCharacter = 3;
+public static final int NSEraDatePickerElementFlag = 256;
+public static final int NSEraserPointingDevice = 3;
+public static final int NSEvenOddWindingRule = 1;
+public static final int NSExclude10_4ElementsIconCreationOption = 4;
+public static final int NSExcludeQuickDrawElementsIconCreationOption = 2;
+public static final int NSExecuteFunctionKey = 63298;
+public static final int NSExpandedFontMask = 32;
+public static final int NSF10FunctionKey = 63245;
+public static final int NSF11FunctionKey = 63246;
+public static final int NSF12FunctionKey = 63247;
+public static final int NSF13FunctionKey = 63248;
+public static final int NSF14FunctionKey = 63249;
+public static final int NSF15FunctionKey = 63250;
+public static final int NSF16FunctionKey = 63251;
+public static final int NSF17FunctionKey = 63252;
+public static final int NSF18FunctionKey = 63253;
+public static final int NSF19FunctionKey = 63254;
+public static final int NSF1FunctionKey = 63236;
+public static final int NSF20FunctionKey = 63255;
+public static final int NSF21FunctionKey = 63256;
+public static final int NSF22FunctionKey = 63257;
+public static final int NSF23FunctionKey = 63258;
+public static final int NSF24FunctionKey = 63259;
+public static final int NSF25FunctionKey = 63260;
+public static final int NSF26FunctionKey = 63261;
+public static final int NSF27FunctionKey = 63262;
+public static final int NSF28FunctionKey = 63263;
+public static final int NSF29FunctionKey = 63264;
+public static final int NSF2FunctionKey = 63237;
+public static final int NSF30FunctionKey = 63265;
+public static final int NSF31FunctionKey = 63266;
+public static final int NSF32FunctionKey = 63267;
+public static final int NSF33FunctionKey = 63268;
+public static final int NSF34FunctionKey = 63269;
+public static final int NSF35FunctionKey = 63270;
+public static final int NSF3FunctionKey = 63238;
+public static final int NSF4FunctionKey = 63239;
+public static final int NSF5FunctionKey = 63240;
+public static final int NSF6FunctionKey = 63241;
+public static final int NSF7FunctionKey = 63242;
+public static final int NSF8FunctionKey = 63243;
+public static final int NSF9FunctionKey = 63244;
+public static final int NSFPCurrentField = 134;
+public static final int NSFPPreviewButton = 131;
+public static final int NSFPPreviewField = 128;
+public static final int NSFPRevertButton = 130;
+public static final int NSFPSetButton = 132;
+public static final int NSFPSizeField = 129;
+public static final int NSFPSizeTitle = 133;
+public static final int NSFileHandlingPanelCancelButton = 0;
+public static final int NSFileHandlingPanelOKButton = 1;
+public static final int NSFindFunctionKey = 63301;
+public static final int NSFindPanelActionNext = 2;
+public static final int NSFindPanelActionPrevious = 3;
+public static final int NSFindPanelActionReplace = 5;
+public static final int NSFindPanelActionReplaceAll = 4;
+public static final int NSFindPanelActionReplaceAllInSelection = 8;
+public static final int NSFindPanelActionReplaceAndFind = 6;
+public static final int NSFindPanelActionSelectAll = 9;
+public static final int NSFindPanelActionSelectAllInSelection = 10;
+public static final int NSFindPanelActionSetFindString = 7;
+public static final int NSFindPanelActionShowFindPanel = 1;
+public static final int NSFindPanelSubstringMatchTypeContains = 0;
+public static final int NSFindPanelSubstringMatchTypeEndsWith = 3;
+public static final int NSFindPanelSubstringMatchTypeFullWord = 2;
+public static final int NSFindPanelSubstringMatchTypeStartsWith = 1;
+public static final int NSFitPagination = 1;
+public static final int NSFixedPitchFontMask = 1024;
+public static final int NSFlagsChanged = 12;
+public static final int NSFlagsChangedMask = 4096;
+public static final int NSFloatType = 3;
+public static final int NSFloatingPointSamplesBitmapFormat = 4;
+public static final int NSFloatingWindowLevel = 3;
+public static final int NSFocusRingAbove = 2;
+public static final int NSFocusRingBelow = 1;
+public static final int NSFocusRingOnly = 0;
+public static final int NSFocusRingTypeDefault = 0;
+public static final int NSFocusRingTypeExterior = 2;
+public static final int NSFocusRingTypeNone = 1;
+public static final int NSFontAntialiasedIntegerAdvancementsRenderingMode = 3;
+public static final int NSFontAntialiasedRenderingMode = 1;
+public static final int NSFontBoldTrait = 2;
+public static final int NSFontClarendonSerifsClass = 1073741824;
+public static final int NSFontCollectionApplicationOnlyMask = 1;
+public static final int NSFontCondensedTrait = 64;
+public static final int NSFontDefaultRenderingMode = 0;
+public static final int NSFontExpandedTrait = 32;
+public static final int NSFontFamilyClassMask = -268435456;
+public static final int NSFontFreeformSerifsClass = 1879048192;
+public static final int NSFontIntegerAdvancementsRenderingMode = 2;
+public static final int NSFontItalicTrait = 1;
+public static final int NSFontModernSerifsClass = 805306368;
+public static final int NSFontMonoSpaceTrait = 1024;
+public static final int NSFontOldStyleSerifsClass = 268435456;
+public static final int NSFontOrnamentalsClass = -1879048192;
+public static final int NSFontPanelAllEffectsModeMask = 1048320;
+public static final int NSFontPanelAllModesMask = -1;
+public static final int NSFontPanelCollectionModeMask = 4;
+public static final int NSFontPanelDocumentColorEffectModeMask = 2048;
+public static final int NSFontPanelFaceModeMask = 1;
+public static final int NSFontPanelShadowEffectModeMask = 4096;
+public static final int NSFontPanelSizeModeMask = 2;
+public static final int NSFontPanelStandardModesMask = 65535;
+public static final int NSFontPanelStrikethroughEffectModeMask = 512;
+public static final int NSFontPanelTextColorEffectModeMask = 1024;
+public static final int NSFontPanelUnderlineEffectModeMask = 256;
+public static final int NSFontSansSerifClass = -2147483648;
+public static final int NSFontScriptsClass = -1610612736;
+public static final int NSFontSlabSerifsClass = 1342177280;
+public static final int NSFontSymbolicClass = -1073741824;
+public static final int NSFontTransitionalSerifsClass = 536870912;
+public static final int NSFontUIOptimizedTrait = 4096;
+public static final int NSFontUnknownClass = 0;
+public static final int NSFontVerticalTrait = 2048;
+public static final int NSFormFeedCharacter = 12;
+public static final int NSFunctionKeyMask = 8388608;
+public static final int NSGIFFileType = 2;
+public static final int NSGlyphAttributeBidiLevel = 2;
+public static final int NSGlyphAttributeElastic = 1;
+public static final int NSGlyphAttributeInscribe = 5;
+public static final int NSGlyphAttributeSoft = 0;
+public static final int NSGlyphInscribeAbove = 2;
+public static final int NSGlyphInscribeBase = 0;
+public static final int NSGlyphInscribeBelow = 1;
+public static final int NSGlyphInscribeOverBelow = 4;
+public static final int NSGlyphInscribeOverstrike = 3;
+public static final int NSGradientConcaveStrong = 2;
+public static final int NSGradientConcaveWeak = 1;
+public static final int NSGradientConvexStrong = 4;
+public static final int NSGradientConvexWeak = 3;
+public static final int NSGradientDrawsAfterEndingLocation = 2;
+public static final int NSGradientDrawsBeforeStartingLocation = 1;
+public static final int NSGradientNone = 0;
+public static final int NSGraphiteControlTint = 6;
+public static final int NSGrayColorSpaceModel = 0;
+public static final int NSGrayModeColorPanel = 0;
+public static final int NSGrooveBorder = 3;
+public static final int NSHSBModeColorPanel = 3;
+public static final int NSHUDWindowMask = 8192;
+public static final int NSHeavierFontAction = 5;
+public static final int NSHelpButtonBezelStyle = 9;
+public static final int NSHelpFunctionKey = 63302;
+public static final int NSHelpKeyMask = 4194304;
+public static final int NSHighlightModeMatrix = 1;
+public static final int NSHomeFunctionKey = 63273;
+public static final int NSHorizontalRuler = 0;
+public static final int NSHourMinuteDatePickerElementFlag = 12;
+public static final int NSHourMinuteSecondDatePickerElementFlag = 14;
+public static final int NSIdentityMappingCharacterCollection = 0;
+public static final int NSIllegalTextMovement = 0;
+public static final int NSImageAbove = 5;
+public static final int NSImageAlignBottom = 5;
+public static final int NSImageAlignBottomLeft = 6;
+public static final int NSImageAlignBottomRight = 7;
+public static final int NSImageAlignCenter = 0;
+public static final int NSImageAlignLeft = 4;
+public static final int NSImageAlignRight = 8;
+public static final int NSImageAlignTop = 1;
+public static final int NSImageAlignTopLeft = 2;
+public static final int NSImageAlignTopRight = 3;
+public static final int NSImageBelow = 4;
+public static final int NSImageCacheAlways = 1;
+public static final int NSImageCacheBySize = 2;
+public static final int NSImageCacheDefault = 0;
+public static final int NSImageCacheNever = 3;
+public static final int NSImageCellType = 2;
+public static final int NSImageFrameButton = 4;
+public static final int NSImageFrameGrayBezel = 2;
+public static final int NSImageFrameGroove = 3;
+public static final int NSImageFrameNone = 0;
+public static final int NSImageFramePhoto = 1;
+public static final int NSImageInterpolationDefault = 0;
+public static final int NSImageInterpolationHigh = 3;
+public static final int NSImageInterpolationLow = 2;
+public static final int NSImageInterpolationNone = 1;
+public static final int NSImageLeft = 2;
+public static final int NSImageLoadStatusCancelled = 1;
+public static final int NSImageLoadStatusCompleted = 0;
+public static final int NSImageLoadStatusInvalidData = 2;
+public static final int NSImageLoadStatusReadError = 4;
+public static final int NSImageLoadStatusUnexpectedEOF = 3;
+public static final int NSImageOnly = 1;
+public static final int NSImageOverlaps = 6;
+public static final int NSImageRepLoadStatusCompleted = -6;
+public static final int NSImageRepLoadStatusInvalidData = -4;
+public static final int NSImageRepLoadStatusReadingHeader = -2;
+public static final int NSImageRepLoadStatusUnexpectedEOF = -5;
+public static final int NSImageRepLoadStatusUnknownType = -1;
+public static final int NSImageRepLoadStatusWillNeedAllData = -3;
+public static final int NSImageRepMatchesDevice = 0;
+public static final int NSImageRight = 3;
+public static final int NSImageScaleAxesIndependently = 1;
+public static final int NSImageScaleNone = 2;
+public static final int NSImageScaleProportionallyDown = 0;
+public static final int NSImageScaleProportionallyUpOrDown = 3;
+public static final int NSIndexedColorSpaceModel = 5;
+public static final int NSInformationalAlertStyle = 1;
+public static final int NSInformationalRequest = 10;
+public static final int NSInsertCharFunctionKey = 63293;
+public static final int NSInsertFunctionKey = 63271;
+public static final int NSInsertLineFunctionKey = 63291;
+public static final int NSIntType = 1;
+public static final int NSItalicFontMask = 1;
+public static final int NSJPEG2000FileType = 5;
+public static final int NSJPEGFileType = 3;
+public static final int NSJustifiedTextAlignment = 3;
+public static final int NSKeyDown = 10;
+public static final int NSKeyDownMask = 1024;
+public static final int NSKeyUp = 11;
+public static final int NSKeyUpMask = 2048;
+public static final int NSLABColorSpaceModel = 3;
+public static final int NSLandscapeOrientation = 1;
+public static final int NSLeftArrowFunctionKey = 63234;
+public static final int NSLeftMouseDown = 1;
+public static final int NSLeftMouseDownMask = 2;
+public static final int NSLeftMouseDragged = 6;
+public static final int NSLeftMouseDraggedMask = 64;
+public static final int NSLeftMouseUp = 2;
+public static final int NSLeftMouseUpMask = 4;
+public static final int NSLeftTabStopType = 0;
+public static final int NSLeftTabsBezelBorder = 1;
+public static final int NSLeftTextAlignment = 0;
+public static final int NSLeftTextMovement = 19;
+public static final int NSLighterFontAction = 6;
+public static final int NSLineBorder = 1;
+public static final int NSLineBreakByCharWrapping = 1;
+public static final int NSLineBreakByClipping = 2;
+public static final int NSLineBreakByTruncatingHead = 3;
+public static final int NSLineBreakByTruncatingMiddle = 5;
+public static final int NSLineBreakByTruncatingTail = 4;
+public static final int NSLineBreakByWordWrapping = 0;
+public static final int NSLineDoesntMove = 0;
+public static final int NSLineMovesDown = 3;
+public static final int NSLineMovesLeft = 1;
+public static final int NSLineMovesRight = 2;
+public static final int NSLineMovesUp = 4;
+public static final int NSLineSeparatorCharacter = 8232;
+public static final int NSLineSweepDown = 2;
+public static final int NSLineSweepLeft = 0;
+public static final int NSLineSweepRight = 1;
+public static final int NSLineSweepUp = 3;
+public static final int NSLineToBezierPathElement = 1;
+public static final int NSLinearSlider = 0;
+public static final int NSListModeMatrix = 2;
+public static final int NSMacintoshInterfaceStyle = 3;
+public static final int NSMainMenuWindowLevel = 24;
+public static final int NSMenuFunctionKey = 63285;
+public static final int NSMiniControlSize = 2;
+public static final int NSMiniaturizableWindowMask = 4;
+public static final int NSMiterLineJoinStyle = 0;
+public static final int NSMixedState = -1;
+public static final int NSModalPanelWindowLevel = 8;
+public static final int NSModeSwitchFunctionKey = 63303;
+public static final int NSMomentaryChangeButton = 5;
+public static final int NSMomentaryLight = 7;
+public static final int NSMomentaryLightButton = 0;
+public static final int NSMomentaryPushButton = 0;
+public static final int NSMomentaryPushInButton = 7;
+public static final int NSMouseEntered = 8;
+public static final int NSMouseEnteredMask = 256;
+public static final int NSMouseEventSubtype = 0;
+public static final int NSMouseExited = 9;
+public static final int NSMouseExitedMask = 512;
+public static final int NSMouseMoved = 5;
+public static final int NSMouseMovedMask = 32;
+public static final int NSMoveToBezierPathElement = 0;
+public static final int NSNarrowFontMask = 16;
+public static final int NSNativeShortGlyphPacking = 5;
+public static final int NSNaturalTextAlignment = 4;
+public static final int NSNewlineCharacter = 10;
+public static final int NSNextFunctionKey = 63296;
+public static final int NSNextStepInterfaceStyle = 1;
+public static final int NSNoBorder = 0;
+public static final int NSNoCellMask = 0;
+public static final int NSNoFontChangeAction = 0;
+public static final int NSNoImage = 0;
+public static final int NSNoInterfaceStyle = 0;
+public static final int NSNoModeColorPanel = -1;
+public static final int NSNoScrollerParts = 0;
+public static final int NSNoTabsBezelBorder = 4;
+public static final int NSNoTabsLineBorder = 5;
+public static final int NSNoTabsNoBorder = 6;
+public static final int NSNoTitle = 0;
+public static final int NSNoUnderlineStyle = 0;
+public static final int NSNonStandardCharacterSetFontMask = 8;
+public static final int NSNonZeroWindingRule = 0;
+public static final int NSNonactivatingPanelMask = 128;
+public static final int NSNormalWindowLevel = 0;
+public static final int NSNullCellType = 0;
+public static final int NSNullGlyph = 0;
+public static final int NSNumericPadKeyMask = 2097152;
+public static final int NSOKButton = 1;
+public static final int NSOPENGL_CURRENT_VERSION = 1;
+public static final int NSOffState = 0;
+public static final int NSOnOffButton = 6;
+public static final int NSOnState = 1;
+public static final int NSOnlyScrollerArrows = 1;
+public static final int NSOpenGLCPRasterizationEnable = 221;
+public static final int NSOpenGLCPStateValidation = 301;
+public static final int NSOpenGLCPSurfaceOpacity = 236;
+public static final int NSOpenGLCPSurfaceOrder = 235;
+public static final int NSOpenGLCPSwapInterval = 222;
+public static final int NSOpenGLCPSwapRectangle = 200;
+public static final int NSOpenGLCPSwapRectangleEnable = 201;
+public static final int NSOpenGLGOClearFormatCache = 502;
+public static final int NSOpenGLGOFormatCacheSize = 501;
+public static final int NSOpenGLGOResetLibrary = 504;
+public static final int NSOpenGLGORetainRenderers = 503;
+public static final int NSOpenGLPFAAccelerated = 73;
+public static final int NSOpenGLPFAAccumSize = 14;
+public static final int NSOpenGLPFAAllRenderers = 1;
+public static final int NSOpenGLPFAAllowOfflineRenderers = 96;
+public static final int NSOpenGLPFAAlphaSize = 11;
+public static final int NSOpenGLPFAAuxBuffers = 7;
+public static final int NSOpenGLPFAAuxDepthStencil = 57;
+public static final int NSOpenGLPFABackingStore = 76;
+public static final int NSOpenGLPFAClosestPolicy = 74;
+public static final int NSOpenGLPFAColorFloat = 58;
+public static final int NSOpenGLPFAColorSize = 8;
+public static final int NSOpenGLPFACompliant = 83;
+public static final int NSOpenGLPFADepthSize = 12;
+public static final int NSOpenGLPFADoubleBuffer = 5;
+public static final int NSOpenGLPFAFullScreen = 54;
+public static final int NSOpenGLPFAMPSafe = 78;
+public static final int NSOpenGLPFAMaximumPolicy = 52;
+public static final int NSOpenGLPFAMinimumPolicy = 51;
+public static final int NSOpenGLPFAMultiScreen = 81;
+public static final int NSOpenGLPFAMultisample = 59;
+public static final int NSOpenGLPFANoRecovery = 72;
+public static final int NSOpenGLPFAOffScreen = 53;
+public static final int NSOpenGLPFAPixelBuffer = 90;
+public static final int NSOpenGLPFARendererID = 70;
+public static final int NSOpenGLPFARobust = 75;
+public static final int NSOpenGLPFASampleAlpha = 61;
+public static final int NSOpenGLPFASampleBuffers = 55;
+public static final int NSOpenGLPFASamples = 56;
+public static final int NSOpenGLPFAScreenMask = 84;
+public static final int NSOpenGLPFASingleRenderer = 71;
+public static final int NSOpenGLPFAStencilSize = 13;
+public static final int NSOpenGLPFAStereo = 6;
+public static final int NSOpenGLPFASupersample = 60;
+public static final int NSOpenGLPFAVirtualScreenCount = 128;
+public static final int NSOpenGLPFAWindow = 80;
+public static final int NSOtherMouseDown = 25;
+public static final int NSOtherMouseDownMask = 33554432;
+public static final int NSOtherMouseDragged = 27;
+public static final int NSOtherMouseDraggedMask = 134217728;
+public static final int NSOtherMouseUp = 26;
+public static final int NSOtherMouseUpMask = 67108864;
+public static final int NSOtherTextMovement = 0;
+public static final int NSOutlineViewDropOnItemIndex = -1;
+public static final int NSPNGFileType = 4;
+public static final int NSPageDownFunctionKey = 63277;
+public static final int NSPageUpFunctionKey = 63276;
+public static final int NSParagraphSeparatorCharacter = 8233;
+public static final int NSPathStyleNavigationBar = 1;
+public static final int NSPathStylePopUp = 2;
+public static final int NSPathStyleStandard = 0;
+public static final int NSPatternColorSpaceModel = 6;
+public static final int NSPauseFunctionKey = 63280;
+public static final int NSPenLowerSideMask = 2;
+public static final int NSPenPointingDevice = 1;
+public static final int NSPenTipMask = 1;
+public static final int NSPenUpperSideMask = 4;
+public static final int NSPeriodic = 16;
+public static final int NSPeriodicMask = 65536;
+public static final int NSPlainTextTokenStyle = 1;
+public static final int NSPopUpArrowAtBottom = 2;
+public static final int NSPopUpArrowAtCenter = 1;
+public static final int NSPopUpMenuWindowLevel = 101;
+public static final int NSPopUpNoArrow = 0;
+public static final int NSPortraitOrientation = 0;
+public static final int NSPositiveDoubleType = 7;
+public static final int NSPositiveFloatType = 4;
+public static final int NSPositiveIntType = 2;
+public static final int NSPosterFontMask = 256;
+public static final int NSPowerOffEventType = 1;
+public static final int NSPressedTab = 2;
+public static final int NSPrevFunctionKey = 63295;
+public static final int NSPrintFunctionKey = 63288;
+public static final int NSPrintPanelShowsCopies = 1;
+public static final int NSPrintPanelShowsOrientation = 8;
+public static final int NSPrintPanelShowsPageRange = 2;
+public static final int NSPrintPanelShowsPageSetupAccessory = 256;
+public static final int NSPrintPanelShowsPaperSize = 4;
+public static final int NSPrintPanelShowsPreview = 131072;
+public static final int NSPrintPanelShowsScaling = 16;
+public static final int NSPrintScreenFunctionKey = 63278;
+public static final int NSPrinterTableError = 2;
+public static final int NSPrinterTableNotFound = 1;
+public static final int NSPrinterTableOK = 0;
+public static final int NSPrintingCancelled = 0;
+public static final int NSPrintingFailure = 3;
+public static final int NSPrintingReplyLater = 2;
+public static final int NSPrintingSuccess = 1;
+public static final int NSProgressIndicatorBarStyle = 0;
+public static final int NSProgressIndicatorPreferredAquaThickness = 12;
+public static final int NSProgressIndicatorPreferredLargeThickness = 18;
+public static final int NSProgressIndicatorPreferredSmallThickness = 10;
+public static final int NSProgressIndicatorPreferredThickness = 14;
+public static final int NSProgressIndicatorSpinningStyle = 1;
+public static final int NSPushInCell = 2;
+public static final int NSPushInCellMask = 2;
+public static final int NSPushOnPushOffButton = 1;
+public static final int NSQTMovieLoopingBackAndForthPlayback = 2;
+public static final int NSQTMovieLoopingPlayback = 1;
+public static final int NSQTMovieNormalPlayback = 0;
+public static final int NSRGBColorSpaceModel = 1;
+public static final int NSRGBModeColorPanel = 1;
+public static final int NSRadioButton = 4;
+public static final int NSRadioModeMatrix = 0;
+public static final int NSRangeDateMode = 1;
+public static final int NSRatingLevelIndicatorStyle = 3;
+public static final int NSRecessedBezelStyle = 13;
+public static final int NSRedoFunctionKey = 63300;
+public static final int NSRegularControlSize = 0;
+public static final int NSRegularSquareBezelStyle = 2;
+public static final int NSRelevancyLevelIndicatorStyle = 0;
+public static final int NSRemoveTraitFontAction = 7;
+public static final int NSResetCursorRectsRunLoopOrdering = 700000;
+public static final int NSResetFunctionKey = 63283;
+public static final int NSResizableWindowMask = 8;
+public static final int NSReturnTextMovement = 16;
+public static final int NSRightArrowFunctionKey = 63235;
+public static final int NSRightMouseDown = 3;
+public static final int NSRightMouseDownMask = 8;
+public static final int NSRightMouseDragged = 7;
+public static final int NSRightMouseDraggedMask = 128;
+public static final int NSRightMouseUp = 4;
+public static final int NSRightMouseUpMask = 16;
+public static final int NSRightTabStopType = 1;
+public static final int NSRightTabsBezelBorder = 3;
+public static final int NSRightTextAlignment = 1;
+public static final int NSRightTextMovement = 20;
+public static final int NSRoundLineCapStyle = 1;
+public static final int NSRoundLineJoinStyle = 1;
+public static final int NSRoundRectBezelStyle = 12;
+public static final int NSRoundedBezelStyle = 1;
+public static final int NSRoundedDisclosureBezelStyle = 14;
+public static final int NSRoundedTokenStyle = 2;
+public static final int NSRuleEditorNestingModeCompound = 2;
+public static final int NSRuleEditorNestingModeList = 1;
+public static final int NSRuleEditorNestingModeSimple = 3;
+public static final int NSRuleEditorNestingModeSingle = 0;
+public static final int NSRuleEditorRowTypeCompound = 1;
+public static final int NSRuleEditorRowTypeSimple = 0;
+public static final int NSRunAbortedResponse = -1001;
+public static final int NSRunContinuesResponse = -1002;
+public static final int NSRunStoppedResponse = -1000;
+public static final int NSSaveAsOperation = 1;
+public static final int NSSaveOperation = 0;
+public static final int NSSaveToOperation = 2;
+public static final int NSScaleNone = 2;
+public static final int NSScaleProportionally = 0;
+public static final int NSScaleToFit = 1;
+public static final int NSScreenChangedEventType = 8;
+public static final int NSScreenSaverWindowLevel = 1000;
+public static final int NSScrollLockFunctionKey = 63279;
+public static final int NSScrollWheel = 22;
+public static final int NSScrollWheelMask = 4194304;
+public static final int NSScrollerArrowsDefaultSetting = 0;
+public static final int NSScrollerArrowsMaxEnd = 0;
+public static final int NSScrollerArrowsMinEnd = 1;
+public static final int NSScrollerArrowsNone = 2;
+public static final int NSScrollerDecrementArrow = 1;
+public static final int NSScrollerDecrementLine = 4;
+public static final int NSScrollerDecrementPage = 1;
+public static final int NSScrollerIncrementArrow = 0;
+public static final int NSScrollerIncrementLine = 5;
+public static final int NSScrollerIncrementPage = 3;
+public static final int NSScrollerKnob = 2;
+public static final int NSScrollerKnobSlot = 6;
+public static final int NSScrollerNoPart = 0;
+public static final int NSSearchFieldClearRecentsMenuItemTag = 1002;
+public static final int NSSearchFieldNoRecentsMenuItemTag = 1003;
+public static final int NSSearchFieldRecentsMenuItemTag = 1001;
+public static final int NSSearchFieldRecentsTitleMenuItemTag = 1000;
+public static final int NSSegmentStyleAutomatic = 0;
+public static final int NSSegmentStyleCapsule = 5;
+public static final int NSSegmentStyleRoundRect = 3;
+public static final int NSSegmentStyleRounded = 1;
+public static final int NSSegmentStyleSmallSquare = 6;
+public static final int NSSegmentStyleTexturedRounded = 2;
+public static final int NSSegmentStyleTexturedSquare = 4;
+public static final int NSSegmentSwitchTrackingMomentary = 2;
+public static final int NSSegmentSwitchTrackingSelectAny = 1;
+public static final int NSSegmentSwitchTrackingSelectOne = 0;
+public static final int NSSelectByCharacter = 0;
+public static final int NSSelectByParagraph = 2;
+public static final int NSSelectByWord = 1;
+public static final int NSSelectFunctionKey = 63297;
+public static final int NSSelectedTab = 0;
+public static final int NSSelectingNext = 1;
+public static final int NSSelectingPrevious = 2;
+public static final int NSSelectionAffinityDownstream = 1;
+public static final int NSSelectionAffinityUpstream = 0;
+public static final int NSServiceApplicationLaunchFailedError = 66561;
+public static final int NSServiceApplicationNotFoundError = 66560;
+public static final int NSServiceErrorMaximum = 66817;
+public static final int NSServiceErrorMinimum = 66560;
+public static final int NSServiceInvalidPasteboardDataError = 66563;
+public static final int NSServiceMalformedServiceDictionaryError = 66564;
+public static final int NSServiceMiscellaneousError = 66800;
+public static final int NSServiceRequestTimedOutError = 66562;
+public static final int NSShadowlessSquareBezelStyle = 6;
+public static final int NSShiftKeyMask = 131072;
+public static final int NSShowControlGlyphs = 1;
+public static final int NSShowInvisibleGlyphs = 2;
+public static final int NSSingleDateMode = 0;
+public static final int NSSingleUnderlineStyle = 1;
+public static final int NSSizeDownFontAction = 4;
+public static final int NSSizeUpFontAction = 3;
+public static final int NSSmallCapsFontMask = 128;
+public static final int NSSmallControlSize = 1;
+public static final int NSSmallIconButtonBezelStyle = 2;
+public static final int NSSmallSquareBezelStyle = 10;
+public static final int NSSpecialPageOrder = 0;
+public static final int NSSpeechImmediateBoundary = 0;
+public static final int NSSpeechSentenceBoundary = 2;
+public static final int NSSpeechWordBoundary = 1;
+public static final int NSSpellingStateGrammarFlag = 2;
+public static final int NSSpellingStateSpellingFlag = 1;
+public static final int NSSplitViewDividerStyleThick = 1;
+public static final int NSSplitViewDividerStyleThin = 2;
+public static final int NSSquareLineCapStyle = 2;
+public static final int NSSquareStatusItemLength = -2;
+public static final int NSStatusWindowLevel = 25;
+public static final int NSStopFunctionKey = 63284;
+public static final int NSStringDrawingDisableScreenFontSubstitution = 4;
+public static final int NSStringDrawingOneShot = 16;
+public static final int NSStringDrawingTruncatesLastVisibleLine = 32;
+public static final int NSStringDrawingUsesDeviceMetrics = 8;
+public static final int NSStringDrawingUsesFontLeading = 2;
+public static final int NSStringDrawingUsesLineFragmentOrigin = 1;
+public static final int NSSubmenuWindowLevel = 3;
+public static final int NSSwitchButton = 3;
+public static final int NSSysReqFunctionKey = 63281;
+public static final int NSSystemDefined = 14;
+public static final int NSSystemDefinedMask = 16384;
+public static final int NSSystemFunctionKey = 63287;
+public static final int NSTIFFCompressionCCITTFAX3 = 3;
+public static final int NSTIFFCompressionCCITTFAX4 = 4;
+public static final int NSTIFFCompressionJPEG = 6;
+public static final int NSTIFFCompressionLZW = 5;
+public static final int NSTIFFCompressionNEXT = 32766;
+public static final int NSTIFFCompressionNone = 1;
+public static final int NSTIFFCompressionOldJPEG = 32865;
+public static final int NSTIFFCompressionPackBits = 32773;
+public static final int NSTIFFFileType = 0;
+public static final int NSTabCharacter = 9;
+public static final int NSTabTextMovement = 17;
+public static final int NSTableColumnAutoresizingMask = 1;
+public static final int NSTableColumnNoResizing = 0;
+public static final int NSTableColumnUserResizingMask = 2;
+public static final int NSTableViewDropAbove = 1;
+public static final int NSTableViewDropOn = 0;
+public static final int NSTableViewFirstColumnOnlyAutoresizingStyle = 5;
+public static final int NSTableViewGridNone = 0;
+public static final int NSTableViewLastColumnOnlyAutoresizingStyle = 4;
+public static final int NSTableViewNoColumnAutoresizing = 0;
+public static final int NSTableViewReverseSequentialColumnAutoresizingStyle = 3;
+public static final int NSTableViewSelectionHighlightStyleRegular = 0;
+public static final int NSTableViewSelectionHighlightStyleSourceList = 1;
+public static final int NSTableViewSequentialColumnAutoresizingStyle = 2;
+public static final int NSTableViewSolidHorizontalGridLineMask = 2;
+public static final int NSTableViewSolidVerticalGridLineMask = 1;
+public static final int NSTableViewUniformColumnAutoresizingStyle = 1;
+public static final int NSTabletPoint = 23;
+public static final int NSTabletPointEventSubtype = 1;
+public static final int NSTabletPointMask = 8388608;
+public static final int NSTabletProximity = 24;
+public static final int NSTabletProximityEventSubtype = 2;
+public static final int NSTabletProximityMask = 16777216;
+public static final int NSTerminateCancel = 0;
+public static final int NSTerminateLater = 2;
+public static final int NSTerminateNow = 1;
+public static final int NSTextBlockAbsoluteValueType = 0;
+public static final int NSTextBlockBaselineAlignment = 3;
+public static final int NSTextBlockBorder = 0;
+public static final int NSTextBlockBottomAlignment = 2;
+public static final int NSTextBlockHeight = 4;
+public static final int NSTextBlockMargin = 1;
+public static final int NSTextBlockMaximumHeight = 6;
+public static final int NSTextBlockMaximumWidth = 2;
+public static final int NSTextBlockMiddleAlignment = 1;
+public static final int NSTextBlockMinimumHeight = 5;
+public static final int NSTextBlockMinimumWidth = 1;
+public static final int NSTextBlockPadding = -1;
+public static final int NSTextBlockPercentageValueType = 1;
+public static final int NSTextBlockTopAlignment = 0;
+public static final int NSTextBlockWidth = 0;
+public static final int NSTextCellType = 1;
+public static final int NSTextFieldAndStepperDatePickerStyle = 0;
+public static final int NSTextFieldDatePickerStyle = 2;
+public static final int NSTextFieldRoundedBezel = 1;
+public static final int NSTextFieldSquareBezel = 0;
+public static final int NSTextListPrependEnclosingMarker = 1;
+public static final int NSTextReadInapplicableDocumentTypeError = 65806;
+public static final int NSTextReadWriteErrorMaximum = 66303;
+public static final int NSTextReadWriteErrorMinimum = 65792;
+public static final int NSTextStorageEditedAttributes = 1;
+public static final int NSTextStorageEditedCharacters = 2;
+public static final int NSTextTableAutomaticLayoutAlgorithm = 0;
+public static final int NSTextTableFixedLayoutAlgorithm = 1;
+public static final int NSTextWriteInapplicableDocumentTypeError = 66062;
+public static final int NSTexturedBackgroundWindowMask = 256;
+public static final int NSTexturedRoundedBezelStyle = 11;
+public static final int NSTexturedSquareBezelStyle = 8;
+public static final int NSThickSquareBezelStyle = 3;
+public static final int NSThickerSquareBezelStyle = 4;
+public static final int NSTickMarkAbove = 1;
+public static final int NSTickMarkBelow = 0;
+public static final int NSTickMarkLeft = 1;
+public static final int NSTickMarkRight = 0;
+public static final int NSTimeZoneDatePickerElementFlag = 16;
+public static final int NSTitledWindowMask = 1;
+public static final int NSToggleButton = 2;
+public static final int NSToolbarDisplayModeDefault = 0;
+public static final int NSToolbarDisplayModeIconAndLabel = 1;
+public static final int NSToolbarDisplayModeIconOnly = 2;
+public static final int NSToolbarDisplayModeLabelOnly = 3;
+public static final int NSToolbarItemVisibilityPriorityHigh = 1000;
+public static final int NSToolbarItemVisibilityPriorityLow = -1000;
+public static final int NSToolbarItemVisibilityPriorityStandard = 0;
+public static final int NSToolbarItemVisibilityPriorityUser = 2000;
+public static final int NSToolbarSizeModeDefault = 0;
+public static final int NSToolbarSizeModeRegular = 1;
+public static final int NSToolbarSizeModeSmall = 2;
+public static final int NSTopTabsBezelBorder = 0;
+public static final int NSTornOffMenuWindowLevel = 3;
+public static final int NSTrackModeMatrix = 3;
+public static final int NSTrackingActiveAlways = 128;
+public static final int NSTrackingActiveInActiveApp = 64;
+public static final int NSTrackingActiveInKeyWindow = 32;
+public static final int NSTrackingActiveWhenFirstResponder = 16;
+public static final int NSTrackingAssumeInside = 256;
+public static final int NSTrackingCursorUpdate = 4;
+public static final int NSTrackingEnabledDuringMouseDrag = 1024;
+public static final int NSTrackingInVisibleRect = 512;
+public static final int NSTrackingMouseEnteredAndExited = 1;
+public static final int NSTrackingMouseMoved = 2;
+public static final int NSTypesetterBehavior_10_2 = 2;
+public static final int NSTypesetterBehavior_10_2_WithCompatibility = 1;
+public static final int NSTypesetterBehavior_10_3 = 3;
+public static final int NSTypesetterBehavior_10_4 = 4;
+public static final int NSTypesetterContainerBreakAction = 32;
+public static final int NSTypesetterHorizontalTabAction = 4;
+public static final int NSTypesetterLatestBehavior = -1;
+public static final int NSTypesetterLineBreakAction = 8;
+public static final int NSTypesetterOriginalBehavior = 0;
+public static final int NSTypesetterParagraphBreakAction = 16;
+public static final int NSTypesetterWhitespaceAction = 2;
+public static final int NSTypesetterZeroAdvancementAction = 1;
+public static final int NSUnboldFontMask = 4;
+public static final int NSUnderlinePatternDash = 512;
+public static final int NSUnderlinePatternDashDot = 768;
+public static final int NSUnderlinePatternDashDotDot = 1024;
+public static final int NSUnderlinePatternDot = 256;
+public static final int NSUnderlinePatternSolid = 0;
+public static final int NSUnderlineStyleDouble = 9;
+public static final int NSUnderlineStyleNone = 0;
+public static final int NSUnderlineStyleSingle = 1;
+public static final int NSUnderlineStyleThick = 2;
+public static final int NSUndoFunctionKey = 63299;
+public static final int NSUnifiedTitleAndToolbarWindowMask = 4096;
+public static final int NSUnitalicFontMask = 16777216;
+public static final int NSUnknownColorSpaceModel = -1;
+public static final int NSUnknownPageOrder = 2;
+public static final int NSUnknownPointingDevice = 0;
+public static final int NSUnscaledWindowMask = 2048;
+public static final int NSUpArrowFunctionKey = 63232;
+public static final int NSUpTextMovement = 21;
+public static final int NSUpdateWindowsRunLoopOrdering = 500000;
+public static final int NSUserFunctionKey = 63286;
+public static final int NSUtilityWindowMask = 16;
+public static final int NSVariableStatusItemLength = -1;
+public static final int NSVerticalRuler = 1;
+public static final int NSViaPanelFontAction = 1;
+public static final int NSViewHeightSizable = 16;
+public static final int NSViewMaxXMargin = 4;
+public static final int NSViewMaxYMargin = 32;
+public static final int NSViewMinXMargin = 1;
+public static final int NSViewMinYMargin = 8;
+public static final int NSViewNotSizable = 0;
+public static final int NSViewWidthSizable = 2;
+public static final int NSWantsBidiLevels = 4;
+public static final int NSWarningAlertStyle = 0;
+public static final int NSWheelModeColorPanel = 6;
+public static final int NSWindowAbove = 1;
+public static final int NSWindowBackingLocationDefault = 0;
+public static final int NSWindowBackingLocationMainMemory = 2;
+public static final int NSWindowBackingLocationVideoMemory = 1;
+public static final int NSWindowBelow = -1;
+public static final int NSWindowCloseButton = 0;
+public static final int NSWindowCollectionBehaviorCanJoinAllSpaces = 1;
+public static final int NSWindowCollectionBehaviorDefault = 0;
+public static final int NSWindowCollectionBehaviorMoveToActiveSpace = 2;
+public static final int NSWindowDocumentIconButton = 4;
+public static final int NSWindowExposedEventType = 0;
+public static final int NSWindowMiniaturizeButton = 1;
+public static final int NSWindowMovedEventType = 4;
+public static final int NSWindowOut = 0;
+public static final int NSWindowSharingNone = 0;
+public static final int NSWindowSharingReadOnly = 1;
+public static final int NSWindowSharingReadWrite = 2;
+public static final int NSWindowToolbarButton = 3;
+public static final int NSWindowZoomButton = 2;
+public static final int NSWindows95InterfaceStyle = 2;
+public static final int NSWorkspaceLaunchAllowingClassicStartup = 131072;
+public static final int NSWorkspaceLaunchAndHide = 1048576;
+public static final int NSWorkspaceLaunchAndHideOthers = 2097152;
+public static final int NSWorkspaceLaunchAndPrint = 2;
+public static final int NSWorkspaceLaunchAsync = 65536;
+public static final int NSWorkspaceLaunchDefault = 196608;
+public static final int NSWorkspaceLaunchInhibitingBackgroundOnly = 128;
+public static final int NSWorkspaceLaunchNewInstance = 524288;
+public static final int NSWorkspaceLaunchPreferringClassic = 262144;
+public static final int NSWorkspaceLaunchWithoutActivation = 512;
+public static final int NSWorkspaceLaunchWithoutAddingToRecents = 256;
+public static final int NSWritingDirectionLeftToRight = 0;
+public static final int NSWritingDirectionNatural = -1;
+public static final int NSWritingDirectionRightToLeft = 1;
+public static final int NSYearMonthDatePickerElementFlag = 192;
+public static final int NSYearMonthDayDatePickerElementFlag = 224;
+public static final int kCFStringEncodingUTF8 = 134217984;
+public static final int NSASCIIStringEncoding = 1;
+public static final int NSAdminApplicationDirectory = 4;
+public static final int NSAggregateExpressionType = 14;
+public static final int NSAllApplicationsDirectory = 100;
+public static final int NSAllDomainsMask = 65535;
+public static final int NSAllLibrariesDirectory = 101;
+public static final int NSAllPredicateModifier = 1;
+public static final int NSAnchoredSearch = 8;
+public static final int NSAndPredicateType = 1;
+public static final int NSAnyPredicateModifier = 2;
+public static final int NSApplicationDirectory = 1;
+public static final int NSApplicationSupportDirectory = 14;
+public static final int NSArgumentEvaluationScriptError = 3;
+public static final int NSArgumentsWrongScriptError = 6;
+public static final int NSAtomicWrite = 1;
+public static final int NSBackwardsSearch = 4;
+public static final int NSBeginsWithComparison = 5;
+public static final int NSBeginsWithPredicateOperatorType = 8;
+public static final int NSBetweenPredicateOperatorType = 100;
+public static final int NSBundleExecutableArchitectureI386 = 7;
+public static final int NSBundleExecutableArchitecturePPC = 18;
+public static final int NSBundleExecutableArchitecturePPC64 = 16777234;
+public static final int NSBundleExecutableArchitectureX86_64 = 16777223;
+public static final int NSCachesDirectory = 13;
+public static final int NSCalculationDivideByZero = 4;
+public static final int NSCalculationLossOfPrecision = 1;
+public static final int NSCalculationNoError = 0;
+public static final int NSCalculationOverflow = 3;
+public static final int NSCalculationUnderflow = 2;
+public static final int NSCannotCreateScriptCommandError = 10;
+public static final int NSCaseInsensitivePredicateOption = 1;
+public static final int NSCaseInsensitiveSearch = 1;
+public static final int NSCollectorDisabledOption = 2;
+public static final int NSConstantValueExpressionType = 0;
+public static final int NSContainerSpecifierError = 2;
+public static final int NSContainsComparison = 7;
+public static final int NSContainsPredicateOperatorType = 99;
+public static final int NSCoreServiceDirectory = 10;
+public static final int NSCustomSelectorPredicateOperatorType = 11;
+public static final int NSDateFormatterBehavior10_0 = 1000;
+public static final int NSDateFormatterBehavior10_4 = 1040;
+public static final int NSDateFormatterBehaviorDefault = 0;
+public static final int NSDateFormatterFullStyle = 4;
+public static final int NSDateFormatterLongStyle = 3;
+public static final int NSDateFormatterMediumStyle = 2;
+public static final int NSDateFormatterNoStyle = 0;
+public static final int NSDateFormatterShortStyle = 1;
+public static final int NSDayCalendarUnit = 16;
+public static final int NSDecimalMaxSize = 8;
+public static final int NSDecimalNoScale = 32767;
+public static final int NSDemoApplicationDirectory = 2;
+public static final int NSDesktopDirectory = 12;
+public static final int NSDeveloperApplicationDirectory = 3;
+public static final int NSDeveloperDirectory = 6;
+public static final int NSDiacriticInsensitivePredicateOption = 2;
+public static final int NSDiacriticInsensitiveSearch = 128;
+public static final int NSDirectPredicateModifier = 0;
+public static final int NSDocumentDirectory = 9;
+public static final int NSDocumentationDirectory = 8;
+public static final int NSDownloadsDirectory = 15;
+public static final int NSEndsWithComparison = 6;
+public static final int NSEndsWithPredicateOperatorType = 9;
+public static final int NSEqualToComparison = 0;
+public static final int NSEqualToPredicateOperatorType = 4;
+public static final int NSEraCalendarUnit = 2;
+public static final int NSEvaluatedObjectExpressionType = 1;
+public static final int NSEverySubelement = 1;
+public static final int NSExecutableArchitectureMismatchError = 3585;
+public static final int NSExecutableErrorMaximum = 3839;
+public static final int NSExecutableErrorMinimum = 3584;
+public static final int NSExecutableLinkError = 3588;
+public static final int NSExecutableLoadError = 3587;
+public static final int NSExecutableNotLoadableError = 3584;
+public static final int NSExecutableRuntimeMismatchError = 3586;
+public static final int NSFileErrorMaximum = 1023;
+public static final int NSFileErrorMinimum = 0;
+public static final int NSFileLockingError = 255;
+public static final int NSFileNoSuchFileError = 4;
+public static final int NSFileReadCorruptFileError = 259;
+public static final int NSFileReadInapplicableStringEncodingError = 261;
+public static final int NSFileReadInvalidFileNameError = 258;
+public static final int NSFileReadNoPermissionError = 257;
+public static final int NSFileReadNoSuchFileError = 260;
+public static final int NSFileReadTooLargeError = 263;
+public static final int NSFileReadUnknownError = 256;
+public static final int NSFileReadUnknownStringEncodingError = 264;
+public static final int NSFileReadUnsupportedSchemeError = 262;
+public static final int NSFileWriteInapplicableStringEncodingError = 517;
+public static final int NSFileWriteInvalidFileNameError = 514;
+public static final int NSFileWriteNoPermissionError = 513;
+public static final int NSFileWriteOutOfSpaceError = 640;
+public static final int NSFileWriteUnknownError = 512;
+public static final int NSFileWriteUnsupportedSchemeError = 518;
+public static final int NSForcedOrderingSearch = 512;
+public static final int NSFormattingError = 2048;
+public static final int NSFormattingErrorMaximum = 2559;
+public static final int NSFormattingErrorMinimum = 2048;
+public static final double NSFoundationVersionNumber10_0 = 397.39999999999998;
+public static final double NSFoundationVersionNumber10_1 = 425.00000000000000;
+public static final double NSFoundationVersionNumber10_1_1 = 425.00000000000000;
+public static final double NSFoundationVersionNumber10_1_2 = 425.00000000000000;
+public static final double NSFoundationVersionNumber10_1_3 = 425.00000000000000;
+public static final double NSFoundationVersionNumber10_1_4 = 425.00000000000000;
+public static final double NSFoundationVersionNumber10_2 = 462.00000000000000;
+public static final double NSFoundationVersionNumber10_2_1 = 462.00000000000000;
+public static final double NSFoundationVersionNumber10_2_2 = 462.00000000000000;
+public static final double NSFoundationVersionNumber10_2_3 = 462.00000000000000;
+public static final double NSFoundationVersionNumber10_2_4 = 462.00000000000000;
+public static final double NSFoundationVersionNumber10_2_5 = 462.00000000000000;
+public static final double NSFoundationVersionNumber10_2_6 = 462.00000000000000;
+public static final double NSFoundationVersionNumber10_2_7 = 462.69999999999999;
+public static final double NSFoundationVersionNumber10_2_8 = 462.69999999999999;
+public static final double NSFoundationVersionNumber10_3 = 500.00000000000000;
+public static final double NSFoundationVersionNumber10_3_1 = 500.00000000000000;
+public static final double NSFoundationVersionNumber10_3_2 = 500.30000000000001;
+public static final double NSFoundationVersionNumber10_3_3 = 500.54000000000002;
+public static final double NSFoundationVersionNumber10_3_4 = 500.56000000000000;
+public static final double NSFoundationVersionNumber10_3_5 = 500.56000000000000;
+public static final double NSFoundationVersionNumber10_3_6 = 500.56000000000000;
+public static final double NSFoundationVersionNumber10_3_7 = 500.56000000000000;
+public static final double NSFoundationVersionNumber10_3_8 = 500.56000000000000;
+public static final double NSFoundationVersionNumber10_3_9 = 500.57999999999998;
+public static final double NSFoundationVersionNumber10_4 = 567.00000000000000;
+public static final double NSFoundationVersionNumber10_4_1 = 567.00000000000000;
+public static final double NSFoundationVersionNumber10_4_10 = 567.28999999999996;
+public static final double NSFoundationVersionNumber10_4_11 = 567.36000000000001;
+public static final double NSFoundationVersionNumber10_4_2 = 567.12000000000000;
+public static final double NSFoundationVersionNumber10_4_3 = 567.21000000000004;
+public static final double NSFoundationVersionNumber10_4_4_Intel = 567.23000000000002;
+public static final double NSFoundationVersionNumber10_4_4_PowerPC = 567.21000000000004;
+public static final double NSFoundationVersionNumber10_4_5 = 567.25000000000000;
+public static final double NSFoundationVersionNumber10_4_6 = 567.25999999999999;
+public static final double NSFoundationVersionNumber10_4_7 = 567.26999999999998;
+public static final double NSFoundationVersionNumber10_4_8 = 567.27999999999997;
+public static final double NSFoundationVersionNumber10_4_9 = 567.28999999999996;
+public static final int NSFoundationVersionWithFileManagerResourceForkSupport = 412;
+public static final int NSFunctionExpressionType = 4;
+public static final int NSGreaterThanComparison = 4;
+public static final int NSGreaterThanOrEqualToComparison = 3;
+public static final int NSGreaterThanOrEqualToPredicateOperatorType = 3;
+public static final int NSGreaterThanPredicateOperatorType = 2;
+public static final int NSHPUXOperatingSystem = 4;
+public static final int NSHTTPCookieAcceptPolicyAlways = 0;
+public static final int NSHTTPCookieAcceptPolicyNever = 1;
+public static final int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2;
+public static final int NSHashTableCopyIn = 65536;
+public static final int NSHashTableObjectPointerPersonality = 512;
+public static final int NSHashTableStrongMemory = 0;
+public static final int NSHashTableZeroingWeakMemory = 1;
+public static final int NSHourCalendarUnit = 32;
+public static final int NSINTEGER_DEFINED = 1;
+public static final int NSISO2022JPStringEncoding = 21;
+public static final int NSISOLatin1StringEncoding = 5;
+public static final int NSISOLatin2StringEncoding = 9;
+public static final int NSInPredicateOperatorType = 10;
+public static final int NSIndexSubelement = 0;
+public static final int NSIntegerMax = 2147483647;
+public static final int NSIntegerMin = -2147483648;
+public static final int NSInternalScriptError = 8;
+public static final int NSInternalSpecifierError = 5;
+public static final int NSIntersectSetExpressionType = 6;
+public static final int NSInvalidIndexSpecifierError = 4;
+public static final int NSJapaneseEUCStringEncoding = 3;
+public static final int NSKeyPathExpressionType = 3;
+public static final int NSKeySpecifierEvaluationScriptError = 2;
+public static final int NSKeyValueChangeInsertion = 2;
+public static final int NSKeyValueChangeRemoval = 3;
+public static final int NSKeyValueChangeReplacement = 4;
+public static final int NSKeyValueChangeSetting = 1;
+public static final int NSKeyValueIntersectSetMutation = 3;
+public static final int NSKeyValueMinusSetMutation = 2;
+public static final int NSKeyValueObservingOptionInitial = 4;
+public static final int NSKeyValueObservingOptionNew = 1;
+public static final int NSKeyValueObservingOptionOld = 2;
+public static final int NSKeyValueObservingOptionPrior = 8;
+public static final int NSKeyValueSetSetMutation = 4;
+public static final int NSKeyValueUnionSetMutation = 1;
+public static final int NSKeyValueValidationError = 1024;
+public static final int NSLessThanComparison = 2;
+public static final int NSLessThanOrEqualToComparison = 1;
+public static final int NSLessThanOrEqualToPredicateOperatorType = 1;
+public static final int NSLessThanPredicateOperatorType = 0;
+public static final int NSLibraryDirectory = 5;
+public static final int NSLikePredicateOperatorType = 7;
+public static final int NSLiteralSearch = 2;
+public static final int NSLocalDomainMask = 2;
+public static final int NSMACHOperatingSystem = 5;
+public static final int NSMacOSRomanStringEncoding = 30;
+public static final int NSMachPortDeallocateNone = 0;
+public static final int NSMachPortDeallocateReceiveRight = 2;
+public static final int NSMachPortDeallocateSendRight = 1;
+public static final int NSMapTableCopyIn = 65536;
+public static final int NSMapTableObjectPointerPersonality = 512;
+public static final int NSMapTableStrongMemory = 0;
+public static final int NSMapTableZeroingWeakMemory = 1;
+public static final int NSMappedRead = 1;
+public static final int NSMatchesPredicateOperatorType = 6;
+public static final int NSMaxXEdge = 2;
+public static final int NSMaxYEdge = 3;
+public static final int NSMiddleSubelement = 2;
+public static final int NSMinXEdge = 0;
+public static final int NSMinYEdge = 1;
+public static final int NSMinusSetExpressionType = 7;
+public static final int NSMinuteCalendarUnit = 64;
+public static final int NSMonthCalendarUnit = 8;
+public static final int NSNEXTSTEPStringEncoding = 2;
+public static final int NSNetServiceNoAutoRename = 1;
+public static final int NSNetServicesActivityInProgress = -72003;
+public static final int NSNetServicesBadArgumentError = -72004;
+public static final int NSNetServicesCancelledError = -72005;
+public static final int NSNetServicesCollisionError = -72001;
+public static final int NSNetServicesInvalidError = -72006;
+public static final int NSNetServicesNotFoundError = -72002;
+public static final int NSNetServicesTimeoutError = -72007;
+public static final int NSNetServicesUnknownError = -72000;
+public static final int NSNetworkDomainMask = 4;
+public static final int NSNoScriptError = 0;
+public static final int NSNoSpecifierError = 0;
+public static final int NSNoSubelement = 4;
+public static final int NSNoTopLevelContainersSpecifierError = 1;
+public static final int NSNonLossyASCIIStringEncoding = 7;
+public static final int NSNotEqualToPredicateOperatorType = 5;
+public static final int NSNotFound = 2147483647;
+public static final int NSNotPredicateType = 0;
+public static final int NSNotificationCoalescingOnName = 1;
+public static final int NSNotificationCoalescingOnSender = 2;
+public static final int NSNotificationDeliverImmediately = 1;
+public static final int NSNotificationNoCoalescing = 0;
+public static final int NSNotificationPostToAllSessions = 2;
+public static final int NSNotificationSuspensionBehaviorCoalesce = 2;
+public static final int NSNotificationSuspensionBehaviorDeliverImmediately = 4;
+public static final int NSNotificationSuspensionBehaviorDrop = 1;
+public static final int NSNotificationSuspensionBehaviorHold = 3;
+public static final int NSNumberFormatterBehavior10_0 = 1000;
+public static final int NSNumberFormatterBehavior10_4 = 1040;
+public static final int NSNumberFormatterBehaviorDefault = 0;
+public static final int NSNumberFormatterCurrencyStyle = 2;
+public static final int NSNumberFormatterDecimalStyle = 1;
+public static final int NSNumberFormatterNoStyle = 0;
+public static final int NSNumberFormatterPadAfterPrefix = 1;
+public static final int NSNumberFormatterPadAfterSuffix = 3;
+public static final int NSNumberFormatterPadBeforePrefix = 0;
+public static final int NSNumberFormatterPadBeforeSuffix = 2;
+public static final int NSNumberFormatterPercentStyle = 3;
+public static final int NSNumberFormatterRoundCeiling = 0;
+public static final int NSNumberFormatterRoundDown = 2;
+public static final int NSNumberFormatterRoundFloor = 1;
+public static final int NSNumberFormatterRoundHalfDown = 5;
+public static final int NSNumberFormatterRoundHalfEven = 4;
+public static final int NSNumberFormatterRoundHalfUp = 6;
+public static final int NSNumberFormatterRoundUp = 3;
+public static final int NSNumberFormatterScientificStyle = 4;
+public static final int NSNumberFormatterSpellOutStyle = 5;
+public static final int NSNumericSearch = 64;
+public static final int NSOSF1OperatingSystem = 7;
+public static final int NSObjCArrayType = 91;
+public static final int NSObjCBitfield = 98;
+public static final int NSObjCBoolType = 66;
+public static final int NSObjCCharType = 99;
+public static final int NSObjCDoubleType = 100;
+public static final int NSObjCFloatType = 102;
+public static final int NSObjCLongType = 108;
+public static final int NSObjCLonglongType = 113;
+public static final int NSObjCNoType = 0;
+public static final int NSObjCObjectType = 64;
+public static final int NSObjCPointerType = 94;
+public static final int NSObjCSelectorType = 58;
+public static final int NSObjCShortType = 115;
+public static final int NSObjCStringType = 42;
+public static final int NSObjCStructType = 123;
+public static final int NSObjCUnionType = 40;
+public static final int NSObjCVoidType = 118;
+public static final int NSObjectAutoreleasedEvent = 3;
+public static final int NSObjectExtraRefDecrementedEvent = 5;
+public static final int NSObjectExtraRefIncrementedEvent = 4;
+public static final int NSObjectInternalRefDecrementedEvent = 7;
+public static final int NSObjectInternalRefIncrementedEvent = 6;
+public static final int NSOpenStepUnicodeReservedBase = 62464;
+public static final int NSOperationNotSupportedForKeyScriptError = 9;
+public static final int NSOperationNotSupportedForKeySpecifierError = 6;
+public static final int NSOperationQueueDefaultMaxConcurrentOperationCount = -1;
+public static final int NSOperationQueuePriorityHigh = 4;
+public static final int NSOperationQueuePriorityLow = -4;
+public static final int NSOperationQueuePriorityNormal = 0;
+public static final int NSOperationQueuePriorityVeryHigh = 8;
+public static final int NSOperationQueuePriorityVeryLow = -8;
+public static final int NSOrPredicateType = 2;
+public static final int NSOrderedAscending = -1;
+public static final int NSOrderedDescending = 1;
+public static final int NSOrderedSame = 0;
+public static final int NSPointerFunctionsCStringPersonality = 768;
+public static final int NSPointerFunctionsCopyIn = 65536;
+public static final int NSPointerFunctionsIntegerPersonality = 1280;
+public static final int NSPointerFunctionsMachVirtualMemory = 4;
+public static final int NSPointerFunctionsMallocMemory = 3;
+public static final int NSPointerFunctionsObjectPersonality = 0;
+public static final int NSPointerFunctionsObjectPointerPersonality = 512;
+public static final int NSPointerFunctionsOpaqueMemory = 2;
+public static final int NSPointerFunctionsOpaquePersonality = 256;
+public static final int NSPointerFunctionsStrongMemory = 0;
+public static final int NSPointerFunctionsStructPersonality = 1024;
+public static final int NSPointerFunctionsZeroingWeakMemory = 1;
+public static final int NSPositionAfter = 0;
+public static final int NSPositionBefore = 1;
+public static final int NSPositionBeginning = 2;
+public static final int NSPositionEnd = 3;
+public static final int NSPositionReplace = 4;
+public static final int NSPostASAP = 2;
+public static final int NSPostNow = 3;
+public static final int NSPostWhenIdle = 1;
+public static final int NSPropertyListBinaryFormat_v1_0 = 200;
+public static final int NSPropertyListImmutable = 0;
+public static final int NSPropertyListMutableContainers = 1;
+public static final int NSPropertyListMutableContainersAndLeaves = 2;
+public static final int NSPropertyListOpenStepFormat = 1;
+public static final int NSPropertyListXMLFormat_v1_0 = 100;
+public static final int NSRandomSubelement = 3;
+public static final int NSReceiverEvaluationScriptError = 1;
+public static final int NSReceiversCantHandleCommandScriptError = 4;
+public static final int NSRelativeAfter = 0;
+public static final int NSRelativeBefore = 1;
+public static final int NSRequiredArgumentsMissingScriptError = 5;
+public static final int NSRoundBankers = 3;
+public static final int NSRoundDown = 1;
+public static final int NSRoundPlain = 0;
+public static final int NSRoundUp = 2;
+public static final int NSSaveOptionsAsk = 2;
+public static final int NSSaveOptionsNo = 1;
+public static final int NSSaveOptionsYes = 0;
+public static final int NSScannedOption = 1;
+public static final int NSSecondCalendarUnit = 128;
+public static final int NSShiftJISStringEncoding = 8;
+public static final int NSSolarisOperatingSystem = 3;
+public static final int NSStreamEventEndEncountered = 16;
+public static final int NSStreamEventErrorOccurred = 8;
+public static final int NSStreamEventHasBytesAvailable = 2;
+public static final int NSStreamEventHasSpaceAvailable = 4;
+public static final int NSStreamEventNone = 0;
+public static final int NSStreamEventOpenCompleted = 1;
+public static final int NSStreamStatusAtEnd = 5;
+public static final int NSStreamStatusClosed = 6;
+public static final int NSStreamStatusError = 7;
+public static final int NSStreamStatusNotOpen = 0;
+public static final int NSStreamStatusOpen = 2;
+public static final int NSStreamStatusOpening = 1;
+public static final int NSStreamStatusReading = 3;
+public static final int NSStreamStatusWriting = 4;
+public static final int NSStringEncodingConversionAllowLossy = 1;
+public static final int NSStringEncodingConversionExternalRepresentation = 2;
+public static final int NSSubqueryExpressionType = 13;
+public static final int NSSunOSOperatingSystem = 6;
+public static final int NSSymbolStringEncoding = 6;
+public static final int NSSystemDomainMask = 8;
+public static final double NSTimeIntervalSince1970 = 978307200.00000000;
+public static final int NSTimeZoneNameStyleDaylightSaving = 2;
+public static final int NSTimeZoneNameStyleShortDaylightSaving = 3;
+public static final int NSTimeZoneNameStyleShortStandard = 1;
+public static final int NSTimeZoneNameStyleStandard = 0;
+public static final long NSUIntegerMax = 4294967295L;
+public static final int NSURLCacheStorageAllowed = 0;
+public static final int NSURLCacheStorageAllowedInMemoryOnly = 1;
+public static final int NSURLCacheStorageNotAllowed = 2;
+public static final int NSURLCredentialPersistenceForSession = 1;
+public static final int NSURLCredentialPersistenceNone = 0;
+public static final int NSURLCredentialPersistencePermanent = 2;
+public static final int NSURLErrorBadServerResponse = -1011;
+public static final int NSURLErrorBadURL = -1000;
+public static final int NSURLErrorCancelled = -999;
+public static final int NSURLErrorCannotCloseFile = -3002;
+public static final int NSURLErrorCannotConnectToHost = -1004;
+public static final int NSURLErrorCannotCreateFile = -3000;
+public static final int NSURLErrorCannotDecodeContentData = -1016;
+public static final int NSURLErrorCannotDecodeRawData = -1015;
+public static final int NSURLErrorCannotFindHost = -1003;
+public static final int NSURLErrorCannotLoadFromNetwork = -2000;
+public static final int NSURLErrorCannotMoveFile = -3005;
+public static final int NSURLErrorCannotOpenFile = -3001;
+public static final int NSURLErrorCannotParseResponse = -1017;
+public static final int NSURLErrorCannotRemoveFile = -3004;
+public static final int NSURLErrorCannotWriteToFile = -3003;
+public static final int NSURLErrorClientCertificateRejected = -1205;
+public static final int NSURLErrorDNSLookupFailed = -1006;
+public static final int NSURLErrorDataLengthExceedsMaximum = -1103;
+public static final int NSURLErrorDownloadDecodingFailedMidStream = -3006;
+public static final int NSURLErrorDownloadDecodingFailedToComplete = -3007;
+public static final int NSURLErrorFileDoesNotExist = -1100;
+public static final int NSURLErrorFileIsDirectory = -1101;
+public static final int NSURLErrorHTTPTooManyRedirects = -1007;
+public static final int NSURLErrorNetworkConnectionLost = -1005;
+public static final int NSURLErrorNoPermissionsToReadFile = -1102;
+public static final int NSURLErrorNotConnectedToInternet = -1009;
+public static final int NSURLErrorRedirectToNonExistentLocation = -1010;
+public static final int NSURLErrorResourceUnavailable = -1008;
+public static final int NSURLErrorSecureConnectionFailed = -1200;
+public static final int NSURLErrorServerCertificateHasBadDate = -1201;
+public static final int NSURLErrorServerCertificateHasUnknownRoot = -1203;
+public static final int NSURLErrorServerCertificateNotYetValid = -1204;
+public static final int NSURLErrorServerCertificateUntrusted = -1202;
+public static final int NSURLErrorTimedOut = -1001;
+public static final int NSURLErrorUnknown = -1;
+public static final int NSURLErrorUnsupportedURL = -1002;
+public static final int NSURLErrorUserAuthenticationRequired = -1013;
+public static final int NSURLErrorUserCancelledAuthentication = -1012;
+public static final int NSURLErrorZeroByteResource = -1014;
+public static final int NSURLHandleLoadFailed = 3;
+public static final int NSURLHandleLoadInProgress = 2;
+public static final int NSURLHandleLoadSucceeded = 1;
+public static final int NSURLHandleNotLoaded = 0;
+public static final int NSURLRequestReloadIgnoringCacheData = 1;
+public static final int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4;
+public static final int NSURLRequestReloadIgnoringLocalCacheData = 1;
+public static final int NSURLRequestReloadRevalidatingCacheData = 5;
+public static final int NSURLRequestReturnCacheDataDontLoad = 3;
+public static final int NSURLRequestReturnCacheDataElseLoad = 2;
+public static final int NSURLRequestUseProtocolCachePolicy = 0;
+public static final int NSUTF16BigEndianStringEncoding = -1879047936;
+public static final int NSUTF16LittleEndianStringEncoding = -1811939072;
+public static final int NSUTF16StringEncoding = 10;
+public static final int NSUTF32BigEndianStringEncoding = -1744830208;
+public static final int NSUTF32LittleEndianStringEncoding = -1677721344;
+public static final int NSUTF32StringEncoding = -1946156800;
+public static final int NSUTF8StringEncoding = 4;
+public static final int NSUncachedRead = 2;
+public static final int NSUndefinedDateComponent = 2147483647;
+public static final int NSUndoCloseGroupingRunLoopOrdering = 350000;
+public static final int NSUnicodeStringEncoding = 10;
+public static final int NSUnionSetExpressionType = 5;
+public static final int NSUnknownKeyScriptError = 7;
+public static final int NSUnknownKeySpecifierError = 3;
+public static final int NSUserCancelledError = 3072;
+public static final int NSUserDirectory = 7;
+public static final int NSUserDomainMask = 1;
+public static final int NSValidationErrorMaximum = 2047;
+public static final int NSValidationErrorMinimum = 1024;
+public static final int NSVariableExpressionType = 2;
+public static final int NSWeekCalendarUnit = 256;
+public static final int NSWeekdayCalendarUnit = 512;
+public static final int NSWeekdayOrdinalCalendarUnit = 1024;
+public static final int NSWidthInsensitiveSearch = 256;
+public static final int NSWindows95OperatingSystem = 2;
+public static final int NSWindowsCP1250StringEncoding = 15;
+public static final int NSWindowsCP1251StringEncoding = 11;
+public static final int NSWindowsCP1252StringEncoding = 12;
+public static final int NSWindowsCP1253StringEncoding = 13;
+public static final int NSWindowsCP1254StringEncoding = 14;
+public static final int NSWindowsNTOperatingSystem = 1;
+public static final int NSWrapCalendarComponents = 1;
+public static final int NSXMLAttributeCDATAKind = 6;
+public static final int NSXMLAttributeDeclarationKind = 10;
+public static final int NSXMLAttributeEntitiesKind = 11;
+public static final int NSXMLAttributeEntityKind = 10;
+public static final int NSXMLAttributeEnumerationKind = 14;
+public static final int NSXMLAttributeIDKind = 7;
+public static final int NSXMLAttributeIDRefKind = 8;
+public static final int NSXMLAttributeIDRefsKind = 9;
+public static final int NSXMLAttributeKind = 3;
+public static final int NSXMLAttributeNMTokenKind = 12;
+public static final int NSXMLAttributeNMTokensKind = 13;
+public static final int NSXMLAttributeNotationKind = 15;
+public static final int NSXMLCommentKind = 6;
+public static final int NSXMLDTDKind = 8;
+public static final int NSXMLDocumentHTMLKind = 2;
+public static final int NSXMLDocumentIncludeContentTypeDeclaration = 262144;
+public static final int NSXMLDocumentKind = 1;
+public static final int NSXMLDocumentTextKind = 3;
+public static final int NSXMLDocumentTidyHTML = 512;
+public static final int NSXMLDocumentTidyXML = 1024;
+public static final int NSXMLDocumentValidate = 8192;
+public static final int NSXMLDocumentXHTMLKind = 1;
+public static final int NSXMLDocumentXInclude = 65536;
+public static final int NSXMLDocumentXMLKind = 0;
+public static final int NSXMLElementDeclarationAnyKind = 18;
+public static final int NSXMLElementDeclarationElementKind = 20;
+public static final int NSXMLElementDeclarationEmptyKind = 17;
+public static final int NSXMLElementDeclarationKind = 11;
+public static final int NSXMLElementDeclarationMixedKind = 19;
+public static final int NSXMLElementDeclarationUndefinedKind = 16;
+public static final int NSXMLElementKind = 2;
+public static final int NSXMLEntityDeclarationKind = 9;
+public static final int NSXMLEntityGeneralKind = 1;
+public static final int NSXMLEntityParameterKind = 4;
+public static final int NSXMLEntityParsedKind = 2;
+public static final int NSXMLEntityPredefined = 5;
+public static final int NSXMLEntityUnparsedKind = 3;
+public static final int NSXMLInvalidKind = 0;
+public static final int NSXMLNamespaceKind = 4;
+public static final int NSXMLNodeCompactEmptyElement = 4;
+public static final int NSXMLNodeExpandEmptyElement = 2;
+public static final int NSXMLNodeIsCDATA = 1;
+public static final int NSXMLNodeOptionsNone = 0;
+public static final int NSXMLNodePreserveAll = -1048546;
+public static final int NSXMLNodePreserveAttributeOrder = 2097152;
+public static final int NSXMLNodePreserveCDATA = 16777216;
+public static final int NSXMLNodePreserveCharacterReferences = 134217728;
+public static final int NSXMLNodePreserveDTD = 67108864;
+public static final int NSXMLNodePreserveEmptyElements = 6;
+public static final int NSXMLNodePreserveEntities = 4194304;
+public static final int NSXMLNodePreserveNamespaceOrder = 1048576;
+public static final int NSXMLNodePreservePrefixes = 8388608;
+public static final int NSXMLNodePreserveQuotes = 24;
+public static final int NSXMLNodePreserveWhitespace = 33554432;
+public static final int NSXMLNodePrettyPrint = 131072;
+public static final int NSXMLNodeUseDoubleQuotes = 16;
+public static final int NSXMLNodeUseSingleQuotes = 8;
+public static final int NSXMLNotationDeclarationKind = 12;
+public static final int NSXMLParserAttributeHasNoValueError = 41;
+public static final int NSXMLParserAttributeListNotFinishedError = 51;
+public static final int NSXMLParserAttributeListNotStartedError = 50;
+public static final int NSXMLParserAttributeNotFinishedError = 40;
+public static final int NSXMLParserAttributeNotStartedError = 39;
+public static final int NSXMLParserAttributeRedefinedError = 42;
+public static final int NSXMLParserCDATANotFinishedError = 63;
+public static final int NSXMLParserCharacterRefAtEOFError = 10;
+public static final int NSXMLParserCharacterRefInDTDError = 13;
+public static final int NSXMLParserCharacterRefInEpilogError = 12;
+public static final int NSXMLParserCharacterRefInPrologError = 11;
+public static final int NSXMLParserCommentContainsDoubleHyphenError = 80;
+public static final int NSXMLParserCommentNotFinishedError = 45;
+public static final int NSXMLParserConditionalSectionNotFinishedError = 59;
+public static final int NSXMLParserConditionalSectionNotStartedError = 58;
+public static final int NSXMLParserDOCTYPEDeclNotFinishedError = 61;
+public static final int NSXMLParserDelegateAbortedParseError = 512;
+public static final int NSXMLParserDocumentStartError = 3;
+public static final int NSXMLParserElementContentDeclNotFinishedError = 55;
+public static final int NSXMLParserElementContentDeclNotStartedError = 54;
+public static final int NSXMLParserEmptyDocumentError = 4;
+public static final int NSXMLParserEncodingNotSupportedError = 32;
+public static final int NSXMLParserEntityBoundaryError = 90;
+public static final int NSXMLParserEntityIsExternalError = 29;
+public static final int NSXMLParserEntityIsParameterError = 30;
+public static final int NSXMLParserEntityNotFinishedError = 37;
+public static final int NSXMLParserEntityNotStartedError = 36;
+public static final int NSXMLParserEntityRefAtEOFError = 14;
+public static final int NSXMLParserEntityRefInDTDError = 17;
+public static final int NSXMLParserEntityRefInEpilogError = 16;
+public static final int NSXMLParserEntityRefInPrologError = 15;
+public static final int NSXMLParserEntityRefLoopError = 89;
+public static final int NSXMLParserEntityReferenceMissingSemiError = 23;
+public static final int NSXMLParserEntityReferenceWithoutNameError = 22;
+public static final int NSXMLParserEntityValueRequiredError = 84;
+public static final int NSXMLParserEqualExpectedError = 75;
+public static final int NSXMLParserExternalStandaloneEntityError = 82;
+public static final int NSXMLParserExternalSubsetNotFinishedError = 60;
+public static final int NSXMLParserExtraContentError = 86;
+public static final int NSXMLParserGTRequiredError = 73;
+public static final int NSXMLParserInternalError = 1;
+public static final int NSXMLParserInvalidCharacterError = 9;
+public static final int NSXMLParserInvalidCharacterInEntityError = 87;
+public static final int NSXMLParserInvalidCharacterRefError = 8;
+public static final int NSXMLParserInvalidConditionalSectionError = 83;
+public static final int NSXMLParserInvalidDecimalCharacterRefError = 7;
+public static final int NSXMLParserInvalidEncodingError = 81;
+public static final int NSXMLParserInvalidEncodingNameError = 79;
+public static final int NSXMLParserInvalidHexCharacterRefError = 6;
+public static final int NSXMLParserInvalidURIError = 91;
+public static final int NSXMLParserLTRequiredError = 72;
+public static final int NSXMLParserLTSlashRequiredError = 74;
+public static final int NSXMLParserLessThanSymbolInAttributeError = 38;
+public static final int NSXMLParserLiteralNotFinishedError = 44;
+public static final int NSXMLParserLiteralNotStartedError = 43;
+public static final int NSXMLParserMisplacedCDATAEndStringError = 62;
+public static final int NSXMLParserMisplacedXMLDeclarationError = 64;
+public static final int NSXMLParserMixedContentDeclNotFinishedError = 53;
+public static final int NSXMLParserMixedContentDeclNotStartedError = 52;
+public static final int NSXMLParserNAMERequiredError = 68;
+public static final int NSXMLParserNMTOKENRequiredError = 67;
+public static final int NSXMLParserNamespaceDeclarationError = 35;
+public static final int NSXMLParserNoDTDError = 94;
+public static final int NSXMLParserNotWellBalancedError = 85;
+public static final int NSXMLParserNotationNotFinishedError = 49;
+public static final int NSXMLParserNotationNotStartedError = 48;
+public static final int NSXMLParserOutOfMemoryError = 2;
+public static final int NSXMLParserPCDATARequiredError = 69;
+public static final int NSXMLParserParsedEntityRefAtEOFError = 18;
+public static final int NSXMLParserParsedEntityRefInEpilogError = 20;
+public static final int NSXMLParserParsedEntityRefInInternalError = 88;
+public static final int NSXMLParserParsedEntityRefInInternalSubsetError = 21;
+public static final int NSXMLParserParsedEntityRefInPrologError = 19;
+public static final int NSXMLParserParsedEntityRefMissingSemiError = 25;
+public static final int NSXMLParserParsedEntityRefNoNameError = 24;
+public static final int NSXMLParserPrematureDocumentEndError = 5;
+public static final int NSXMLParserProcessingInstructionNotFinishedError = 47;
+public static final int NSXMLParserProcessingInstructionNotStartedError = 46;
+public static final int NSXMLParserPublicIdentifierRequiredError = 71;
+public static final int NSXMLParserSeparatorRequiredError = 66;
+public static final int NSXMLParserSpaceRequiredError = 65;
+public static final int NSXMLParserStandaloneValueError = 78;
+public static final int NSXMLParserStringNotClosedError = 34;
+public static final int NSXMLParserStringNotStartedError = 33;
+public static final int NSXMLParserTagNameMismatchError = 76;
+public static final int NSXMLParserURIFragmentError = 92;
+public static final int NSXMLParserURIRequiredError = 70;
+public static final int NSXMLParserUndeclaredEntityError = 26;
+public static final int NSXMLParserUnfinishedTagError = 77;
+public static final int NSXMLParserUnknownEncodingError = 31;
+public static final int NSXMLParserUnparsedEntityError = 28;
+public static final int NSXMLParserXMLDeclNotFinishedError = 57;
+public static final int NSXMLParserXMLDeclNotStartedError = 56;
+public static final int NSXMLProcessingInstructionKind = 5;
+public static final int NSXMLTextKind = 7;
+public static final int NSYearCalendarUnit = 4;
+public static final int NS_BigEndian = 2;
+public static final int NS_LittleEndian = 1;
+public static final int NS_UNICHAR_IS_EIGHT_BIT = 0;
+public static final int NS_UnknownByteOrder = 0;
+public static final int DOM_ADDITION = 2;
+public static final int DOM_ANY_TYPE = 0;
+public static final int DOM_ANY_UNORDERED_NODE_TYPE = 8;
+public static final int DOM_ATTRIBUTE_NODE = 2;
+public static final int DOM_AT_TARGET = 2;
+public static final int DOM_BAD_BOUNDARYPOINTS_ERR = 1;
+public static final int DOM_BOOLEAN_TYPE = 3;
+public static final int DOM_BOTH = 2;
+public static final int DOM_BUBBLING_PHASE = 3;
+public static final int DOM_CAPTURING_PHASE = 1;
+public static final int DOM_CDATA_SECTION_NODE = 4;
+public static final int DOM_CHARSET_RULE = 2;
+public static final int DOM_COMMENT_NODE = 8;
+public static final int DOM_CSS_ATTR = 22;
+public static final int DOM_CSS_CM = 6;
+public static final int DOM_CSS_COUNTER = 23;
+public static final int DOM_CSS_CUSTOM = 3;
+public static final int DOM_CSS_DEG = 11;
+public static final int DOM_CSS_DIMENSION = 18;
+public static final int DOM_CSS_EMS = 3;
+public static final int DOM_CSS_EXS = 4;
+public static final int DOM_CSS_GRAD = 13;
+public static final int DOM_CSS_HZ = 16;
+public static final int DOM_CSS_IDENT = 21;
+public static final int DOM_CSS_IN = 8;
+public static final int DOM_CSS_INHERIT = 0;
+public static final int DOM_CSS_KHZ = 17;
+public static final int DOM_CSS_MM = 7;
+public static final int DOM_CSS_MS = 14;
+public static final int DOM_CSS_NUMBER = 1;
+public static final int DOM_CSS_PC = 10;
+public static final int DOM_CSS_PERCENTAGE = 2;
+public static final int DOM_CSS_PRIMITIVE_VALUE = 1;
+public static final int DOM_CSS_PT = 9;
+public static final int DOM_CSS_PX = 5;
+public static final int DOM_CSS_RAD = 12;
+public static final int DOM_CSS_RECT = 24;
+public static final int DOM_CSS_RGBCOLOR = 25;
+public static final int DOM_CSS_S = 15;
+public static final int DOM_CSS_STRING = 19;
+public static final int DOM_CSS_UNKNOWN = 0;
+public static final int DOM_CSS_URI = 20;
+public static final int DOM_CSS_VALUE_LIST = 2;
+public static final int DOM_DOCUMENT_FRAGMENT_NODE = 11;
+public static final int DOM_DOCUMENT_NODE = 9;
+public static final int DOM_DOCUMENT_TYPE_NODE = 10;
+public static final int DOM_DOMSTRING_SIZE_ERR = 2;
+public static final int DOM_ELEMENT_NODE = 1;
+public static final int DOM_END_TO_END = 2;
+public static final int DOM_END_TO_START = 3;
+public static final int DOM_ENTITY_NODE = 6;
+public static final int DOM_ENTITY_REFERENCE_NODE = 5;
+public static final int DOM_FILTER_ACCEPT = 1;
+public static final int DOM_FILTER_REJECT = 2;
+public static final int DOM_FILTER_SKIP = 3;
+public static final int DOM_FIRST_ORDERED_NODE_TYPE = 9;
+public static final int DOM_FONT_FACE_RULE = 5;
+public static final int DOM_HIERARCHY_REQUEST_ERR = 3;
+public static final int DOM_HORIZONTAL = 0;
+public static final int DOM_IMPORT_RULE = 3;
+public static final int DOM_INDEX_SIZE_ERR = 1;
+public static final int DOM_INUSE_ATTRIBUTE_ERR = 10;
+public static final int DOM_INVALID_ACCESS_ERR = 15;
+public static final int DOM_INVALID_CHARACTER_ERR = 5;
+public static final int DOM_INVALID_EXPRESSION_ERR = 51;
+public static final int DOM_INVALID_MODIFICATION_ERR = 13;
+public static final int DOM_INVALID_NODE_TYPE_ERR = 2;
+public static final int DOM_INVALID_STATE_ERR = 11;
+public static final int DOM_KEY_LOCATION_LEFT = 1;
+public static final int DOM_KEY_LOCATION_NUMPAD = 3;
+public static final int DOM_KEY_LOCATION_RIGHT = 2;
+public static final int DOM_KEY_LOCATION_STANDARD = 0;
+public static final int DOM_MEDIA_RULE = 4;
+public static final int DOM_MODIFICATION = 1;
+public static final int DOM_NAMESPACE_ERR = 14;
+public static final int DOM_NODE_AFTER = 1;
+public static final int DOM_NODE_BEFORE = 0;
+public static final int DOM_NODE_BEFORE_AND_AFTER = 2;
+public static final int DOM_NODE_INSIDE = 3;
+public static final int DOM_NOTATION_NODE = 12;
+public static final int DOM_NOT_FOUND_ERR = 8;
+public static final int DOM_NOT_SUPPORTED_ERR = 9;
+public static final int DOM_NO_DATA_ALLOWED_ERR = 6;
+public static final int DOM_NO_MODIFICATION_ALLOWED_ERR = 7;
+public static final int DOM_NUMBER_TYPE = 1;
+public static final int DOM_ORDERED_NODE_ITERATOR_TYPE = 5;
+public static final int DOM_ORDERED_NODE_SNAPSHOT_TYPE = 7;
+public static final int DOM_PAGE_RULE = 6;
+public static final int DOM_PROCESSING_INSTRUCTION_NODE = 7;
+public static final int DOM_REMOVAL = 3;
+public static final int DOM_SHOW_ALL = -1;
+public static final int DOM_SHOW_ATTRIBUTE = 2;
+public static final int DOM_SHOW_CDATA_SECTION = 8;
+public static final int DOM_SHOW_COMMENT = 128;
+public static final int DOM_SHOW_DOCUMENT = 256;
+public static final int DOM_SHOW_DOCUMENT_FRAGMENT = 1024;
+public static final int DOM_SHOW_DOCUMENT_TYPE = 512;
+public static final int DOM_SHOW_ELEMENT = 1;
+public static final int DOM_SHOW_ENTITY = 32;
+public static final int DOM_SHOW_ENTITY_REFERENCE = 16;
+public static final int DOM_SHOW_NOTATION = 2048;
+public static final int DOM_SHOW_PROCESSING_INSTRUCTION = 64;
+public static final int DOM_SHOW_TEXT = 4;
+public static final int DOM_START_TO_END = 1;
+public static final int DOM_START_TO_START = 0;
+public static final int DOM_STRING_TYPE = 2;
+public static final int DOM_STYLE_RULE = 1;
+public static final int DOM_SYNTAX_ERR = 12;
+public static final int DOM_TEXT_NODE = 3;
+public static final int DOM_TYPE_ERR = 52;
+public static final int DOM_UNKNOWN_RULE = 0;
+public static final int DOM_UNORDERED_NODE_ITERATOR_TYPE = 4;
+public static final int DOM_UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+public static final int DOM_UNSPECIFIED_EVENT_TYPE_ERR = 0;
+public static final int DOM_VERTICAL = 1;
+public static final int DOM_WRONG_DOCUMENT_ERR = 4;
+public static final int WebCacheModelDocumentBrowser = 1;
+public static final int WebCacheModelDocumentViewer = 0;
+public static final int WebCacheModelPrimaryWebBrowser = 2;
+public static final int WebDragDestinationActionAny = -1;
+public static final int WebDragDestinationActionDHTML = 1;
+public static final int WebDragDestinationActionEdit = 2;
+public static final int WebDragDestinationActionLoad = 4;
+public static final int WebDragDestinationActionNone = 0;
+public static final int WebDragSourceActionAny = -1;
+public static final int WebDragSourceActionDHTML = 1;
+public static final int WebDragSourceActionImage = 2;
+public static final int WebDragSourceActionLink = 4;
+public static final int WebDragSourceActionNone = 0;
+public static final int WebDragSourceActionSelection = 8;
+public static final int WebJNIReturnTypeBoolean = 3;
+public static final int WebJNIReturnTypeByte = 4;
+public static final int WebJNIReturnTypeChar = 5;
+public static final int WebJNIReturnTypeDouble = 10;
+public static final int WebJNIReturnTypeFloat = 9;
+public static final int WebJNIReturnTypeInt = 7;
+public static final int WebJNIReturnTypeInvalid = 0;
+public static final int WebJNIReturnTypeLong = 8;
+public static final int WebJNIReturnTypeObject = 2;
+public static final int WebJNIReturnTypeShort = 6;
+public static final int WebJNIReturnTypeVoid = 1;
+public static final int WebKitErrorCannotFindPlugIn = 200;
+public static final int WebKitErrorCannotLoadPlugIn = 201;
+public static final int WebKitErrorCannotShowMIMEType = 100;
+public static final int WebKitErrorCannotShowURL = 101;
+public static final int WebKitErrorFrameLoadInterruptedByPolicyChange = 102;
+public static final int WebKitErrorJavaUnavailable = 202;
+public static final int WebMenuItemPDFActualSize = 24;
+public static final int WebMenuItemPDFAutoSize = 27;
+public static final int WebMenuItemPDFContinuous = 30;
+public static final int WebMenuItemPDFFacingPages = 29;
+public static final int WebMenuItemPDFNextPage = 31;
+public static final int WebMenuItemPDFPreviousPage = 32;
+public static final int WebMenuItemPDFSinglePage = 28;
+public static final int WebMenuItemPDFZoomIn = 25;
+public static final int WebMenuItemPDFZoomOut = 26;
+public static final int WebMenuItemTagCopy = 8;
+public static final int WebMenuItemTagCopyImageToClipboard = 6;
+public static final int WebMenuItemTagCopyLinkToClipboard = 3;
+public static final int WebMenuItemTagCut = 13;
+public static final int WebMenuItemTagDownloadImageToDisk = 5;
+public static final int WebMenuItemTagDownloadLinkToDisk = 2;
+public static final int WebMenuItemTagGoBack = 9;
+public static final int WebMenuItemTagGoForward = 10;
+public static final int WebMenuItemTagIgnoreSpelling = 17;
+public static final int WebMenuItemTagLearnSpelling = 18;
+public static final int WebMenuItemTagLookUpInDictionary = 22;
+public static final int WebMenuItemTagNoGuessesFound = 16;
+public static final int WebMenuItemTagOpenFrameInNewWindow = 7;
+public static final int WebMenuItemTagOpenImageInNewWindow = 4;
+public static final int WebMenuItemTagOpenLinkInNewWindow = 1;
+public static final int WebMenuItemTagOpenWithDefaultApplication = 23;
+public static final int WebMenuItemTagOther = 19;
+public static final int WebMenuItemTagPaste = 14;
+public static final int WebMenuItemTagReload = 12;
+public static final int WebMenuItemTagSearchInSpotlight = 20;
+public static final int WebMenuItemTagSearchWeb = 21;
+public static final int WebMenuItemTagSpellingGuess = 15;
+public static final int WebMenuItemTagStop = 11;
+public static final int WebNavigationTypeBackForward = 2;
+public static final int WebNavigationTypeFormResubmitted = 4;
+public static final int WebNavigationTypeFormSubmitted = 1;
+public static final int WebNavigationTypeLinkClicked = 0;
+public static final int WebNavigationTypeOther = 5;
+public static final int WebNavigationTypeReload = 3;
+public static final int WebViewInsertActionDropped = 2;
+public static final int WebViewInsertActionPasted = 1;
+public static final int WebViewInsertActionTyped = 0;
 
+/** Globals */
+/** @method flags=const */
+alias Cocoa.NSAccessibilityButtonRole NSAccessibilityButtonRole_;
+public static const NSString NSAccessibilityButtonRole = new NSString(NSAccessibilityButtonRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityCheckBoxRole NSAccessibilityCheckBoxRole_;
+public static const NSString NSAccessibilityCheckBoxRole = new NSString(NSAccessibilityCheckBoxRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityChildrenAttribute NSAccessibilityChildrenAttribute_;
+public static const NSString NSAccessibilityChildrenAttribute = new NSString(NSAccessibilityChildrenAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityColumnRole NSAccessibilityColumnRole_;
+public static const NSString NSAccessibilityColumnRole = new NSString(NSAccessibilityColumnRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityComboBoxRole NSAccessibilityComboBoxRole_;
+public static const NSString NSAccessibilityComboBoxRole = new NSString(NSAccessibilityComboBoxRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityConfirmAction NSAccessibilityConfirmAction_;
+public static const NSString NSAccessibilityConfirmAction = new NSString(NSAccessibilityConfirmAction_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityContentsAttribute NSAccessibilityContentsAttribute_;
+public static const NSString NSAccessibilityContentsAttribute = new NSString(NSAccessibilityContentsAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityDescriptionAttribute NSAccessibilityDescriptionAttribute_;
+public static const NSString NSAccessibilityDescriptionAttribute = new NSString(NSAccessibilityDescriptionAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityDialogSubrole NSAccessibilityDialogSubrole_;
+public static const NSString NSAccessibilityDialogSubrole = new NSString(NSAccessibilityDialogSubrole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityEnabledAttribute NSAccessibilityEnabledAttribute_;
+public static const NSString NSAccessibilityEnabledAttribute = new NSString(NSAccessibilityEnabledAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityExpandedAttribute NSAccessibilityExpandedAttribute_;
+public static const NSString NSAccessibilityExpandedAttribute = new NSString(NSAccessibilityExpandedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityFloatingWindowSubrole NSAccessibilityFloatingWindowSubrole_;
+public static const NSString NSAccessibilityFloatingWindowSubrole = new NSString(NSAccessibilityFloatingWindowSubrole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityFocusedAttribute NSAccessibilityFocusedAttribute_;
+public static const NSString NSAccessibilityFocusedAttribute = new NSString(NSAccessibilityFocusedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityFocusedUIElementChangedNotification NSAccessibilityFocusedUIElementChangedNotification_;
+public static const NSString NSAccessibilityFocusedUIElementChangedNotification = new NSString(NSAccessibilityFocusedUIElementChangedNotification_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityGridRole NSAccessibilityGridRole_;
+public static const NSString NSAccessibilityGridRole = new NSString(NSAccessibilityGridRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityGroupRole NSAccessibilityGroupRole_;
+public static const NSString NSAccessibilityGroupRole = new NSString(NSAccessibilityGroupRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityHelpAttribute NSAccessibilityHelpAttribute_;
+public static const NSString NSAccessibilityHelpAttribute = new NSString(NSAccessibilityHelpAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityHelpTagRole NSAccessibilityHelpTagRole_;
+public static const NSString NSAccessibilityHelpTagRole = new NSString(NSAccessibilityHelpTagRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityHorizontalOrientationValue NSAccessibilityHorizontalOrientationValue_;
+public static const NSString NSAccessibilityHorizontalOrientationValue = new NSString(NSAccessibilityHorizontalOrientationValue_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityHorizontalScrollBarAttribute NSAccessibilityHorizontalScrollBarAttribute_;
+public static const NSString NSAccessibilityHorizontalScrollBarAttribute = new NSString(NSAccessibilityHorizontalScrollBarAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityImageRole NSAccessibilityImageRole_;
+public static const NSString NSAccessibilityImageRole = new NSString(NSAccessibilityImageRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityIncrementorRole NSAccessibilityIncrementorRole_;
+public static const NSString NSAccessibilityIncrementorRole = new NSString(NSAccessibilityIncrementorRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityInsertionPointLineNumberAttribute NSAccessibilityInsertionPointLineNumberAttribute_;
+public static const NSString NSAccessibilityInsertionPointLineNumberAttribute = new NSString(NSAccessibilityInsertionPointLineNumberAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityLabelValueAttribute NSAccessibilityLabelValueAttribute_;
+public static const NSString NSAccessibilityLabelValueAttribute = new NSString(NSAccessibilityLabelValueAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityLineForIndexParameterizedAttribute NSAccessibilityLineForIndexParameterizedAttribute_;
+public static const NSString NSAccessibilityLineForIndexParameterizedAttribute = new NSString(NSAccessibilityLineForIndexParameterizedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityLinkRole NSAccessibilityLinkRole_;
+public static const NSString NSAccessibilityLinkRole = new NSString(NSAccessibilityLinkRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityLinkTextAttribute NSAccessibilityLinkTextAttribute_;
+public static const NSString NSAccessibilityLinkTextAttribute = new NSString(NSAccessibilityLinkTextAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityListRole NSAccessibilityListRole_;
+public static const NSString NSAccessibilityListRole = new NSString(NSAccessibilityListRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityMaxValueAttribute NSAccessibilityMaxValueAttribute_;
+public static const NSString NSAccessibilityMaxValueAttribute = new NSString(NSAccessibilityMaxValueAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityMenuBarRole NSAccessibilityMenuBarRole_;
+public static const NSString NSAccessibilityMenuBarRole = new NSString(NSAccessibilityMenuBarRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityMenuButtonRole NSAccessibilityMenuButtonRole_;
+public static const NSString NSAccessibilityMenuButtonRole = new NSString(NSAccessibilityMenuButtonRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityMenuItemRole NSAccessibilityMenuItemRole_;
+public static const NSString NSAccessibilityMenuItemRole = new NSString(NSAccessibilityMenuItemRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityMenuRole NSAccessibilityMenuRole_;
+public static const NSString NSAccessibilityMenuRole = new NSString(NSAccessibilityMenuRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityMinValueAttribute NSAccessibilityMinValueAttribute_;
+public static const NSString NSAccessibilityMinValueAttribute = new NSString(NSAccessibilityMinValueAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityNextContentsAttribute NSAccessibilityNextContentsAttribute_;
+public static const NSString NSAccessibilityNextContentsAttribute = new NSString(NSAccessibilityNextContentsAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityNumberOfCharactersAttribute NSAccessibilityNumberOfCharactersAttribute_;
+public static const NSString NSAccessibilityNumberOfCharactersAttribute = new NSString(NSAccessibilityNumberOfCharactersAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityOrientationAttribute NSAccessibilityOrientationAttribute_;
+public static const NSString NSAccessibilityOrientationAttribute = new NSString(NSAccessibilityOrientationAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityOutlineRole NSAccessibilityOutlineRole_;
+public static const NSString NSAccessibilityOutlineRole = new NSString(NSAccessibilityOutlineRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityOutlineRowSubrole NSAccessibilityOutlineRowSubrole_;
+public static const NSString NSAccessibilityOutlineRowSubrole = new NSString(NSAccessibilityOutlineRowSubrole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityParentAttribute NSAccessibilityParentAttribute_;
+public static const NSString NSAccessibilityParentAttribute = new NSString(NSAccessibilityParentAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityPopUpButtonRole NSAccessibilityPopUpButtonRole_;
+public static const NSString NSAccessibilityPopUpButtonRole = new NSString(NSAccessibilityPopUpButtonRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityPositionAttribute NSAccessibilityPositionAttribute_;
+public static const NSString NSAccessibilityPositionAttribute = new NSString(NSAccessibilityPositionAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityPressAction NSAccessibilityPressAction_;
+public static const NSString NSAccessibilityPressAction = new NSString(NSAccessibilityPressAction_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityPreviousContentsAttribute NSAccessibilityPreviousContentsAttribute_;
+public static const NSString NSAccessibilityPreviousContentsAttribute = new NSString(NSAccessibilityPreviousContentsAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityProgressIndicatorRole NSAccessibilityProgressIndicatorRole_;
+public static const NSString NSAccessibilityProgressIndicatorRole = new NSString(NSAccessibilityProgressIndicatorRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRTFForRangeParameterizedAttribute NSAccessibilityRTFForRangeParameterizedAttribute_;
+public static const NSString NSAccessibilityRTFForRangeParameterizedAttribute = new NSString(NSAccessibilityRTFForRangeParameterizedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRadioButtonRole NSAccessibilityRadioButtonRole_;
+public static const NSString NSAccessibilityRadioButtonRole = new NSString(NSAccessibilityRadioButtonRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRadioGroupRole NSAccessibilityRadioGroupRole_;
+public static const NSString NSAccessibilityRadioGroupRole = new NSString(NSAccessibilityRadioGroupRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRangeForIndexParameterizedAttribute NSAccessibilityRangeForIndexParameterizedAttribute_;
+public static const NSString NSAccessibilityRangeForIndexParameterizedAttribute = new NSString(NSAccessibilityRangeForIndexParameterizedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRangeForLineParameterizedAttribute NSAccessibilityRangeForLineParameterizedAttribute_;
+public static const NSString NSAccessibilityRangeForLineParameterizedAttribute = new NSString(NSAccessibilityRangeForLineParameterizedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRangeForPositionParameterizedAttribute NSAccessibilityRangeForPositionParameterizedAttribute_;
+public static const NSString NSAccessibilityRangeForPositionParameterizedAttribute = new NSString(NSAccessibilityRangeForPositionParameterizedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRoleAttribute NSAccessibilityRoleAttribute_;
+public static const NSString NSAccessibilityRoleAttribute = new NSString(NSAccessibilityRoleAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRoleDescriptionAttribute NSAccessibilityRoleDescriptionAttribute_;
+public static const NSString NSAccessibilityRoleDescriptionAttribute = new NSString(NSAccessibilityRoleDescriptionAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityRowRole NSAccessibilityRowRole_;
+public static const NSString NSAccessibilityRowRole = new NSString(NSAccessibilityRowRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityScrollAreaRole NSAccessibilityScrollAreaRole_;
+public static const NSString NSAccessibilityScrollAreaRole = new NSString(NSAccessibilityScrollAreaRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityScrollBarRole NSAccessibilityScrollBarRole_;
+public static const NSString NSAccessibilityScrollBarRole = new NSString(NSAccessibilityScrollBarRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySelectedAttribute NSAccessibilitySelectedAttribute_;
+public static const NSString NSAccessibilitySelectedAttribute = new NSString(NSAccessibilitySelectedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySelectedChildrenAttribute NSAccessibilitySelectedChildrenAttribute_;
+public static const NSString NSAccessibilitySelectedChildrenAttribute = new NSString(NSAccessibilitySelectedChildrenAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySelectedChildrenChangedNotification NSAccessibilitySelectedChildrenChangedNotification_;
+public static const NSString NSAccessibilitySelectedChildrenChangedNotification = new NSString(NSAccessibilitySelectedChildrenChangedNotification_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySelectedTextAttribute NSAccessibilitySelectedTextAttribute_;
+public static const NSString NSAccessibilitySelectedTextAttribute = new NSString(NSAccessibilitySelectedTextAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySelectedTextChangedNotification NSAccessibilitySelectedTextChangedNotification_;
+public static const NSString NSAccessibilitySelectedTextChangedNotification = new NSString(NSAccessibilitySelectedTextChangedNotification_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySelectedTextRangeAttribute NSAccessibilitySelectedTextRangeAttribute_;
+public static const NSString NSAccessibilitySelectedTextRangeAttribute = new NSString(NSAccessibilitySelectedTextRangeAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySelectedTextRangesAttribute NSAccessibilitySelectedTextRangesAttribute_;
+public static const NSString NSAccessibilitySelectedTextRangesAttribute = new NSString(NSAccessibilitySelectedTextRangesAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySizeAttribute NSAccessibilitySizeAttribute_;
+public static const NSString NSAccessibilitySizeAttribute = new NSString(NSAccessibilitySizeAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySliderRole NSAccessibilitySliderRole_;
+public static const NSString NSAccessibilitySliderRole = new NSString(NSAccessibilitySliderRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySortButtonRole NSAccessibilitySortButtonRole_;
+public static const NSString NSAccessibilitySortButtonRole = new NSString(NSAccessibilitySortButtonRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySplitterRole NSAccessibilitySplitterRole_;
+public static const NSString NSAccessibilitySplitterRole = new NSString(NSAccessibilitySplitterRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityStandardWindowSubrole NSAccessibilityStandardWindowSubrole_;
+public static const NSString NSAccessibilityStandardWindowSubrole = new NSString(NSAccessibilityStandardWindowSubrole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityStaticTextRole NSAccessibilityStaticTextRole_;
+public static const NSString NSAccessibilityStaticTextRole = new NSString(NSAccessibilityStaticTextRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityStringForRangeParameterizedAttribute NSAccessibilityStringForRangeParameterizedAttribute_;
+public static const NSString NSAccessibilityStringForRangeParameterizedAttribute = new NSString(NSAccessibilityStringForRangeParameterizedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityStyleRangeForIndexParameterizedAttribute NSAccessibilityStyleRangeForIndexParameterizedAttribute_;
+public static const NSString NSAccessibilityStyleRangeForIndexParameterizedAttribute = new NSString(NSAccessibilityStyleRangeForIndexParameterizedAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySubroleAttribute NSAccessibilitySubroleAttribute_;
+public static const NSString NSAccessibilitySubroleAttribute = new NSString(NSAccessibilitySubroleAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilitySystemDialogSubrole NSAccessibilitySystemDialogSubrole_;
+public static const NSString NSAccessibilitySystemDialogSubrole = new NSString(NSAccessibilitySystemDialogSubrole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTabGroupRole NSAccessibilityTabGroupRole_;
+public static const NSString NSAccessibilityTabGroupRole = new NSString(NSAccessibilityTabGroupRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTableRole NSAccessibilityTableRole_;
+public static const NSString NSAccessibilityTableRole = new NSString(NSAccessibilityTableRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTableRowSubrole NSAccessibilityTableRowSubrole_;
+public static const NSString NSAccessibilityTableRowSubrole = new NSString(NSAccessibilityTableRowSubrole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTabsAttribute NSAccessibilityTabsAttribute_;
+public static const NSString NSAccessibilityTabsAttribute = new NSString(NSAccessibilityTabsAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTextAreaRole NSAccessibilityTextAreaRole_;
+public static const NSString NSAccessibilityTextAreaRole = new NSString(NSAccessibilityTextAreaRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTextFieldRole NSAccessibilityTextFieldRole_;
+public static const NSString NSAccessibilityTextFieldRole = new NSString(NSAccessibilityTextFieldRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTextLinkSubrole NSAccessibilityTextLinkSubrole_;
+public static const NSString NSAccessibilityTextLinkSubrole = new NSString(NSAccessibilityTextLinkSubrole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTitleAttribute NSAccessibilityTitleAttribute_;
+public static const NSString NSAccessibilityTitleAttribute = new NSString(NSAccessibilityTitleAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTitleUIElementAttribute NSAccessibilityTitleUIElementAttribute_;
+public static const NSString NSAccessibilityTitleUIElementAttribute = new NSString(NSAccessibilityTitleUIElementAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityToolbarRole NSAccessibilityToolbarRole_;
+public static const NSString NSAccessibilityToolbarRole = new NSString(NSAccessibilityToolbarRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityTopLevelUIElementAttribute NSAccessibilityTopLevelUIElementAttribute_;
+public static const NSString NSAccessibilityTopLevelUIElementAttribute = new NSString(NSAccessibilityTopLevelUIElementAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityUnknownRole NSAccessibilityUnknownRole_;
+public static const NSString NSAccessibilityUnknownRole = new NSString(NSAccessibilityUnknownRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityUnknownSubrole NSAccessibilityUnknownSubrole_;
+public static const NSString NSAccessibilityUnknownSubrole = new NSString(NSAccessibilityUnknownSubrole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityValueAttribute NSAccessibilityValueAttribute_;
+public static const NSString NSAccessibilityValueAttribute = new NSString(NSAccessibilityValueAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityValueChangedNotification NSAccessibilityValueChangedNotification_;
+public static const NSString NSAccessibilityValueChangedNotification = new NSString(NSAccessibilityValueChangedNotification_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityValueDescriptionAttribute NSAccessibilityValueDescriptionAttribute_;
+public static const NSString NSAccessibilityValueDescriptionAttribute = new NSString(NSAccessibilityValueDescriptionAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityValueIndicatorRole NSAccessibilityValueIndicatorRole_;
+public static const NSString NSAccessibilityValueIndicatorRole = new NSString(NSAccessibilityValueIndicatorRole_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityVerticalOrientationValue NSAccessibilityVerticalOrientationValue_;
+public static const NSString NSAccessibilityVerticalOrientationValue = new NSString(NSAccessibilityVerticalOrientationValue_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityVerticalScrollBarAttribute NSAccessibilityVerticalScrollBarAttribute_;
+public static const NSString NSAccessibilityVerticalScrollBarAttribute = new NSString(NSAccessibilityVerticalScrollBarAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityVisibleCharacterRangeAttribute NSAccessibilityVisibleCharacterRangeAttribute_;
+public static const NSString NSAccessibilityVisibleCharacterRangeAttribute = new NSString(NSAccessibilityVisibleCharacterRangeAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityVisibleChildrenAttribute NSAccessibilityVisibleChildrenAttribute_;
+public static const NSString NSAccessibilityVisibleChildrenAttribute = new NSString(NSAccessibilityVisibleChildrenAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityWindowAttribute NSAccessibilityWindowAttribute_;
+public static const NSString NSAccessibilityWindowAttribute = new NSString(NSAccessibilityWindowAttribute_);
+/** @method flags=const */
+alias Cocoa.NSAccessibilityWindowRole NSAccessibilityWindowRole_;
+public static const NSString NSAccessibilityWindowRole = new NSString(NSAccessibilityWindowRole_);
+/** @method flags=const */
+alias Cocoa.NSBackgroundColorAttributeName NSBackgroundColorAttributeName_;
+public static const NSString NSBackgroundColorAttributeName = new NSString(NSBackgroundColorAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSBaselineOffsetAttributeName NSBaselineOffsetAttributeName_;
+public static const NSString NSBaselineOffsetAttributeName = new NSString(NSBaselineOffsetAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSCalibratedRGBColorSpace NSCalibratedRGBColorSpace_;
+public static const NSString NSCalibratedRGBColorSpace = new NSString(NSCalibratedRGBColorSpace_);
+/** @method flags=const */
+alias Cocoa.NSDeviceRGBColorSpace NSDeviceRGBColorSpace_;
+public static const NSString NSDeviceRGBColorSpace = new NSString(NSDeviceRGBColorSpace_);
+/** @method flags=const */
+alias Cocoa.NSDeviceResolution NSDeviceResolution_;
+public static const NSString NSDeviceResolution = new NSString(NSDeviceResolution_);
+/** @method flags=const */
+alias Cocoa.NSDragPboard NSDragPboard_;
+public static const NSString NSDragPboard = new NSString(NSDragPboard_);
+/** @method flags=const */
+alias Cocoa.NSFilenamesPboardType NSFilenamesPboardType_;
+public static const NSString NSFilenamesPboardType = new NSString(NSFilenamesPboardType_);
+/** @method flags=const */
+alias Cocoa.NSFontAttributeName NSFontAttributeName_;
+public static const NSString NSFontAttributeName = new NSString(NSFontAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSForegroundColorAttributeName NSForegroundColorAttributeName_;
+public static const NSString NSForegroundColorAttributeName = new NSString(NSForegroundColorAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSHTMLPboardType NSHTMLPboardType_;
+public static const NSString NSHTMLPboardType = new NSString(NSHTMLPboardType_);
+/** @method flags=const */
+alias Cocoa.NSLinkAttributeName NSLinkAttributeName_;
+public static const NSString NSLinkAttributeName = new NSString(NSLinkAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSParagraphStyleAttributeName NSParagraphStyleAttributeName_;
+public static const NSString NSParagraphStyleAttributeName = new NSString(NSParagraphStyleAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSPrintAllPages NSPrintAllPages_;
+public static const NSString NSPrintAllPages = new NSString(NSPrintAllPages_);
+/** @method flags=const */
+alias Cocoa.NSPrintCopies NSPrintCopies_;
+public static const NSString NSPrintCopies = new NSString(NSPrintCopies_);
+/** @method flags=const */
+alias Cocoa.NSPrintFirstPage NSPrintFirstPage_;
+public static const NSString NSPrintFirstPage = new NSString(NSPrintFirstPage_);
+/** @method flags=const */
+alias Cocoa.NSPrintJobDisposition NSPrintJobDisposition_;
+public static const NSString NSPrintJobDisposition = new NSString(NSPrintJobDisposition_);
+/** @method flags=const */
+alias Cocoa.NSPrintLastPage NSPrintLastPage_;
+public static const NSString NSPrintLastPage = new NSString(NSPrintLastPage_);
+/** @method flags=const */
+alias Cocoa.NSPrintMustCollate NSPrintMustCollate_;
+public static const NSString NSPrintMustCollate = new NSString(NSPrintMustCollate_);
+/** @method flags=const */
+alias Cocoa.NSPrintPreviewJob NSPrintPreviewJob_;
+public static const NSString NSPrintPreviewJob = new NSString(NSPrintPreviewJob_);
+/** @method flags=const */
+alias Cocoa.NSPrintSaveJob NSPrintSaveJob_;
+public static const NSString NSPrintSaveJob = new NSString(NSPrintSaveJob_);
+/** @method flags=const */
+alias Cocoa.NSPrintSavePath NSPrintSavePath_;
+public static const NSString NSPrintSavePath = new NSString(NSPrintSavePath_);
+/** @method flags=const */
+alias Cocoa.NSPrintSpoolJob NSPrintSpoolJob_;
+public static const NSString NSPrintSpoolJob = new NSString(NSPrintSpoolJob_);
+/** @method flags=const */
+alias Cocoa.NSRTFPboardType NSRTFPboardType_;
+public static const NSString NSRTFPboardType = new NSString(NSRTFPboardType_);
+/** @method flags=const */
+alias Cocoa.NSStrikethroughColorAttributeName NSStrikethroughColorAttributeName_;
+public static const NSString NSStrikethroughColorAttributeName = new NSString(NSStrikethroughColorAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSStrikethroughStyleAttributeName NSStrikethroughStyleAttributeName_;
+public static const NSString NSStrikethroughStyleAttributeName = new NSString(NSStrikethroughStyleAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSStringPboardType NSStringPboardType_;
+public static const NSString NSStringPboardType = new NSString(NSStringPboardType_);
+/** @method flags=const */
+alias Cocoa.NSTIFFPboardType NSTIFFPboardType_;
+public static const NSString NSTIFFPboardType = new NSString(NSTIFFPboardType_);
+/** @method flags=const */
+alias Cocoa.NSURLPboardType NSURLPboardType_;
+public static const NSString NSURLPboardType = new NSString(NSURLPboardType_);
+/** @method flags=const */
+alias Cocoa.NSUnderlineColorAttributeName NSUnderlineColorAttributeName_;
+public static const NSString NSUnderlineColorAttributeName = new NSString(NSUnderlineColorAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSUnderlineStyleAttributeName NSUnderlineStyleAttributeName_;
+public static const NSString NSUnderlineStyleAttributeName = new NSString(NSUnderlineStyleAttributeName_);
+/** @method flags=const */
+alias Cocoa.NSDefaultRunLoopMode NSDefaultRunLoopMode_;
+public static const NSString NSDefaultRunLoopMode = new NSString(NSDefaultRunLoopMode_);
+/** @method flags=const */
+alias Cocoa.NSErrorFailingURLStringKey NSErrorFailingURLStringKey_;
+public static const NSString NSErrorFailingURLStringKey = new NSString(NSErrorFailingURLStringKey_);
+
+/** Functions */
+
+/**
+ * @param action cast=(NSString*)
+ */
+alias Cocoa.NSAccessibilityActionDescription NSAccessibilityActionDescription;
+/**
+ * @param element cast=(id)
+ * @param notification cast=(NSString*)
+ */
+alias Cocoa.NSAccessibilityPostNotification NSAccessibilityPostNotification;
+/**
+* @param element cast=(id)
+* @param attribute cast=(NSString*)
+* @param value cast=(id)
+*/
+alias Cocoa.NSAccessibilityRaiseBadArgumentException NSAccessibilityRaiseBadArgumentException;
+/**
+* @param role cast=(NSString*)
+* @param subrole cast=(NSString*)
+*/
+alias Cocoa.NSAccessibilityRoleDescription NSAccessibilityRoleDescription;
+/**
+* @param element cast=(id)
+*/
+alias Cocoa.NSAccessibilityRoleDescriptionForUIElement NSAccessibilityRoleDescriptionForUIElement;
+/**
+* @param element cast=(id)
+*/
+alias Cocoa.NSAccessibilityUnignoredAncestor NSAccessibilityUnignoredAncestor;
+/**
+* @param originalChildren cast=(NSArray*)
+*/
+alias Cocoa.NSAccessibilityUnignoredChildren NSAccessibilityUnignoredChildren;
+/**
+* @param originalChild cast=(id)
+*/
+alias Cocoa.NSAccessibilityUnignoredChildrenForOnlyChild NSAccessibilityUnignoredChildrenForOnlyChild;
+/**
+* @param element cast=(id)
+*/
+alias Cocoa.NSAccessibilityUnignoredDescendant NSAccessibilityUnignoredDescendant;
+alias Cocoa.NSBeep NSBeep;
+/**
+* @param depth cast=(NSWindowDepth)
+*/
+alias Cocoa.NSBitsPerPixelFromDepth NSBitsPerPixelFromDepth;
+/**
+* @param cf cast=(CFTypeRef)
+*/
+alias Carbon.CFRelease CFRelease;
+/**
+* @param allocator cast=(CFAllocatorRef)
+* @param originalString cast=(CFStringRef)
+* @param charactersToLeaveUnescaped cast=(CFStringRef)
+* @param legalURLCharactersToBeEscaped cast=(CFStringRef)
+* @param encoding cast=(CFStringEncoding)
+*/
+alias Carbon.CFURLCreateStringByAddingPercentEscapes CFURLCreateStringByAddingPercentEscapes;
+/**
+* @param newCursorPosition flags=struct */
+alias Carbon.CGWarpMouseCursorPosition CGWarpMouseCursorPosition;
+/**
+* @param hfsFileTypeCode cast=(OSType)
+*/
+alias Cocoa.NSFileTypeForHFSTypeCode NSFileTypeForHFSTypeCode;
+/**
+* @param typePtr cast=(char*)
+* @param sizep cast=(NSUInteger*)
+* @param alignp cast=(NSUInteger*)
+*/
+alias Cocoa.NSGetSizeAndAlignment NSGetSizeAndAlignment;
+/**
+* @param directory cast=(NSSearchPathDirectory)
+* @param domainMask cast=(NSSearchPathDomainMask)
+* @param expandTilde cast=(BOOL)
+*/
+alias Cocoa.NSSearchPathForDirectoriesInDomains NSSearchPathForDirectoriesInDomains;
+alias Cocoa.NSTemporaryDirectory NSTemporaryDirectory;
+
+/** Sends */
+
+/** @method flags=cast */
+alias objc.objc_msgSend_bool objc_msgSend_bool;
+/** @method flags=cast */
+alias objc.objc_msgSend_fpret objc_msgSend_fpret;
+/** @method flags=cast */
+alias objc.objc_msgSend objc_msgSend;
+/** @method flags=cast */
+alias objc.objc_msgSend_stret objc_msgSend_stret;
+
+/** Sizeof natives */
+
+
+/** Memmove natives */
+
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(void *),flags=critical
+ */
+alias stdc.memmove memmove;
+
+/** This section is auto generated */
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/Protocol.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.Protocol;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import objc = dwt.internal.objc.runtime;
+
+public class Protocol : cocoa.id {
+
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
+    super(id);
+}
+
+}
--- a/dwt/internal/cocoa/SWTApplicationDelegate.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTApplicationDelegate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,18 +1,30 @@
 /*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTApplicationDelegate;
 
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSObject;
 import objc = dwt.internal.objc.runtime;
 
 public class SWTApplicationDelegate : NSObject {
-    public this () {
-        super(null);
-    }
+    
+public this() {
+    super(cast(objc.id) null);
+}
+    
+public this(objc.id id) {
+    super(id);
+}
 
-    public this (objc.id id) {
-        super(id);
-    }
 }
--- a/dwt/internal/cocoa/SWTBox.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTBox.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,16 +9,13 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTBox;
 
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSBox;
-import dwt.internal.cocoa.NSInteger;
-import dwt.internal.cocoa.OS;
 
 public class SWTBox : NSBox {
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
+
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/SWTBrowserCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.SWTBrowserCell;
+
+import dwt.dwthelper.utils;
+import dwt.internal.cocoa.NSBrowserCell;
+
+public class SWTBrowserCell : NSBrowserCell {
+
+}
--- a/dwt/internal/cocoa/SWTButton.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTButton.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,10 +9,11 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTButton;
 
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSButton;
 
 public class SWTButton : NSButton {
--- a/dwt/internal/cocoa/SWTComboBox.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTComboBox.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,10 +9,11 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTComboBox;
 
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSComboBox;
 
 public class SWTComboBox : NSComboBox {
--- a/dwt/internal/cocoa/SWTDatePicker.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTDatePicker.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,10 +9,11 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTDatePicker;
 
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSDatePicker;
 
 public class SWTDatePicker : NSDatePicker {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/SWTDragSourceDelegate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *     Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.SWTDragSourceDelegate;
+
+import dwt.dwthelper.utils;
+import dwt.internal.cocoa.NSObject;
+
+public class SWTDragSourceDelegate : NSObject {
+
+    public this() {
+        super(cast(objc.id) null);
+    }
+        
+    public this(objc.id id) {
+        super(id);
+    }
+
+}
--- a/dwt/internal/cocoa/SWTImageView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTImageView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,10 +9,11 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTImageView;
 
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSImageView;
 
 public class SWTImageView : NSImageView {
--- a/dwt/internal/cocoa/SWTMenu.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTMenu.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,16 +1,21 @@
 /*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTMenu;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSMenu;
-import dwt.internal.cocoa.OS;
 
 public class SWTMenu : NSMenu {
 
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
 }
--- a/dwt/internal/cocoa/SWTMenuItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTMenuItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTMenuItem;
 
--- a/dwt/internal/cocoa/SWTOutlineView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTOutlineView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTOutlineView;
 
--- a/dwt/internal/cocoa/SWTPanelDelegate.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTPanelDelegate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,31 +9,22 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTPanelDelegate;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
 public class SWTPanelDelegate : NSObject {
 
-    public this () {
-        super(null);
-    }
-
-    public this (objc.id id) {
-        super(id);
-    }
-
-    public NSInteger tag () {
-        return cast(NSInteger) OS.objc_msgSend(id_, OS.sel_tag);
-    }
-
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
+public this() {
+    super(cast(objc.id) null);
+}
+    
+public this(objc.id id) {
+    super(id);
+}
 
 }
--- a/dwt/internal/cocoa/SWTPopUpButton.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTPopUpButton.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,12 +9,12 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTPopUpButton;
 
 import dwt.internal.cocoa.NSPopUpButton;
 
-public class SWTPopUpButton : NSPopUpButton {
+public class SWTPopUpButton: NSPopUpButton {
 
 }
--- a/dwt/internal/cocoa/SWTProgressIndicator.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTProgressIndicator.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,17 +9,13 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTProgressIndicator;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSProgressIndicator;
-import dwt.internal.cocoa.OS;
 
 public class SWTProgressIndicator : NSProgressIndicator {
 
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
 }
--- a/dwt/internal/cocoa/SWTScrollView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTScrollView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,27 +9,22 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTScrollView;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSScrollView;
-import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
 public class SWTScrollView : NSScrollView {
 
-    public this () {
-        super(null);
-    }
-
-    public this (objc.id id) {
-        super(id);
-    }
-
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
+public this() {
+    super(cast(objc.id) null);
+}
+    
+public this(objc.id id) {
+    super(id);
+}
 
 }
--- a/dwt/internal/cocoa/SWTScroller.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTScroller.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTScroller;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/SWTSearchField.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *     Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.SWTSearchField;
+
+import dwt.dwthelper.utils;
+import dwt.internal.cocoa.NSSearchField;
+
+public class SWTSearchField : NSSearchField {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/SWTSecureTextField.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *     Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.SWTSecureTextField;
+
+import dwt.dwthelper.utils;
+import dwt.internal.cocoa.NSSecureTextField;
+
+public class SWTSecureTextField : NSSecureTextField {
+
+}
--- a/dwt/internal/cocoa/SWTSlider.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTSlider.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTSlider;
 
--- a/dwt/internal/cocoa/SWTStepper.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTStepper.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTStepper;
 
--- a/dwt/internal/cocoa/SWTTabView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTTabView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,26 +9,22 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTTabView;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSTabView;
-import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
 public class SWTTabView : NSTabView {
 
-    public this () {
-        super(null);
-    }
+public this() {
+    super(cast(objc.id) null);
+}
+    
+public this(objc.id id) {
+    super(id);
+}
 
-    public this (objc.id id) {
-        super(id);
-    }
-
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/SWTTableHeaderCell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *     Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.SWTTableHeaderCell;
+
+import dwt.dwthelper.utils;
+import dwt.internal.cocoa.NSTableHeaderCell;
+
+public class SWTTableHeaderCell : NSTableHeaderCell {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/SWTTableHeaderView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *     Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.SWTTableHeaderView;
+
+import dwt.dwthelper.utils;
+import dwt.internal.cocoa.NSTableHeaderView;
+
+public class SWTTableHeaderView : NSTableHeaderView {
+
+}
--- a/dwt/internal/cocoa/SWTTableView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTTableView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTTableView;
 
--- a/dwt/internal/cocoa/SWTTextField.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTTextField.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTTextField;
 
--- a/dwt/internal/cocoa/SWTTextView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTTextView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,26 +9,22 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTTextView;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSTextView;
-import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
 public class SWTTextView : NSTextView {
 
-    public this () {
-        super(null );
-    }
+public this() {
+    super(cast(objc.id) null);
+}
+    
+public this(objc.id id) {
+    super(id);
+}
 
-    public this (objc.id id) {
-        super(id);
-    }
-
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
 }
--- a/dwt/internal/cocoa/SWTTreeItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTTreeItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,21 +9,13 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTTreeItem;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
 
 public class SWTTreeItem : NSObject {
 
-    public NSInteger tag () {
-        return cast(NSInteger) OS.objc_msgSend(id_, OS.sel_tag);
-    }
-
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
 }
--- a/dwt/internal/cocoa/SWTView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,26 +9,23 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTView;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
+
 public class SWTView : NSView {
 
-    public this () {
-        super(null);
-    }
+public this() {
+    super(cast(objc.id) null);
+}
+    
+public this(objc.id id) {
+    super(id);
+}
 
-    public this (objc.id id) {
-        super(id);
-    }
-
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
-}
\ No newline at end of file
+}
--- a/dwt/internal/cocoa/SWTWebViewDelegate.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTWebViewDelegate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,17 +9,13 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTWebViewDelegate;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
 
 public class SWTWebViewDelegate : NSObject {
 
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
 }
--- a/dwt/internal/cocoa/SWTWindow.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTWindow.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,17 +9,13 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTWindow;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSWindow;
-import dwt.internal.cocoa.OS;
 
 public class SWTWindow : NSWindow {
 
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
 }
--- a/dwt/internal/cocoa/SWTWindowDelegate.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/SWTWindowDelegate.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,31 +9,22 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.SWTWindowDelegate;
 
-import dwt.internal.cocoa.NSInteger;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSObject;
-import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
 public class SWTWindowDelegate : NSObject {
 
-    public this () {
-        super(null);
-    }
-
-    public this (objc.id id) {
-        super(id);
-    }
-
-    public NSInteger tag () {
-        return cast(NSInteger) OS.objc_msgSend(id_, OS.sel_tag);
-    }
-
-    public void setTag (NSInteger tag) {
-        OS.objc_msgSend(id_, OS.sel_setTag_1, tag);
-    }
+public this() {
+    super(cast(objc.id) null);
+}
+    
+public this(objc.id id) {
+    super(id);
+}
 
 }
--- a/dwt/internal/cocoa/WebDataSource.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/WebDataSource.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,101 +1,60 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
-module dwt.internal.cocoa;
+module dwt.internal.cocoa.WebDataSource;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSMutableURLRequest;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.WebDocumentRepresentation;
+import dwt.internal.cocoa.WebFrame;
+import objc = dwt.internal.objc.runtime;
 
 public class WebDataSource : NSObject {
 
-public WebDataSource() {
+public this() {
     super();
 }
 
-public WebDataSource(int id) {
+public this(objc.id id) {
     super(id);
 }
 
-//public void addSubresource(WebResource subresource) {
-//  OS.objc_msgSend(this.id, OS.sel_addSubresource_1, subresource !is null ? subresource.id : 0);
-//}
-
-public NSData data() {
-    int result = OS.objc_msgSend(this.id_, OS.sel_data);
-    return result !is 0 ? new NSData(result) : null;
+public this(cocoa.id id) {
+    super(id);
 }
 
-//public id initWithRequest(NSURLRequest request) {
-//  int result = OS.objc_msgSend(this.id, OS.sel_initWithRequest_1, request !is null ? request.id : 0);
-//  return result !is 0 ? new id(result) : null;
-//}
-
-//public NSURLRequest initialRequest() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_initialRequest);
-//  return result !is 0 ? new NSURLRequest(result) : null;
-//}
-
-public bool isLoading() {
-    return OS.objc_msgSend(this.id_, OS.sel_isLoading) !is 0;
-}
-
-//public WebResource mainResource() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_mainResource);
-//  return result !is 0 ? new WebResource(result) : null;
-//}
-
 public NSString pageTitle() {
-    int result = OS.objc_msgSend(this.id, OS.sel_pageTitle);
-    return result !is 0 ? new NSString(result) : null;
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_pageTitle);
+    return result !is null ? new NSString(result) : null;
 }
 
 public WebDocumentRepresentation representation() {
-    int result = OS.objc_msgSend(this.id, OS.sel_representation);
-    return result !is 0 ? new WebDocumentRepresentation (result) : null;
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_representation);
+    return result !is null ? new WebDocumentRepresentation(result) : null;
 }
 
 public NSMutableURLRequest request() {
-    int result = OS.objc_msgSend(this.id, OS.sel_request);
-    return result !is 0 ? new NSMutableURLRequest(result) : null;
-}
-
-public NSURLResponse response() {
-    int result = OS.objc_msgSend(this.id, OS.sel_response);
-    return result !is 0 ? new NSURLResponse(result) : null;
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_request);
+    return result !is null ? new NSMutableURLRequest(result) : null;
 }
 
-//public WebResource subresourceForURL(NSURL URL) {
-//  int result = OS.objc_msgSend(this.id, OS.sel_subresourceForURL_1, URL !is null ? URL.id : 0);
-//  return result !is 0 ? new WebResource(result) : null;
-//}
-
-//public NSArray subresources() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_subresources);
-//  return result !is 0 ? new NSArray(result) : null;
-//}
-
-public NSString textEncodingName() {
-    int result = OS.objc_msgSend(this.id, OS.sel_textEncodingName);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-//public NSURL unreachableURL() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_unreachableURL);
-//  return result !is 0 ? new NSURL(result) : null;
-//}
-
-//public WebArchive webArchive() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_webArchive);
-//  return result !is 0 ? new WebArchive(result) : null;
-//}
-
 public WebFrame webFrame() {
-    int result = OS.objc_msgSend(this.id, OS.sel_webFrame);
-    return result !is 0 ? new WebFrame(result) : null;
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_webFrame);
+    return result !is null ? new WebFrame(result) : null;
 }
 
 }
--- a/dwt/internal/cocoa/WebDocumentRepresentation.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/WebDocumentRepresentation.d	Mon Dec 01 17:07:00 2008 +0100
@@ -7,17 +7,35 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
-module dwt.internal.cocoa;
+module dwt.internal.cocoa.WebDocumentRepresentation;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
 
 public class WebDocumentRepresentation : NSObject {
 
-public WebDocumentRepresentation(int id) {
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
     super(id);
 }
 
 public NSString documentSource() {
-    int id = OS.objc_msgSend(this.id, OS.sel_documentSource);
-    return id !is 0 ? new NSString(id) : null;
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_documentSource);
+    return result !is null ? new NSString(result) : null;
 }
 }
--- a/dwt/internal/cocoa/WebFrame.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/WebFrame.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,115 +1,59 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
-module dwt.internal.cocoa;
+module dwt.internal.cocoa.WebFrame;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.DOMDocument;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSURL;
+import dwt.internal.cocoa.NSURLRequest;
+import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.WebDataSource;
+import objc = dwt.internal.objc.runtime;
 
 public class WebFrame : NSObject {
 
-public WebFrame() {
+public this() {
     super();
 }
 
-public WebFrame(int id) {
+public this(objc.id id) {
     super(id);
 }
 
-public DOMDocument DOMDocument() {
-    int result = OS.objc_msgSend(this.id, OS.sel_DOMDocument);
-    return result !is 0 ? new DOMDocument(result) : null;
+public this(cocoa.id id) {
+    super(id);
 }
 
-public NSArray childFrames() {
-    int result = OS.objc_msgSend(this.id, OS.sel_childFrames);
-    return result !is 0 ? new NSArray(result) : null;
+public DOMDocument DOMDocument_() {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_DOMDocument);
+    return result !is null ? new DOMDocument(result) : null;
 }
 
 public WebDataSource dataSource() {
-    int result = OS.objc_msgSend(this.id, OS.sel_dataSource);
-    return result !is 0 ? new WebDataSource(result) : null;
-}
-
-public WebFrame findFrameNamed(NSString name) {
-    int result = OS.objc_msgSend(this.id, OS.sel_findFrameNamed_1, name !is null ? name.id : 0);
-    return result is this.id ? this : (result !is 0 ? new WebFrame(result) : null);
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_dataSource);
+    return result !is null ? new WebDataSource(result) : null;
 }
 
-//public DOMHTMLElement frameElement() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_frameElement);
-//  return result !is 0 ? new DOMHTMLElement(result) : null;
-//}
-
-//public WebFrameView frameView() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_frameView);
-//  return result !is 0 ? new WebFrameView(result) : null;
-//}
-
-public int globalContext() {
-    return OS.objc_msgSend(this.id, OS.sel_globalContext);
-}
-
-//public id initWithName(NSString name, WebFrameView view, WebView webView) {
-//  int result = OS.objc_msgSend(this.id, OS.sel_initWithName_1webFrameView_1webView_1, name !is null ? name.id : 0, view !is null ? view.id : 0, webView !is null ? webView.id : 0);
-//  return result !is 0 ? new id(result) : null;
-//}
-
-public void loadAlternateHTMLString(NSString String, NSURL baseURL, NSURL unreachableURL) {
-    OS.objc_msgSend(this.id, OS.sel_loadAlternateHTMLString_1baseURL_1forUnreachableURL_1, String !is null ? String.id : 0, baseURL !is null ? baseURL.id : 0, unreachableURL !is null ? unreachableURL.id : 0);
-}
-//
-//public void loadArchive(WebArchive archive) {
-//  OS.objc_msgSend(this.id, OS.sel_loadArchive_1, archive !is null ? archive.id : 0);
-//}
-
-public void loadData(NSData data, NSString MIMEType, NSString encodingName, NSURL URL) {
-    OS.objc_msgSend(this.id, OS.sel_loadData_1MIMEType_1textEncodingName_1baseURL_1, data !is null ? data.id : 0, MIMEType !is null ? MIMEType.id : 0, encodingName !is null ? encodingName.id : 0, URL !is null ? URL.id : 0);
-}
-
-public void loadHTMLString(NSString String, NSURL URL) {
-    OS.objc_msgSend(this.id, OS.sel_loadHTMLString_1baseURL_1, String !is null ? String.id : 0, URL !is null ? URL.id : 0);
+public void loadHTMLString(NSString string, NSURL URL) {
+    OS.objc_msgSend(this.id, OS.sel_loadHTMLString_baseURL_, string !is null ? string.id : null, URL !is null ? URL.id : null);
 }
 
 public void loadRequest(NSURLRequest request) {
-    OS.objc_msgSend(this.id, OS.sel_loadRequest_1, request !is null ? request.id : 0);
-}
-
-public NSString name() {
-    int result = OS.objc_msgSend(this.id, OS.sel_name);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public WebFrame parentFrame() {
-    int result = OS.objc_msgSend(this.id, OS.sel_parentFrame);
-    return result is this.id ? this : (result !is 0 ? new WebFrame(result) : null);
-}
-
-public WebDataSource provisionalDataSource() {
-    int result = OS.objc_msgSend(this.id, OS.sel_provisionalDataSource);
-    return result !is 0 ? new WebDataSource(result) : null;
+    OS.objc_msgSend(this.id, OS.sel_loadRequest_, request !is null ? request.id : null);
 }
 
-public void reload() {
-    OS.objc_msgSend(this.id, OS.sel_reload);
 }
-
-public void stopLoading() {
-    OS.objc_msgSend(this.id, OS.sel_stopLoading);
-}
-
-public WebView webView() {
-    int result = OS.objc_msgSend(this.id, OS.sel_webView);
-    return result !is 0 ? new WebView(result) : null;
-}
-
-//public WebScriptObject windowObject() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_windowObject);
-//  return result !is 0 ? new WebScriptObject(result) : null;
-//}
-
-}
--- a/dwt/internal/cocoa/WebFrameView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/WebFrameView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,30 +1,42 @@
-module dwt.internal.cocoa;
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.WebFrameView;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSPrintInfo;
+import dwt.internal.cocoa.NSPrintOperation;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
 
 public class WebFrameView : NSObject {
 
-public WebFrameView() {
+public this() {
     super();
 }
 
-public WebFrameView(int id) {
+public this(objc.id id) {
     super(id);
 }
 
-public bool allowsScrolling() {
-    return OS.objc_msgSend(this.id, OS.sel_allowsScrolling) !is 0;
-}
-
-public bool canPrintHeadersAndFooters() {
-    return OS.objc_msgSend(this.id, OS.sel_canPrintHeadersAndFooters) !is 0;
-}
-
-public NSView  documentView() {
-    int result = OS.objc_msgSend(this.id, OS.sel_documentView);
-    return result !is 0 ? new NSView (result) : null;
+public this(cocoa.id id) {
+    super(id);
 }
 
 public bool documentViewShouldHandlePrint() {
-    return OS.objc_msgSend(this.id, OS.sel_documentViewShouldHandlePrint) !is 0;
+    return OS.objc_msgSend_bool(this.id, OS.sel_documentViewShouldHandlePrint);
 }
 
 public void printDocumentView() {
@@ -32,17 +44,8 @@
 }
 
 public NSPrintOperation printOperationWithPrintInfo(NSPrintInfo printInfo) {
-    int result = OS.objc_msgSend(this.id, OS.sel_printOperationWithPrintInfo_1, printInfo !is null ? printInfo.id : 0);
-    return result !is 0 ? new NSPrintOperation(result) : null;
-}
-
-public void setAllowsScrolling(bool flag) {
-    OS.objc_msgSend(this.id, OS.sel_setAllowsScrolling_1, flag);
-}
-
-public WebFrame webFrame() {
-    int result = OS.objc_msgSend(this.id, OS.sel_webFrame);
-    return result !is 0 ? new WebFrame(result) : null;
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_printOperationWithPrintInfo_, printInfo !is null ? printInfo.id : null);
+    return result !is null ? new NSPrintOperation(result) : null;
 }
 
 }
--- a/dwt/internal/cocoa/WebOpenPanelResultListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/WebOpenPanelResultListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -7,12 +7,30 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
-module dwt.internal.cocoa;
+module dwt.internal.cocoa.WebOpenPanelResultListener;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
 
 public class WebOpenPanelResultListener : NSObject {
 
-public WebOpenPanelResultListener(int id) {
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
     super(id);
 }
 
@@ -20,7 +38,7 @@
     OS.objc_msgSend(id, OS.sel_cancel);
 }
 
-public void chooseFilename(NSString String) {
-    OS.objc_msgSend(id, OS.sel_chooseFilename_1, String !is null ? String.id : 0);
+public void chooseFilename(NSString string) {
+    OS.objc_msgSend(id, OS.sel_chooseFilename_, string !is null ? string.id : null);
 }
 }
--- a/dwt/internal/cocoa/WebPolicyDecisionListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/WebPolicyDecisionListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -7,12 +7,29 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
-module dwt.internal.cocoa;
+module dwt.internal.cocoa.WebPolicyDecisionListener;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
 
 public class WebPolicyDecisionListener : NSObject {
 
-public WebPolicyDecisionListener(int id) {
+public this() {
+    super();
+}
+
+public this(objc.id id) {
+    super(id);
+}
+
+public this(cocoa.id id) {
     super(id);
 }
     
--- a/dwt/internal/cocoa/WebPreferences.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/WebPreferences.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,254 +1,45 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
-module dwt.internal.cocoa;
+module dwt.internal.cocoa.WebPreferences;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
 
 public class WebPreferences : NSObject {
 
-public WebPreferences() {
+public this() {
     super();
 }
 
-public WebPreferences(int id) {
+public this(objc.id id) {
     super(id);
 }
 
-//public bool allowsAnimatedImageLooping() {
-//  return OS.objc_msgSend(this.id, OS.sel_allowsAnimatedImageLooping) !is 0;
-//}
-//
-//public bool allowsAnimatedImages() {
-//  return OS.objc_msgSend(this.id, OS.sel_allowsAnimatedImages) !is 0;
-//}
-
-//public bool arePlugInsEnabled() {
-//  return OS.objc_msgSend(this.id, OS.sel_arePlugInsEnabled) !is 0;
-//}
-//
-//public bool autosaves() {
-//  return OS.objc_msgSend(this.id, OS.sel_autosaves) !is 0;
-//}
-
-//public int cacheModel() {
-//  return OS.objc_msgSend(this.id, OS.sel_cacheModel);
-//}
-//
-//public NSString cursiveFontFamily() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_cursiveFontFamily);
-//  return result !is 0 ? new NSString(result) : null;
-//}
-
-//public int defaultFixedFontSize() {
-//  return OS.objc_msgSend(this.id, OS.sel_defaultFixedFontSize);
-//}
-//
-//public int defaultFontSize() {
-//  return OS.objc_msgSend(this.id, OS.sel_defaultFontSize);
-//}
-//
-//public NSString defaultTextEncodingName() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_defaultTextEncodingName);
-//  return result !is 0 ? new NSString(result) : null;
-//}
-
-//public NSString fantasyFontFamily() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_fantasyFontFamily);
-//  return result !is 0 ? new NSString(result) : null;
-//}
-//
-//public NSString fixedFontFamily() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_fixedFontFamily);
-//  return result !is 0 ? new NSString(result) : null;
-//}
-
-public NSString identifier() {
-    int result = OS.objc_msgSend(this.id, OS.sel_identifier);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public id initWithIdentifier(NSString anIdentifier) {
-    int result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_1, anIdentifier !is null ? anIdentifier.id : 0);
-    return result !is 0 ? new id(result) : null;
+public this(cocoa.id id) {
+    super(id);
 }
 
-//public bool isJavaEnabled() {
-//  return OS.objc_msgSend(this.id, OS.sel_isJavaEnabled) !is 0;
-//}
-
-//public bool isJavaScriptEnabled() {
-//  return OS.objc_msgSend(this.id, OS.sel_isJavaScriptEnabled) !is 0;
-//}
-//
-//public bool javaScriptCanOpenWindowsAutomatically() {
-//  return OS.objc_msgSend(this.id, OS.sel_javaScriptCanOpenWindowsAutomatically) !is 0;
-//}
-//
-//public bool loadsImagesAutomatically() {
-//  return OS.objc_msgSend(this.id, OS.sel_loadsImagesAutomatically) !is 0;
-//}
-//
-//public int minimumFontSize() {
-//  return OS.objc_msgSend(this.id, OS.sel_minimumFontSize);
-//}
-//
-//public int minimumLogicalFontSize() {
-//  return OS.objc_msgSend(this.id, OS.sel_minimumLogicalFontSize);
-//}
-//
-//public bool privateBrowsingEnabled() {
-//  return OS.objc_msgSend(this.id, OS.sel_privateBrowsingEnabled) !is 0;
-//}
-//
-//public NSString sansSerifFontFamily() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_sansSerifFontFamily);
-//  return result !is 0 ? new NSString(result) : null;
-//}
-//
-//public NSString serifFontFamily() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_serifFontFamily);
-//  return result !is 0 ? new NSString(result) : null;
-//}
-//
-//public void setAllowsAnimatedImageLooping(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setAllowsAnimatedImageLooping_1, flag);
-//}
-//
-//public void setAllowsAnimatedImages(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setAllowsAnimatedImages_1, flag);
-//}
-//
-//public void setAutosaves(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setAutosaves_1, flag);
-//}
-//
-//public void setCacheModel(int cacheModel) {
-//  OS.objc_msgSend(this.id, OS.sel_setCacheModel_1, cacheModel);
-//}
-//
-//public void setCursiveFontFamily(NSString family) {
-//  OS.objc_msgSend(this.id, OS.sel_setCursiveFontFamily_1, family !is null ? family.id : 0);
-//}
-//
-//public void setDefaultFixedFontSize(int size) {
-//  OS.objc_msgSend(this.id, OS.sel_setDefaultFixedFontSize_1, size);
-//}
-//
-//public void setDefaultFontSize(int size) {
-//  OS.objc_msgSend(this.id, OS.sel_setDefaultFontSize_1, size);
-//}
-//
-//public void setDefaultTextEncodingName(NSString encoding) {
-//  OS.objc_msgSend(this.id, OS.sel_setDefaultTextEncodingName_1, encoding !is null ? encoding.id : 0);
-//}
-//
-//public void setFantasyFontFamily(NSString family) {
-//  OS.objc_msgSend(this.id, OS.sel_setFantasyFontFamily_1, family !is null ? family.id : 0);
-//}
-//
-//public void setFixedFontFamily(NSString family) {
-//  OS.objc_msgSend(this.id, OS.sel_setFixedFontFamily_1, family !is null ? family.id : 0);
-//}
-
 public void setJavaEnabled(bool flag) {
-    OS.objc_msgSend(this.id, OS.sel_setJavaEnabled_1, flag);
+    OS.objc_msgSend(this.id, OS.sel_setJavaEnabled_, flag);
 }
 
-//public void setJavaScriptCanOpenWindowsAutomatically(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setJavaScriptCanOpenWindowsAutomatically_1, flag);
-//}
-//
-//public void setJavaScriptEnabled(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setJavaScriptEnabled_1, flag);
-//}
-//
-//public void setLoadsImagesAutomatically(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setLoadsImagesAutomatically_1, flag);
-//}
-//
-//public void setMinimumFontSize(int size) {
-//  OS.objc_msgSend(this.id, OS.sel_setMinimumFontSize_1, size);
-//}
-//
-//public void setMinimumLogicalFontSize(int size) {
-//  OS.objc_msgSend(this.id, OS.sel_setMinimumLogicalFontSize_1, size);
-//}
-//
-//public void setPlugInsEnabled(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setPlugInsEnabled_1, flag);
-//}
-//
-//public void setPrivateBrowsingEnabled(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setPrivateBrowsingEnabled_1, flag);
-//}
-//
-//public void setSansSerifFontFamily(NSString family) {
-//  OS.objc_msgSend(this.id, OS.sel_setSansSerifFontFamily_1, family !is null ? family.id : 0);
-//}
-//
-//public void setSerifFontFamily(NSString family) {
-//  OS.objc_msgSend(this.id, OS.sel_setSerifFontFamily_1, family !is null ? family.id : 0);
-//}
-//
-//public void setShouldPrintBackgrounds(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setShouldPrintBackgrounds_1, flag);
-//}
-//
-//public void setStandardFontFamily(NSString family) {
-//  OS.objc_msgSend(this.id, OS.sel_setStandardFontFamily_1, family !is null ? family.id : 0);
-//}
-//
-//public void setTabsToLinks(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setTabsToLinks_1, flag);
-//}
-//
-//public void setUserStyleSheetEnabled(bool flag) {
-//  OS.objc_msgSend(this.id, OS.sel_setUserStyleSheetEnabled_1, flag);
-//}
-//
-//public void setUserStyleSheetLocation(NSURL URL) {
-//  OS.objc_msgSend(this.id, OS.sel_setUserStyleSheetLocation_1, URL !is null ? URL.id : 0);
-//}
-//
-//public void setUsesPageCache(bool usesPageCache) {
-//  OS.objc_msgSend(this.id, OS.sel_setUsesPageCache_1, usesPageCache);
-//}
-//
-//public bool shouldPrintBackgrounds() {
-//  return OS.objc_msgSend(this.id, OS.sel_shouldPrintBackgrounds) !is 0;
-//}
-//
-//public NSString standardFontFamily() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_standardFontFamily);
-//  return result !is 0 ? new NSString(result) : null;
-//}
-//
 public static WebPreferences standardPreferences() {
-    int result = OS.objc_msgSend(OS.class_WebPreferences, OS.sel_standardPreferences);
-    return result !is 0 ? new WebPreferences(result) : null;
+    objc.id result = OS.objc_msgSend(OS.class_WebPreferences, OS.sel_standardPreferences);
+    return result !is null ? new WebPreferences(result) : null;
 }
-//
-//public bool tabsToLinks() {
-//  return OS.objc_msgSend(this.id, OS.sel_tabsToLinks) !is 0;
-//}
-//
-//public bool userStyleSheetEnabled() {
-//  return OS.objc_msgSend(this.id, OS.sel_userStyleSheetEnabled) !is 0;
-//}
-//
-//public NSURL userStyleSheetLocation() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_userStyleSheetLocation);
-//  return result !is 0 ? new NSURL(result) : null;
-//}
-//
-//public bool usesPageCache() {
-//  return OS.objc_msgSend(this.id, OS.sel_usesPageCache) !is 0;
-//}
 
 }
--- a/dwt/internal/cocoa/WebView.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/WebView.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,596 +1,106 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *    Jacob Carlborg <doob@me.com>
  *******************************************************************************/
-module dwt.internal.cocoa;
+module dwt.internal.cocoa.WebView;
+
+import dwt.dwthelper.utils;
+import cocoa = dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSView;
+import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.WebFrame;
+import objc = dwt.internal.objc.runtime;
 
 public class WebView : NSView {
 
-public WebView() {
+public this() {
     super();
 }
 
-public WebView(int id) {
+public this(objc.id id) {
     super(id);
 }
 
-public static NSArray MIMETypesShownAsHTML() {
-    int result = OS.objc_msgSend(OS.class_WebView, OS.sel_MIMETypesShownAsHTML);
-    return result !is 0 ? new NSArray(result) : null;
-}
-
-public id UIDelegate() {
-    int result = OS.objc_msgSend(this.id, OS.sel_UIDelegate);
-    return result !is 0 ? new id(result) : null;
-}
-
-public static NSURL URLFromPasteboard(NSPasteboard pasteboard) {
-    int result = OS.objc_msgSend(OS.class_WebView, OS.sel_URLFromPasteboard_1, pasteboard !is null ? pasteboard.id : 0);
-    return result !is 0 ? new NSURL(result) : null;
-}
-
-public static NSString URLTitleFromPasteboard(NSPasteboard pasteboard) {
-    int result = OS.objc_msgSend(OS.class_WebView, OS.sel_URLTitleFromPasteboard_1, pasteboard !is null ? pasteboard.id : 0);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public void alignCenter(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_alignCenter_1, sender !is null ? sender.id : 0);
+public this(cocoa.id id) {
+    super(id);
 }
 
-public void alignJustified(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_alignJustified_1, sender !is null ? sender.id : 0);
-}
-
-public void alignLeft(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_alignLeft_1, sender !is null ? sender.id : 0);
-}
-
-public void alignRight(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_alignRight_1, sender !is null ? sender.id : 0);
-}
-
-public NSString applicationNameForUserAgent() {
-    int result = OS.objc_msgSend(this.id, OS.sel_applicationNameForUserAgent);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-//public void applyStyle(DOMCSSStyleDeclaration style) {
-//  OS.objc_msgSend(this.id, OS.sel_applyStyle_1, style !is null ? style.id : 0);
-//}
-//
-//public WebBackForwardList backForwardList() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_backForwardList);
-//  return result !is 0 ? new WebBackForwardList(result) : null;
-//}
-
 public bool canGoBack() {
-    return OS.objc_msgSend(this.id, OS.sel_canGoBack) !is 0;
+    return OS.objc_msgSend_bool(this.id, OS.sel_canGoBack);
 }
 
 public bool canGoForward() {
-    return OS.objc_msgSend(this.id, OS.sel_canGoForward) !is 0;
-}
-
-public bool canMakeTextLarger() {
-    return OS.objc_msgSend(this.id, OS.sel_canMakeTextLarger) !is 0;
-}
-
-public bool canMakeTextSmaller() {
-    return OS.objc_msgSend(this.id, OS.sel_canMakeTextSmaller) !is 0;
-}
-
-public bool canMakeTextStandardSize() {
-    return OS.objc_msgSend(this.id, OS.sel_canMakeTextStandardSize) !is 0;
+    return OS.objc_msgSend_bool(this.id, OS.sel_canGoForward);
 }
 
 public static bool canShowMIMEType(NSString MIMEType) {
-    return OS.objc_msgSend(OS.class_WebView, OS.sel_canShowMIMEType_1, MIMEType !is null ? MIMEType.id : 0) !is 0;
-}
-
-public static bool canShowMIMETypeAsHTML(NSString MIMEType) {
-    return OS.objc_msgSend(OS.class_WebView, OS.sel_canShowMIMETypeAsHTML_1, MIMEType !is null ? MIMEType.id : 0) !is 0;
-}
-
-public void changeAttributes(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_changeAttributes_1, sender !is null ? sender.id : 0);
-}
-
-public void changeColor(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_changeColor_1, sender !is null ? sender.id : 0);
-}
-
-public void changeDocumentBackgroundColor(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_changeDocumentBackgroundColor_1, sender !is null ? sender.id : 0);
-}
-
-public void changeFont(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_changeFont_1, sender !is null ? sender.id : 0);
-}
-
-public void checkSpelling(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_checkSpelling_1, sender !is null ? sender.id : 0);
-}
-
-public void close() {
-    OS.objc_msgSend(this.id, OS.sel_close);
-}
-
-//public DOMCSSStyleDeclaration computedStyleForElement(DOMElement element, NSString pseudoElement) {
-//  int result = OS.objc_msgSend(this.id, OS.sel_computedStyleForElement_1pseudoElement_1, element !is null ? element.id : 0, pseudoElement !is null ? pseudoElement.id : 0);
-//  return result !is 0 ? new DOMCSSStyleDeclaration(result) : null;
-//}
-
-public void copy(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_copy_1, sender !is null ? sender.id : 0);
-}
-
-public void copyFont(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_copyFont_1, sender !is null ? sender.id : 0);
-}
-
-public NSString customTextEncodingName() {
-    int result = OS.objc_msgSend(this.id, OS.sel_customTextEncodingName);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public NSString customUserAgent() {
-    int result = OS.objc_msgSend(this.id, OS.sel_customUserAgent);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public void cut(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_cut_1, sender !is null ? sender.id : 0);
-}
-
-public void delete(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_delete_1, sender !is null ? sender.id : 0);
-}
-
-public void deleteSelection() {
-    OS.objc_msgSend(this.id, OS.sel_deleteSelection);
-}
-
-public id downloadDelegate() {
-    int result = OS.objc_msgSend(this.id, OS.sel_downloadDelegate);
-    return result !is 0 ? new id(result) : null;
-}
-
-public bool drawsBackground() {
-    return OS.objc_msgSend(this.id, OS.sel_drawsBackground) !is 0;
-}
-
-//public DOMRange editableDOMRangeForPoint(NSPoint point) {
-//  int result = OS.objc_msgSend(this.id, OS.sel_editableDOMRangeForPoint_1, point);
-//  return result !is 0 ? new DOMRange(result) : null;
-//}
-
-public id editingDelegate() {
-    int result = OS.objc_msgSend(this.id, OS.sel_editingDelegate);
-    return result !is 0 ? new id(result) : null;
-}
-
-public NSDictionary elementAtPoint(NSPoint point) {
-    int result = OS.objc_msgSend(this.id, OS.sel_elementAtPoint_1, point);
-    return result !is 0 ? new NSDictionary(result) : null;
-}
-
-public double estimatedProgress() {
-    return OS.objc_msgSend_fpret(this.id, OS.sel_estimatedProgress);
-}
-
-public id frameLoadDelegate() {
-    int result = OS.objc_msgSend(this.id, OS.sel_frameLoadDelegate);
-    return result !is 0 ? new id(result) : null;
+    return OS.objc_msgSend_bool(OS.class_WebView, OS.sel_canShowMIMEType_, MIMEType !is null ? MIMEType.id : null);
 }
 
 public bool goBack() {
-    return OS.objc_msgSend(this.id, OS.sel_goBack) !is 0;
-}
-
-public void goBack_(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_goBack_1, sender !is null ? sender.id : 0);
+    return OS.objc_msgSend_bool(this.id, OS.sel_goBack);
 }
 
 public bool goForward() {
-    return OS.objc_msgSend(this.id, OS.sel_goForward) !is 0;
-}
-
-public void goForward_(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_goForward_1, sender !is null ? sender.id : 0);
-}
-//
-//public bool goToBackForwardItem(WebHistoryItem item) {
-//  return OS.objc_msgSend(this.id, OS.sel_goToBackForwardItem_1, item !is null ? item.id : 0) !is 0;
-//}
-
-public NSString groupName() {
-    int result = OS.objc_msgSend(this.id, OS.sel_groupName);
-    return result !is 0 ? new NSString(result) : null;
+    return OS.objc_msgSend_bool(this.id, OS.sel_goForward);
 }
 
-public NSWindow hostWindow() {
-    int result = OS.objc_msgSend(this.id, OS.sel_hostWindow);
-    return result !is 0 ? new NSWindow(result) : null;
-}
-
-public id initWithFrame(NSRect frame, NSString frameName, NSString groupName) {
-    int result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_1frameName_1groupName_1, frame, frameName !is null ? frameName.id : 0, groupName !is null ? groupName.id : 0);
-    return result !is 0 ? new id(result) : null;
-}
-
-public bool isContinuousSpellCheckingEnabled() {
-    return OS.objc_msgSend(this.id, OS.sel_isContinuousSpellCheckingEnabled) !is 0;
-}
-
-public bool isEditable() {
-    return OS.objc_msgSend(this.id, OS.sel_isEditable) !is 0;
-}
-
-public bool isLoading() {
-    return OS.objc_msgSend(this.id, OS.sel_isLoading) !is 0;
+public WebView initWithFrame(NSRect frame, NSString frameName, NSString groupName) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_frameName_groupName_, frame, frameName !is null ? frameName.id : null, groupName !is null ? groupName.id : null);
+    return result is this.id ? this : (result !is null ? new WebView(result) : null);
 }
 
 public WebFrame mainFrame() {
-    int result = OS.objc_msgSend(this.id, OS.sel_mainFrame);
-    return result !is 0 ? new WebFrame(result) : null;
-}
-
-//public DOMDocument mainFrameDocument() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_mainFrameDocument);
-//  return result !is 0 ? new DOMDocument(result) : null;
-//}
-
-public NSImage mainFrameIcon() {
-    int result = OS.objc_msgSend(this.id, OS.sel_mainFrameIcon);
-    return result !is 0 ? new NSImage(result) : null;
-}
-
-public NSString mainFrameTitle() {
-    int result = OS.objc_msgSend(this.id, OS.sel_mainFrameTitle);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public NSString mainFrameURL() {
-    int result = OS.objc_msgSend(this.id, OS.sel_mainFrameURL);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public bool maintainsInactiveSelection() {
-    return OS.objc_msgSend(this.id, OS.sel_maintainsInactiveSelection) !is 0;
-}
-
-public void makeTextLarger(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_makeTextLarger_1, sender !is null ? sender.id : 0);
-}
-
-public void makeTextSmaller(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_makeTextSmaller_1, sender !is null ? sender.id : 0);
-}
-
-public void makeTextStandardSize(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_makeTextStandardSize_1, sender !is null ? sender.id : 0);
-}
-
-public NSString mediaStyle() {
-    int result = OS.objc_msgSend(this.id, OS.sel_mediaStyle);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public void moveDragCaretToPoint(NSPoint point) {
-    OS.objc_msgSend(this.id, OS.sel_moveDragCaretToPoint_1, point);
-}
-
-public void moveToBeginningOfSentence(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_moveToBeginningOfSentence_1, sender !is null ? sender.id : 0);
-}
-
-public void moveToBeginningOfSentenceAndModifySelection(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_moveToBeginningOfSentenceAndModifySelection_1, sender !is null ? sender.id : 0);
-}
-
-public void moveToEndOfSentence(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_moveToEndOfSentence_1, sender !is null ? sender.id : 0);
-}
-
-public void moveToEndOfSentenceAndModifySelection(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_moveToEndOfSentenceAndModifySelection_1, sender !is null ? sender.id : 0);
-}
-
-public void paste(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_paste_1, sender !is null ? sender.id : 0);
-}
-
-public void pasteAsPlainText(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_pasteAsPlainText_1, sender !is null ? sender.id : 0);
-}
-
-public void pasteAsRichText(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_pasteAsRichText_1, sender !is null ? sender.id : 0);
-}
-
-public void pasteFont(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_pasteFont_1, sender !is null ? sender.id : 0);
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_mainFrame);
+    return result !is null ? new WebFrame(result) : null;
 }
 
-public NSArray pasteboardTypesForElement(NSDictionary element) {
-    int result = OS.objc_msgSend(this.id, OS.sel_pasteboardTypesForElement_1, element !is null ? element.id : 0);
-    return result !is 0 ? new NSArray(result) : null;
-}
-
-public NSArray pasteboardTypesForSelection() {
-    int result = OS.objc_msgSend(this.id, OS.sel_pasteboardTypesForSelection);
-    return result !is 0 ? new NSArray(result) : null;
-}
-
-public void performFindPanelAction(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_performFindPanelAction_1, sender !is null ? sender.id : 0);
-}
-
-public id policyDelegate() {
-    int result = OS.objc_msgSend(this.id, OS.sel_policyDelegate);
-    return result !is 0 ? new id(result) : null;
-}
-
-//public WebPreferences preferences() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_preferences);
-//  return result !is 0 ? new WebPreferences(result) : null;
-//}
-
-public NSString preferencesIdentifier() {
-    int result = OS.objc_msgSend(this.id, OS.sel_preferencesIdentifier);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-public static void registerURLSchemeAsLocal(NSString scheme) {
-    OS.objc_msgSend(OS.class_WebView, OS.sel_registerURLSchemeAsLocal_1, scheme !is null ? scheme.id : 0);
-}
-
-public static void registerViewClass(int viewClass, int representationClass, NSString MIMEType) {
-    OS.objc_msgSend(OS.class_WebView, OS.sel_registerViewClass_1representationClass_1forMIMEType_1, viewClass, representationClass, MIMEType !is null ? MIMEType.id : 0);
-}
-
-public void reload(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_reload_1, sender !is null ? sender.id : 0);
-}
-
-public void removeDragCaret() {
-    OS.objc_msgSend(this.id, OS.sel_removeDragCaret);
-}
-
-//public void replaceSelectionWithArchive(WebArchive archive) {
-//  OS.objc_msgSend(this.id, OS.sel_replaceSelectionWithArchive_1, archive !is null ? archive.id : 0);
-//}
-
-public void replaceSelectionWithMarkupString(NSString markupString) {
-    OS.objc_msgSend(this.id, OS.sel_replaceSelectionWithMarkupString_1, markupString !is null ? markupString.id : 0);
-}
-
-//public void replaceSelectionWithNode(DOMNode node) {
-//  OS.objc_msgSend(this.id, OS.sel_replaceSelectionWithNode_1, node !is null ? node.id : 0);
-//}
-
-public void replaceSelectionWithText(NSString text) {
-    OS.objc_msgSend(this.id, OS.sel_replaceSelectionWithText_1, text !is null ? text.id : 0);
-}
-
-public id resourceLoadDelegate() {
-    int result = OS.objc_msgSend(this.id, OS.sel_resourceLoadDelegate);
-    return result !is 0 ? new id(result) : null;
-}
-
-//public bool searchFor(NSString String, bool forward, bool caseFlag, bool wrapFlag) {
-//  return OS.objc_msgSend(this.id, OS.sel_searchFor_1direction_1caseSensitive_1wrap_1, String !is null ? String.id : 0, forward, caseFlag, wrapFlag) !is 0;
-//}
-
-public void selectSentence(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_selectSentence_1, sender !is null ? sender.id : 0);
-}
-
-//public DOMRange selectedDOMRange() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_selectedDOMRange);
-//  return result !is 0 ? new DOMRange(result) : null;
-//}
-
-//public WebFrame selectedFrame() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_selectedFrame);
-//  return result !is 0 ? new WebFrame(result) : null;
-//}
-
-public int selectionAffinity() {
-    return OS.objc_msgSend(this.id, OS.sel_selectionAffinity);
+public void reload(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_reload_, sender !is null ? sender.id : null);
 }
 
 public void setApplicationNameForUserAgent(NSString applicationName) {
-    OS.objc_msgSend(this.id, OS.sel_setApplicationNameForUserAgent_1, applicationName !is null ? applicationName.id : 0);
-}
-
-public void setContinuousSpellCheckingEnabled(bool flag) {
-    OS.objc_msgSend(this.id, OS.sel_setContinuousSpellCheckingEnabled_1, flag);
-}
-
-public void setCustomTextEncodingName(NSString encodingName) {
-    OS.objc_msgSend(this.id, OS.sel_setCustomTextEncodingName_1, encodingName !is null ? encodingName.id : 0);
-}
-
-public void setCustomUserAgent(NSString userAgentString) {
-    OS.objc_msgSend(this.id, OS.sel_setCustomUserAgent_1, userAgentString !is null ? userAgentString.id : 0);
-}
-
-public void setDownloadDelegate(id delegate) {
-    OS.objc_msgSend(this.id, OS.sel_setDownloadDelegate_1, delegate !is null ? delegate.id : 0);
+    OS.objc_msgSend(this.id, OS.sel_setApplicationNameForUserAgent_, applicationName !is null ? applicationName.id : null);
 }
 
-public void setDrawsBackground(bool drawsBackround) {
-    OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_1, drawsBackround);
-}
-
-public void setEditable(bool flag) {
-    OS.objc_msgSend(this.id, OS.sel_setEditable_1, flag);
-}
-
-public void setEditingDelegate(id delegate) {
-    OS.objc_msgSend(this.id, OS.sel_setEditingDelegate_1, delegate !is null ? delegate.id : 0);
-}
-
-public void setFrameLoadDelegate(id delegate) {
-    OS.objc_msgSend(this.id, OS.sel_setFrameLoadDelegate_1, delegate !is null ? delegate.id : 0);
-}
-
-public void setGroupName(NSString groupName) {
-    OS.objc_msgSend(this.id, OS.sel_setGroupName_1, groupName !is null ? groupName.id : 0);
-}
-
-public void setHostWindow(NSWindow hostWindow) {
-    OS.objc_msgSend(this.id, OS.sel_setHostWindow_1, hostWindow !is null ? hostWindow.id : 0);
+public void setDownloadDelegate(cocoa.id delegate_) {
+    OS.objc_msgSend(this.id, OS.sel_setDownloadDelegate_, delegate_ !is null ? delegate_.id : null);
 }
 
-public static void setMIMETypesShownAsHTML(NSArray MIMETypes) {
-    OS.objc_msgSend(OS.class_WebView, OS.sel_setMIMETypesShownAsHTML_1, MIMETypes !is null ? MIMETypes.id : 0);
-}
-
-public void setMainFrameURL(NSString URLString) {
-    OS.objc_msgSend(this.id, OS.sel_setMainFrameURL_1, URLString !is null ? URLString.id : 0);
-}
-
-public void setMaintainsBackForwardList(bool flag) {
-    OS.objc_msgSend(this.id, OS.sel_setMaintainsBackForwardList_1, flag);
-}
-
-public void setMediaStyle(NSString mediaStyle) {
-    OS.objc_msgSend(this.id, OS.sel_setMediaStyle_1, mediaStyle !is null ? mediaStyle.id : 0);
-}
-
-public void setPolicyDelegate(id delegate) {
-    OS.objc_msgSend(this.id, OS.sel_setPolicyDelegate_1, delegate !is null ? delegate.id : 0);
+public void setFrameLoadDelegate(cocoa.id delegate_) {
+    OS.objc_msgSend(this.id, OS.sel_setFrameLoadDelegate_, delegate_ !is null ? delegate_.id : null);
 }
 
-//public void setPreferences(WebPreferences prefs) {
-//  OS.objc_msgSend(this.id, OS.sel_setPreferences_1, prefs !is null ? prefs.id : 0);
-//}
-
-public void setPreferencesIdentifier(NSString anIdentifier) {
-    OS.objc_msgSend(this.id, OS.sel_setPreferencesIdentifier_1, anIdentifier !is null ? anIdentifier.id : 0);
-}
-
-public void setResourceLoadDelegate(id delegate) {
-    OS.objc_msgSend(this.id, OS.sel_setResourceLoadDelegate_1, delegate !is null ? delegate.id : 0);
-}
-
-//public void setSelectedDOMRange(DOMRange range, int selectionAffinity) {
-//  OS.objc_msgSend(this.id, OS.sel_setSelectedDOMRange_1affinity_1, range !is null ? range.id : 0, selectionAffinity);
-//}
-
-public void setShouldCloseWithWindow(bool close) {
-    OS.objc_msgSend(this.id, OS.sel_setShouldCloseWithWindow_1, close);
-}
-
-public void setSmartInsertDeleteEnabled(bool flag) {
-    OS.objc_msgSend(this.id, OS.sel_setSmartInsertDeleteEnabled_1, flag);
-}
-
-public void setTextSizeMultiplier(float multiplier) {
-    OS.objc_msgSend(this.id, OS.sel_setTextSizeMultiplier_1, multiplier);
+public void setPolicyDelegate(cocoa.id delegate_) {
+    OS.objc_msgSend(this.id, OS.sel_setPolicyDelegate_, delegate_ !is null ? delegate_.id : null);
 }
 
-//public void setTypingStyle(DOMCSSStyleDeclaration style) {
-//  OS.objc_msgSend(this.id, OS.sel_setTypingStyle_1, style !is null ? style.id : 0);
-//}
-
-public void setUIDelegate(id delegate) {
-    OS.objc_msgSend(this.id, OS.sel_setUIDelegate_1, delegate !is null ? delegate.id : 0);
-}
-
-public bool shouldCloseWithWindow() {
-    return OS.objc_msgSend(this.id, OS.sel_shouldCloseWithWindow) !is 0;
-}
-
-public void showGuessPanel(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_showGuessPanel_1, sender !is null ? sender.id : 0);
-}
-
-public bool smartInsertDeleteEnabled() {
-    return OS.objc_msgSend(this.id, OS.sel_smartInsertDeleteEnabled) !is 0;
+public void setResourceLoadDelegate(cocoa.id delegate_) {
+    OS.objc_msgSend(this.id, OS.sel_setResourceLoadDelegate_, delegate_ !is null ? delegate_.id : null);
 }
 
-public int spellCheckerDocumentTag() {
-    return OS.objc_msgSend(this.id, OS.sel_spellCheckerDocumentTag);
-}
-
-public void startSpeaking(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_startSpeaking_1, sender !is null ? sender.id : 0);
-}
-
-public void stopLoading(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_stopLoading_1, sender !is null ? sender.id : 0);
-}
-
-public void stopSpeaking(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_stopSpeaking_1, sender !is null ? sender.id : 0);
-}
-
-public NSString StringByEvaluatingJavaScriptFromString(NSString script) {
-    int result = OS.objc_msgSend(this.id, OS.sel_StringByEvaluatingJavaScriptFromString_1, script !is null ? script.id : 0);
-    return result !is 0 ? new NSString(result) : null;
+public void setUIDelegate(cocoa.id delegate_) {
+    OS.objc_msgSend(this.id, OS.sel_setUIDelegate_, delegate_ !is null ? delegate_.id : null);
 }
 
-//public DOMCSSStyleDeclaration styleDeclarationWithText(NSString text) {
-//  int result = OS.objc_msgSend(this.id, OS.sel_styleDeclarationWithText_1, text !is null ? text.id : 0);
-//  return result !is 0 ? new DOMCSSStyleDeclaration(result) : null;
-//}
-
-public bool supportsTextEncoding() {
-    return OS.objc_msgSend(this.id, OS.sel_supportsTextEncoding) !is 0;
-}
-
-public void takeStringURLFrom(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_takeStringURLFrom_1, sender !is null ? sender.id : 0);
-}
-
-public float textSizeMultiplier() {
-    return (float)OS.objc_msgSend_fpret(this.id, OS.sel_textSizeMultiplier);
-}
-
-public void toggleContinuousSpellChecking(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_toggleContinuousSpellChecking_1, sender !is null ? sender.id : 0);
-}
-
-public void toggleSmartInsertDelete(id sender) {
-    OS.objc_msgSend(this.id, OS.sel_toggleSmartInsertDelete_1, sender !is null ? sender.id : 0);
+public void stopLoading(cocoa.id sender) {
+    OS.objc_msgSend(this.id, OS.sel_stopLoading_, sender !is null ? sender.id : null);
 }
 
-//public DOMCSSStyleDeclaration typingStyle() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_typingStyle);
-//  return result !is 0 ? new DOMCSSStyleDeclaration(result) : null;
-//}
-
-public NSUndoManager undoManager() {
-    int result = OS.objc_msgSend(this.id, OS.sel_undoManager);
-    return result !is 0 ? new NSUndoManager(result) : null;
-}
-
-public NSString userAgentForURL(NSURL URL) {
-    int result = OS.objc_msgSend(this.id, OS.sel_userAgentForURL_1, URL !is null ? URL.id : 0);
-    return result !is 0 ? new NSString(result) : null;
-}
-
-//public WebScriptObject windowScriptObject() {
-//  int result = OS.objc_msgSend(this.id, OS.sel_windowScriptObject);
-//  return result !is 0 ? new WebScriptObject(result) : null;
-//}
-
-public void writeElement(NSDictionary element, NSArray types, NSPasteboard pasteboard) {
-    OS.objc_msgSend(this.id, OS.sel_writeElement_1withPasteboardTypes_1toPasteboard_1, element !is null ? element.id : 0, types !is null ? types.id : 0, pasteboard !is null ? pasteboard.id : 0);
-}
-
-public void writeSelectionWithPasteboardTypes(NSArray types, NSPasteboard pasteboard) {
-    OS.objc_msgSend(this.id, OS.sel_writeSelectionWithPasteboardTypes_1toPasteboard_1, types !is null ? types.id : 0, pasteboard !is null ? pasteboard.id : 0);
+public NSString stringByEvaluatingJavaScriptFromString(NSString script) {
+    objc.id result = OS.objc_msgSend(this.id, OS.sel_stringByEvaluatingJavaScriptFromString_, script !is null ? script.id : null);
+    return result !is null ? new NSString(result) : null;
 }
 
 }
--- a/dwt/internal/cocoa/gl.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 3, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.cocoa.gl;
-
-extern (C):
-
-alias uint GLenum;
-alias ubyte GLboolean;
-alias uint GLbitfield;
-alias byte GLbyte;
-alias short GLshort;
-alias int GLint;
-alias int GLsizei;
-alias ubyte GLubyte;
-alias ushort GLushort;
-alias uint GLuint;
-alias float GLfloat;
-alias float GLclampf;
-alias double GLdouble;
-alias double GLclampd;
-alias void GLvoid;
-
-alias int GLintptr;
-alias int GLsizeiptr;
\ No newline at end of file
--- a/dwt/internal/cocoa/id.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/id.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,22 +9,37 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.id;
 
+import dwt.dwthelper.utils;
+
+import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-public class id
-{
-    public objc.id id_;
+/**
+ * @jniclass flags=no_gen
+ */
+public class id {
+
+public objc.id id;
+
+public this() {
+}
 
-    public this ()
-    {
-    }
+public this(objc.id id) {
+    this.id = id;
+}
+
+public this(dwt.internal.cocoa.id.id id) {
+    this.id = id !is null ? id.id : null;
+}
 
-    public this (objc.id id)
-    {
-        this.id_ = id;
-    }
+public objc.id objc_getClass() {
+    String name = this.classinfo.name;
+    int index = name.lastIndexOf('.');
+    if (index !is -1) name = name.substring(index + 1);
+    return OS.objc_getClass(name);
 }
+}
\ No newline at end of file
--- a/dwt/internal/cocoa/objc_super.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/cocoa/objc_super.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.internal.cocoa.objc_super;
 
--- a/dwt/internal/image/FileFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/FileFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -82,7 +82,7 @@
 public static ImageData[] load(InputStream istr, ImageLoader loader) {
     FileFormat fileFormat = null;
     LEDataInputStream stream = new LEDataInputStream(istr);
-    bool isSupported = false;    
+    bool isSupported = false;   
     foreach( TFormat; TFormats ){
         try{
             fileFormat = new TFormat();
--- a/dwt/internal/image/GIFFileFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/GIFFileFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/internal/image/JPEGDecoder.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/JPEGDecoder.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -243,7 +243,7 @@
          * You could suppress output of a table by setting this to true.
          * (See jpeg_suppress_tables for an example.)
          */
-        bool sent_table;     /* true when table has been output */
+        bool sent_table;        /* true when table has been output */
     }
 
     static final class JHUFF_TBL {
@@ -256,7 +256,7 @@
          * You could suppress output of a table by setting this to true.
          * (See jpeg_suppress_tables for an example.)
          */
-        bool sent_table;     /* true when table has been output */
+        bool sent_table;        /* true when table has been output */
     }
 
     static final class bitread_perm_state {     /* Bitreading state saved across MCUs */
@@ -374,7 +374,7 @@
 
         /* This is here to share code between baseline and progressive decoders; */
         /* other modules probably should not use it */
-        bool insufficient_data;  /* set true after emitting warning */
+        bool insufficient_data; /* set true after emitting warning */
 
         bitread_working_state br_state_local;
         savable_state state_local;
@@ -979,7 +979,7 @@
                         r = s >> 4;
                         s &= 15;
                         if (s !is 0) {
-                            if (s !is 1) {       /* size of new coef should always be 1 */
+                            if (s !is 1) {      /* size of new coef should always be 1 */
 //                              WARNMS(cinfo, JWRN_HUFF_BAD_CODE);
                             }
 //                          CHECK_BIT_BUFFER(br_state, 1, goto undoit);
@@ -1242,7 +1242,7 @@
                                 k += 15;        /* skip 15 zeroes in band */
                             } else {        /* EOBr, run length is 2^r + appended bits */
                                 EOBRUN = 1 << r;
-                                if (r !is 0) {       /* EOBr, r > 0 */
+                                if (r !is 0) {      /* EOBr, r > 0 */
 //                                  CHECK_BIT_BUFFER(br_state, r, return FALSE);
                                     {
                                     if (bits_left < (r)) {
@@ -1280,7 +1280,7 @@
             return true;
         }
 
-        bool decode_mcu_DC_first (jpeg_decompress_struct cinfo, short[][] MCU_data) {     
+        bool decode_mcu_DC_first (jpeg_decompress_struct cinfo, short[][] MCU_data) {    
             phuff_entropy_decoder entropy = this;
             int Al = cinfo.Al;
             int s = 0, r;
@@ -1596,7 +1596,7 @@
          * components will be ignored (eg grayscale output from YCbCr image),
          * we can skip most computations for the unused components.
          */
-        bool component_needed;   /* do we need the value of this component? */
+        bool component_needed;  /* do we need the value of this component? */
 
         /* These values are computed before starting a scan of the component. */
         /* The decompressor output side may not use these variables. */
@@ -1634,7 +1634,7 @@
          * premultiplied as described above.    Since colormap indexes must fit into
          * JSAMPLEs, the entries of this array will too.
          */
-        bool is_padded;      /* is the colorindex padded for odither? */
+        bool is_padded;     /* is the colorindex padded for odither? */
 
         int[MAX_Q_COMPS] Ncolors;// = new int [MAX_Q_COMPS];    /* # of values alloced to each component */
 
@@ -1644,7 +1644,7 @@
 
         /* Variables for Floyd-Steinberg dithering */
 //          FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */
-        bool on_odd_row; 
+        bool on_odd_row;    
 
         void start_pass (jpeg_decompress_struct cinfo, bool is_pre_scan) {
             error();
@@ -1661,7 +1661,7 @@
 //                   JDIMENSION *out_row_ctr,
 //                   JDIMENSION out_rows_avail));
 
-        bool need_context_rows;  /* TRUE if need rows above & below */
+        bool need_context_rows; /* TRUE if need rows above & below */
 
         /* Color conversion buffer. When using separate upsampling and color
          * conversion steps, this buffer holds one upsampled row group until it
@@ -1706,8 +1706,8 @@
         /* State of marker reader --- nominally internal, but applications
          * supplying COM or APPn handlers might like to know the state.
          */
-        bool saw_SOI;        /* found SOI? */
-        bool saw_SOF;        /* found SOF? */
+        bool saw_SOI;       /* found SOI? */
+        bool saw_SOF;       /* found SOF? */
         int next_restart_num;       /* next restart number expected (0-7) */
         int discarded_bytes;    /* # of bytes skipped looking for a marker */
 
@@ -1734,7 +1734,7 @@
         byte[][][MAX_COMPONENTS] buffer;// = new byte[MAX_COMPONENTS][][];
         int[MAX_COMPONENTS] buffer_offset;// = new int[MAX_COMPONENTS];
 
-        bool buffer_full;        /* Have we gotten an iMCU row from decoder? */
+        bool buffer_full;       /* Have we gotten an iMCU row from decoder? */
         int[1] rowgroup_ctr;// = new int[1];    /* counts row groups output to postprocessor */
 
         /* Remaining fields are only used in the context case. */
@@ -1958,10 +1958,10 @@
 
     static final class jpeg_input_controller {
         int consume_input;
-        bool has_multiple_scans; /* True if file has multiple scans */
+        bool has_multiple_scans;    /* True if file has multiple scans */
         bool eoi_reached;
 
-        bool inheaders;      /* true until first SOS is reached */
+        bool inheaders;     /* true until first SOS is reached */
     }
 
     static final class  jpeg_color_deconverter {
@@ -2050,7 +2050,7 @@
 //      struct jpeg_memory_mgr * mem;   /* Memory manager module */\
 //      struct jpeg_progress_mgr * progress; /* Progress monitor, or null if none */\
 //      void * client_data;     /* Available for use by application */\
-        bool is_decompressor;    /* So common code can tell which is which */
+        bool is_decompressor;   /* So common code can tell which is which */
         int global_state;       /* For checking call sequence validity */
 
 //      /* Source of compressed data */
@@ -2080,22 +2080,22 @@
 
         double output_gamma;        /* image gamma wanted in output */
 
-        bool buffered_image; /* true=multiple output passes */
-        bool raw_data_out;       /* true=downsampled data wanted */
+        bool buffered_image;    /* true=multiple output passes */
+        bool raw_data_out;      /* true=downsampled data wanted */
 
         int dct_method; /* IDCT algorithm selector */
-        bool do_fancy_upsampling;    /* true=apply fancy upsampling */
-        bool do_block_smoothing; /* true=apply interblock smoothing */
-
-        bool quantize_colors;    /* true=colormapped output wanted */
+        bool do_fancy_upsampling;   /* true=apply fancy upsampling */
+        bool do_block_smoothing;    /* true=apply interblock smoothing */
+
+        bool quantize_colors;   /* true=colormapped output wanted */
         /* the following are ignored if not quantize_colors: */
         int dither_mode;    /* type of color dithering to use */
-        bool two_pass_quantize;  /* true=use two-pass color quantization */
+        bool two_pass_quantize; /* true=use two-pass color quantization */
         int desired_number_of_colors;   /* max # colors to use in created colormap */
         /* these are significant only in buffered-image mode: */
-        bool enable_1pass_quant; /* enable future use of 1-pass quantizer */
+        bool enable_1pass_quant;    /* enable future use of 1-pass quantizer */
         bool enable_external_quant;/* enable future use of external colormap */
-        bool enable_2pass_quant; /* enable future use of 2-pass quantizer */
+        bool enable_2pass_quant;    /* enable future use of 2-pass quantizer */
 
         /* Description of actual output image that will be returned to application.
          * These fields are computed by jpeg_start_decompress().
@@ -2182,8 +2182,8 @@
         jpeg_component_info[] comp_info;
         /* comp_info[i] describes component that appears i'th in SOF */
 
-        bool progressive_mode;   /* true if SOFn specifies progressive mode */
-        bool arith_code;     /* true=arithmetic coding, false=Huffman */
+        bool progressive_mode;  /* true if SOFn specifies progressive mode */
+        bool arith_code;        /* true=arithmetic coding, false=Huffman */
 
         byte[NUM_ARITH_TBLS] arith_dc_L;// = new byte[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */
         byte[NUM_ARITH_TBLS] arith_dc_U;// = new byte[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */
@@ -2194,17 +2194,17 @@
         /* These fields record data obtained from optional markers recognized by
          * the JPEG library.
          */
-        bool saw_JFIF_marker;    /* true iff a JFIF APP0 marker was found */
+        bool saw_JFIF_marker;   /* true iff a JFIF APP0 marker was found */
         /* Data copied from JFIF marker; only valid if saw_JFIF_marker is true: */
         byte JFIF_major_version;    /* JFIF version number */
         byte JFIF_minor_version;
         byte density_unit;      /* JFIF code for pixel size units */
         short X_density;        /* Horizontal pixel density */
         short Y_density;        /* Vertical pixel density */
-        bool saw_Adobe_marker;   /* true iff an Adobe APP14 marker was found */
+        bool saw_Adobe_marker;  /* true iff an Adobe APP14 marker was found */
         byte Adobe_transform;   /* Color transform code from Adobe marker */
 
-        bool CCIR601_sampling;   /* true=first samples are cosited */
+        bool CCIR601_sampling;  /* true=first samples are cosited */
 
         /* Aside from the specific data retained from APPn markers known to the
          * library, the uninterpreted contents of any or all APPn and COM markers
@@ -4448,7 +4448,7 @@
 
         length -= count;
 
-        if ((index & 0x10) !is 0) {      /* AC table definition */
+        if ((index & 0x10) !is 0) {     /* AC table definition */
             index -= 0x10;
             htblptr = cinfo.ac_huff_tbl_ptrs[index] = new JHUFF_TBL();
         } else {            /* DC table definition */
@@ -5237,7 +5237,7 @@
 //               GETJOCTET(data[12]), GETJOCTET(data[13]));
         }
         totallen -= APP0_DATA_LEN;
-        if (totallen !is ((data[12] & 0xFF) * (data[13] & 0xFF) * 3)) {
+        if (totallen !is    ((data[12] & 0xFF) * (data[13] & 0xFF) * 3)) {
 //          TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, cast(int) totallen);
         }
     } else if (datalen >= 6 &&
--- a/dwt/internal/image/JPEGFileFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/JPEGFileFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved.  This source file is made available under the terms contained in the README file
  * accompanying this program.  The README file should be located in the about_files directory of the
--- a/dwt/internal/image/LEDataInputStream.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/LEDataInputStream.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/internal/image/OS2BMPFileFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/OS2BMPFileFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/internal/image/PNGFileFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/PNGFileFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -176,7 +176,7 @@
         if ((signature[4] & 0xFF) !is 13) return false; //<RETURN>
         if ((signature[5] & 0xFF) !is 10) return false; //<LINEFEED>
         if ((signature[6] & 0xFF) !is 26) return false; //<CTRL/Z>
-        if ((signature[7] & 0xFF) !is 10) return false; //<LINEFEED>     
+        if ((signature[7] & 0xFF) !is 10) return false; //<LINEFEED>        
         return true;
     } catch (Exception e) {
         return false;
--- a/dwt/internal/image/PngEncoder.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/PngEncoder.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/internal/image/PngPlteChunk.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/PngPlteChunk.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -112,7 +112,7 @@
 
     // Palette chunks' data fields must be event multiples
     // of 3. Each 3-byte group represents an RGB value.
-    if (getLength() % 3 !is 0) DWT.error(DWT.ERROR_INVALID_IMAGE);   
+    if (getLength() % 3 !is 0) DWT.error(DWT.ERROR_INVALID_IMAGE);  
 
     // Palettes cannot have more entries than 2^bitDepth
     // where bitDepth is the bit depth of the image given
--- a/dwt/internal/image/TIFFFileFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/TIFFFileFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/internal/image/WinBMPFileFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/WinBMPFileFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/internal/image/WinICOFileFormat.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/image/WinICOFileFormat.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/XPCOM.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,1732 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2006 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.XPCOM;
+
+import dwt.dwthelper.utils;
+
+import dwt.internal.C;
+
+/** @jniclass flags=cpp */
+public class XPCOM extends C {
+    public static final String MOZILLA_FIVE_HOME = "MOZILLA_FIVE_HOME"; //$NON-NLS-1$
+    public static final String MOZILLA_PLUGIN_PATH = "MOZ_PLUGIN_PATH"; //$NON-NLS-1$
+    public static final String CONTENT_MAYBETEXT = "application/x-vnd.mozilla.maybe-text"; //$NON-NLS-1$
+    public static final String CONTENT_MULTIPART = "multipart/x-mixed-replace"; //$NON-NLS-1$
+    public static final String DOMEVENT_FOCUS = "focus"; //$NON-NLS-1$
+    public static final String DOMEVENT_UNLOAD = "unload"; //$NON-NLS-1$
+    public static final String DOMEVENT_MOUSEDOWN = "mousedown"; //$NON-NLS-1$
+    public static final String DOMEVENT_MOUSEUP = "mouseup"; //$NON-NLS-1$
+    public static final String DOMEVENT_MOUSEMOVE = "mousemove"; //$NON-NLS-1$
+    public static final String DOMEVENT_MOUSEDRAG = "draggesture"; //$NON-NLS-1$
+    public static final String DOMEVENT_MOUSEWHEEL = "DOMMouseScroll"; //$NON-NLS-1$
+    public static final String DOMEVENT_MOUSEOVER = "mouseover"; //$NON-NLS-1$
+    public static final String DOMEVENT_MOUSEOUT = "mouseout"; //$NON-NLS-1$
+    public static final String DOMEVENT_KEYUP = "keyup"; //$NON-NLS-1$
+    public static final String DOMEVENT_KEYDOWN = "keydown"; //$NON-NLS-1$
+    public static final String DOMEVENT_KEYPRESS = "keypress"; //$NON-NLS-1$
+    
+    /* CID constants */
+    public static final nsID NS_APPSHELL_CID =  new nsID("2d96b3df-c051-11d1-a827-0040959a28c9"); //$NON-NLS-1$
+    public static final nsID NS_CATEGORYMANAGER_CID = new nsID("16d222a6-1dd2-11b2-b693-f38b02c021b2"); //$NON-NLS-1$
+    public static final nsID NS_DOWNLOAD_CID = new nsID("e3fa9D0a-1dd1-11b2-bdef-8c720b597445"); //$NON-NLS-1$
+    public static final nsID NS_FILEPICKER_CID = new nsID("54ae32f8-1dd2-11b2-a209-df7c505370f8"); //$NON-NLS-1$
+    public static final nsID NS_HELPERAPPLAUNCHERDIALOG_CID = new nsID("f68578eb-6ec2-4169-ae19-8c6243f0abe1"); //$NON-NLS-1$
+    public static final nsID NS_INPUTSTREAMCHANNEL_CID = new nsID("6ddb050c-0d04-11d4-986e-00c04fa0cf4a"); //$NON-NLS-1$
+    public static final nsID NS_IOSERVICE_CID = new nsID("9ac9e770-18bc-11d3-9337-00104ba0fd40"); //$NON-NLS-1$
+    public static final nsID NS_LOADGROUP_CID = new nsID("e1c61582-2a84-11d3-8cce-0060b0fc14a3"); //$NON-NLS-1$
+    public static final nsID NS_PROMPTSERVICE_CID = new nsID("a2112d6a-0e28-421f-b46a-25c0b308cbd0"); //$NON-NLS-1$
+
+    public static final String NS_CONTEXTSTACK_CONTRACTID = "@mozilla.org/js/xpc/ContextStack;1"; //$NON-NLS-1$
+    public static final String NS_COOKIEMANAGER_CONTRACTID = "@mozilla.org/cookiemanager;1"; //$NON-NLS-1$
+    public static final String NS_DIRECTORYSERVICE_CONTRACTID = "@mozilla.org/file/directory_service;1"; //$NON-NLS-1$
+    public static final String NS_DOMSERIALIZER_CONTRACTID = "@mozilla.org/xmlextras/xmlserializer;1"; //$NON-NLS-1$
+    public static final String NS_DOWNLOAD_CONTRACTID = "@mozilla.org/download;1"; //$NON-NLS-1$
+    public static final String NS_FILEPICKER_CONTRACTID = "@mozilla.org/filepicker;1"; //$NON-NLS-1$
+    public static final String NS_HELPERAPPLAUNCHERDIALOG_CONTRACTID = "@mozilla.org/helperapplauncherdialog;1"; //$NON-NLS-1$
+    public static final String NS_MEMORY_CONTRACTID = "@mozilla.org/xpcom/memory-service;1"; //$NON-NLS-1$
+    public static final String NS_OBSERVER_CONTRACTID = "@mozilla.org/observer-service;1"; //$NON-NLS-1$
+    public static final String NS_PREFLOCALIZEDSTRING_CONTRACTID = "@mozilla.org/pref-localizedstring;1"; //$NON-NLS-1$
+    public static final String NS_PREFSERVICE_CONTRACTID = "@mozilla.org/preferences-service;1"; //$NON-NLS-1$
+    public static final String NS_PROMPTSERVICE_CONTRACTID = "@mozilla.org/embedcomp/prompt-service;1"; //$NON-NLS-1$
+    public static final String NS_TRANSFER_CONTRACTID = "@mozilla.org/transfer;1"; //$NON-NLS-1$
+    public static final String NS_WEBNAVIGATIONINFO_CONTRACTID = "@mozilla.org/webnavigation-info;1"; //$NON-NLS-1$
+    public static final String NS_WINDOWWATCHER_CONTRACTID = "@mozilla.org/embedcomp/window-watcher;1"; //$NON-NLS-1$
+
+    /* directory service constants */
+    public static final String NS_APP_APPLICATION_REGISTRY_DIR = "AppRegD"; //$NON-NLS-1$
+    public static final String NS_APP_CACHE_PARENT_DIR = "cachePDir"; //$NON-NLS-1$
+    public static final String NS_APP_HISTORY_50_FILE = "UHist"; //$NON-NLS-1$
+    public static final String NS_APP_LOCALSTORE_50_FILE = "LclSt"; //$NON-NLS-1$
+    public static final String NS_APP_PLUGINS_DIR_LIST = "APluginsDL"; //$NON-NLS-1$
+    public static final String NS_APP_PREF_DEFAULTS_50_DIR = "PrfDef"; //$NON-NLS-1$
+    public static final String NS_APP_PREFS_50_DIR = "PrefD"; //$NON-NLS-1$
+    public static final String NS_APP_PREFS_50_FILE = "PrefF"; //$NON-NLS-1$
+    public static final String NS_APP_USER_CHROME_DIR = "UChrm"; //$NON-NLS-1$
+    public static final String NS_APP_USER_MIMETYPES_50_FILE = "UMimTyp"; //$NON-NLS-1$
+    public static final String NS_APP_USER_PROFILE_50_DIR = "ProfD"; //$NON-NLS-1$
+    public static final String NS_GRE_COMPONENT_DIR = "GreComsD"; //$NON-NLS-1$
+    public static final String NS_GRE_DIR = "GreD"; //$NON-NLS-1$
+    public static final String NS_OS_CURRENT_PROCESS_DIR = "CurProcD"; //$NON-NLS-1$
+    public static final String NS_OS_HOME_DIR = "Home"; //$NON-NLS-1$
+    public static final String NS_OS_TEMP_DIR = "TmpD"; //$NON-NLS-1$
+    public static final String NS_XPCOM_COMPONENT_DIR = "ComsD"; //$NON-NLS-1$
+    public static final String NS_XPCOM_CURRENT_PROCESS_DIR = "XCurProcD"; //$NON-NLS-1$
+    public static final String NS_XPCOM_INIT_CURRENT_PROCESS_DIR = "MozBinD"; //$NON-NLS-1$
+
+    /* XPCOM constants */
+    public static final int NS_OK =  0;
+    public static final int NS_COMFALSE = 1;
+    public static final int NS_BINDING_ABORTED = 0x804B0002;
+    public static final int NS_ERROR_BASE = 0xc1f30000;
+    public static final int NS_ERROR_NOT_INITIALIZED =  NS_ERROR_BASE + 1;
+    public static final int NS_ERROR_ALREADY_INITIALIZED = NS_ERROR_BASE + 2;
+    public static final int NS_ERROR_NOT_IMPLEMENTED =  0x80004001;
+    public static final int NS_NOINTERFACE =  0x80004002;
+    public static final int NS_ERROR_NO_INTERFACE =  NS_NOINTERFACE;
+    public static final int NS_ERROR_INVALID_POINTER =  0x80004003;
+    public static final int NS_ERROR_NULL_POINTER = NS_ERROR_INVALID_POINTER;
+    public static final int NS_ERROR_ABORT = 0x80004004;
+    public static final int NS_ERROR_FAILURE = 0x80004005;
+    public static final int NS_ERROR_UNEXPECTED = 0x8000ffff;
+    public static final int NS_ERROR_OUT_OF_MEMORY = 0x8007000e;
+    public static final int NS_ERROR_ILLEGAL_VALUE = 0x80070057;
+    public static final int NS_ERROR_INVALID_ARG = NS_ERROR_ILLEGAL_VALUE;
+    public static final int NS_ERROR_NO_AGGREGATION = 0x80040110;
+    public static final int NS_ERROR_NOT_AVAILABLE = 0x80040111;
+    public static final int NS_ERROR_FACTORY_NOT_REGISTERED = 0x80040154;
+    public static final int NS_ERROR_FACTORY_REGISTER_AGAIN = 0x80040155;
+    public static final int NS_ERROR_FACTORY_NOT_LOADED = 0x800401f8;
+    public static final int NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT = NS_ERROR_BASE + 0x101;
+    public static final int NS_ERROR_FACTORY_EXISTS = NS_ERROR_BASE + 0x100;
+    public static final int NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = 0x804e03f3;
+    public static final int NS_ERROR_FILE_NOT_FOUND = 0x80520012;
+    public static final int NS_ERROR_FILE_UNRECOGNIZED_PATH = 0x80520001;
+
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *)
+ * @param nbytes cast=(size_t)
+ */
+public static final native void memmove(nsID dest, int /*long*/ src, int nbytes);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *)
+ * @param nbytes cast=(size_t)
+ */
+public static final native void memmove(int /*long*/ dest, nsID src, int nbytes);
+/** @method flags=no_gen */
+public static final native int strlen_PRUnichar(int /*long*/ s);
+
+/** @param result cast=(nsIComponentManager**) */
+public static final native int _NS_GetComponentManager(int /*long*/[] result);
+public static final int NS_GetComponentManager(int /*long*/[] result) {
+    lock.lock();
+    try {
+        return _NS_GetComponentManager(result);
+    } finally {
+        lock.unlock();
+    }
+}
+/** @param result cast=(nsIServiceManager**) */
+public static final native int _NS_GetServiceManager(int /*long*/[] result);
+public static final int NS_GetServiceManager(int /*long*/[] result) {
+    lock.lock();
+    try {
+        return _NS_GetServiceManager(result);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @param result cast=(nsIServiceManager **)
+ * @param binDirectory cast=(nsIFile *)
+ * @param appFileLocationProvider cast=(nsIDirectoryServiceProvider *)
+ */
+public static final native int _NS_InitXPCOM2(int /*long*/ result, int /*long*/ binDirectory, int /*long*/ appFileLocationProvider);
+public static final int NS_InitXPCOM2(int /*long*/ result, int /*long*/ binDirectory, int /*long*/ appFileLocationProvider) {
+    lock.lock();
+    try {
+        return _NS_InitXPCOM2(result, binDirectory, appFileLocationProvider);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @param path cast=(nsAString *),flags=struct
+ * @param result cast=(nsILocalFile**)
+ */
+public static final native int _NS_NewLocalFile(int /*long*/ path, int followLinks, int /*long*/[] result);
+public static final int NS_NewLocalFile(int /*long*/ path, int followLinks, int /*long*/[] result) {
+    lock.lock();
+    try {
+        return _NS_NewLocalFile(path, followLinks, result);
+    } finally {
+        lock.unlock();
+    }
+}
+/** @method flags=new */
+public static final native int /*long*/ _nsEmbedCString_new();
+public static final int /*long*/ nsEmbedCString_new() {
+    lock.lock();
+    try {
+        return _nsEmbedCString_new();
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=new
+ * @param aString cast=(const char *)
+ */
+public static final native int /*long*/ _nsEmbedCString_new(byte[] aString, int length);
+public static final int /*long*/ nsEmbedCString_new(byte[] aString, int length) {
+    lock.lock();
+    try {
+        return _nsEmbedCString_new(aString, length);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=new
+ * @param aString cast=(const char *)
+ */
+public static final native int /*long*/ _nsEmbedCString_new(int /*long*/ aString, int length);
+public static final int /*long*/ nsEmbedCString_new(int /*long*/ aString, int length) {
+    lock.lock();
+    try {
+        return _nsEmbedCString_new(aString, length);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=delete
+ * @param ptr cast=(nsEmbedCString *)
+ */
+public static final native void _nsEmbedCString_delete(int /*long*/ ptr);
+public static final void nsEmbedCString_delete(int /*long*/ ptr) {
+    lock.lock();
+    try {
+        _nsEmbedCString_delete(ptr);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=cpp
+ * @param ptr cast=(nsEmbedCString *)
+ */
+public static final native int _nsEmbedCString_Length(int /*long*/ ptr);
+public static final int nsEmbedCString_Length(int /*long*/ ptr) {
+    lock.lock();
+    try {
+        return _nsEmbedCString_Length(ptr);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=cpp
+ * @param ptr cast=(nsEmbedCString *)
+ */
+public static final native int /*long*/ _nsEmbedCString_get(int /*long*/ ptr);
+public static final int /*long*/ nsEmbedCString_get(int /*long*/ ptr) {
+    lock.lock();
+    try {
+        return _nsEmbedCString_get(ptr);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=delete
+ * @param ptr cast=(nsID *)
+ */
+public static final native void _nsID_delete(int /*long*/ ptr);
+public static final void nsID_delete(int /*long*/ ptr) {
+    lock.lock();
+    try {
+        _nsID_delete(ptr);
+    } finally {
+        lock.unlock();
+    }
+}
+/** @method flags=new */
+public static final native int /*long*/ _nsID_new();
+public static final int /*long*/ nsID_new() {
+    lock.lock();
+    try {
+        return _nsID_new();
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=cpp
+ * @param ptr cast=(nsID *)
+ * @param other cast=(nsID *),flags=struct
+ */
+public static final native int _nsID_Equals(int /*long*/ ptr, int /*long*/ other);
+public static final int nsID_Equals(int /*long*/ ptr, int /*long*/ other) {
+    lock.lock();
+    try {
+        return _nsID_Equals(ptr, other);
+    } finally {
+        lock.unlock();
+    }
+}
+/** @method flags=new */
+public static final native int /*long*/ _nsEmbedString_new();
+public static final int /*long*/ nsEmbedString_new() {
+    lock.lock();
+    try {
+        return _nsEmbedString_new();
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=new
+ * @param aString cast=(PRUnichar *)
+ */
+public static final native int /*long*/ _nsEmbedString_new(char[] aString);
+public static final int /*long*/ nsEmbedString_new(char[] aString) {
+    lock.lock();
+    try {
+        return _nsEmbedString_new(aString);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=delete
+ * @param ptr cast=(nsEmbedString *)
+ */
+public static final native void _nsEmbedString_delete(int /*long*/ ptr);
+public static final void nsEmbedString_delete(int /*long*/ ptr) {
+    lock.lock();
+    try {
+        _nsEmbedString_delete(ptr);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=cpp
+ * @param ptr cast=(nsEmbedString *)
+ */
+public static final native int _nsEmbedString_Length(int /*long*/ ptr);
+public static final int nsEmbedString_Length(int /*long*/ ptr) {
+    lock.lock();
+    try {
+        return _nsEmbedString_Length(ptr);
+    } finally {
+        lock.unlock();
+    }
+}
+/**
+ * @method flags=cpp
+ * @param ptr cast=(nsEmbedString *)
+ */
+public static final native int /*long*/ _nsEmbedString_get(int /*long*/ ptr);
+public static final int /*long*/ nsEmbedString_get(int /*long*/ ptr) {
+    lock.lock();
+    try {
+        return _nsEmbedString_get(ptr);
+    } finally {
+        lock.unlock();
+    }
+}
+/** @param place cast=(const char *) */
+public static final native int _XPCOMGlueStartup(byte[] place);
+public static final int XPCOMGlueStartup(byte[] place) {
+    lock.lock();
+    try {
+        return _XPCOMGlueStartup(place);
+    } finally {
+        lock.unlock();
+    }
+}
+public static final native int _XPCOMGlueShutdown();
+public static final int XPCOMGlueShutdown() {
+    lock.lock();
+    try {
+        return _XPCOMGlueShutdown();
+    } finally {
+        lock.unlock();
+    }
+}
+
+/**
+ * @param ptr cast=(nsWriteSegmentFun)
+ * @param aInStream cast=(nsIInputStream *)
+ * @param aClosure cast=(void *)
+ * @param aFromSegment cast=(const char *)
+ * @param aWriteCount cast=(PRUint32 *)
+ */
+public static final native int /*long*/ _Call(int /*long*/ ptr, int /*long*/ aInStream, int /*long*/ aClosure, byte[] aFromSegment, int aToOffset, int aCount, int[] aWriteCount);
+public static final int /*long*/ Call(int /*long*/ ptr, int /*long*/ aInStream, int /*long*/ aClosure, byte[] aFromSegment, int aToOffset, int aCount, int[] aWriteCount) {
+    lock.lock();
+    try {
+        return _Call(ptr, aInStream, aClosure, aFromSegment, aToOffset, aCount, aWriteCount);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, float arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, float arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, float[] arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, float[] arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long[] arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long[] arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, short[] arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, short[] arg0) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long [] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long [] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, long[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, long[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, long arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, long arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, nsID arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, nsID arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, nsID arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, nsID arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, int[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, int[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, long[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, long[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, int arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, int arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, long arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, long arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, int[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, int[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, long[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, long[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, char[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, char[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, int arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, int arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, int arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, int arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, int[] arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, int[] arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long [] arg0, long [] arg1, long [] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long [] arg0, long [] arg1, long [] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, long[] arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, long[] arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, long[] arg1, long [] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, long[] arg1, long [] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, nsID arg1, long [] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, nsID arg1, long [] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, nsID arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, nsID arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, long arg1, long [] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, long arg1, long [] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, long arg1, long arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, long arg1, long arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, long[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, long[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long [] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long [] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, nsID arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, nsID arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, nsID arg1, long [] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, nsID arg1, long [] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, char[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, char[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, nsID arg1, long[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, nsID arg1, long[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, nsID arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, nsID arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, long[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, long[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int[] arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int[] arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int[] arg1, long[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int[] arg1, long[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, long[] arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, long[] arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, nsID arg1, int arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, nsID arg1, int arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, nsID arg1, long arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, nsID arg1, long arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, char[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, char[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1, char[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1, char[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, byte[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, byte[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, byte[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, byte[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, int arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, int arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, int[] arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, int[] arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, int arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, int arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1, int arg2);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1, int arg2) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, nsID arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, nsID arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, long arg1, nsID arg2, long[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, long arg1, nsID arg2, long[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, int arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, int arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1, long arg2, long[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1, long arg2, long[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, long [] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, long [] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, char[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, char[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, char[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, char[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, int arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, int arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, int arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, int arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, int[] arg1, int[] arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int[] arg0, int[] arg1, int[] arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, int arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, int arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, long arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, long arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, int arg1, nsID arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, int arg1, nsID arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, long arg1, nsID arg2, long [] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, long arg1, nsID arg2, long [] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, int[] arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, int[] arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, long [] arg2, int[] arg3);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, long [] arg2, int[] arg3) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, int arg2, int arg3, int arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, int arg2, int arg3, int arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, long arg2, long arg3, long arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, long arg2, long arg3, long arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3, int[] arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1, int[] arg2, int[] arg3, int[] arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, char[] arg3, int[] arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, char[] arg3, int[] arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, char[] arg3, int[] arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, char[] arg3, int[] arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, int arg2, int[] arg3, int[] arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, int arg2, int[] arg3, int[] arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, long arg2, long [] arg3, int[] arg4);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, int arg1, long arg2, long [] arg3, int[] arg4) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, byte[] arg2, byte[] arg3, int arg4, int[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, byte[] arg1, byte[] arg2, byte[] arg3, int arg4, int[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1, byte[] arg2, byte[] arg3, long arg4, long[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, byte[] arg1, byte[] arg2, byte[] arg3, long arg4, long[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, char[] arg2, int arg3, long arg4, int arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, char[] arg2, int arg3, long arg4, int arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, char[] arg2, int arg3, long arg4, int arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, char[] arg2, int arg3, long arg4, int arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, char[] arg2, long arg3, long arg4, long arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, char[] arg2, long arg3, long arg4, long arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, char[] arg2, long arg3, long arg4, long arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, char[] arg2, long arg3, long arg4, long arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, int arg3, int arg4, int arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, int arg3, int arg4, int arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, int arg3, byte[] arg4, byte[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, int arg3, byte[] arg4, byte[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, long arg3, byte[] arg4, byte[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, nsID arg0, byte[] arg1, byte[] arg2, long arg3, byte[] arg4, byte[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, long arg2, long arg3, long arg4, long arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, long arg2, long arg3, long arg4, long arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, char[] arg3, int[] arg4, int[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, char[] arg3, int[] arg4, int[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, char[] arg3, int[] arg4, int[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, char[] arg3, int[] arg4, int[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, byte[] arg2, int arg3, int arg4, int[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, byte[] arg2, int arg3, int arg4, int[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, byte[] arg2, int arg3, int arg4, long[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0, byte[] arg1, byte[] arg2, int arg3, int arg4, long[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int[] arg4, int[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int[] arg4, int[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int arg2, long arg3, int[] arg4, long [] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int arg2, long arg3, int[] arg4, long [] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, char[] arg2, char[] arg3, int arg4, int [] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, char[] arg2, char[] arg3, int arg4, int [] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, char[] arg2, char[] arg3, int arg4, long[] arg5);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, char[] arg2, char[] arg3, int arg4, long[] arg5) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int arg3, int[] arg4, int[] arg5, int[] arg6);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int arg3, int[] arg4, int[] arg5, int[] arg6) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, int arg3, long[] arg4, int[] arg5, int[] arg6);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, int arg3, long[] arg4, int[] arg5, int[] arg6) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3, char[] arg4, int[] arg5, int[] arg6);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3, char[] arg4, int[] arg5, int[] arg6) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, long[] arg3, char[] arg4, int[] arg5, int[] arg6);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, long[] arg3, char[] arg4, int[] arg5, int[] arg6) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, char[] arg4, int[] arg5, int[] arg6);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, char[] arg4, int[] arg5, int[] arg6) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, long arg3, char[] arg4, int[] arg5, int[] arg6);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, int arg2, long arg3, char[] arg4, int[] arg5, int[] arg6) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, long arg4, int arg5, int arg6);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, long arg4, int arg5, int arg6) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+    } finally {
+        lock.unlock();
+    }
+}
+
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3, int[] arg4, char[] arg5, int[] arg6, int[] arg7);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int[] arg3, int[] arg4, char[] arg5, int[] arg6, int[] arg7) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, long[] arg3, long [] arg4, char[] arg5, int[] arg6, int[] arg7);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, long[] arg3, long [] arg4, char[] arg5, int[] arg6, int[] arg7) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, char[] arg6, int[] arg7, int[] arg8);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, char[] arg6, int[] arg7, int[] arg8) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, int arg4, long arg5, char[] arg6, int[] arg7, long [] arg8);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, long arg3, int arg4, long arg5, char[] arg6, int[] arg7, long [] arg8) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int arg2, long arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int arg2, long arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int arg3, char[] arg4, char[] arg5, char[] arg6, char[] arg7, int[] arg8, int[] arg9);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, char[] arg1, char[] arg2, int arg3, char[] arg4, char[] arg5, char[] arg6, char[] arg7, int[] arg8, int[] arg9) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, int arg3, char[] arg4, char[] arg5, char[] arg6, char[] arg7, int[] arg8, int[] arg9);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, char[] arg1, char[] arg2, int arg3, char[] arg4, char[] arg5, char[] arg6, char[] arg7, int[] arg8, int[] arg9) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, char[] arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int[] arg10, int[] arg11);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, char[] arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int[] arg10, int[] arg11) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, int arg3, char[] arg4, long arg5, long arg6, int arg7, long arg8, int arg9, long [] arg10, long [] arg11);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, int arg3, char[] arg4, long arg5, long arg6, int arg7, long arg8, int arg9, long [] arg10, long [] arg11) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, char[] arg4, byte[] arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int[] arg11, int[] arg12);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, char[] arg4, byte[] arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int[] arg11, int[] arg12) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, int arg3, char[] arg4, byte[] arg5, long arg6, long arg7, int arg8, long arg9, int arg10, long [] arg11, long [] arg12);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2, int arg3, char[] arg4, byte[] arg5, long arg6, long arg7, int arg8, long arg9, int arg10, long [] arg11, long [] arg12) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, int arg12, short arg13, int arg14);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, int arg12, short arg13, int arg14) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14);
+    } finally {
+        lock.unlock();
+    }
+}
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int arg2, long arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, int arg12, short arg13, long arg14);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int arg2, long arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10, int arg11, int arg12, short arg13, long arg14) {
+    lock.lock();
+    try {
+        return _VtblCall(fnNumber, ppVtbl, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14);
+    } finally {
+        lock.unlock();
+    }
+}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/XPCOMObject.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,1029 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+module dwt.internal.mozilla.XPCOMObject;
+
+import dwt.dwthelper.utils;
+
+import java.util.Hashtable;
+
+import dwt.DWT;
+import dwt.internal.C;
+import dwt.internal.Callback;
+import dwt.internal.LONG;
+
+public class XPCOMObject {
+
+    private int /*long*/ ppVtable;
+    
+    static private final int MAX_ARG_COUNT = 12;
+    static private final int MAX_VTABLE_LENGTH = 80;
+    static private Callback[][] Callbacks = new Callback[MAX_VTABLE_LENGTH][MAX_ARG_COUNT];
+    static private Hashtable ObjectMap = new Hashtable ();
+    
+public XPCOMObject (int[] argCounts) {
+    int /*long*/[] callbackAddresses = new int /*long*/[argCounts.length];
+    synchronized (Callbacks) {
+        for (int i = 0, length = argCounts.length; i < length; i++){
+            if ((Callbacks[i][argCounts[i]]) is null) {
+                Callbacks[i][argCounts[i]] = new Callback (getClass (), "callback"+i, argCounts[i] + 1, true, XPCOM.NS_ERROR_FAILURE); //$NON-NLS-1$
+            }
+            callbackAddresses[i] = Callbacks[i][argCounts[i]].getAddress ();
+            if (callbackAddresses[i] is 0) DWT.error (DWT.ERROR_NO_MORE_CALLBACKS);
+        }
+    }
+
+    int /*long*/ pVtable = C.malloc (C.PTR_SIZEOF * argCounts.length);
+    XPCOM.memmove (pVtable, callbackAddresses, C.PTR_SIZEOF * argCounts.length);
+    ppVtable = C.malloc (C.PTR_SIZEOF);
+    XPCOM.memmove (ppVtable, new int /*long*/[] {pVtable}, C.PTR_SIZEOF);
+    ObjectMap.put (new LONG (ppVtable), this);
+}
+    
+static int /*long*/ callback0 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method0 (args);
+}
+static int /*long*/ callback1 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method1 (args);
+}
+static int /*long*/ callback10 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method10 (args);
+}
+static int /*long*/ callback11 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method11 (args);
+}
+static int /*long*/ callback12 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method12 (args);
+}
+static int /*long*/ callback13 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method13 (args);
+}
+static int /*long*/ callback14 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method14 (args);
+}
+static int /*long*/ callback15 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method15 (args);
+}
+static int /*long*/ callback16 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method16 (args);
+}
+static int /*long*/ callback17 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method17 (args);
+}
+static int /*long*/ callback18 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method18 (args);
+}
+static int /*long*/ callback19 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method19 (args);
+}
+static int /*long*/ callback2 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method2 (args);
+}
+static int /*long*/ callback20 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method20 (args);
+}
+static int /*long*/ callback21 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method21 (args);
+}
+static int /*long*/ callback22 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method22 (args);
+}
+static int /*long*/ callback23 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method23 (args);
+}
+static int /*long*/ callback24 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method24 (args);
+}
+static int /*long*/ callback25 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method25 (args);
+}
+static int /*long*/ callback26 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method26 (args);
+}
+static int /*long*/ callback27 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method27 (args);
+}
+static int /*long*/ callback28 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method28 (args);
+}
+static int /*long*/ callback29 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method29 (args);
+}
+static int /*long*/ callback3 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method3 (args);
+}
+static int /*long*/ callback30 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method30 (args);
+}
+static int /*long*/ callback31 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method31 (args);
+}
+static int /*long*/ callback32 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method32 (args);
+}
+static int /*long*/ callback33 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method33 (args);
+}
+static int /*long*/ callback34 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method34 (args);
+}
+static int /*long*/ callback35 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method35 (args);
+}
+static int /*long*/ callback36 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method36 (args);
+}
+static int /*long*/ callback37 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method37 (args);
+}
+static int /*long*/ callback38 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method38 (args);
+}
+static int /*long*/ callback39 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method39 (args);
+}
+static int /*long*/ callback4 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method4 (args);
+}
+static int /*long*/ callback40 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method40 (args);
+}
+static int /*long*/ callback41 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method41 (args);
+}
+static int /*long*/ callback42 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method42 (args);
+}
+static int /*long*/ callback43 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method43 (args);
+}
+static int /*long*/ callback44 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method44 (args);
+}
+static int /*long*/ callback45 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method45 (args);
+}
+static int /*long*/ callback46 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method46 (args);
+}
+static int /*long*/ callback47 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method47 (args);
+}
+static int /*long*/ callback48 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method48 (args);
+}
+static int /*long*/ callback49 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method49 (args);
+}
+static int /*long*/ callback5 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method5 (args);
+}
+static int /*long*/ callback50 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method50 (args);
+}
+static int /*long*/ callback51 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method51 (args);
+}
+static int /*long*/ callback52 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method52 (args);
+}
+static int /*long*/ callback53 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method53 (args);
+}
+static int /*long*/ callback54 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method54 (args);
+}
+static int /*long*/ callback55 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method55 (args);
+}
+static int /*long*/ callback56 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method56 (args);
+}
+static int /*long*/ callback57 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method57 (args);
+}
+static int /*long*/ callback58 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method58 (args);
+}
+static int /*long*/ callback59 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method59 (args);
+}
+static int /*long*/ callback6 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method6 (args);
+}
+static int /*long*/ callback60 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method60 (args);
+}
+static int /*long*/ callback61 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method61 (args);
+}
+static int /*long*/ callback62 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method62 (args);
+}
+static int /*long*/ callback63 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method63 (args);
+}
+static int /*long*/ callback64 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method64 (args);
+}
+static int /*long*/ callback65 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method65 (args);
+}
+static int /*long*/ callback66 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method66 (args);
+}
+static int /*long*/ callback67 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method67 (args);
+}
+static int /*long*/ callback68 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method68 (args);
+}
+static int /*long*/ callback69 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method69 (args);
+}
+static int /*long*/ callback7 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method7 (args);
+}
+static int /*long*/ callback70 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method70 (args);
+}
+static int /*long*/ callback71 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method71 (args);
+}
+static int /*long*/ callback72 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method72 (args);
+}
+static int /*long*/ callback73 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method73 (args);
+}
+static int /*long*/ callback74 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method74 (args);
+}
+static int /*long*/ callback75 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method75 (args);
+}
+static int /*long*/ callback76 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method76 (args);
+}
+static int /*long*/ callback77 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method77 (args);
+}
+static int /*long*/ callback78 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method78 (args);
+}
+static int /*long*/ callback79 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method79 (args);
+}
+static int /*long*/ callback8 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method8 (args);
+}
+static int /*long*/ callback9 (int /*long*/[] callbackArgs) {
+    // find the object on which this call was invoked
+    int /*long*/ address = callbackArgs[0];
+    Object object = ObjectMap.get (new LONG (address));
+    if (object is null) return XPCOM.NS_ERROR_FAILURE;
+    int /*long*/[] args = new int /*long*/[callbackArgs.length - 1];
+    System.arraycopy (callbackArgs, 1, args, 0, args.length);
+    return ((XPCOMObject) object).method9 (args);
+}
+
+public void dispose() {
+    // free the memory for this reference
+    int /*long*/[] pVtable = new int /*long*/[1];
+    XPCOM.memmove (pVtable, ppVtable, C.PTR_SIZEOF);
+    C.free (pVtable[0]);
+    C.free (ppVtable);  
+
+    // remove this ppVtable from the list
+    ObjectMap.remove (new LONG (ppVtable)); 
+
+    ppVtable = 0;
+}
+    
+public int /*long*/ getAddress () {
+    return ppVtable;
+}
+
+public int /*long*/ method0 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method1 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method10 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method11 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method12 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method13 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method14 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method15 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method16 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method17 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method18 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method19 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method2 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method20 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method21 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method22 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method23 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method24 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method25 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method26 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method27 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method28 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method29 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method3 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method30 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method31 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method32 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method33 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method34 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method35 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method36 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method37 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method38 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method39 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method4 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method40 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method41 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method42 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method43 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method44 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method45 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method46 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method47 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method48 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method49 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method5 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method50 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method51 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method52 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method53 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method54 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method55 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method56 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method57 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method58 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method59 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method6 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method60 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method61 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method62 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method63 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method64 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method65 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method66 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method67 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method68 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method69 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method7 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method70 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method71 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method72 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method73 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method74 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method75 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method76 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method77 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method78 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method79 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method8 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+public int /*long*/ method9 (int /*long*/[] args) {
+    return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/init/GREVersionRange.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+module dwt.internal.mozilla.init.GREVersionRange;
+
+import dwt.dwthelper.utils;
+
+/** @jniclass flags=cpp */
+public class GREVersionRange {
+    /** @field cast=(const char *) */
+    public int /*long*/ lower;
+    public bool lowerInclusive;
+    /** @field cast=(const char *) */
+    public int /*long*/ upper;
+    public bool upperInclusive;
+    public static final int sizeof = XPCOMInit.GREVersionRange_sizeof();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/init/XPCOMInit.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,73 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2006 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.init.XPCOMInit;
+
+import dwt.dwthelper.utils;
+
+import dwt.internal.Platform;
+
+/** @jniclass flags=cpp */
+public class XPCOMInit extends Platform {
+    public static final int PATH_MAX = 4096;
+    
+public static final native int GREVersionRange_sizeof ();
+
+/**
+ * @param versions cast=(const GREVersionRange *)
+ * @param properties cast=(const GREProperty *)
+ * @param buffer cast=(char *)
+ */
+public static final native int _GRE_GetGREPathWithProperties (GREVersionRange versions, int versionsLength, int /*long*/ properties, int propertiesLength, int /*long*/ buffer, int buflen);
+public static final int GRE_GetGREPathWithProperties (GREVersionRange versions, int versionsLength, int /*long*/ properties, int propertiesLength, int /*long*/ buffer, int buflen) {
+    lock.lock();
+    try {
+        return _GRE_GetGREPathWithProperties(versions, versionsLength, properties, propertiesLength, buffer, buflen);
+    } finally {
+        lock.unlock();
+    }
+}
+/** @param place cast=(const char *) */
+public static final native int _XPCOMGlueStartup (byte[] place);
+public static final int XPCOMGlueStartup (byte[] place) {
+    lock.lock();
+    try {
+        return _XPCOMGlueStartup(place);
+    } finally {
+        lock.unlock();
+    }
+}
+public static final native int _XPCOMGlueShutdown ();
+public static final int XPCOMGlueShutdown () {
+    lock.lock();
+    try {
+        return _XPCOMGlueShutdown();
+    } finally {
+        lock.unlock();
+    }
+}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsEmbedString.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,65 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2004 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsEmbedString;
+
+import dwt.dwthelper.utils;
+
+public class nsEmbedString {
+    int /*long*/ handle;
+    
+public nsEmbedString() {
+    handle = XPCOM.nsEmbedString_new();
+}
+
+public nsEmbedString(String string) {
+    if (string !is null) {
+       char[] aString = new char[string.length() + 1];
+       string.getChars(0, string.length(), aString, 0);
+       handle = XPCOM.nsEmbedString_new(aString);
+    }   
+}
+
+public int /*long*/ getAddress() {
+    return handle;
+}   
+    
+public String toString() {
+    if (handle is 0) return null;
+    int length = XPCOM.nsEmbedString_Length(handle);
+    int /*long*/ buffer = XPCOM.nsEmbedString_get(handle);
+    char[] dest = new char[length];
+    XPCOM.memmove(dest, buffer, length * 2);
+    return new String(dest);
+}   
+    
+public void dispose() {
+    if (handle is 0) return;            
+    XPCOM.nsEmbedString_delete(handle);
+    handle = 0;     
+}   
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIAppShell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,77 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIAppShell;
+
+import dwt.dwthelper.utils;
+
+public class nsIAppShell extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 8;
+
+    public static final String NS_IAPPSHELL_IID_STR =
+        "a0757c31-eeac-11d1-9ec1-00aa002fb821";
+
+    public static final nsID NS_IAPPSHELL_IID =
+        new nsID(NS_IAPPSHELL_IID_STR);
+
+    public nsIAppShell(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Create(int /*long*/ argc, int /*long*/[] argv) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), argc, argv);
+    }
+
+    public int Run() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress());
+    }
+
+    public int Spinup() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
+    }
+
+    public int Spindown() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress());
+    }
+
+    public int ListenToEventQueue(int /*long*/ aQueue, int aListen) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aQueue, aListen);
+    }
+
+    public int GetNativeEvent(int /*long*/ aRealEvent, int /*long*/[] aEvent) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aRealEvent, aEvent);
+    }
+
+    public int DispatchNativeEvent(int aRealEvent, int /*long*/ aEvent) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aRealEvent, aEvent);
+    }
+
+    public int Exit() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIAuthInformation.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,89 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIAuthInformation;
+
+import dwt.dwthelper.utils;
+
+public class nsIAuthInformation extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 9;
+
+    public static final String NS_IAUTHINFORMATION_IID_STR =
+        "0d73639c-2a92-4518-9f92-28f71fea5f20";
+
+    public static final nsID NS_IAUTHINFORMATION_IID =
+        new nsID(NS_IAUTHINFORMATION_IID_STR);
+
+    public nsIAuthInformation(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int AUTH_HOST = 1;
+
+    public static final int AUTH_PROXY = 2;
+
+    public static final int NEED_DOMAIN = 4;
+
+    public static final int ONLY_PASSWORD = 8;
+
+    public int GetFlags(int[] aFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aFlags);
+    }
+
+    public int GetRealm(int /*long*/ aRealm) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aRealm);
+    }
+
+    public int GetAuthenticationScheme(int /*long*/ aAuthenticationScheme) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aAuthenticationScheme);
+    }
+
+    public int GetUsername(int /*long*/ aUsername) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aUsername);
+    }
+
+    public int SetUsername(int /*long*/ aUsername) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aUsername);
+    }
+
+    public int GetPassword(int /*long*/ aPassword) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aPassword);
+    }
+
+    public int SetPassword(int /*long*/ aPassword) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aPassword);
+    }
+
+    public int GetDomain(int /*long*/ aDomain) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aDomain);
+    }
+
+    public int SetDomain(int /*long*/ aDomain) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aDomain);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIBaseWindow.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,141 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIBaseWindow;
+
+import dwt.dwthelper.utils;
+
+public class nsIBaseWindow extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 24;
+
+    public static final String NS_IBASEWINDOW_IID_STR =
+        "046bc8a0-8015-11d3-af70-00a024ffc08c";
+
+    public static final nsID NS_IBASEWINDOW_IID =
+        new nsID(NS_IBASEWINDOW_IID_STR);
+
+    public nsIBaseWindow(int /*long*/ address) {
+        super(address);
+    }
+
+    public int InitWindow(int /*long*/ parentNativeWindow, int /*long*/ parentWidget, int x, int y, int cx, int cy) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parentNativeWindow, parentWidget, x, y, cx, cy);
+    }
+
+    public int Create() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress());
+    }
+
+    public int Destroy() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
+    }
+
+    public int SetPosition(int x, int y) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), x, y);
+    }
+
+    public int GetPosition(int[] x, int[] y) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), x, y);
+    }
+
+    public int SetSize(int cx, int cy, int fRepaint) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), cx, cy, fRepaint);
+    }
+
+    public int GetSize(int[] cx, int[] cy) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), cx, cy);
+    }
+
+    public int SetPositionAndSize(int x, int y, int cx, int cy, int fRepaint) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), x, y, cx, cy, fRepaint);
+    }
+
+    public int GetPositionAndSize(int[] x, int[] y, int[] cx, int[] cy) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), x, y, cx, cy);
+    }
+
+    public int Repaint(int force) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), force);
+    }
+
+    public int GetParentWidget(int /*long*/[] aParentWidget) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aParentWidget);
+    }
+
+    public int SetParentWidget(int /*long*/ aParentWidget) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aParentWidget);
+    }
+
+    public int GetParentNativeWindow(int /*long*/[] aParentNativeWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aParentNativeWindow);
+    }
+
+    public int SetParentNativeWindow(int /*long*/ aParentNativeWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aParentNativeWindow);
+    }
+
+    public int GetVisibility(int[] aVisibility) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aVisibility);
+    }
+
+    public int SetVisibility(int aVisibility) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aVisibility);
+    }
+
+    public int GetEnabled(int[] aEnabled) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aEnabled);
+    }
+
+    public int SetEnabled(int aEnabled) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aEnabled);
+    }
+
+    public int GetBlurSuppression(int[] aBlurSuppression) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aBlurSuppression);
+    }
+
+    public int SetBlurSuppression(int aBlurSuppression) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aBlurSuppression);
+    }
+
+    public int GetMainWidget(int /*long*/[] aMainWidget) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aMainWidget);
+    }
+
+    public int SetFocus() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress());
+    }
+
+    public int GetTitle(int /*long*/[] aTitle) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aTitle);
+    }
+
+    public int SetTitle(char[] aTitle) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aTitle);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsICancelable.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsICancelable;
+
+import dwt.dwthelper.utils;
+
+public class nsICancelable extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
+
+    public static final String NS_ICANCELABLE_IID_STR =
+        "d94ac0a0-bb18-46b8-844e-84159064b0bd";
+
+    public static final nsID NS_ICANCELABLE_IID =
+        new nsID(NS_ICANCELABLE_IID_STR);
+
+    public nsICancelable(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Cancel(int aReason) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aReason);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsICategoryManager.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,69 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsICategoryManager;
+
+import dwt.dwthelper.utils;
+
+public class nsICategoryManager extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 6;
+
+    public static final String NS_ICATEGORYMANAGER_IID_STR =
+        "3275b2cd-af6d-429a-80d7-f0c5120342ac";
+
+    public static final nsID NS_ICATEGORYMANAGER_IID =
+        new nsID(NS_ICATEGORYMANAGER_IID_STR);
+
+    public nsICategoryManager(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetCategoryEntry(byte[] aCategory, byte[] aEntry, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aCategory, aEntry, _retval);
+    }
+
+    public int AddCategoryEntry(byte[] aCategory, byte[] aEntry, byte[] aValue, int aPersist, int aReplace, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aCategory, aEntry, aValue, aPersist, aReplace, _retval);
+    }
+
+    public int DeleteCategoryEntry(byte[] aCategory, byte[] aEntry, int aPersist) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aCategory, aEntry, aPersist);
+    }
+
+    public int DeleteCategory(byte[] aCategory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aCategory);
+    }
+
+    public int EnumerateCategory(byte[] aCategory, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aCategory, _retval);
+    }
+
+    public int EnumerateCategories(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIChannel.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,121 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIChannel;
+
+import dwt.dwthelper.utils;
+
+public class nsIChannel extends nsIRequest {
+
+    static final int LAST_METHOD_ID = nsIRequest.LAST_METHOD_ID + 16;
+
+    public static final String NS_ICHANNEL_IID_STR =
+        "c63a055a-a676-4e71-bf3c-6cfa11082018";
+
+    public static final nsID NS_ICHANNEL_IID =
+        new nsID(NS_ICHANNEL_IID_STR);
+
+    public nsIChannel(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetOriginalURI(int /*long*/[] aOriginalURI) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 1, getAddress(), aOriginalURI);
+    }
+
+    public int SetOriginalURI(int /*long*/ aOriginalURI) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 2, getAddress(), aOriginalURI);
+    }
+
+    public int GetURI(int /*long*/[] aURI) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 3, getAddress(), aURI);
+    }
+
+    public int GetOwner(int /*long*/[] aOwner) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 4, getAddress(), aOwner);
+    }
+
+    public int SetOwner(int /*long*/ aOwner) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 5, getAddress(), aOwner);
+    }
+
+    public int GetNotificationCallbacks(int /*long*/[] aNotificationCallbacks) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 6, getAddress(), aNotificationCallbacks);
+    }
+
+    public int SetNotificationCallbacks(int /*long*/ aNotificationCallbacks) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 7, getAddress(), aNotificationCallbacks);
+    }
+
+    public int GetSecurityInfo(int /*long*/[] aSecurityInfo) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 8, getAddress(), aSecurityInfo);
+    }
+
+    public int GetContentType(int /*long*/ aContentType) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 9, getAddress(), aContentType);
+    }
+
+    public int SetContentType(int /*long*/ aContentType) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 10, getAddress(), aContentType);
+    }
+
+    public int GetContentCharset(int /*long*/ aContentCharset) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 11, getAddress(), aContentCharset);
+    }
+
+    public int SetContentCharset(int /*long*/ aContentCharset) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 12, getAddress(), aContentCharset);
+    }
+
+    public int GetContentLength(int[] aContentLength) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 13, getAddress(), aContentLength);
+    }
+
+    public int SetContentLength(int aContentLength) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 14, getAddress(), aContentLength);
+    }
+
+    public int Open(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 15, getAddress(), _retval);
+    }
+
+    public int AsyncOpen(int /*long*/ aListener, int /*long*/ aContext) {
+        return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 16, getAddress(), aListener, aContext);
+    }
+
+    public static final int LOAD_DOCUMENT_URI = 65536;
+
+    public static final int LOAD_RETARGETED_DOCUMENT_URI = 131072;
+
+    public static final int LOAD_REPLACE = 262144;
+
+    public static final int LOAD_INITIAL_DOCUMENT_URI = 524288;
+
+    public static final int LOAD_TARGETED = 1048576;
+
+    public static final int LOAD_CALL_CONTENT_SNIFFERS = 2097152;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIComponentManager.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIComponentManager;
+
+import dwt.dwthelper.utils;
+
+public class nsIComponentManager extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
+
+    public static final String NS_ICOMPONENTMANAGER_IID_STR =
+        "a88e5a60-205a-4bb1-94e1-2628daf51eae";
+
+    public static final nsID NS_ICOMPONENTMANAGER_IID =
+        new nsID(NS_ICOMPONENTMANAGER_IID_STR);
+
+    public nsIComponentManager(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetClassObject(nsID aClass, nsID aIID, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aClass, aIID, result);
+    }
+
+    public int GetClassObjectByContractID(byte[] aContractID, nsID aIID, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aContractID, aIID, result);
+    }
+
+    public int CreateInstance(nsID aClass, int /*long*/ aDelegate, nsID aIID, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aClass, aDelegate, aIID, result);
+    }
+
+    public int CreateInstanceByContractID(byte[] aContractID, int /*long*/ aDelegate, nsID aIID, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aContractID, aDelegate, aIID, result);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIComponentRegistrar.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,93 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIComponentRegistrar;
+
+import dwt.dwthelper.utils;
+
+public class nsIComponentRegistrar extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 12;
+
+    public static final String NS_ICOMPONENTREGISTRAR_IID_STR =
+        "2417cbfe-65ad-48a6-b4b6-eb84db174392";
+
+    public static final nsID NS_ICOMPONENTREGISTRAR_IID =
+        new nsID(NS_ICOMPONENTREGISTRAR_IID_STR);
+
+    public nsIComponentRegistrar(int /*long*/ address) {
+        super(address);
+    }
+
+    public int AutoRegister(int /*long*/ aSpec) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aSpec);
+    }
+
+    public int AutoUnregister(int /*long*/ aSpec) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aSpec);
+    }
+
+    public int RegisterFactory(nsID aClass, byte[] aClassName, byte[] aContractID, int /*long*/ aFactory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aClass, aClassName, aContractID, aFactory);
+    }
+
+    public int UnregisterFactory(nsID aClass, int /*long*/ aFactory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aClass, aFactory);
+    }
+
+    public int RegisterFactoryLocation(nsID aClass, byte[] aClassName, byte[] aContractID, int /*long*/ aFile, byte[] aLoaderStr, byte[] aType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aClass, aClassName, aContractID, aFile, aLoaderStr, aType);
+    }
+
+    public int UnregisterFactoryLocation(nsID aClass, int /*long*/ aFile) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aClass, aFile);
+    }
+
+    public int IsCIDRegistered(nsID aClass, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aClass, _retval);
+    }
+
+    public int IsContractIDRegistered(byte[] aContractID, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aContractID, _retval);
+    }
+
+    public int EnumerateCIDs(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), _retval);
+    }
+
+    public int EnumerateContractIDs(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), _retval);
+    }
+
+    public int CIDToContractID(nsID aClass, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aClass, _retval);
+    }
+
+    public int ContractIDToCID(byte[] aContractID, int /*long*/ _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aContractID, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIContextMenuListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIContextMenuListener;
+
+import dwt.dwthelper.utils;
+
+public class nsIContextMenuListener extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
+
+    public static final String NS_ICONTEXTMENULISTENER_IID_STR =
+        "3478b6b0-3875-11d4-94ef-0020183bf181";
+
+    public static final nsID NS_ICONTEXTMENULISTENER_IID =
+        new nsID(NS_ICONTEXTMENULISTENER_IID_STR);
+
+    public nsIContextMenuListener(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int CONTEXT_NONE = 0;
+
+    public static final int CONTEXT_LINK = 1;
+
+    public static final int CONTEXT_IMAGE = 2;
+
+    public static final int CONTEXT_DOCUMENT = 4;
+
+    public static final int CONTEXT_TEXT = 8;
+
+    public static final int CONTEXT_INPUT = 16;
+
+    public int OnShowContextMenu(int aContextFlags, int /*long*/ aEvent, int /*long*/ aNode) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aContextFlags, aEvent, aNode);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsICookie.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,103 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsICookie;
+
+import dwt.dwthelper.utils;
+
+public class nsICookie extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 9;
+
+    public static final String NS_ICOOKIE_IID_STR =
+        "e9fcb9a4-d376-458f-b720-e65e7df593bc";
+
+    public static final nsID NS_ICOOKIE_IID =
+        new nsID(NS_ICOOKIE_IID_STR);
+
+    public nsICookie(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetName(int /*long*/ aName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aName);
+    }
+
+    public int GetValue(int /*long*/ aValue) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aValue);
+    }
+
+    public int GetIsDomain(int[] aIsDomain) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aIsDomain);
+    }
+
+    public int GetHost(int /*long*/ aHost) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aHost);
+    }
+
+    public int GetPath(int /*long*/ aPath) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aPath);
+    }
+
+    public int GetIsSecure(int[] aIsSecure) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aIsSecure);
+    }
+
+    public int GetExpires(long[] aExpires) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aExpires);
+    }
+
+    public static final int STATUS_UNKNOWN = 0;
+
+    public static final int STATUS_ACCEPTED = 1;
+
+    public static final int STATUS_DOWNGRADED = 2;
+
+    public static final int STATUS_FLAGGED = 3;
+
+    public static final int STATUS_REJECTED = 4;
+
+    public int GetStatus(int /*long*/ aStatus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aStatus);
+    }
+
+    public static final int POLICY_UNKNOWN = 0;
+
+    public static final int POLICY_NONE = 1;
+
+    public static final int POLICY_NO_CONSENT = 2;
+
+    public static final int POLICY_IMPLICIT_CONSENT = 3;
+
+    public static final int POLICY_EXPLICIT_CONSENT = 4;
+
+    public static final int POLICY_NO_II = 5;
+
+    public int GetPolicy(int /*long*/ aPolicy) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aPolicy);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsICookieManager.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsICookieManager;
+
+import dwt.dwthelper.utils;
+
+public class nsICookieManager extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3;
+
+    public static final String NS_ICOOKIEMANAGER_IID_STR =
+        "aaab6710-0f2c-11d5-a53b-0010a401eb10";
+
+    public static final nsID NS_ICOOKIEMANAGER_IID =
+        new nsID(NS_ICOOKIEMANAGER_IID_STR);
+
+    public nsICookieManager(int /*long*/ address) {
+        super(address);
+    }
+
+    public int RemoveAll() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress());
+    }
+
+    public int GetEnumerator(int /*long*/[] aEnumerator) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aEnumerator);
+    }
+
+    public int Remove(int /*long*/ aDomain, int /*long*/ aName, int /*long*/ aPath, int aBlocked) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aDomain, aName, aPath, aBlocked);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsID.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,79 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2004 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsID;
+
+import dwt.dwthelper.utils;
+
+/** @jniclass flags=cpp */
+public class nsID {
+    
+    public int m0;
+    public short m1;
+    public short m2;
+    public byte[] m3 = new byte[8];
+    public static final int sizeof = 16;
+
+public nsID() {
+}
+
+public nsID(String id) {
+    Parse(id);
+}
+
+public bool Equals(nsID other) {
+    int /*long*/ ptr = XPCOM.nsID_new ();
+    XPCOM.memmove (ptr, this, nsID.sizeof);
+    int /*long*/ otherPtr = XPCOM.nsID_new ();
+    XPCOM.memmove (otherPtr, other, nsID.sizeof);
+    bool result = XPCOM.nsID_Equals (ptr, otherPtr) !is 0;
+    XPCOM.nsID_delete (ptr);
+    XPCOM.nsID_delete (otherPtr);
+    return result;
+}
+
+public void Parse (String aIDStr) {
+    if (aIDStr is null) throw new Error ();
+    int i = 0;
+    for (; i < 8; i++) m0 = (m0 << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16);
+    if (aIDStr.charAt (i++) !is '-') throw new Error ();
+    for (; i < 13; i++) m1 = (short)((m1 << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    if (aIDStr.charAt (i++) !is '-') throw new Error ();
+    for (; i < 18; i++) m2 = (short)((m2 << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    if (aIDStr.charAt (i++) !is '-') throw new Error ();
+    for (; i < 21; i++) m3[0] = (byte)((m3[0] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    for (; i < 23; i++) m3[1] = (byte)((m3[1] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    if (aIDStr.charAt (i++) !is '-') throw new Error ();
+    for (; i < 26; i++) m3[2] = (byte)((m3[2] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    for (; i < 28; i++) m3[3] = (byte)((m3[3] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    for (; i < 30; i++) m3[4] = (byte)((m3[4] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    for (; i < 32; i++) m3[5] = (byte)((m3[5] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    for (; i < 34; i++) m3[6] = (byte)((m3[6] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+    for (; i < 36; i++) m3[7] = (byte)((m3[7] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,91 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMEvent;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMEvent extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 10;
+
+    public static final String NS_IDOMEVENT_IID_STR =
+        "a66b7b80-ff46-bd97-0080-5f8ae38add32";
+
+    public static final nsID NS_IDOMEVENT_IID =
+        new nsID(NS_IDOMEVENT_IID_STR);
+
+    public nsIDOMEvent(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int CAPTURING_PHASE = 1;
+
+    public static final int AT_TARGET = 2;
+
+    public static final int BUBBLING_PHASE = 3;
+
+    public int GetType(int /*long*/ aType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aType);
+    }
+
+    public int GetTarget(int /*long*/[] aTarget) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aTarget);
+    }
+
+    public int GetCurrentTarget(int /*long*/[] aCurrentTarget) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aCurrentTarget);
+    }
+
+    public int GetEventPhase(short[] aEventPhase) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aEventPhase);
+    }
+
+    public int GetBubbles(int[] aBubbles) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aBubbles);
+    }
+
+    public int GetCancelable(int[] aCancelable) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aCancelable);
+    }
+
+    public int GetTimeStamp(int /*long*/[] aTimeStamp) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aTimeStamp);
+    }
+
+    public int StopPropagation() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress());
+    }
+
+    public int PreventDefault() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress());
+    }
+
+    public int InitEvent(int /*long*/ eventTypeArg, int canBubbleArg, int cancelableArg) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), eventTypeArg, canBubbleArg, cancelableArg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMEventTarget.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMEventTarget;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMEventTarget extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3;
+
+    public static final String NS_IDOMEVENTTARGET_IID_STR =
+        "1c773b30-d1cf-11d2-bd95-00805f8ae3f4";
+
+    public static final nsID NS_IDOMEVENTTARGET_IID =
+        new nsID(NS_IDOMEVENTTARGET_IID_STR);
+
+    public nsIDOMEventTarget(int /*long*/ address) {
+        super(address);
+    }
+
+    public int AddEventListener(int /*long*/ type, int /*long*/ listener, int useCapture) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), type, listener, useCapture);
+    }
+
+    public int RemoveEventListener(int /*long*/ type, int /*long*/ listener, int useCapture) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), type, listener, useCapture);
+    }
+
+    public int DispatchEvent(int /*long*/ evt, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), evt, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMKeyEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,301 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMKeyEvent;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMKeyEvent extends nsIDOMUIEvent {
+
+    static final int LAST_METHOD_ID = nsIDOMUIEvent.LAST_METHOD_ID + 7;
+
+    public static final String NS_IDOMKEYEVENT_IID_STR =
+        "028e0e6e-8b01-11d3-aae7-0010838a3123";
+
+    public static final nsID NS_IDOMKEYEVENT_IID =
+        new nsID(NS_IDOMKEYEVENT_IID_STR);
+
+    public nsIDOMKeyEvent(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int DOM_VK_CANCEL = 3;
+
+    public static final int DOM_VK_HELP = 6;
+
+    public static final int DOM_VK_BACK_SPACE = 8;
+
+    public static final int DOM_VK_TAB = 9;
+
+    public static final int DOM_VK_CLEAR = 12;
+
+    public static final int DOM_VK_RETURN = 13;
+
+    public static final int DOM_VK_ENTER = 14;
+
+    public static final int DOM_VK_SHIFT = 16;
+
+    public static final int DOM_VK_CONTROL = 17;
+
+    public static final int DOM_VK_ALT = 18;
+
+    public static final int DOM_VK_PAUSE = 19;
+
+    public static final int DOM_VK_CAPS_LOCK = 20;
+
+    public static final int DOM_VK_ESCAPE = 27;
+
+    public static final int DOM_VK_SPACE = 32;
+
+    public static final int DOM_VK_PAGE_UP = 33;
+
+    public static final int DOM_VK_PAGE_DOWN = 34;
+
+    public static final int DOM_VK_END = 35;
+
+    public static final int DOM_VK_HOME = 36;
+
+    public static final int DOM_VK_LEFT = 37;
+
+    public static final int DOM_VK_UP = 38;
+
+    public static final int DOM_VK_RIGHT = 39;
+
+    public static final int DOM_VK_DOWN = 40;
+
+    public static final int DOM_VK_PRINTSCREEN = 44;
+
+    public static final int DOM_VK_INSERT = 45;
+
+    public static final int DOM_VK_DELETE = 46;
+
+    public static final int DOM_VK_0 = 48;
+
+    public static final int DOM_VK_1 = 49;
+
+    public static final int DOM_VK_2 = 50;
+
+    public static final int DOM_VK_3 = 51;
+
+    public static final int DOM_VK_4 = 52;
+
+    public static final int DOM_VK_5 = 53;
+
+    public static final int DOM_VK_6 = 54;
+
+    public static final int DOM_VK_7 = 55;
+
+    public static final int DOM_VK_8 = 56;
+
+    public static final int DOM_VK_9 = 57;
+
+    public static final int DOM_VK_SEMICOLON = 59;
+
+    public static final int DOM_VK_EQUALS = 61;
+
+    public static final int DOM_VK_A = 65;
+
+    public static final int DOM_VK_B = 66;
+
+    public static final int DOM_VK_C = 67;
+
+    public static final int DOM_VK_D = 68;
+
+    public static final int DOM_VK_E = 69;
+
+    public static final int DOM_VK_F = 70;
+
+    public static final int DOM_VK_G = 71;
+
+    public static final int DOM_VK_H = 72;
+
+    public static final int DOM_VK_I = 73;
+
+    public static final int DOM_VK_J = 74;
+
+    public static final int DOM_VK_K = 75;
+
+    public static final int DOM_VK_L = 76;
+
+    public static final int DOM_VK_M = 77;
+
+    public static final int DOM_VK_N = 78;
+
+    public static final int DOM_VK_O = 79;
+
+    public static final int DOM_VK_P = 80;
+
+    public static final int DOM_VK_Q = 81;
+
+    public static final int DOM_VK_R = 82;
+
+    public static final int DOM_VK_S = 83;
+
+    public static final int DOM_VK_T = 84;
+
+    public static final int DOM_VK_U = 85;
+
+    public static final int DOM_VK_V = 86;
+
+    public static final int DOM_VK_W = 87;
+
+    public static final int DOM_VK_X = 88;
+
+    public static final int DOM_VK_Y = 89;
+
+    public static final int DOM_VK_Z = 90;
+
+    public static final int DOM_VK_NUMPAD0 = 96;
+
+    public static final int DOM_VK_NUMPAD1 = 97;
+
+    public static final int DOM_VK_NUMPAD2 = 98;
+
+    public static final int DOM_VK_NUMPAD3 = 99;
+
+    public static final int DOM_VK_NUMPAD4 = 100;
+
+    public static final int DOM_VK_NUMPAD5 = 101;
+
+    public static final int DOM_VK_NUMPAD6 = 102;
+
+    public static final int DOM_VK_NUMPAD7 = 103;
+
+    public static final int DOM_VK_NUMPAD8 = 104;
+
+    public static final int DOM_VK_NUMPAD9 = 105;
+
+    public static final int DOM_VK_MULTIPLY = 106;
+
+    public static final int DOM_VK_ADD = 107;
+
+    public static final int DOM_VK_SEPARATOR = 108;
+
+    public static final int DOM_VK_SUBTRACT = 109;
+
+    public static final int DOM_VK_DECIMAL = 110;
+
+    public static final int DOM_VK_DIVIDE = 111;
+
+    public static final int DOM_VK_F1 = 112;
+
+    public static final int DOM_VK_F2 = 113;
+
+    public static final int DOM_VK_F3 = 114;
+
+    public static final int DOM_VK_F4 = 115;
+
+    public static final int DOM_VK_F5 = 116;
+
+    public static final int DOM_VK_F6 = 117;
+
+    public static final int DOM_VK_F7 = 118;
+
+    public static final int DOM_VK_F8 = 119;
+
+    public static final int DOM_VK_F9 = 120;
+
+    public static final int DOM_VK_F10 = 121;
+
+    public static final int DOM_VK_F11 = 122;
+
+    public static final int DOM_VK_F12 = 123;
+
+    public static final int DOM_VK_F13 = 124;
+
+    public static final int DOM_VK_F14 = 125;
+
+    public static final int DOM_VK_F15 = 126;
+
+    public static final int DOM_VK_F16 = 127;
+
+    public static final int DOM_VK_F17 = 128;
+
+    public static final int DOM_VK_F18 = 129;
+
+    public static final int DOM_VK_F19 = 130;
+
+    public static final int DOM_VK_F20 = 131;
+
+    public static final int DOM_VK_F21 = 132;
+
+    public static final int DOM_VK_F22 = 133;
+
+    public static final int DOM_VK_F23 = 134;
+
+    public static final int DOM_VK_F24 = 135;
+
+    public static final int DOM_VK_NUM_LOCK = 144;
+
+    public static final int DOM_VK_SCROLL_LOCK = 145;
+
+    public static final int DOM_VK_COMMA = 188;
+
+    public static final int DOM_VK_PERIOD = 190;
+
+    public static final int DOM_VK_SLASH = 191;
+
+    public static final int DOM_VK_BACK_QUOTE = 192;
+
+    public static final int DOM_VK_OPEN_BRACKET = 219;
+
+    public static final int DOM_VK_BACK_SLASH = 220;
+
+    public static final int DOM_VK_CLOSE_BRACKET = 221;
+
+    public static final int DOM_VK_QUOTE = 222;
+
+    public static final int DOM_VK_META = 224;
+
+    public int GetCharCode(int[] aCharCode) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 1, getAddress(), aCharCode);
+    }
+
+    public int GetKeyCode(int[] aKeyCode) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 2, getAddress(), aKeyCode);
+    }
+
+    public int GetAltKey(int[] aAltKey) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 3, getAddress(), aAltKey);
+    }
+
+    public int GetCtrlKey(int[] aCtrlKey) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 4, getAddress(), aCtrlKey);
+    }
+
+    public int GetShiftKey(int[] aShiftKey) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 5, getAddress(), aShiftKey);
+    }
+
+    public int GetMetaKey(int[] aMetaKey) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 6, getAddress(), aMetaKey);
+    }
+
+    public int InitKeyEvent(int /*long*/ typeArg, int canBubbleArg, int cancelableArg, int /*long*/ viewArg, int ctrlKeyArg, int altKeyArg, int shiftKeyArg, int metaKeyArg, int keyCodeArg, int charCodeArg) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 7, getAddress(), typeArg, canBubbleArg, cancelableArg, viewArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, keyCodeArg, charCodeArg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMMouseEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,89 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMMouseEvent;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMMouseEvent extends nsIDOMUIEvent {
+
+    static final int LAST_METHOD_ID = nsIDOMUIEvent.LAST_METHOD_ID + 11;
+
+    public static final String NS_IDOMMOUSEEVENT_IID_STR =
+        "ff751edc-8b02-aae7-0010-8301838a3123";
+
+    public static final nsID NS_IDOMMOUSEEVENT_IID =
+        new nsID(NS_IDOMMOUSEEVENT_IID_STR);
+
+    public nsIDOMMouseEvent(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetScreenX(int[] aScreenX) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 1, getAddress(), aScreenX);
+    }
+
+    public int GetScreenY(int[] aScreenY) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 2, getAddress(), aScreenY);
+    }
+
+    public int GetClientX(int[] aClientX) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 3, getAddress(), aClientX);
+    }
+
+    public int GetClientY(int[] aClientY) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 4, getAddress(), aClientY);
+    }
+
+    public int GetCtrlKey(int[] aCtrlKey) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 5, getAddress(), aCtrlKey);
+    }
+
+    public int GetShiftKey(int[] aShiftKey) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 6, getAddress(), aShiftKey);
+    }
+
+    public int GetAltKey(int[] aAltKey) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 7, getAddress(), aAltKey);
+    }
+
+    public int GetMetaKey(int[] aMetaKey) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 8, getAddress(), aMetaKey);
+    }
+
+    public int GetButton(short[] aButton) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 9, getAddress(), aButton);
+    }
+
+    public int GetRelatedTarget(int /*long*/[] aRelatedTarget) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 10, getAddress(), aRelatedTarget);
+    }
+
+    public int InitMouseEvent(int /*long*/ typeArg, int canBubbleArg, int cancelableArg, int /*long*/ viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, int ctrlKeyArg, int altKeyArg, int shiftKeyArg, int metaKeyArg, short buttonArg, int /*long*/ relatedTargetArg) {
+        return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 11, getAddress(), typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMSerializer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMSerializer;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMSerializer extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
+
+    public static final String NS_IDOMSERIALIZER_IID_STR =
+        "a6cf9123-15b3-11d2-932e-00805f8add32";
+
+    public static final nsID NS_IDOMSERIALIZER_IID =
+        new nsID(NS_IDOMSERIALIZER_IID_STR);
+
+    public nsIDOMSerializer(int /*long*/ address) {
+        super(address);
+    }
+
+    public int SerializeToString(int /*long*/ root, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), root, _retval);
+    }
+
+    public int SerializeToStream(int /*long*/ root, int /*long*/ stream, byte[] charset) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), root, stream, charset);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMSerializer_1_7.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMSerializer_1_7;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMSerializer_1_7 extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
+
+    public static final String NS_IDOMSERIALIZER_IID_STR =
+        "9fd4ba15-e67c-4c98-b52c-7715f62c9196";
+
+    public static final nsID NS_IDOMSERIALIZER_IID =
+        new nsID(NS_IDOMSERIALIZER_IID_STR);
+
+    public nsIDOMSerializer_1_7(int /*long*/ address) {
+        super(address);
+    }
+
+    public int SerializeToString(int /*long*/ root, int /*long*/ _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), root, _retval);
+    }
+
+    public int SerializeToStream(int /*long*/ root, int /*long*/ stream, int /*long*/ charset) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), root, stream, charset);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMUIEvent.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMUIEvent;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMUIEvent extends nsIDOMEvent {
+
+    static final int LAST_METHOD_ID = nsIDOMEvent.LAST_METHOD_ID + 3;
+
+    public static final String NS_IDOMUIEVENT_IID_STR =
+        "a6cf90c3-15b3-11d2-932e-00805f8add32";
+
+    public static final nsID NS_IDOMUIEVENT_IID =
+        new nsID(NS_IDOMUIEVENT_IID_STR);
+
+    public nsIDOMUIEvent(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetView(int /*long*/[] aView) {
+        return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 1, getAddress(), aView);
+    }
+
+    public int GetDetail(int[] aDetail) {
+        return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 2, getAddress(), aDetail);
+    }
+
+    public int InitUIEvent(int /*long*/ typeArg, int canBubbleArg, int cancelableArg, int /*long*/ viewArg, int detailArg) {
+        return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 3, getAddress(), typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMWindow.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,113 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMWindow;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMWindow extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 17;
+
+    public static final String NS_IDOMWINDOW_IID_STR =
+        "a6cf906b-15b3-11d2-932e-00805f8add32";
+
+    public static final nsID NS_IDOMWINDOW_IID =
+        new nsID(NS_IDOMWINDOW_IID_STR);
+
+    public nsIDOMWindow(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetDocument(int /*long*/[] aDocument) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aDocument);
+    }
+
+    public int GetParent(int /*long*/[] aParent) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aParent);
+    }
+
+    public int GetTop(int /*long*/[] aTop) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aTop);
+    }
+
+    public int GetScrollbars(int /*long*/[] aScrollbars) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aScrollbars);
+    }
+
+    public int GetFrames(int /*long*/[] aFrames) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aFrames);
+    }
+
+    public int GetName(int /*long*/ aName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aName);
+    }
+
+    public int SetName(int /*long*/ aName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aName);
+    }
+
+    public int GetTextZoom(float[] aTextZoom) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aTextZoom);
+    }
+
+    public int SetTextZoom(float aTextZoom) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aTextZoom);
+    }
+
+    public int GetScrollX(int[] aScrollX) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aScrollX);
+    }
+
+    public int GetScrollY(int[] aScrollY) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aScrollY);
+    }
+
+    public int ScrollTo(int xScroll, int yScroll) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), xScroll, yScroll);
+    }
+
+    public int ScrollBy(int xScrollDif, int yScrollDif) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), xScrollDif, yScrollDif);
+    }
+
+    public int GetSelection(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), _retval);
+    }
+
+    public int ScrollByLines(int numLines) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), numLines);
+    }
+
+    public int ScrollByPages(int numPages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), numPages);
+    }
+
+    public int SizeToContent() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDOMWindowCollection.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDOMWindowCollection;
+
+import dwt.dwthelper.utils;
+
+public class nsIDOMWindowCollection extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3;
+
+    public static final String NS_IDOMWINDOWCOLLECTION_IID_STR =
+        "a6cf906f-15b3-11d2-932e-00805f8add32";
+
+    public static final nsID NS_IDOMWINDOWCOLLECTION_IID =
+        new nsID(NS_IDOMWINDOWCOLLECTION_IID_STR);
+
+    public nsIDOMWindowCollection(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetLength(int[] aLength) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aLength);
+    }
+
+    public int Item(int index, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), index, _retval);
+    }
+
+    public int NamedItem(int /*long*/ name, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), name, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDirectoryService.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDirectoryService;
+
+import dwt.dwthelper.utils;
+
+public class nsIDirectoryService extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3;
+
+    public static final String NS_IDIRECTORYSERVICE_IID_STR =
+        "57a66a60-d43a-11d3-8cc2-00609792278c";
+
+    public static final nsID NS_IDIRECTORYSERVICE_IID =
+        new nsID(NS_IDIRECTORYSERVICE_IID_STR);
+
+    public nsIDirectoryService(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Init() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress());
+    }
+
+    public int RegisterProvider(int /*long*/ prov) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), prov);
+    }
+
+    public int UnregisterProvider(int /*long*/ prov) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), prov);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDirectoryServiceProvider.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDirectoryServiceProvider;
+
+import dwt.dwthelper.utils;
+
+public class nsIDirectoryServiceProvider extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
+
+    public static final String NS_IDIRECTORYSERVICEPROVIDER_IID_STR =
+        "bbf8cab0-d43a-11d3-8cc2-00609792278c";
+
+    public static final nsID NS_IDIRECTORYSERVICEPROVIDER_IID =
+        new nsID(NS_IDIRECTORYSERVICEPROVIDER_IID_STR);
+
+    public nsIDirectoryServiceProvider(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetFile(byte[] prop, int[] persistent, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), prop, persistent, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDirectoryServiceProvider2.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDirectoryServiceProvider2;
+
+import dwt.dwthelper.utils;
+
+public class nsIDirectoryServiceProvider2 extends nsIDirectoryServiceProvider {
+
+    static final int LAST_METHOD_ID = nsIDirectoryServiceProvider.LAST_METHOD_ID + 1;
+
+    public static final String NS_IDIRECTORYSERVICEPROVIDER2_IID_STRING =
+        "2f977d4b-5485-11d4-87e2-0010a4e75ef2";
+
+    public static final nsID NS_IDIRECTORYSERVICEPROVIDER2_IID =
+        new nsID(NS_IDIRECTORYSERVICEPROVIDER2_IID_STRING);
+
+    public nsIDirectoryServiceProvider2(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetFiles(byte[] prop, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsIDirectoryServiceProvider.LAST_METHOD_ID + 1, getAddress(), prop, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDocShell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,271 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDocShell;
+
+import dwt.dwthelper.utils;
+
+public class nsIDocShell extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 51;
+
+    public static final String NS_IDOCSHELL_IID_STR =
+        "69e5de00-7b8b-11d3-af61-00a024ffc08c";
+
+    public static final nsID NS_IDOCSHELL_IID =
+        new nsID(NS_IDOCSHELL_IID_STR);
+
+    public nsIDocShell(int /*long*/ address) {
+        super(address);
+    }
+
+    public int LoadURI(int /*long*/ uri, int /*long*/ loadInfo, int aLoadFlags, int firstParty) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uri, loadInfo, aLoadFlags, firstParty);
+    }
+
+    public int LoadStream(int /*long*/ aStream, int /*long*/ aURI, int /*long*/ aContentType, int /*long*/ aContentCharset, int /*long*/ aLoadInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aStream, aURI, aContentType, aContentCharset, aLoadInfo);
+    }
+
+    public int InternalLoad(int /*long*/ aURI, int /*long*/ aReferrer, int /*long*/ aOwner, int aInheritOwner, char[] aWindowTarget, int /*long*/ aPostDataStream, int /*long*/ aHeadersStream, int aLoadFlags, int /*long*/ aSHEntry, int firstParty, int /*long*/[] aDocShell, int /*long*/[] aRequest) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aURI, aReferrer, aOwner, aInheritOwner, aWindowTarget, aPostDataStream, aHeadersStream, aLoadFlags, aSHEntry, firstParty, aDocShell, aRequest);
+    }
+
+    public int CreateLoadInfo(int /*long*/[] loadInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), loadInfo);
+    }
+
+    public int PrepareForNewContentModel() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress());
+    }
+
+    public int SetCurrentURI(int /*long*/ aURI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aURI);
+    }
+
+    public int FireUnloadNotification() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress());
+    }
+
+    public int GetPresContext(int /*long*/[] aPresContext) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aPresContext);
+    }
+
+    public int GetPresShell(int /*long*/[] aPresShell) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aPresShell);
+    }
+
+    public int GetEldestPresShell(int /*long*/[] aEldestPresShell) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aEldestPresShell);
+    }
+
+    public int GetContentViewer(int /*long*/[] aContentViewer) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aContentViewer);
+    }
+
+    public int GetChromeEventHandler(int /*long*/[] aChromeEventHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aChromeEventHandler);
+    }
+
+    public int SetChromeEventHandler(int /*long*/ aChromeEventHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aChromeEventHandler);
+    }
+
+    public int GetParentURIContentListener(int /*long*/[] aParentURIContentListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aParentURIContentListener);
+    }
+
+    public int SetParentURIContentListener(int /*long*/ aParentURIContentListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aParentURIContentListener);
+    }
+
+    public int GetDocumentCharsetInfo(int /*long*/[] aDocumentCharsetInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aDocumentCharsetInfo);
+    }
+
+    public int SetDocumentCharsetInfo(int /*long*/ aDocumentCharsetInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aDocumentCharsetInfo);
+    }
+
+    public int GetAllowPlugins(int[] aAllowPlugins) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aAllowPlugins);
+    }
+
+    public int SetAllowPlugins(int aAllowPlugins) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aAllowPlugins);
+    }
+
+    public int GetAllowJavascript(int[] aAllowJavascript) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aAllowJavascript);
+    }
+
+    public int SetAllowJavascript(int aAllowJavascript) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aAllowJavascript);
+    }
+
+    public int GetAllowMetaRedirects(int[] aAllowMetaRedirects) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aAllowMetaRedirects);
+    }
+
+    public int SetAllowMetaRedirects(int aAllowMetaRedirects) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aAllowMetaRedirects);
+    }
+
+    public int GetAllowSubframes(int[] aAllowSubframes) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aAllowSubframes);
+    }
+
+    public int SetAllowSubframes(int aAllowSubframes) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aAllowSubframes);
+    }
+
+    public int GetAllowImages(int[] aAllowImages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aAllowImages);
+    }
+
+    public int SetAllowImages(int aAllowImages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aAllowImages);
+    }
+
+    public static final int ENUMERATE_FORWARDS = 0;
+
+    public static final int ENUMERATE_BACKWARDS = 1;
+
+    public int GetDocShellEnumerator(int aItemType, int aDirection, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aItemType, aDirection, _retval);
+    }
+
+    public static final int APP_TYPE_UNKNOWN = 0;
+
+    public static final int APP_TYPE_MAIL = 1;
+
+    public int GetAppType(int[] aAppType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), aAppType);
+    }
+
+    public int SetAppType(int aAppType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), aAppType);
+    }
+
+    public int GetAllowAuth(int[] aAllowAuth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), aAllowAuth);
+    }
+
+    public int SetAllowAuth(int aAllowAuth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), aAllowAuth);
+    }
+
+    public int GetZoom(float[] aZoom) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), aZoom);
+    }
+
+    public int SetZoom(float aZoom) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), aZoom);
+    }
+
+    public int GetMarginWidth(int[] aMarginWidth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), aMarginWidth);
+    }
+
+    public int SetMarginWidth(int aMarginWidth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), aMarginWidth);
+    }
+
+    public int GetMarginHeight(int[] aMarginHeight) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 37, getAddress(), aMarginHeight);
+    }
+
+    public int SetMarginHeight(int aMarginHeight) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 38, getAddress(), aMarginHeight);
+    }
+
+    public int GetHasFocus(int[] aHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 39, getAddress(), aHasFocus);
+    }
+
+    public int SetHasFocus(int aHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 40, getAddress(), aHasFocus);
+    }
+
+    public int GetCanvasHasFocus(int[] aCanvasHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 41, getAddress(), aCanvasHasFocus);
+    }
+
+    public int SetCanvasHasFocus(int aCanvasHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 42, getAddress(), aCanvasHasFocus);
+    }
+
+    public int TabToTreeOwner(int forward, int[] tookFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 43, getAddress(), forward, tookFocus);
+    }
+
+    public static final int BUSY_FLAGS_NONE = 0;
+
+    public static final int BUSY_FLAGS_BUSY = 1;
+
+    public static final int BUSY_FLAGS_BEFORE_PAGE_LOAD = 2;
+
+    public static final int BUSY_FLAGS_PAGE_LOADING = 4;
+
+    public static final int LOAD_CMD_NORMAL = 1;
+
+    public static final int LOAD_CMD_RELOAD = 2;
+
+    public static final int LOAD_CMD_HISTORY = 4;
+
+    public int GetBusyFlags(int[] aBusyFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 44, getAddress(), aBusyFlags);
+    }
+
+    public int GetLoadType(int[] aLoadType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 45, getAddress(), aLoadType);
+    }
+
+    public int SetLoadType(int aLoadType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 46, getAddress(), aLoadType);
+    }
+
+    public int IsBeingDestroyed(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 47, getAddress(), _retval);
+    }
+
+    public int GetIsExecutingOnLoadHandler(int[] aIsExecutingOnLoadHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 48, getAddress(), aIsExecutingOnLoadHandler);
+    }
+
+    public int GetLayoutHistoryState(int /*long*/[] aLayoutHistoryState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 49, getAddress(), aLayoutHistoryState);
+    }
+
+    public int SetLayoutHistoryState(int /*long*/ aLayoutHistoryState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 50, getAddress(), aLayoutHistoryState);
+    }
+
+    public int GetShouldSaveLayoutState(int[] aShouldSaveLayoutState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 51, getAddress(), aShouldSaveLayoutState);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDocShell_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,319 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDocShell_1_8;
+
+import dwt.dwthelper.utils;
+
+public class nsIDocShell_1_8 extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 61;
+
+    public static final String NS_IDOCSHELL_IID_STR =
+        "9f0c7461-b9a4-47f6-b88c-421dce1bce66";
+
+    public static final nsID NS_IDOCSHELL_IID =
+        new nsID(NS_IDOCSHELL_IID_STR);
+
+    public nsIDocShell_1_8(int /*long*/ address) {
+        super(address);
+    }
+
+    public int LoadURI(int /*long*/ uri, int /*long*/ loadInfo, int aLoadFlags, int firstParty) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uri, loadInfo, aLoadFlags, firstParty);
+    }
+
+    public int LoadStream(int /*long*/ aStream, int /*long*/ aURI, int /*long*/ aContentType, int /*long*/ aContentCharset, int /*long*/ aLoadInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aStream, aURI, aContentType, aContentCharset, aLoadInfo);
+    }
+
+    public static final int INTERNAL_LOAD_FLAGS_NONE = 0;
+
+    public static final int INTERNAL_LOAD_FLAGS_INHERIT_OWNER = 1;
+
+    public static final int INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER = 2;
+
+    public int InternalLoad(int /*long*/ aURI, int /*long*/ aReferrer, int /*long*/ aOwner, int aFlags, char[] aWindowTarget, byte[] aTypeHint, int /*long*/ aPostDataStream, int /*long*/ aHeadersStream, int aLoadFlags, int /*long*/ aSHEntry, int firstParty, int /*long*/[] aDocShell, int /*long*/[] aRequest) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aURI, aReferrer, aOwner, aFlags, aWindowTarget, aTypeHint, aPostDataStream, aHeadersStream, aLoadFlags, aSHEntry, firstParty, aDocShell, aRequest);
+    }
+
+    public int CreateLoadInfo(int /*long*/[] loadInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), loadInfo);
+    }
+
+    public int PrepareForNewContentModel() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress());
+    }
+
+    public int SetCurrentURI(int /*long*/ aURI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aURI);
+    }
+
+    public int FirePageHideNotification(int isUnload) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), isUnload);
+    }
+
+    public int GetPresContext(int /*long*/[] aPresContext) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aPresContext);
+    }
+
+    public int GetPresShell(int /*long*/[] aPresShell) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aPresShell);
+    }
+
+    public int GetEldestPresShell(int /*long*/[] aEldestPresShell) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aEldestPresShell);
+    }
+
+    public int GetContentViewer(int /*long*/[] aContentViewer) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aContentViewer);
+    }
+
+    public int GetChromeEventHandler(int /*long*/[] aChromeEventHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aChromeEventHandler);
+    }
+
+    public int SetChromeEventHandler(int /*long*/ aChromeEventHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aChromeEventHandler);
+    }
+
+    public int GetDocumentCharsetInfo(int /*long*/[] aDocumentCharsetInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aDocumentCharsetInfo);
+    }
+
+    public int SetDocumentCharsetInfo(int /*long*/ aDocumentCharsetInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aDocumentCharsetInfo);
+    }
+
+    public int GetAllowPlugins(int[] aAllowPlugins) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aAllowPlugins);
+    }
+
+    public int SetAllowPlugins(int aAllowPlugins) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aAllowPlugins);
+    }
+
+    public int GetAllowJavascript(int[] aAllowJavascript) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aAllowJavascript);
+    }
+
+    public int SetAllowJavascript(int aAllowJavascript) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aAllowJavascript);
+    }
+
+    public int GetAllowMetaRedirects(int[] aAllowMetaRedirects) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aAllowMetaRedirects);
+    }
+
+    public int SetAllowMetaRedirects(int aAllowMetaRedirects) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aAllowMetaRedirects);
+    }
+
+    public int GetAllowSubframes(int[] aAllowSubframes) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aAllowSubframes);
+    }
+
+    public int SetAllowSubframes(int aAllowSubframes) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aAllowSubframes);
+    }
+
+    public int GetAllowImages(int[] aAllowImages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aAllowImages);
+    }
+
+    public int SetAllowImages(int aAllowImages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aAllowImages);
+    }
+
+    public static final int ENUMERATE_FORWARDS = 0;
+
+    public static final int ENUMERATE_BACKWARDS = 1;
+
+    public int GetDocShellEnumerator(int aItemType, int aDirection, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aItemType, aDirection, _retval);
+    }
+
+    public static final int APP_TYPE_UNKNOWN = 0;
+
+    public static final int APP_TYPE_MAIL = 1;
+
+    public static final int APP_TYPE_EDITOR = 2;
+
+    public int GetAppType(int[] aAppType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aAppType);
+    }
+
+    public int SetAppType(int aAppType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aAppType);
+    }
+
+    public int GetAllowAuth(int[] aAllowAuth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), aAllowAuth);
+    }
+
+    public int SetAllowAuth(int aAllowAuth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), aAllowAuth);
+    }
+
+    public int GetZoom(float[] aZoom) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), aZoom);
+    }
+
+    public int SetZoom(float aZoom) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), aZoom);
+    }
+
+    public int GetMarginWidth(int[] aMarginWidth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), aMarginWidth);
+    }
+
+    public int SetMarginWidth(int aMarginWidth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), aMarginWidth);
+    }
+
+    public int GetMarginHeight(int[] aMarginHeight) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), aMarginHeight);
+    }
+
+    public int SetMarginHeight(int aMarginHeight) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), aMarginHeight);
+    }
+
+    public int GetHasFocus(int[] aHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 37, getAddress(), aHasFocus);
+    }
+
+    public int SetHasFocus(int aHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 38, getAddress(), aHasFocus);
+    }
+
+    public int GetCanvasHasFocus(int[] aCanvasHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 39, getAddress(), aCanvasHasFocus);
+    }
+
+    public int SetCanvasHasFocus(int aCanvasHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 40, getAddress(), aCanvasHasFocus);
+    }
+
+    public int TabToTreeOwner(int forward, int[] tookFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 41, getAddress(), forward, tookFocus);
+    }
+
+    public static final int BUSY_FLAGS_NONE = 0;
+
+    public static final int BUSY_FLAGS_BUSY = 1;
+
+    public static final int BUSY_FLAGS_BEFORE_PAGE_LOAD = 2;
+
+    public static final int BUSY_FLAGS_PAGE_LOADING = 4;
+
+    public static final int LOAD_CMD_NORMAL = 1;
+
+    public static final int LOAD_CMD_RELOAD = 2;
+
+    public static final int LOAD_CMD_HISTORY = 4;
+
+    public int GetBusyFlags(int[] aBusyFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 42, getAddress(), aBusyFlags);
+    }
+
+    public int GetLoadType(int[] aLoadType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 43, getAddress(), aLoadType);
+    }
+
+    public int SetLoadType(int aLoadType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 44, getAddress(), aLoadType);
+    }
+
+    public int IsBeingDestroyed(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 45, getAddress(), _retval);
+    }
+
+    public int GetIsExecutingOnLoadHandler(int[] aIsExecutingOnLoadHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 46, getAddress(), aIsExecutingOnLoadHandler);
+    }
+
+    public int GetLayoutHistoryState(int /*long*/[] aLayoutHistoryState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 47, getAddress(), aLayoutHistoryState);
+    }
+
+    public int SetLayoutHistoryState(int /*long*/ aLayoutHistoryState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 48, getAddress(), aLayoutHistoryState);
+    }
+
+    public int GetShouldSaveLayoutState(int[] aShouldSaveLayoutState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 49, getAddress(), aShouldSaveLayoutState);
+    }
+
+    public int GetSecurityUI(int /*long*/[] aSecurityUI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 50, getAddress(), aSecurityUI);
+    }
+
+    public int SetSecurityUI(int /*long*/ aSecurityUI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 51, getAddress(), aSecurityUI);
+    }
+
+    public int SuspendRefreshURIs() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 52, getAddress());
+    }
+
+    public int ResumeRefreshURIs() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 53, getAddress());
+    }
+
+    public int BeginRestore(int /*long*/ viewer, int top) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 54, getAddress(), viewer, top);
+    }
+
+    public int FinishRestore() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 55, getAddress());
+    }
+
+    public int GetRestoringDocument(int[] aRestoringDocument) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 56, getAddress(), aRestoringDocument);
+    }
+
+    public int GetUseErrorPages(int[] aUseErrorPages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 57, getAddress(), aUseErrorPages);
+    }
+
+    public int SetUseErrorPages(int aUseErrorPages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 58, getAddress(), aUseErrorPages);
+    }
+
+    public int GetPreviousTransIndex(int[] aPreviousTransIndex) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 59, getAddress(), aPreviousTransIndex);
+    }
+
+    public int GetLoadedTransIndex(int[] aLoadedTransIndex) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 60, getAddress(), aLoadedTransIndex);
+    }
+
+    public int HistoryPurged(int numEntries) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 61, getAddress(), numEntries);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDocShell_1_9.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,349 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDocShell_1_9;
+
+import dwt.dwthelper.utils;
+
+public class nsIDocShell_1_9 extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 67;
+
+    public static final String NS_IDOCSHELL_IID_STR =
+        "7d1cf6b9-daa3-476d-8f9f-9eb2a971a95c";
+
+    public static final nsID NS_IDOCSHELL_IID =
+        new nsID(NS_IDOCSHELL_IID_STR);
+
+    public nsIDocShell_1_9(int /*long*/ address) {
+        super(address);
+    }
+
+    public int LoadURI(int /*long*/ uri, int /*long*/ loadInfo, int aLoadFlags, int firstParty) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uri, loadInfo, aLoadFlags, firstParty);
+    }
+
+    public int LoadStream(int /*long*/ aStream, int /*long*/ aURI, int /*long*/ aContentType, int /*long*/ aContentCharset, int /*long*/ aLoadInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aStream, aURI, aContentType, aContentCharset, aLoadInfo);
+    }
+
+    public static final int INTERNAL_LOAD_FLAGS_NONE = 0;
+
+    public static final int INTERNAL_LOAD_FLAGS_INHERIT_OWNER = 1;
+
+    public static final int INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER = 2;
+
+    public static final int INTERNAL_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 4;
+
+    public static final int INTERNAL_LOAD_FLAGS_FIRST_LOAD = 8;
+
+    public static final int INTERNAL_LOAD_FLAGS_BYPASS_CLASSIFIER = 16;
+
+    public int InternalLoad(int /*long*/ aURI, int /*long*/ aReferrer, int /*long*/ aOwner, int aFlags, char[] aWindowTarget, byte[] aTypeHint, int /*long*/ aPostDataStream, int /*long*/ aHeadersStream, int aLoadFlags, int /*long*/ aSHEntry, int firstParty, int /*long*/[] aDocShell, int /*long*/[] aRequest) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aURI, aReferrer, aOwner, aFlags, aWindowTarget, aTypeHint, aPostDataStream, aHeadersStream, aLoadFlags, aSHEntry, firstParty, aDocShell, aRequest);
+    }
+
+    public int CreateLoadInfo(int /*long*/[] loadInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), loadInfo);
+    }
+
+    public int PrepareForNewContentModel() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress());
+    }
+
+    public int SetCurrentURI(int /*long*/ aURI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aURI);
+    }
+
+    public int FirePageHideNotification(int isUnload) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), isUnload);
+    }
+
+    public int GetPresContext(int /*long*/[] aPresContext) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aPresContext);
+    }
+
+    public int GetPresShell(int /*long*/[] aPresShell) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aPresShell);
+    }
+
+    public int GetEldestPresShell(int /*long*/[] aEldestPresShell) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aEldestPresShell);
+    }
+
+    public int GetContentViewer(int /*long*/[] aContentViewer) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aContentViewer);
+    }
+
+    public int GetChromeEventHandler(int /*long*/[] aChromeEventHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aChromeEventHandler);
+    }
+
+    public int SetChromeEventHandler(int /*long*/ aChromeEventHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aChromeEventHandler);
+    }
+
+    public int GetDocumentCharsetInfo(int /*long*/[] aDocumentCharsetInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aDocumentCharsetInfo);
+    }
+
+    public int SetDocumentCharsetInfo(int /*long*/ aDocumentCharsetInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aDocumentCharsetInfo);
+    }
+
+    public int GetAllowPlugins(int[] aAllowPlugins) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aAllowPlugins);
+    }
+
+    public int SetAllowPlugins(int aAllowPlugins) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aAllowPlugins);
+    }
+
+    public int GetAllowJavascript(int[] aAllowJavascript) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aAllowJavascript);
+    }
+
+    public int SetAllowJavascript(int aAllowJavascript) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aAllowJavascript);
+    }
+
+    public int GetAllowMetaRedirects(int[] aAllowMetaRedirects) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aAllowMetaRedirects);
+    }
+
+    public int SetAllowMetaRedirects(int aAllowMetaRedirects) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aAllowMetaRedirects);
+    }
+
+    public int GetAllowSubframes(int[] aAllowSubframes) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aAllowSubframes);
+    }
+
+    public int SetAllowSubframes(int aAllowSubframes) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aAllowSubframes);
+    }
+
+    public int GetAllowImages(int[] aAllowImages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aAllowImages);
+    }
+
+    public int SetAllowImages(int aAllowImages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aAllowImages);
+    }
+
+    public static final int ENUMERATE_FORWARDS = 0;
+
+    public static final int ENUMERATE_BACKWARDS = 1;
+
+    public int GetDocShellEnumerator(int aItemType, int aDirection, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aItemType, aDirection, _retval);
+    }
+
+    public static final int APP_TYPE_UNKNOWN = 0;
+
+    public static final int APP_TYPE_MAIL = 1;
+
+    public static final int APP_TYPE_EDITOR = 2;
+
+    public int GetAppType(int[] aAppType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aAppType);
+    }
+
+    public int SetAppType(int aAppType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aAppType);
+    }
+
+    public int GetAllowAuth(int[] aAllowAuth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), aAllowAuth);
+    }
+
+    public int SetAllowAuth(int aAllowAuth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), aAllowAuth);
+    }
+
+    public int GetZoom(float[] aZoom) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), aZoom);
+    }
+
+    public int SetZoom(float aZoom) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), aZoom);
+    }
+
+    public int GetMarginWidth(int[] aMarginWidth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), aMarginWidth);
+    }
+
+    public int SetMarginWidth(int aMarginWidth) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), aMarginWidth);
+    }
+
+    public int GetMarginHeight(int[] aMarginHeight) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), aMarginHeight);
+    }
+
+    public int SetMarginHeight(int aMarginHeight) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), aMarginHeight);
+    }
+
+    public int GetHasFocus(int[] aHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 37, getAddress(), aHasFocus);
+    }
+
+    public int SetHasFocus(int aHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 38, getAddress(), aHasFocus);
+    }
+
+    public int GetCanvasHasFocus(int[] aCanvasHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 39, getAddress(), aCanvasHasFocus);
+    }
+
+    public int SetCanvasHasFocus(int aCanvasHasFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 40, getAddress(), aCanvasHasFocus);
+    }
+
+    public int TabToTreeOwner(int forward, int[] tookFocus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 41, getAddress(), forward, tookFocus);
+    }
+
+    public static final int BUSY_FLAGS_NONE = 0;
+
+    public static final int BUSY_FLAGS_BUSY = 1;
+
+    public static final int BUSY_FLAGS_BEFORE_PAGE_LOAD = 2;
+
+    public static final int BUSY_FLAGS_PAGE_LOADING = 4;
+
+    public static final int LOAD_CMD_NORMAL = 1;
+
+    public static final int LOAD_CMD_RELOAD = 2;
+
+    public static final int LOAD_CMD_HISTORY = 4;
+
+    public int GetBusyFlags(int[] aBusyFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 42, getAddress(), aBusyFlags);
+    }
+
+    public int GetLoadType(int[] aLoadType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 43, getAddress(), aLoadType);
+    }
+
+    public int SetLoadType(int aLoadType) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 44, getAddress(), aLoadType);
+    }
+
+    public int IsBeingDestroyed(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 45, getAddress(), _retval);
+    }
+
+    public int GetIsExecutingOnLoadHandler(int[] aIsExecutingOnLoadHandler) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 46, getAddress(), aIsExecutingOnLoadHandler);
+    }
+
+    public int GetLayoutHistoryState(int /*long*/[] aLayoutHistoryState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 47, getAddress(), aLayoutHistoryState);
+    }
+
+    public int SetLayoutHistoryState(int /*long*/ aLayoutHistoryState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 48, getAddress(), aLayoutHistoryState);
+    }
+
+    public int GetShouldSaveLayoutState(int[] aShouldSaveLayoutState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 49, getAddress(), aShouldSaveLayoutState);
+    }
+
+    public int GetSecurityUI(int /*long*/[] aSecurityUI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 50, getAddress(), aSecurityUI);
+    }
+
+    public int SetSecurityUI(int /*long*/ aSecurityUI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 51, getAddress(), aSecurityUI);
+    }
+
+    public int SuspendRefreshURIs() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 52, getAddress());
+    }
+
+    public int ResumeRefreshURIs() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 53, getAddress());
+    }
+
+    public int BeginRestore(int /*long*/ viewer, int top) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 54, getAddress(), viewer, top);
+    }
+
+    public int FinishRestore() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 55, getAddress());
+    }
+
+    public int GetRestoringDocument(int[] aRestoringDocument) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 56, getAddress(), aRestoringDocument);
+    }
+
+    public int GetUseErrorPages(int[] aUseErrorPages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 57, getAddress(), aUseErrorPages);
+    }
+
+    public int SetUseErrorPages(int aUseErrorPages) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 58, getAddress(), aUseErrorPages);
+    }
+
+    public int GetPreviousTransIndex(int[] aPreviousTransIndex) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 59, getAddress(), aPreviousTransIndex);
+    }
+
+    public int GetLoadedTransIndex(int[] aLoadedTransIndex) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 60, getAddress(), aLoadedTransIndex);
+    }
+
+    public int HistoryPurged(int numEntries) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 61, getAddress(), numEntries);
+    }
+
+    public int GetSessionStorageForURI(int /*long*/ uri, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 62, getAddress(), uri, _retval);
+    }
+
+    public int AddSessionStorage(int /*long*/ aDomain, int /*long*/ storage) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 63, getAddress(), aDomain, storage);
+    }
+
+    public int GetCurrentDocumentChannel(int /*long*/[] aCurrentDocumentChannel) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 64, getAddress(), aCurrentDocumentChannel);
+    }
+
+    public int SetChildOffset(int offset) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 65, getAddress(), offset);
+    }
+
+    public int GetIsInUnload(int[] aIsInUnload) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 66, getAddress(), aIsInUnload);
+    }
+
+    public int GetChannelIsUnsafe(int[] aChannelIsUnsafe) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 67, getAddress(), aChannelIsUnsafe);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDownload.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,97 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2004, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDownload;
+
+import dwt.dwthelper.utils;
+
+public class nsIDownload extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 13;
+
+    public static final String NS_IDOWNLOAD_IID_STR =
+        "06cb92f2-1dd2-11b2-95f2-96dfdfb804a1";
+
+    public static final nsID NS_IDOWNLOAD_IID =
+        new nsID(NS_IDOWNLOAD_IID_STR);
+
+    public nsIDownload(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Init(int /*long*/ aSource, int /*long*/ aTarget, char[] aDisplayName, int /*long*/ aMIMEInfo, long startTime, int /*long*/ aPersist) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aSource, aTarget, aDisplayName, aMIMEInfo, startTime, aPersist);
+    }
+
+    public int GetSource(int /*long*/[] aSource) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aSource);
+    }
+
+    public int GetTarget(int /*long*/[] aTarget) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aTarget);
+    }
+
+    public int GetPersist(int /*long*/[] aPersist) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aPersist);
+    }
+
+    public int GetPercentComplete(int[] aPercentComplete) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aPercentComplete);
+    }
+
+    public int GetDisplayName(int /*long*/[] aDisplayName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aDisplayName);
+    }
+
+    public int SetDisplayName(char[] aDisplayName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aDisplayName);
+    }
+
+    public int GetStartTime(long[] aStartTime) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aStartTime);
+    }
+
+    public int GetMIMEInfo(int /*long*/[] aMIMEInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aMIMEInfo);
+    }
+
+    public int GetListener(int /*long*/[] aListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aListener);
+    }
+
+    public int SetListener(int /*long*/ aListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aListener);
+    }
+
+    public int GetObserver(int /*long*/[] aObserver) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aObserver);
+    }
+
+    public int SetObserver(int /*long*/ aObserver) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aObserver);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIDownload_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,85 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIDownload_1_8;
+
+import dwt.dwthelper.utils;
+
+public class nsIDownload_1_8 extends nsITransfer {
+
+    static final int LAST_METHOD_ID = nsITransfer.LAST_METHOD_ID + 10;
+
+    public static final String NS_IDOWNLOAD_IID_STR =
+        "9e1fd9f2-9727-4926-85cd-f16c375bba6d";
+
+    public static final nsID NS_IDOWNLOAD_IID =
+        new nsID(NS_IDOWNLOAD_IID_STR);
+
+    public nsIDownload_1_8(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetTargetFile(int /*long*/[] aTargetFile) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 1, getAddress(), aTargetFile);
+    }
+
+    public int GetPercentComplete(int[] aPercentComplete) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 2, getAddress(), aPercentComplete);
+    }
+
+    public int GetAmountTransferred(int /*long*/ aAmountTransferred) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 3, getAddress(), aAmountTransferred);
+    }
+
+    public int GetSize(int /*long*/ aSize) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 4, getAddress(), aSize);
+    }
+
+    public int GetSource(int /*long*/[] aSource) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 5, getAddress(), aSource);
+    }
+
+    public int GetTarget(int /*long*/[] aTarget) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 6, getAddress(), aTarget);
+    }
+
+    public int GetCancelable(int /*long*/[] aCancelable) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 7, getAddress(), aCancelable);
+    }
+
+    public int GetDisplayName(int /*long*/[] aDisplayName) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 8, getAddress(), aDisplayName);
+    }
+
+    public int GetStartTime(long[] aStartTime) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 9, getAddress(), aStartTime);
+    }
+
+    public int GetMIMEInfo(int /*long*/[] aMIMEInfo) {
+        return XPCOM.VtblCall(nsITransfer.LAST_METHOD_ID + 10, getAddress(), aMIMEInfo);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIEmbeddingSiteWindow.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,83 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIEmbeddingSiteWindow;
+
+import dwt.dwthelper.utils;
+
+public class nsIEmbeddingSiteWindow extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 8;
+
+    public static final String NS_IEMBEDDINGSITEWINDOW_IID_STR =
+        "3e5432cd-9568-4bd1-8cbe-d50aba110743";
+
+    public static final nsID NS_IEMBEDDINGSITEWINDOW_IID =
+        new nsID(NS_IEMBEDDINGSITEWINDOW_IID_STR);
+
+    public nsIEmbeddingSiteWindow(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int DIM_FLAGS_POSITION = 1;
+
+    public static final int DIM_FLAGS_SIZE_INNER = 2;
+
+    public static final int DIM_FLAGS_SIZE_OUTER = 4;
+
+    public int SetDimensions(int flags, int x, int y, int cx, int cy) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), flags, x, y, cx, cy);
+    }
+
+    public int GetDimensions(int flags, int[] x, int[] y, int[] cx, int[] cy) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), flags, x, y, cx, cy);
+    }
+
+    public int SetFocus() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
+    }
+
+    public int GetVisibility(int[] aVisibility) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aVisibility);
+    }
+
+    public int SetVisibility(int aVisibility) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aVisibility);
+    }
+
+    public int GetTitle(int /*long*/[] aTitle) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aTitle);
+    }
+
+    public int SetTitle(char[] aTitle) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aTitle);
+    }
+
+    public int GetSiteWindow(int /*long*/[] aSiteWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aSiteWindow);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIFactory.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIFactory;
+
+import dwt.dwthelper.utils;
+
+public class nsIFactory extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
+
+    public static final String NS_IFACTORY_IID_STR =
+        "00000001-0000-0000-c000-000000000046";
+
+    public static final nsID NS_IFACTORY_IID =
+        new nsID(NS_IFACTORY_IID_STR);
+
+    public nsIFactory(int /*long*/ address) {
+        super(address);
+    }
+
+    public int CreateInstance(int /*long*/ aOuter, nsID iid, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aOuter, iid, result);
+    }
+
+    public int LockFactory(int lock) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), lock);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIFile.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,229 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIFile;
+
+import dwt.dwthelper.utils;
+
+public class nsIFile extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 45;
+
+    public static final String NS_IFILE_IID_STR =
+        "c8c0a080-0868-11d3-915f-d9d889d48e3c";
+
+    public static final nsID NS_IFILE_IID =
+        new nsID(NS_IFILE_IID_STR);
+
+    public nsIFile(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int NORMAL_FILE_TYPE = 0;
+
+    public static final int DIRECTORY_TYPE = 1;
+
+    public int Append(int /*long*/ node) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), node);
+    }
+
+    public int AppendNative(int /*long*/ node) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), node);
+    }
+
+    public int Normalize() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
+    }
+
+    public int Create(int type, int permissions) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), type, permissions);
+    }
+
+    public int GetLeafName(int /*long*/ aLeafName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aLeafName);
+    }
+
+    public int SetLeafName(int /*long*/ aLeafName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aLeafName);
+    }
+
+    public int GetNativeLeafName(int /*long*/ aNativeLeafName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aNativeLeafName);
+    }
+
+    public int SetNativeLeafName(int /*long*/ aNativeLeafName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aNativeLeafName);
+    }
+
+    public int CopyTo(int /*long*/ newParentDir, int /*long*/ newName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), newParentDir, newName);
+    }
+
+    public int CopyToNative(int /*long*/ newParentDir, int /*long*/ newName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), newParentDir, newName);
+    }
+
+    public int CopyToFollowingLinks(int /*long*/ newParentDir, int /*long*/ newName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), newParentDir, newName);
+    }
+
+    public int CopyToFollowingLinksNative(int /*long*/ newParentDir, int /*long*/ newName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), newParentDir, newName);
+    }
+
+    public int MoveTo(int /*long*/ newParentDir, int /*long*/ newName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), newParentDir, newName);
+    }
+
+    public int MoveToNative(int /*long*/ newParentDir, int /*long*/ newName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), newParentDir, newName);
+    }
+
+    public int Remove(int recursive) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), recursive);
+    }
+
+    public int GetPermissions(int[] aPermissions) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aPermissions);
+    }
+
+    public int SetPermissions(int aPermissions) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aPermissions);
+    }
+
+    public int GetPermissionsOfLink(int[] aPermissionsOfLink) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aPermissionsOfLink);
+    }
+
+    public int SetPermissionsOfLink(int aPermissionsOfLink) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aPermissionsOfLink);
+    }
+
+    public int GetLastModifiedTime(long[] aLastModifiedTime) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aLastModifiedTime);
+    }
+
+    public int SetLastModifiedTime(long aLastModifiedTime) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aLastModifiedTime);
+    }
+
+    public int GetLastModifiedTimeOfLink(long[] aLastModifiedTimeOfLink) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aLastModifiedTimeOfLink);
+    }
+
+    public int SetLastModifiedTimeOfLink(long aLastModifiedTimeOfLink) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aLastModifiedTimeOfLink);
+    }
+
+    public int GetFileSize(long[] aFileSize) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aFileSize);
+    }
+
+    public int SetFileSize(long aFileSize) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aFileSize);
+    }
+
+    public int GetFileSizeOfLink(long[] aFileSizeOfLink) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aFileSizeOfLink);
+    }
+
+    public int GetTarget(int /*long*/ aTarget) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aTarget);
+    }
+
+    public int GetNativeTarget(int /*long*/ aNativeTarget) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aNativeTarget);
+    }
+
+    public int GetPath(int /*long*/ aPath) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), aPath);
+    }
+
+    public int GetNativePath(int /*long*/ aNativePath) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), aNativePath);
+    }
+
+    public int Exists(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), _retval);
+    }
+
+    public int IsWritable(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), _retval);
+    }
+
+    public int IsReadable(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), _retval);
+    }
+
+    public int IsExecutable(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), _retval);
+    }
+
+    public int IsHidden(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), _retval);
+    }
+
+    public int IsDirectory(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), _retval);
+    }
+
+    public int IsFile(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 37, getAddress(), _retval);
+    }
+
+    public int IsSymlink(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 38, getAddress(), _retval);
+    }
+
+    public int IsSpecial(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 39, getAddress(), _retval);
+    }
+
+    public int CreateUnique(int type, int permissions) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 40, getAddress(), type, permissions);
+    }
+
+    public int Clone(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 41, getAddress(), _retval);
+    }
+
+    public int Equals(int /*long*/ inFile, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 42, getAddress(), inFile, _retval);
+    }
+
+    public int Contains(int /*long*/ inFile, int recur, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 43, getAddress(), inFile, recur, _retval);
+    }
+
+    public int GetParent(int /*long*/[] aParent) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 44, getAddress(), aParent);
+    }
+
+    public int GetDirectoryEntries(int /*long*/[] aDirectoryEntries) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 45, getAddress(), aDirectoryEntries);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIFilePicker.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,120 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIFilePicker;
+
+import dwt.dwthelper.utils;
+
+public class nsIFilePicker extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 15;
+
+    public static final String NS_IFILEPICKER_IID_STR =
+        "c47de916-1dd1-11b2-8141-82507fa02b21";
+
+    public static final nsID NS_IFILEPICKER_IID =
+        new nsID(NS_IFILEPICKER_IID_STR);
+
+    public nsIFilePicker(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int modeOpen = 0;
+    public static final int modeSave = 1;
+    public static final int modeGetFolder = 2;
+    public static final int modeOpenMultiple = 3;
+    public static final int returnOK = 0;
+    public static final int returnCancel = 1;
+    public static final int returnReplace = 2;
+    public static final int filterAll = 1;
+    public static final int filterHTML = 2;
+    public static final int filterText = 4;
+    public static final int filterImages = 8;
+    public static final int filterXML = 16;
+    public static final int filterXUL = 32;
+    public static final int filterApps = 64;
+
+    public int Init(int /*long*/ parent, char[] title, int mode) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, title, mode);
+    }
+
+    public int AppendFilters(int filterMask) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), filterMask);
+    }
+
+    public int AppendFilter(char[] title, char[] filter) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), title, filter);
+    }
+
+    public int GetDefaultString(int /*long*/[] aDefaultString) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aDefaultString);
+    }
+
+    public int SetDefaultString(char[] aDefaultString) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aDefaultString);
+    }
+
+    public int GetDefaultExtension(int /*long*/[] aDefaultExtension) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aDefaultExtension);
+    }
+
+    public int SetDefaultExtension(char[] aDefaultExtension) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aDefaultExtension);
+    }
+
+    public int GetFilterIndex(int[] aFilterIndex) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aFilterIndex);
+    }
+
+    public int SetFilterIndex(int aFilterIndex) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aFilterIndex);
+    }
+
+    public int GetDisplayDirectory(int /*long*/[] aDisplayDirectory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aDisplayDirectory);
+    }
+
+    public int SetDisplayDirectory(int /*long*/ aDisplayDirectory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aDisplayDirectory);
+    }
+
+    public int GetFile(int /*long*/[] aFile) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aFile);
+    }
+
+    public int GetFileURL(int /*long*/[] aFileURL) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aFileURL);
+    }
+
+    public int GetFiles(int /*long*/[] aFiles) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aFiles);
+    }
+
+    public int Show(int /*long*/ _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIFilePicker_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,120 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIFilePicker_1_8;
+
+import dwt.dwthelper.utils;
+
+public class nsIFilePicker_1_8 extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 15;
+
+    public static final String NS_IFILEPICKER_IID_STR =
+        "80faf095-c807-4558-a2cc-185ed70754ea";
+
+    public static final nsID NS_IFILEPICKER_IID =
+        new nsID(NS_IFILEPICKER_IID_STR);
+
+    public nsIFilePicker_1_8(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int modeOpen = 0;
+    public static final int modeSave = 1;
+    public static final int modeGetFolder = 2;
+    public static final int modeOpenMultiple = 3;
+    public static final int returnOK = 0;
+    public static final int returnCancel = 1;
+    public static final int returnReplace = 2;
+    public static final int filterAll = 1;
+    public static final int filterHTML = 2;
+    public static final int filterText = 4;
+    public static final int filterImages = 8;
+    public static final int filterXML = 16;
+    public static final int filterXUL = 32;
+    public static final int filterApps = 64;
+
+    public int Init(int /*long*/ parent, int /*long*/ title, int mode) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, title, mode);
+    }
+
+    public int AppendFilters(int filterMask) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), filterMask);
+    }
+
+    public int AppendFilter(int /*long*/ title, int /*long*/ filter) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), title, filter);
+    }
+
+    public int GetDefaultString(int /*long*/ aDefaultString) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aDefaultString);
+    }
+
+    public int SetDefaultString(int /*long*/ aDefaultString) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aDefaultString);
+    }
+
+    public int GetDefaultExtension(int /*long*/ aDefaultExtension) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aDefaultExtension);
+    }
+
+    public int SetDefaultExtension(int /*long*/ aDefaultExtension) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aDefaultExtension);
+    }
+
+    public int GetFilterIndex(int[] aFilterIndex) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aFilterIndex);
+    }
+
+    public int SetFilterIndex(int aFilterIndex) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aFilterIndex);
+    }
+
+    public int GetDisplayDirectory(int /*long*/[] aDisplayDirectory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aDisplayDirectory);
+    }
+
+    public int SetDisplayDirectory(int /*long*/ aDisplayDirectory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aDisplayDirectory);
+    }
+
+    public int GetFile(int /*long*/[] aFile) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aFile);
+    }
+
+    public int GetFileURL(int /*long*/[] aFileURL) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aFileURL);
+    }
+
+    public int GetFiles(int /*long*/[] aFiles) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aFiles);
+    }
+
+    public int Show(int /*long*/ _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIHelperAppLauncher.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,81 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIHelperAppLauncher;
+
+import dwt.dwthelper.utils;
+
+public class nsIHelperAppLauncher extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 9;
+
+    public static final String NS_IHELPERAPPLAUNCHER_IID_STR =
+        "9503d0fe-4c9d-11d4-98d0-001083010e9b";
+
+    public static final nsID NS_IHELPERAPPLAUNCHER_IID =
+        new nsID(NS_IHELPERAPPLAUNCHER_IID_STR);
+
+    public nsIHelperAppLauncher(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetMIMEInfo(int /*long*/[] aMIMEInfo) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aMIMEInfo);
+    }
+
+    public int GetSource(int /*long*/[] aSource) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aSource);
+    }
+
+    public int GetSuggestedFileName(int /*long*/[] aSuggestedFileName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aSuggestedFileName);
+    }
+
+    public int SaveToDisk(int /*long*/ aNewFileLocation, int aRememberThisPreference) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aNewFileLocation, aRememberThisPreference);
+    }
+
+    public int LaunchWithApplication(int /*long*/ aApplication, int aRememberThisPreference) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aApplication, aRememberThisPreference);
+    }
+
+    public int Cancel() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress());
+    }
+
+    public int SetWebProgressListener(int /*long*/ aWebProgressListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aWebProgressListener);
+    }
+
+    public int CloseProgressWindow() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress());
+    }
+
+    public int GetDownloadInfo(int /*long*/[] aSourceUrl, long[] aTimeDownloadStarted, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aSourceUrl, aTimeDownloadStarted, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIHelperAppLauncherDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2004, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIHelperAppLauncherDialog;
+
+import dwt.dwthelper.utils;
+
+public class nsIHelperAppLauncherDialog extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3;
+
+    public static final String NS_IHELPERAPPLAUNCHERDIALOG_IID_STR =
+        "d7ebddf0-4c84-11d4-807a-00600811a9c3";
+
+    public static final nsID NS_IHELPERAPPLAUNCHERDIALOG_IID =
+        new nsID(NS_IHELPERAPPLAUNCHERDIALOG_IID_STR);
+
+    public nsIHelperAppLauncherDialog(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Show(int /*long*/ aLauncher, int /*long*/ aContext) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aLauncher, aContext);
+    }
+
+    public int PromptForSaveToFile(int /*long*/ aWindowContext, char[] aDefaultFile, char[] aSuggestedFileExtension, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aWindowContext, aDefaultFile, aSuggestedFileExtension, _retval);
+    }
+
+    public int ShowProgressDialog(int /*long*/ aLauncher, int /*long*/ aContext) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aLauncher, aContext);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIHelperAppLauncherDialog_1_9.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIHelperAppLauncherDialog_1_9;
+
+import dwt.dwthelper.utils;
+
+public class nsIHelperAppLauncherDialog_1_9 extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
+
+    public static final String NS_IHELPERAPPLAUNCHERDIALOG_IID_STR =
+        "f3704fdc-8ae6-4eba-a3c3-f02958ac0649";
+
+    public static final nsID NS_IHELPERAPPLAUNCHERDIALOG_IID =
+        new nsID(NS_IHELPERAPPLAUNCHERDIALOG_IID_STR);
+
+    public nsIHelperAppLauncherDialog_1_9(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int REASON_CANTHANDLE = 0;
+
+    public static final int REASON_SERVERREQUEST = 1;
+
+    public static final int REASON_TYPESNIFFED = 2;
+
+    public int Show(int /*long*/ aLauncher, int /*long*/ aWindowContext, int aReason) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aLauncher, aWindowContext, aReason);
+    }
+
+    public int PromptForSaveToFile(int /*long*/ aLauncher, int /*long*/ aWindowContext, char[] aDefaultFileName, char[] aSuggestedFileExtension, int aForcePrompt, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aLauncher, aWindowContext, aDefaultFileName, aSuggestedFileExtension, aForcePrompt, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIHelperAppLauncher_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,81 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIHelperAppLauncher_1_8;
+
+import dwt.dwthelper.utils;
+
+public class nsIHelperAppLauncher_1_8 extends nsICancelable {
+
+    static final int LAST_METHOD_ID = nsICancelable.LAST_METHOD_ID + 9;
+
+    public static final String NS_IHELPERAPPLAUNCHER_IID_STR =
+        "99a0882d-2ff9-4659-9952-9ac531ba5592";
+
+    public static final nsID NS_IHELPERAPPLAUNCHER_IID =
+        new nsID(NS_IHELPERAPPLAUNCHER_IID_STR);
+
+    public nsIHelperAppLauncher_1_8(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetMIMEInfo(int /*long*/[] aMIMEInfo) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 1, getAddress(), aMIMEInfo);
+    }
+
+    public int GetSource(int /*long*/[] aSource) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 2, getAddress(), aSource);
+    }
+
+    public int GetSuggestedFileName(int /*long*/ aSuggestedFileName) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 3, getAddress(), aSuggestedFileName);
+    }
+
+    public int SaveToDisk(int /*long*/ aNewFileLocation, int aRememberThisPreference) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 4, getAddress(), aNewFileLocation, aRememberThisPreference);
+    }
+
+    public int LaunchWithApplication(int /*long*/ aApplication, int aRememberThisPreference) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 5, getAddress(), aApplication, aRememberThisPreference);
+    }
+
+    public int SetWebProgressListener(int /*long*/ aWebProgressListener) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 6, getAddress(), aWebProgressListener);
+    }
+
+    public int CloseProgressWindow() {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 7, getAddress());
+    }
+
+    public int GetTargetFile(int /*long*/[] aTargetFile) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 8, getAddress(), aTargetFile);
+    }
+
+    public int GetTimeDownloadStarted(int /*long*/ aTimeDownloadStarted) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 9, getAddress(), aTimeDownloadStarted);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIHelperAppLauncher_1_9.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,85 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIHelperAppLauncher_1_9;
+
+import dwt.dwthelper.utils;
+
+public class nsIHelperAppLauncher_1_9 extends nsICancelable {
+
+    static final int LAST_METHOD_ID = nsICancelable.LAST_METHOD_ID + 10;
+
+    public static final String NS_IHELPERAPPLAUNCHER_IID_STR =
+        "cc75c21a-0a79-4f68-90e1-563253d0c555";
+
+    public static final nsID NS_IHELPERAPPLAUNCHER_IID =
+        new nsID(NS_IHELPERAPPLAUNCHER_IID_STR);
+
+    public nsIHelperAppLauncher_1_9(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetMIMEInfo(int /*long*/[] aMIMEInfo) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 1, getAddress(), aMIMEInfo);
+    }
+
+    public int GetSource(int /*long*/[] aSource) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 2, getAddress(), aSource);
+    }
+
+    public int GetSuggestedFileName(int /*long*/ aSuggestedFileName) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 3, getAddress(), aSuggestedFileName);
+    }
+
+    public int SaveToDisk(int /*long*/ aNewFileLocation, int aRememberThisPreference) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 4, getAddress(), aNewFileLocation, aRememberThisPreference);
+    }
+
+    public int LaunchWithApplication(int /*long*/ aApplication, int aRememberThisPreference) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 5, getAddress(), aApplication, aRememberThisPreference);
+    }
+
+    public int SetWebProgressListener(int /*long*/ aWebProgressListener) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 6, getAddress(), aWebProgressListener);
+    }
+
+    public int CloseProgressWindow() {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 7, getAddress());
+    }
+
+    public int GetTargetFile(int /*long*/[] aTargetFile) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 8, getAddress(), aTargetFile);
+    }
+
+    public int GetTargetFileIsExecutable(int[] aTargetFileIsExecutable) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 9, getAddress(), aTargetFileIsExecutable);
+    }
+
+    public int GetTimeDownloadStarted(int /*long*/ aTimeDownloadStarted) {
+        return XPCOM.VtblCall(nsICancelable.LAST_METHOD_ID + 10, getAddress(), aTimeDownloadStarted);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIIOService.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,85 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIIOService;
+
+import dwt.dwthelper.utils;
+
+public class nsIIOService extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 10;
+
+    public static final String NS_IIOSERVICE_IID_STR =
+        "bddeda3f-9020-4d12-8c70-984ee9f7935e";
+
+    public static final nsID NS_IIOSERVICE_IID =
+        new nsID(NS_IIOSERVICE_IID_STR);
+
+    public nsIIOService(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetProtocolHandler(byte[] aScheme, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aScheme, _retval);
+    }
+
+    public int GetProtocolFlags(byte[] aScheme, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aScheme, _retval);
+    }
+
+    public int NewURI(int /*long*/ aSpec, byte[] aOriginCharset, int /*long*/ aBaseURI, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aSpec, aOriginCharset, aBaseURI, _retval);
+    }
+
+    public int NewFileURI(int /*long*/ aFile, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aFile, _retval);
+    }
+
+    public int NewChannelFromURI(int /*long*/ aURI, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aURI, _retval);
+    }
+
+    public int NewChannel(int /*long*/ aSpec, byte[] aOriginCharset, int /*long*/ aBaseURI, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aSpec, aOriginCharset, aBaseURI, _retval);
+    }
+
+    public int GetOffline(int[] aOffline) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aOffline);
+    }
+
+    public int SetOffline(int aOffline) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aOffline);
+    }
+
+    public int AllowPort(int aPort, byte[] aScheme, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aPort, aScheme, _retval);
+    }
+
+    public int ExtractScheme(int /*long*/ urlString, int /*long*/ _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), urlString, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIInputStream.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,65 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIInputStream;
+
+import dwt.dwthelper.utils;
+
+public class nsIInputStream extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 5;
+
+    public static final String NS_IINPUTSTREAM_IID_STR =
+        "fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a";
+
+    public static final nsID NS_IINPUTSTREAM_IID =
+        new nsID(NS_IINPUTSTREAM_IID_STR);
+
+    public nsIInputStream(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Close() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress());
+    }
+
+    public int Available(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), _retval);
+    }
+
+    public int Read(byte[] aBuf, int aCount, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aBuf, aCount, _retval);
+    }
+
+    public int ReadSegments(int /*long*/ aWriter, int /*long*/ aClosure, int aCount, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aWriter, aClosure, aCount, _retval);
+    }
+
+    public int IsNonBlocking(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIInterfaceRequestor.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIInterfaceRequestor;
+
+import dwt.dwthelper.utils;
+
+public class nsIInterfaceRequestor extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
+
+    public static final String NS_IINTERFACEREQUESTOR_IID_STR =
+        "033a1470-8b2a-11d3-af88-00a024ffc08c";
+
+    public static final nsID NS_IINTERFACEREQUESTOR_IID =
+        new nsID(NS_IINTERFACEREQUESTOR_IID_STR);
+
+    public nsIInterfaceRequestor(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetInterface(nsID uuid, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uuid, result);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIJSContextStack.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIJSContextStack;
+
+import dwt.dwthelper.utils;
+
+public class nsIJSContextStack extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
+
+    public static final String NS_IJSCONTEXTSTACK_IID_STR =
+        "c67d8270-3189-11d3-9885-006008962422";
+
+    public static final nsID NS_IJSCONTEXTSTACK_IID =
+        new nsID(NS_IJSCONTEXTSTACK_IID_STR);
+
+    public nsIJSContextStack(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetCount(int[] aCount) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aCount);
+    }
+
+    public int Peek(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), _retval);
+    }
+
+    public int Pop(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), _retval);
+    }
+
+    public int Push(int /*long*/ cx) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), cx);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsILocalFile.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,113 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsILocalFile;
+
+import dwt.dwthelper.utils;
+
+public class nsILocalFile extends nsIFile {
+
+    static final int LAST_METHOD_ID = nsIFile.LAST_METHOD_ID + 17;
+
+    public static final String NS_ILOCALFILE_IID_STR =
+        "aa610f20-a889-11d3-8c81-000064657374";
+
+    public static final nsID NS_ILOCALFILE_IID =
+        new nsID(NS_ILOCALFILE_IID_STR);
+
+    public nsILocalFile(int /*long*/ address) {
+        super(address);
+    }
+
+    public int InitWithPath(int /*long*/ filePath) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 1, getAddress(), filePath);
+    }
+
+    public int InitWithNativePath(int /*long*/ filePath) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 2, getAddress(), filePath);
+    }
+
+    public int InitWithFile(int /*long*/ aFile) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 3, getAddress(), aFile);
+    }
+
+    public int GetFollowLinks(int[] aFollowLinks) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 4, getAddress(), aFollowLinks);
+    }
+
+    public int SetFollowLinks(int aFollowLinks) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 5, getAddress(), aFollowLinks);
+    }
+
+    public int OpenNSPRFileDesc(int flags, int mode, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 6, getAddress(), flags, mode, _retval);
+    }
+
+    public int OpenANSIFileDesc(byte[] mode, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 7, getAddress(), mode, _retval);
+    }
+
+    public int Load(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 8, getAddress(), _retval);
+    }
+
+    public int GetDiskSpaceAvailable(long[] aDiskSpaceAvailable) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 9, getAddress(), aDiskSpaceAvailable);
+    }
+
+    public int AppendRelativePath(int /*long*/ relativeFilePath) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 10, getAddress(), relativeFilePath);
+    }
+
+    public int AppendRelativeNativePath(int /*long*/ relativeFilePath) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 11, getAddress(), relativeFilePath);
+    }
+
+    public int GetPersistentDescriptor(int /*long*/ aPersistentDescriptor) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 12, getAddress(), aPersistentDescriptor);
+    }
+
+    public int SetPersistentDescriptor(int /*long*/ aPersistentDescriptor) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 13, getAddress(), aPersistentDescriptor);
+    }
+
+    public int Reveal() {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 14, getAddress());
+    }
+
+    public int Launch() {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 15, getAddress());
+    }
+
+    public int GetRelativeDescriptor(int /*long*/ fromFile, int /*long*/ _retval) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 16, getAddress(), fromFile, _retval);
+    }
+
+    public int SetRelativeDescriptor(int /*long*/ fromFile, int /*long*/ relativeDesc) {
+        return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 17, getAddress(), fromFile, relativeDesc);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIMemory.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,65 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIMemory;
+
+import dwt.dwthelper.utils;
+
+public class nsIMemory extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 5;
+
+    public static final String NS_IMEMORY_IID_STR =
+        "59e7e77a-38e4-11d4-8cf5-0060b0fc14a3";
+
+    public static final nsID NS_IMEMORY_IID =
+        new nsID(NS_IMEMORY_IID_STR);
+
+    public nsIMemory(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Alloc(int size) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), size);
+    }
+
+    public int Realloc(int /*long*/ ptr, int newSize) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), ptr, newSize);
+    }
+
+    public int Free(int /*long*/ ptr) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), ptr);
+    }
+
+    public int HeapMinimize(int immediate) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), immediate);
+    }
+
+    public int IsLowMemory(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIObserverService.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIObserverService;
+
+import dwt.dwthelper.utils;
+
+public class nsIObserverService extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
+
+    public static final String NS_IOBSERVERSERVICE_IID_STR =
+        "d07f5192-e3d1-11d2-8acd-00105a1b8860";
+
+    public static final nsID NS_IOBSERVERSERVICE_IID =
+        new nsID(NS_IOBSERVERSERVICE_IID_STR);
+
+    public nsIObserverService(int /*long*/ address) {
+        super(address);
+    }
+
+    public int AddObserver(int /*long*/ anObserver, byte[] aTopic, int ownsWeak) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), anObserver, aTopic, ownsWeak);
+    }
+
+    public int RemoveObserver(int /*long*/ anObserver, byte[] aTopic) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), anObserver, aTopic);
+    }
+
+    public int NotifyObservers(int /*long*/ aSubject, byte[] aTopic, char[] someData) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aSubject, aTopic, someData);
+    }
+
+    public int EnumerateObservers(byte[] aTopic, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aTopic, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIPrefBranch.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,125 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIPrefBranch;
+
+import dwt.dwthelper.utils;
+
+public class nsIPrefBranch extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 18;
+
+    public static final String NS_IPREFBRANCH_IID_STR =
+        "56c35506-f14b-11d3-99d3-ddbfac2ccf65";
+
+    public static final nsID NS_IPREFBRANCH_IID =
+        new nsID(NS_IPREFBRANCH_IID_STR);
+
+    public nsIPrefBranch(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int PREF_INVALID = 0;
+
+    public static final int PREF_STRING = 32;
+
+    public static final int PREF_INT = 64;
+
+    public static final int PREF_BOOL = 128;
+
+    public int GetRoot(int /*long*/[] aRoot) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aRoot);
+    }
+
+    public int GetPrefType(byte[] aPrefName, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aPrefName, _retval);
+    }
+
+    public int GetBoolPref(byte[] aPrefName, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aPrefName, _retval);
+    }
+
+    public int SetBoolPref(byte[] aPrefName, int aValue) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aPrefName, aValue);
+    }
+
+    public int GetCharPref(byte[] aPrefName, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aPrefName, _retval);
+    }
+
+    public int SetCharPref(byte[] aPrefName, byte[] aValue) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aPrefName, aValue);
+    }
+
+    public int GetIntPref(byte[] aPrefName, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aPrefName, _retval);
+    }
+
+    public int SetIntPref(byte[] aPrefName, int aValue) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aPrefName, aValue);
+    }
+
+    public int GetComplexValue(byte[] aPrefName, nsID aType, int /*long*/[] aValue) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aPrefName, aType, aValue);
+    }
+
+    public int SetComplexValue(byte[] aPrefName, nsID aType, int /*long*/ aValue) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aPrefName, aType, aValue);
+    }
+
+    public int ClearUserPref(byte[] aPrefName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aPrefName);
+    }
+
+    public int LockPref(byte[] aPrefName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aPrefName);
+    }
+
+    public int PrefHasUserValue(byte[] aPrefName, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aPrefName, _retval);
+    }
+
+    public int PrefIsLocked(byte[] aPrefName, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aPrefName, _retval);
+    }
+
+    public int UnlockPref(byte[] aPrefName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aPrefName);
+    }
+
+    public int DeleteBranch(byte[] aStartingAt) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aStartingAt);
+    }
+
+    public int GetChildList(byte[] aStartingAt, int[] aCount, int /*long*/[] aChildArray) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aStartingAt, aCount, aChildArray);
+    }
+
+    public int ResetBranch(byte[] aStartingAt) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aStartingAt);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIPrefLocalizedString.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2006 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIPrefLocalizedString;
+
+import dwt.dwthelper.utils;
+
+public class nsIPrefLocalizedString extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
+
+    public static final String NS_IPREFLOCALIZEDSTRING_IID_STR =
+        "ae419e24-1dd1-11b2-b39a-d3e5e7073802";
+
+    public static final nsID NS_IPREFLOCALIZEDSTRING_IID =
+        new nsID(NS_IPREFLOCALIZEDSTRING_IID_STR);
+
+    public nsIPrefLocalizedString(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetData(int /*long*/[] aData) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aData);
+    }
+
+    public int SetData(char[] aData) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aData);
+    }
+
+    public int ToString(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), _retval);
+    }
+
+    public int SetDataWithLength(int length, char[] data) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), length, data);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIPrefService.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,69 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2006 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIPrefService;
+
+import dwt.dwthelper.utils;
+
+public class nsIPrefService extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 6;
+
+    public static final String NS_IPREFSERVICE_IID_STR =
+        "decb9cc7-c08f-4ea5-be91-a8fc637ce2d2";
+
+    public static final nsID NS_IPREFSERVICE_IID =
+        new nsID(NS_IPREFSERVICE_IID_STR);
+
+    public nsIPrefService(int /*long*/ address) {
+        super(address);
+    }
+
+    public int ReadUserPrefs(int /*long*/ aFile) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aFile);
+    }
+
+    public int ResetPrefs() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress());
+    }
+
+    public int ResetUserPrefs() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
+    }
+
+    public int SavePrefFile(int /*long*/ aFile) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aFile);
+    }
+
+    public int GetBranch(byte[] aPrefRoot, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aPrefRoot, _retval);
+    }
+
+    public int GetDefaultBranch(byte[] aPrefRoot, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aPrefRoot, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIProgressDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,65 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIProgressDialog;
+
+import dwt.dwthelper.utils;
+
+public class nsIProgressDialog extends nsIDownload {
+
+    static final int LAST_METHOD_ID = nsIDownload.LAST_METHOD_ID + 5;
+
+    public static final String NS_IPROGRESSDIALOG_IID_STR =
+        "88a478b3-af65-440a-94dc-ed9b154d2990";
+
+    public static final nsID NS_IPROGRESSDIALOG_IID =
+        new nsID(NS_IPROGRESSDIALOG_IID_STR);
+
+    public nsIProgressDialog(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Open(int /*long*/ aParent) {
+        return XPCOM.VtblCall(nsIDownload.LAST_METHOD_ID + 1, getAddress(), aParent);
+    }
+
+    public int GetCancelDownloadOnClose(int[] aCancelDownloadOnClose) {
+        return XPCOM.VtblCall(nsIDownload.LAST_METHOD_ID + 2, getAddress(), aCancelDownloadOnClose);
+    }
+
+    public int SetCancelDownloadOnClose(int aCancelDownloadOnClose) {
+        return XPCOM.VtblCall(nsIDownload.LAST_METHOD_ID + 3, getAddress(), aCancelDownloadOnClose);
+    }
+
+    public int GetDialog(int /*long*/[] aDialog) {
+        return XPCOM.VtblCall(nsIDownload.LAST_METHOD_ID + 4, getAddress(), aDialog);
+    }
+
+    public int SetDialog(int /*long*/ aDialog) {
+        return XPCOM.VtblCall(nsIDownload.LAST_METHOD_ID + 5, getAddress(), aDialog);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIProgressDialog_1_8.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,73 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIProgressDialog_1_8;
+
+import dwt.dwthelper.utils;
+
+public class nsIProgressDialog_1_8 extends nsIDownload_1_8 {
+
+    static final int LAST_METHOD_ID = nsIDownload_1_8.LAST_METHOD_ID + 7;
+
+    public static final String NS_IPROGRESSDIALOG_IID_STR =
+        "20e790a2-76c6-462d-851a-22ab6cbbe48b";
+
+    public static final nsID NS_IPROGRESSDIALOG_IID =
+        new nsID(NS_IPROGRESSDIALOG_IID_STR);
+
+    public nsIProgressDialog_1_8(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Open(int /*long*/ aParent) {
+        return XPCOM.VtblCall(nsIDownload_1_8.LAST_METHOD_ID + 1, getAddress(), aParent);
+    }
+
+    public int GetCancelDownloadOnClose(int[] aCancelDownloadOnClose) {
+        return XPCOM.VtblCall(nsIDownload_1_8.LAST_METHOD_ID + 2, getAddress(), aCancelDownloadOnClose);
+    }
+
+    public int SetCancelDownloadOnClose(int aCancelDownloadOnClose) {
+        return XPCOM.VtblCall(nsIDownload_1_8.LAST_METHOD_ID + 3, getAddress(), aCancelDownloadOnClose);
+    }
+
+    public int GetObserver(int /*long*/[] aObserver) {
+        return XPCOM.VtblCall(nsIDownload_1_8.LAST_METHOD_ID + 4, getAddress(), aObserver);
+    }
+
+    public int SetObserver(int /*long*/ aObserver) {
+        return XPCOM.VtblCall(nsIDownload_1_8.LAST_METHOD_ID + 5, getAddress(), aObserver);
+    }
+
+    public int GetDialog(int /*long*/[] aDialog) {
+        return XPCOM.VtblCall(nsIDownload_1_8.LAST_METHOD_ID + 6, getAddress(), aDialog);
+    }
+
+    public int SetDialog(int /*long*/ aDialog) {
+        return XPCOM.VtblCall(nsIDownload_1_8.LAST_METHOD_ID + 7, getAddress(), aDialog);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIPromptService.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,115 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIPromptService;
+
+import dwt.dwthelper.utils;
+
+public class nsIPromptService extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 9;
+
+    public static final String NS_IPROMPTSERVICE_IID_STR =
+        "1630c61a-325e-49ca-8759-a31b16c47aa5";
+
+    public static final nsID NS_IPROMPTSERVICE_IID =
+        new nsID(NS_IPROMPTSERVICE_IID_STR);
+
+    public nsIPromptService(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Alert(int /*long*/ aParent, char[] aDialogTitle, char[] aText) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aParent, aDialogTitle, aText);
+    }
+
+    public int AlertCheck(int /*long*/ aParent, char[] aDialogTitle, char[] aText, char[] aCheckMsg, int[] aCheckState) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aParent, aDialogTitle, aText, aCheckMsg, aCheckState);
+    }
+
+    public int Confirm(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aParent, aDialogTitle, aText, _retval);
+    }
+
+    public int ConfirmCheck(int /*long*/ aParent, char[] aDialogTitle, char[] aText, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval);
+    }
+
+    public static final int BUTTON_POS_0 = 1;
+
+    public static final int BUTTON_POS_1 = 256;
+
+    public static final int BUTTON_POS_2 = 65536;
+
+    public static final int BUTTON_TITLE_OK = 1;
+
+    public static final int BUTTON_TITLE_CANCEL = 2;
+
+    public static final int BUTTON_TITLE_YES = 3;
+
+    public static final int BUTTON_TITLE_NO = 4;
+
+    public static final int BUTTON_TITLE_SAVE = 5;
+
+    public static final int BUTTON_TITLE_DONT_SAVE = 6;
+
+    public static final int BUTTON_TITLE_REVERT = 7;
+
+    public static final int BUTTON_TITLE_IS_STRING = 127;
+
+    public static final int BUTTON_POS_0_DEFAULT = 0;
+
+    public static final int BUTTON_POS_1_DEFAULT = 16777216;
+
+    public static final int BUTTON_POS_2_DEFAULT = 33554432;
+
+    public static final int BUTTON_DELAY_ENABLE = 67108864;
+
+    public static final int STD_OK_CANCEL_BUTTONS = 513;
+
+    public static final int STD_YES_NO_BUTTONS = 1027;
+    
+    public int ConfirmEx(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int aButtonFlags, char[] aButton0Title, char[] aButton1Title, char[] aButton2Title, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval);
+    }
+
+    public int Prompt(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int /*long*/[] aValue, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval);
+    }
+
+    public int PromptUsernameAndPassword(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int /*long*/[] aUsername, int /*long*/[] aPassword, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval);
+    }
+
+    public int PromptPassword(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int /*long*/[] aPassword, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval);
+    }
+
+    public int Select(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int aCount, int /*long*/[] aSelectList, int[] aOutSelection, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIPromptService2.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIPromptService2;
+
+import dwt.dwthelper.utils;
+
+public class nsIPromptService2 extends nsIPromptService {
+
+    static final int LAST_METHOD_ID = nsIPromptService.LAST_METHOD_ID + 2;
+
+    public static final String NS_IPROMPTSERVICE2_IID_STR =
+        "cf86d196-dbee-4482-9dfa-3477aa128319";
+
+    public static final nsID NS_IPROMPTSERVICE2_IID =
+        new nsID(NS_IPROMPTSERVICE2_IID_STR);
+
+    public nsIPromptService2(int /*long*/ address) {
+        super(address);
+    }
+
+    public int PromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int level, int /*long*/ authInfo, char[] checkboxLabel, int[] checkValue, int[] _retval) {
+        return XPCOM.VtblCall(nsIPromptService.LAST_METHOD_ID + 1, getAddress(), aParent, aChannel, level, authInfo, checkboxLabel, checkValue, _retval);
+    }
+
+    public int AsyncPromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int /*long*/ aCallback, int /*long*/ aContext, int level, int /*long*/ authInfo, char[] checkboxLabel, int[] checkValue, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsIPromptService.LAST_METHOD_ID + 2, getAddress(), aParent, aChannel, aCallback, aContext, level, authInfo, checkboxLabel, checkValue, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIProperties.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,65 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIProperties;
+
+import dwt.dwthelper.utils;
+
+public class nsIProperties extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 5;
+
+    public static final String NS_IPROPERTIES_IID_STR =
+        "78650582-4e93-4b60-8e85-26ebd3eb14ca";
+
+    public static final nsID NS_IPROPERTIES_IID =
+        new nsID(NS_IPROPERTIES_IID_STR);
+
+    public nsIProperties(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Get(byte[] prop, nsID iid, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), prop, iid, result);
+    }
+
+    public int Set(byte[] prop, int /*long*/ value) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), prop, value);
+    }
+
+    public int Has(byte[] prop, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), prop, _retval);
+    }
+
+    public int Undefine(byte[] prop) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), prop);
+    }
+
+    public int GetKeys(int[] count, int /*long*/[] keys) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), count, keys);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIRequest.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,103 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIRequest;
+
+import dwt.dwthelper.utils;
+
+public class nsIRequest extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 10;
+
+    public static final String NS_IREQUEST_IID_STR =
+        "ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe";
+
+    public static final nsID NS_IREQUEST_IID =
+        new nsID(NS_IREQUEST_IID_STR);
+
+    public nsIRequest(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetName(int /*long*/ aName) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aName);
+    }
+
+    public int IsPending(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), _retval);
+    }
+
+    public int GetStatus(int /*long*/[] aStatus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aStatus);
+    }
+
+    public int Cancel(int aStatus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aStatus);
+    }
+
+    public int Suspend() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress());
+    }
+
+    public int Resume() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress());
+    }
+
+    public int GetLoadGroup(int /*long*/[] aLoadGroup) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aLoadGroup);
+    }
+
+    public int SetLoadGroup(int /*long*/ aLoadGroup) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aLoadGroup);
+    }
+
+    public int GetLoadFlags(int /*long*/[] aLoadFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aLoadFlags);
+    }
+
+    public int SetLoadFlags(int aLoadFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aLoadFlags);
+    }
+
+    public static final int LOAD_NORMAL = 0;
+
+    public static final int LOAD_BACKGROUND = 1;
+
+    public static final int INHIBIT_CACHING = 128;
+
+    public static final int INHIBIT_PERSISTENT_CACHING = 256;
+
+    public static final int LOAD_BYPASS_CACHE = 512;
+
+    public static final int LOAD_FROM_CACHE = 1024;
+
+    public static final int VALIDATE_ALWAYS = 2048;
+
+    public static final int VALIDATE_NEVER = 4096;
+
+    public static final int VALIDATE_ONCE_PER_SESSION = 8192;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIServiceManager.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIServiceManager;
+
+import dwt.dwthelper.utils;
+
+public class nsIServiceManager extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
+
+    public static final String NS_ISERVICEMANAGER_IID_STR =
+        "8bb35ed9-e332-462d-9155-4a002ab5c958";
+
+    public static final nsID NS_ISERVICEMANAGER_IID =
+        new nsID(NS_ISERVICEMANAGER_IID_STR);
+
+    public nsIServiceManager(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetService(nsID aClass, nsID aIID, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aClass, aIID, result);
+    }
+
+    public int GetServiceByContractID(byte[] aContractID, nsID aIID, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aContractID, aIID, result);
+    }
+
+    public int IsServiceInstantiated(nsID aClass, nsID aIID, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aClass, aIID, _retval);
+    }
+
+    public int IsServiceInstantiatedByContractID(byte[] aContractID, nsID aIID, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aContractID, aIID, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsISimpleEnumerator.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsISimpleEnumerator;
+
+import dwt.dwthelper.utils;
+
+public class nsISimpleEnumerator extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
+
+    public static final String NS_ISIMPLEENUMERATOR_IID_STR =
+        "d1899240-f9d2-11d2-bdd6-000064657374";
+
+    public static final nsID NS_ISIMPLEENUMERATOR_IID =
+        new nsID(NS_ISIMPLEENUMERATOR_IID_STR);
+
+    public nsISimpleEnumerator(int /*long*/ address) {
+        super(address);
+    }
+
+    public int HasMoreElements(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), _retval);
+    }
+
+    public int GetNext(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsISupports.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,63 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsISupports;
+
+import dwt.dwthelper.utils;
+
+public class nsISupports {
+
+    static final int LAST_METHOD_ID = 2;
+
+    public static final String NS_ISUPPORTS_IID_STR =
+        "00000000-0000-0000-c000-000000000046";
+
+    public static final nsID NS_ISUPPORTS_IID =
+        new nsID(NS_ISUPPORTS_IID_STR);
+
+    int /*long*/ address;
+
+    public nsISupports(int /*long*/ address) {
+        this.address = address;
+    }
+
+    public int /*long*/ getAddress() {
+        return this.address;
+    }
+
+    public int QueryInterface(nsID uuid, int /*long*/[] result) {
+        return XPCOM.VtblCall(0, getAddress(), uuid, result);
+    }
+
+    public int AddRef() {
+        return XPCOM.VtblCall(1, getAddress());
+    }
+
+    public int Release() {
+        return XPCOM.VtblCall(2, getAddress());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsISupportsWeakReference.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsISupportsWeakReference;
+
+import dwt.dwthelper.utils;
+
+public class nsISupportsWeakReference extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
+
+    public static final String NS_ISUPPORTSWEAKREFERENCE_IID_STR =
+        "9188bc86-f92e-11d2-81ef-0060083a0bcf";
+
+    public static final nsID NS_ISUPPORTSWEAKREFERENCE_IID =
+        new nsID(NS_ISUPPORTSWEAKREFERENCE_IID_STR);
+
+    public nsISupportsWeakReference(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetWeakReference(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsITooltipListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2004, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsITooltipListener;
+
+import dwt.dwthelper.utils;
+
+public class nsITooltipListener extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
+
+    public static final String NS_ITOOLTIPLISTENER_IID_STR =
+        "44b78386-1dd2-11b2-9ad2-e4eee2ca1916";
+
+    public static final nsID NS_ITOOLTIPLISTENER_IID =
+        new nsID(NS_ITOOLTIPLISTENER_IID_STR);
+
+    public nsITooltipListener(int /*long*/ address) {
+        super(address);
+    }
+
+    public int OnShowTooltip(int aXCoords, int aYCoords, char[] aTipText) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aXCoords, aYCoords, aTipText);
+    }
+
+    public int OnHideTooltip() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsITransfer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsITransfer;
+
+import dwt.dwthelper.utils;
+
+public class nsITransfer extends nsIWebProgressListener2 {
+
+    static final int LAST_METHOD_ID = nsIWebProgressListener2.LAST_METHOD_ID + 1;
+
+    public static final String NS_ITRANSFER_IID_STR =
+        "23c51569-e9a1-4a92-adeb-3723db82ef7c";
+
+    public static final nsID NS_ITRANSFER_IID =
+        new nsID(NS_ITRANSFER_IID_STR);
+
+    public nsITransfer(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Init(int /*long*/ aSource, int /*long*/ aTarget, int /*long*/ aDisplayName, int /*long*/ aMIMEInfo, long startTime, int /*long*/ aTempFile, int /*long*/ aCancelable) {
+        return XPCOM.VtblCall(nsIWebProgressListener2.LAST_METHOD_ID + 1, getAddress(), aSource, aTarget, aDisplayName, aMIMEInfo, startTime, aTempFile, aCancelable);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIURI.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,149 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIURI;
+
+import dwt.dwthelper.utils;
+
+public class nsIURI extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 26;
+
+    public static final String NS_IURI_IID_STR =
+        "07a22cc0-0ce5-11d3-9331-00104ba0fd40";
+
+    public static final nsID NS_IURI_IID =
+        new nsID(NS_IURI_IID_STR);
+
+    public nsIURI(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetSpec(int /*long*/ aSpec) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aSpec);
+    }
+
+    public int SetSpec(int /*long*/ aSpec) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aSpec);
+    }
+
+    public int GetPrePath(int /*long*/ aPrePath) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aPrePath);
+    }
+
+    public int GetScheme(int /*long*/ aScheme) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aScheme);
+    }
+
+    public int SetScheme(int /*long*/ aScheme) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aScheme);
+    }
+
+    public int GetUserPass(int /*long*/ aUserPass) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aUserPass);
+    }
+
+    public int SetUserPass(int /*long*/ aUserPass) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aUserPass);
+    }
+
+    public int GetUsername(int /*long*/ aUsername) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aUsername);
+    }
+
+    public int SetUsername(int /*long*/ aUsername) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aUsername);
+    }
+
+    public int GetPassword(int /*long*/ aPassword) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aPassword);
+    }
+
+    public int SetPassword(int /*long*/ aPassword) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aPassword);
+    }
+
+    public int GetHostPort(int /*long*/ aHostPort) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aHostPort);
+    }
+
+    public int SetHostPort(int /*long*/ aHostPort) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aHostPort);
+    }
+
+    public int GetHost(int /*long*/ aHost) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aHost);
+    }
+
+    public int SetHost(int /*long*/ aHost) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aHost);
+    }
+
+    public int GetPort(int[] aPort) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aPort);
+    }
+
+    public int SetPort(int aPort) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aPort);
+    }
+
+    public int GetPath(int /*long*/ aPath) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aPath);
+    }
+
+    public int SetPath(int /*long*/ aPath) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aPath);
+    }
+
+    public int Equals(int /*long*/ other, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), other, _retval);
+    }
+
+    public int SchemeIs(byte[] scheme, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), scheme, _retval);
+    }
+
+    public int Clone(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), _retval);
+    }
+
+    public int Resolve(int /*long*/ relativePath, int /*long*/ _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), relativePath, _retval);
+    }
+
+    public int GetAsciiSpec(int /*long*/ aAsciiSpec) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aAsciiSpec);
+    }
+
+    public int GetAsciiHost(int /*long*/ aAsciiHost) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aAsciiHost);
+    }
+
+    public int GetOriginCharset(int /*long*/ aOriginCharset) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aOriginCharset);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIURIContentListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,77 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIURIContentListener;
+
+import dwt.dwthelper.utils;
+
+public class nsIURIContentListener extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 8;
+
+    public static final String NS_IURICONTENTLISTENER_IID_STR =
+        "94928ab3-8b63-11d3-989d-001083010e9b";
+
+    public static final nsID NS_IURICONTENTLISTENER_IID =
+        new nsID(NS_IURICONTENTLISTENER_IID_STR);
+
+    public nsIURIContentListener(int /*long*/ address) {
+        super(address);
+    }
+
+    public int OnStartURIOpen(int /*long*/ aURI, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aURI, _retval);
+    }
+
+    public int DoContent(byte[] aContentType, int aIsContentPreferred, int /*long*/ aRequest, int /*long*/[] aContentHandler, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aContentType, aIsContentPreferred, aRequest, aContentHandler, _retval);
+    }
+
+    public int IsPreferred(byte[] aContentType, int /*long*/[] aDesiredContentType, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aContentType, aDesiredContentType, _retval);
+    }
+
+    public int CanHandleContent(byte[] aContentType, int aIsContentPreferred, int /*long*/[] aDesiredContentType, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aContentType, aIsContentPreferred, aDesiredContentType, _retval);
+    }
+
+    public int GetLoadCookie(int /*long*/[] aLoadCookie) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aLoadCookie);
+    }
+
+    public int SetLoadCookie(int /*long*/ aLoadCookie) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aLoadCookie);
+    }
+
+    public int GetParentContentListener(int /*long*/[] aParentContentListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aParentContentListener);
+    }
+
+    public int SetParentContentListener(int /*long*/ aParentContentListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aParentContentListener);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWeakReference.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWeakReference;
+
+import dwt.dwthelper.utils;
+
+public class nsIWeakReference extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
+
+    public static final String NS_IWEAKREFERENCE_IID_STR =
+        "9188bc85-f92e-11d2-81ef-0060083a0bcf";
+
+    public static final nsID NS_IWEAKREFERENCE_IID =
+        new nsID(NS_IWEAKREFERENCE_IID_STR);
+
+    public nsIWeakReference(int /*long*/ address) {
+        super(address);
+    }
+
+    public int QueryReferent(nsID uuid, int /*long*/[] result) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uuid, result);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebBrowser.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,73 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebBrowser;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebBrowser extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 7;
+
+    public static final String NS_IWEBBROWSER_IID_STR =
+        "69e5df00-7b8b-11d3-af61-00a024ffc08c";
+
+    public static final nsID NS_IWEBBROWSER_IID =
+        new nsID(NS_IWEBBROWSER_IID_STR);
+
+    public nsIWebBrowser(int /*long*/ address) {
+        super(address);
+    }
+
+    public int AddWebBrowserListener(int /*long*/ aListener, nsID aIID) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aListener, aIID);
+    }
+
+    public int RemoveWebBrowserListener(int /*long*/ aListener, nsID aIID) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aListener, aIID);
+    }
+
+    public int GetContainerWindow(int /*long*/[] aContainerWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aContainerWindow);
+    }
+
+    public int SetContainerWindow(int /*long*/ aContainerWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aContainerWindow);
+    }
+
+    public int GetParentURIContentListener(int /*long*/[] aParentURIContentListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aParentURIContentListener);
+    }
+
+    public int SetParentURIContentListener(int /*long*/ aParentURIContentListener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aParentURIContentListener);
+    }
+
+    public int GetContentDOMWindow(int /*long*/[] aContentDOMWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aContentDOMWindow);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebBrowserChrome.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,139 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebBrowserChrome;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebBrowserChrome extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 10;
+
+    public static final String NS_IWEBBROWSERCHROME_IID_STR =
+        "ba434c60-9d52-11d3-afb0-00a024ffc08c";
+
+    public static final nsID NS_IWEBBROWSERCHROME_IID =
+        new nsID(NS_IWEBBROWSERCHROME_IID_STR);
+
+    public nsIWebBrowserChrome(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int STATUS_SCRIPT = 1;
+
+    public static final int STATUS_SCRIPT_DEFAULT = 2;
+
+    public static final int STATUS_LINK = 3;
+
+    public int SetStatus(int statusType, char[] status) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), statusType, status);
+    }
+
+    public int GetWebBrowser(int /*long*/[] aWebBrowser) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aWebBrowser);
+    }
+
+    public int SetWebBrowser(int /*long*/ aWebBrowser) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aWebBrowser);
+    }
+
+    public static final int CHROME_DEFAULT = 1;
+
+    public static final int CHROME_WINDOW_BORDERS = 2;
+
+    public static final int CHROME_WINDOW_CLOSE = 4;
+
+    public static final int CHROME_WINDOW_RESIZE = 8;
+
+    public static final int CHROME_MENUBAR = 16;
+
+    public static final int CHROME_TOOLBAR = 32;
+
+    public static final int CHROME_LOCATIONBAR = 64;
+
+    public static final int CHROME_STATUSBAR = 128;
+
+    public static final int CHROME_PERSONAL_TOOLBAR = 256;
+
+    public static final int CHROME_SCROLLBARS = 512;
+
+    public static final int CHROME_TITLEBAR = 1024;
+
+    public static final int CHROME_EXTRA = 2048;
+
+    public static final int CHROME_WITH_SIZE = 4096;
+
+    public static final int CHROME_WITH_POSITION = 8192;
+
+    public static final int CHROME_WINDOW_MIN = 16384;
+
+    public static final int CHROME_WINDOW_POPUP = 32768;
+
+    public static final int CHROME_WINDOW_RAISED = 33554432;
+
+    public static final int CHROME_WINDOW_LOWERED = 67108864;
+
+    public static final int CHROME_CENTER_SCREEN = 134217728;
+
+    public static final int CHROME_DEPENDENT = 268435456;
+
+    public static final int CHROME_MODAL = 536870912;
+
+    public static final int CHROME_OPENAS_DIALOG = 1073741824;
+
+    public static final int CHROME_OPENAS_CHROME = -2147483648;
+
+    public static final int CHROME_ALL = 4094;
+
+    public int GetChromeFlags(int[] aChromeFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aChromeFlags);
+    }
+
+    public int SetChromeFlags(int aChromeFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aChromeFlags);
+    }
+
+    public int DestroyBrowserWindow() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress());
+    }
+
+    public int SizeBrowserTo(int aCX, int aCY) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aCX, aCY);
+    }
+
+    public int ShowAsModal() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress());
+    }
+
+    public int IsWindowModal(int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), _retval);
+    }
+
+    public int ExitModalEventLoop(int aStatus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aStatus);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebBrowserChromeFocus.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebBrowserChromeFocus;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebBrowserChromeFocus extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
+
+    public static final String NS_IWEBBROWSERCHROMEFOCUS_IID_STR =
+        "d2206418-1dd1-11b2-8e55-acddcd2bcfb8";
+
+    public static final nsID NS_IWEBBROWSERCHROMEFOCUS_IID =
+        new nsID(NS_IWEBBROWSERCHROMEFOCUS_IID_STR);
+
+    public nsIWebBrowserChromeFocus(int /*long*/ address) {
+        super(address);
+    }
+
+    public int FocusNextElement() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress());
+    }
+
+    public int FocusPrevElement() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebBrowserFocus.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,77 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebBrowserFocus;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebBrowserFocus extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 8;
+
+    public static final String NS_IWEBBROWSERFOCUS_IID_STR =
+        "9c5d3c58-1dd1-11b2-a1c9-f3699284657a";
+
+    public static final nsID NS_IWEBBROWSERFOCUS_IID =
+        new nsID(NS_IWEBBROWSERFOCUS_IID_STR);
+
+    public nsIWebBrowserFocus(int /*long*/ address) {
+        super(address);
+    }
+
+    public int Activate() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress());
+    }
+
+    public int Deactivate() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress());
+    }
+
+    public int SetFocusAtFirstElement() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
+    }
+
+    public int SetFocusAtLastElement() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress());
+    }
+
+    public int GetFocusedWindow(int /*long*/[] aFocusedWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aFocusedWindow);
+    }
+
+    public int SetFocusedWindow(int /*long*/ aFocusedWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aFocusedWindow);
+    }
+
+    public int GetFocusedElement(int /*long*/[] aFocusedElement) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aFocusedElement);
+    }
+
+    public int SetFocusedElement(int /*long*/ aFocusedElement) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aFocusedElement);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebNavigation.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,121 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebNavigation;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebNavigation extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 13;
+
+    public static final String NS_IWEBNAVIGATION_IID_STR =
+        "f5d9e7b0-d930-11d3-b057-00a024ffc08c";
+
+    public static final nsID NS_IWEBNAVIGATION_IID =
+        new nsID(NS_IWEBNAVIGATION_IID_STR);
+
+    public nsIWebNavigation(int /*long*/ address) {
+        super(address);
+    }
+
+    public int GetCanGoBack(int[] aCanGoBack) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aCanGoBack);
+    }
+
+    public int GetCanGoForward(int[] aCanGoForward) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aCanGoForward);
+    }
+
+    public int GoBack() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
+    }
+
+    public int GoForward() {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress());
+    }
+
+    public int GotoIndex(int index) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), index);
+    }
+
+    public static final int LOAD_FLAGS_MASK = 65535;
+
+    public static final int LOAD_FLAGS_NONE = 0;
+
+    public static final int LOAD_FLAGS_IS_REFRESH = 16;
+
+    public static final int LOAD_FLAGS_IS_LINK = 32;
+
+    public static final int LOAD_FLAGS_BYPASS_HISTORY = 64;
+
+    public static final int LOAD_FLAGS_REPLACE_HISTORY = 128;
+
+    public static final int LOAD_FLAGS_BYPASS_CACHE = 256;
+
+    public static final int LOAD_FLAGS_BYPASS_PROXY = 512;
+
+    public static final int LOAD_FLAGS_CHARSET_CHANGE = 1024;
+
+    public int LoadURI(char[] uri, int loadFlags, int /*long*/ referrer, int /*long*/ postData, int /*long*/ headers) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), uri, loadFlags, referrer, postData, headers);
+    }
+
+    public int Reload(int reloadFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), reloadFlags);
+    }
+
+    public static final int STOP_NETWORK = 1;
+
+    public static final int STOP_CONTENT = 2;
+
+    public static final int STOP_ALL = 3;
+
+    public int Stop(int stopFlags) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), stopFlags);
+    }
+
+    public int GetDocument(int /*long*/[] aDocument) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aDocument);
+    }
+
+    public int GetCurrentURI(int /*long*/[] aCurrentURI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aCurrentURI);
+    }
+
+    public int GetReferringURI(int /*long*/[] aReferringURI) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aReferringURI);
+    }
+
+    public int GetSessionHistory(int /*long*/[] aSessionHistory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aSessionHistory);
+    }
+
+    public int SetSessionHistory(int /*long*/ aSessionHistory) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aSessionHistory);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebNavigationInfo.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebNavigationInfo;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebNavigationInfo extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
+
+    public static final String NS_IWEBNAVIGATIONINFO_IID_STR =
+        "62a93afb-93a1-465c-84c8-0432264229de";
+
+    public static final nsID NS_IWEBNAVIGATIONINFO_IID =
+        new nsID(NS_IWEBNAVIGATIONINFO_IID_STR);
+
+    public nsIWebNavigationInfo(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int UNSUPPORTED = 0;
+
+    public static final int IMAGE = 1;
+
+    public static final int PLUGIN = 2;
+
+    public static final int OTHER = 32768;
+
+    public int IsTypeSupported(int /*long*/ aType, int /*long*/ aWebNav, int[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aType, aWebNav, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebProgress.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,81 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebProgress;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebProgress extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
+
+    public static final String NS_IWEBPROGRESS_IID_STR =
+        "570f39d0-efd0-11d3-b093-00a024ffc08c";
+
+    public static final nsID NS_IWEBPROGRESS_IID =
+        new nsID(NS_IWEBPROGRESS_IID_STR);
+
+    public nsIWebProgress(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int NOTIFY_STATE_REQUEST = 1;
+
+    public static final int NOTIFY_STATE_DOCUMENT = 2;
+
+    public static final int NOTIFY_STATE_NETWORK = 4;
+
+    public static final int NOTIFY_STATE_WINDOW = 8;
+
+    public static final int NOTIFY_STATE_ALL = 15;
+
+    public static final int NOTIFY_PROGRESS = 16;
+
+    public static final int NOTIFY_STATUS = 32;
+
+    public static final int NOTIFY_SECURITY = 64;
+
+    public static final int NOTIFY_LOCATION = 128;
+
+    public static final int NOTIFY_ALL = 255;
+
+    public int AddProgressListener(int /*long*/ listener, int aNotifyMask) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), listener, aNotifyMask);
+    }
+
+    public int RemoveProgressListener(int /*long*/ listener) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), listener);
+    }
+
+    public int GetDOMWindow(int /*long*/[] aDOMWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aDOMWindow);
+    }
+
+    public int GetIsLoadingDocument(int[] aIsLoadingDocument) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aIsLoadingDocument);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebProgressListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,95 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebProgressListener;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebProgressListener extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 5;
+
+    public static final String NS_IWEBPROGRESSLISTENER_IID_STR =
+        "570f39d1-efd0-11d3-b093-00a024ffc08c";
+
+    public static final nsID NS_IWEBPROGRESSLISTENER_IID =
+        new nsID(NS_IWEBPROGRESSLISTENER_IID_STR);
+
+    public nsIWebProgressListener(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int STATE_START = 1;
+
+    public static final int STATE_REDIRECTING = 2;
+
+    public static final int STATE_TRANSFERRING = 4;
+
+    public static final int STATE_NEGOTIATING = 8;
+
+    public static final int STATE_STOP = 16;
+
+    public static final int STATE_IS_REQUEST = 65536;
+
+    public static final int STATE_IS_DOCUMENT = 131072;
+
+    public static final int STATE_IS_NETWORK = 262144;
+
+    public static final int STATE_IS_WINDOW = 524288;
+
+    public static final int STATE_IS_INSECURE = 4;
+
+    public static final int STATE_IS_BROKEN = 1;
+
+    public static final int STATE_IS_SECURE = 2;
+
+    public static final int STATE_SECURE_HIGH = 262144;
+
+    public static final int STATE_SECURE_MED = 65536;
+
+    public static final int STATE_SECURE_LOW = 131072;
+
+    public int OnStateChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateFlags, int aStatus) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aWebProgress, aRequest, aStateFlags, aStatus);
+    }
+
+    public int OnProgressChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int aCurSelfProgress, int aMaxSelfProgress, int aCurTotalProgress, int aMaxTotalProgress) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress);
+    }
+
+    public int OnLocationChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int /*long*/ location) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aWebProgress, aRequest, location);
+    }
+
+    public int OnStatusChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int aStatus, char[] aMessage) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aWebProgress, aRequest, aStatus, aMessage);
+    }
+
+    public int OnSecurityChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int state) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aWebProgress, aRequest, state);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWebProgressListener2.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWebProgressListener2;
+
+import dwt.dwthelper.utils;
+
+public class nsIWebProgressListener2 extends nsIWebProgressListener {
+
+    static final int LAST_METHOD_ID = nsIWebProgressListener.LAST_METHOD_ID + 1;
+
+    public static final String NS_IWEBPROGRESSLISTENER2_IID_STR =
+        "3f24610d-1e1f-4151-9d2e-239884742324";
+
+    public static final nsID NS_IWEBPROGRESSLISTENER2_IID =
+        new nsID(NS_IWEBPROGRESSLISTENER2_IID_STR);
+
+    public nsIWebProgressListener2(int /*long*/ address) {
+        super(address);
+    }
+
+    public int OnProgressChange64(int /*long*/ aWebProgress, int /*long*/ aRequest, long aCurSelfProgress, long aMaxSelfProgress, long aCurTotalProgress, long aMaxTotalProgress) {
+        return XPCOM.VtblCall(nsIWebProgressListener.LAST_METHOD_ID + 1, getAddress(), aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWindowCreator.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWindowCreator;
+
+import dwt.dwthelper.utils;
+
+public class nsIWindowCreator extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
+
+    public static final String NS_IWINDOWCREATOR_IID_STR =
+        "30465632-a777-44cc-90f9-8145475ef999";
+
+    public static final nsID NS_IWINDOWCREATOR_IID =
+        new nsID(NS_IWINDOWCREATOR_IID_STR);
+
+    public nsIWindowCreator(int /*long*/ address) {
+        super(address);
+    }
+
+    public int CreateChromeWindow(int /*long*/ parent, int chromeFlags, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, chromeFlags, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWindowCreator2.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,51 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWindowCreator2;
+
+import dwt.dwthelper.utils;
+
+public class nsIWindowCreator2 extends nsIWindowCreator {
+
+    static final int LAST_METHOD_ID = nsIWindowCreator.LAST_METHOD_ID + 1;
+
+    public static final String NS_IWINDOWCREATOR2_IID_STR =
+        "f673ec81-a4b0-11d6-964b-eb5a2bf216fc";
+
+    public static final nsID NS_IWINDOWCREATOR2_IID =
+        new nsID(NS_IWINDOWCREATOR2_IID_STR);
+
+    public nsIWindowCreator2(int /*long*/ address) {
+        super(address);
+    }
+
+    public static final int PARENT_IS_LOADING_OR_RUNNING_TIMEOUT = 1;
+
+    public int CreateChromeWindow2(int /*long*/ parent, int chromeFlags, int contextFlags, int /*long*/ uri, int[] cancel, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsIWindowCreator.LAST_METHOD_ID + 1, getAddress(), parent, chromeFlags, contextFlags, uri, cancel, _retval);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/mozilla/nsIWindowWatcher.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,89 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and DWT
+ * -  Copyright (C) 2003, 2005 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+module dwt.internal.mozilla.nsIWindowWatcher;
+
+import dwt.dwthelper.utils;
+
+public class nsIWindowWatcher extends nsISupports {
+
+    static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 11;
+
+    public static final String NS_IWINDOWWATCHER_IID_STR =
+        "002286a8-494b-43b3-8ddd-49e3fc50622b";
+
+    public static final nsID NS_IWINDOWWATCHER_IID =
+        new nsID(NS_IWINDOWWATCHER_IID_STR);
+
+    public nsIWindowWatcher(int /*long*/ address) {
+        super(address);
+    }
+
+    public int OpenWindow(int /*long*/ aParent, byte[] aUrl, byte[] aName, byte[] aFeatures, int /*long*/ aArguments, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aParent, aUrl, aName, aFeatures, aArguments, _retval);
+    }
+
+    public int RegisterNotification(int /*long*/ aObserver) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aObserver);
+    }
+
+    public int UnregisterNotification(int /*long*/ aObserver) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aObserver);
+    }
+
+    public int GetWindowEnumerator(int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), _retval);
+    }
+
+    public int GetNewPrompter(int /*long*/ aParent, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aParent, _retval);
+    }
+
+    public int GetNewAuthPrompter(int /*long*/ aParent, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aParent, _retval);
+    }
+
+    public int SetWindowCreator(int /*long*/ creator) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), creator);
+    }
+
+    public int GetChromeForWindow(int /*long*/ aWindow, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aWindow, _retval);
+    }
+
+    public int GetWindowByName(char[] aTargetName, int /*long*/ aCurrentWindow, int /*long*/[] _retval) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aTargetName, aCurrentWindow, _retval);
+    }
+
+    public int GetActiveWindow(int /*long*/[] aActiveWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aActiveWindow);
+    }
+
+    public int SetActiveWindow(int /*long*/ aActiveWindow) {
+        return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aActiveWindow);
+    }
+}
--- a/dwt/internal/objc/appkit/AppKit.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.appkit.AppKit;
-
-public:
-    
-import dwt.internal.objc.appkit.NSAccessibility;
-import dwt.internal.objc.appkit.NSAttributedString;
-import dwt.internal.objc.appkit.NSGraphics;
--- a/dwt/internal/objc/appkit/NSAccessibility.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.appkit.NSAccessibility;
-
-import bindings = dwt.internal.objc.appkit.bindings;
-import dwt.internal.objc.runtime;
-
-
-id NSAccessibilityPositionAttribute ()
-{
-    return bindings.DCB_NSAccessibilityPositionAttribute;
-}
-
-id NSAccessibilitySizeAttribute ()
-{
-    return bindings.DCB_NSAccessibilitySizeAttribute;
-}
\ No newline at end of file
--- a/dwt/internal/objc/appkit/NSAttributedString.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.appkit.NSAttributedString;
-
-import dwt.internal.cocoa.NSString;
-import bindings = dwt.internal.objc.appkit.bindings;
-import dwt.internal.objc.runtime;
-
-id NSBackgroundColorAttributeName ()
-{
-    return bindings.DCB_NSBackgroundColorAttributeName;
-}
-
-NSString NSBaselineOffsetAttributeName ()
-{
-    return new NSString(bindings.DCB_NSBaselineOffsetAttributeName);
-}
-
-NSString NSFontAttributeName ()
-{
-    return new NSString(bindings.DCB_NSFontAttributeName);
-}
-
-NSString NSForegroundColorAttributeName ()
-{
-    return new NSString(bindings.DCB_NSForegroundColorAttributeName);
-}
-
-NSString NSLinkAttributeName ()
-{
-    return new NSString(bindings.DCB_NSLinkAttributeName);
-}
-
-NSString NSParagraphStyleAttributeName ()
-{
-    return new NSString(bindings.DCB_NSParagraphStyleAttributeName);
-}
-
-NSString NSStrikethroughColorAttributeName ()
-{
-    return new NSString(bindings.DCB_NSStrikethroughColorAttributeName);
-}
-
-NSString NSStrikethroughStyleAttributeName ()
-{
-    return new NSString(bindings.DCB_NSStrikethroughStyleAttributeName);
-}
-
-NSString NSUnderlineColorAttributeName ()
-{
-    return new NSString(bindings.DCB_NSUnderlineColorAttributeName);
-}
-
-NSString NSUnderlineStyleAttributeName ()
-{
-    return new NSString(bindings.DCB_NSUnderlineStyleAttributeName);
-}
\ No newline at end of file
--- a/dwt/internal/objc/appkit/NSGraphics.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.appkit.NSGraphics;
-
-import dwt.internal.cocoa.NSString;
-import bindings = dwt.internal.objc.appkit.bindings : NSBitsPerPixelFromDepth, DCB_NSDeviceResolution, DCB_NSDeviceRGBColorSpace;
-import dwt.internal.objc.runtime;
-
-alias bindings.NSBitsPerPixelFromDepth NSBitsPerPixelFromDepth;
-
-NSString NSDeviceRGBColorSpace ()
-{
-    return new NSString(bindings.DCB_NSDeviceRGBColorSpace());
-}
-
-id NSDeviceResolution ()
-{
-    return bindings.DCB_NSDeviceResolution;
-}
\ No newline at end of file
--- a/dwt/internal/objc/appkit/bindings.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.appkit.bindings;
-
-import dwt.internal.objc.runtime;
-
-extern (C):
-    
-id DCB_NSDeviceRGBColorSpace();
-id DCB_NSAccessibilityPositionAttribute ();
-id DCB_NSAccessibilitySizeAttribute ();
-id DCB_NSBackgroundColorAttributeName ();
-id DCB_NSBaselineOffsetAttributeName ();
-id DCB_NSDeviceResolution ();
-id DCB_NSFontAttributeName ();
-id DCB_NSForegroundColorAttributeName ();
-id DCB_NSLinkAttributeName ();
-id DCB_NSParagraphStyleAttributeName ();
-id DCB_NSStrikethroughColorAttributeName ();
-id DCB_NSStrikethroughStyleAttributeName ();
-id DCB_NSUnderlineColorAttributeName ();
-id DCB_NSUnderlineStyleAttributeName ();
-int NSBitsPerPixelFromDepth (int depth);
-
-version (build)
-{
-    pragma(link, "objc");
-    pragma(link, "dwt-cocoa-bindings");
-}
\ No newline at end of file
--- a/dwt/internal/objc/bindings.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/objc/bindings.d	Mon Dec 01 17:07:00 2008 +0100
@@ -7,18 +7,24 @@
  */
 module dwt.internal.objc.bindings;
 
-import dwt.internal.c.qd.QuickdrawTypes : BOOL;
+import dwt.internal.c.Carbon;
 import dwt.internal.objc.runtime;
 
 extern (C):
 
 BOOL class_addIvar (Class cls, /*const*/char* name, size_t size, byte alignment, /*const*/char* types);
 BOOL class_addMethod (Class cls, SEL name, IMP imp, /*const*/char* types);
+BOOL class_addProtocol(Class cls, Protocol* protocol);
+IMP class_getMethodImplementation(Class cls, SEL name);
+/*const*/ char* class_getName(Class cls);
 Class objc_allocateClassPair (Class superclass, /*const*/char* name, size_t extraBytes);
 id objc_getClass (/*const*/char* name);
+Protocol* objc_getProtocol(/*const*/ char* name);
 id objc_lookUpClass (/*const*/char* name);
 void objc_registerClassPair (Class cls);
+Class object_getClass (id object);
 /*const*/char* object_getClassName (id obj);
+Class object_setClass (id object, Class cls);
 Ivar object_getInstanceVariable (id obj, /*const*/char* name, void** outValue);
 Ivar object_setInstanceVariable (id obj, /*const*/char* name, void* value);
 SEL sel_registerName (/*const*/char* str);
@@ -26,8 +32,7 @@
 void objc_msgSend_stret(void* stretAddr, id theReceiver, SEL theSelector, ...);
 id objc_msgSendSuper (objc_super* superr, SEL op, ...);
 
+void instrumentObjcMessageSends(bool val);
+
 version (X86)
     double objc_msgSend_fpret(id self, SEL op, ...);
-
-version (build)
-    pragma(link, "objc");
--- a/dwt/internal/objc/cocoa/Cocoa.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/objc/cocoa/Cocoa.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,13 +1,285 @@
 /**
  * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
  * Authors: Jacob Carlborg
- * Version: Initial created: 2008
+ * Version: Initial created: Nov 18, 2008
  * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
  * 
  */
 module dwt.internal.objc.cocoa.Cocoa;
 
-public:
+import tango.stdc.config;
+import bindings = dwt.internal.objc.cocoa.bindings;
+import dwt.internal.objc.runtime;
+
+extern (C):
 
-import dwt.internal.objc.foundation.Foundation;
-import dwt.internal.objc.appkit.AppKit;
\ No newline at end of file
+// *.h
+extern
+{
+    id NSAccessibilityButtonRole;
+    id NSAccessibilityCheckBoxRole;
+    id NSAccessibilityChildrenAttribute;
+    id NSAccessibilityColumnRole;
+    id NSAccessibilityComboBoxRole;
+    id NSAccessibilityConfirmAction;
+    id NSAccessibilityContentsAttribute;
+    id NSAccessibilityDescriptionAttribute;
+    id NSAccessibilityDialogSubrole;
+    id NSAccessibilityEnabledAttribute;
+    id NSAccessibilityExpandedAttribute;
+    id NSAccessibilityFloatingWindowSubrole;
+    id NSAccessibilityFocusedAttribute;
+    id NSAccessibilityFocusedUIElementChangedNotification;
+    id NSAccessibilityGridRole;
+    id NSAccessibilityGroupRole;
+    id NSAccessibilityHelpAttribute;
+    id NSAccessibilityHelpTagRole;
+    id NSAccessibilityHorizontalOrientationValue;
+    id NSAccessibilityHorizontalScrollBarAttribute;
+    id NSAccessibilityImageRole;
+    id NSAccessibilityIncrementorRole;
+    id NSAccessibilityInsertionPointLineNumberAttribute;
+    id NSAccessibilityLabelValueAttribute;
+    id NSAccessibilityLineForIndexParameterizedAttribute;
+    id NSAccessibilityLinkRole;
+    id NSAccessibilityLinkTextAttribute;
+    id NSAccessibilityListRole;
+    id NSAccessibilityMaxValueAttribute;
+    id NSAccessibilityMenuBarRole;
+    id NSAccessibilityMenuButtonRole;
+    id NSAccessibilityMenuItemRole;
+    id NSAccessibilityMenuRole;
+    id NSAccessibilityMinValueAttribute;
+    id NSAccessibilityNextContentsAttribute;
+    id NSAccessibilityNumberOfCharactersAttribute;
+    id NSAccessibilityOrientationAttribute;
+    id NSAccessibilityOutlineRole;
+    id NSAccessibilityOutlineRowSubrole;
+    id NSAccessibilityParentAttribute;
+    id NSAccessibilityPopUpButtonRole;
+    id NSAccessibilityPositionAttribute;
+    id NSAccessibilityPressAction;
+    id NSAccessibilityPreviousContentsAttribute;
+    id NSAccessibilityProgressIndicatorRole;
+    id NSAccessibilityRTFForRangeParameterizedAttribute;
+    id NSAccessibilityRadioButtonRole;
+    id NSAccessibilityRadioGroupRole;
+    id NSAccessibilityRangeForIndexParameterizedAttribute;
+    id NSAccessibilityRangeForLineParameterizedAttribute;
+    id NSAccessibilityRangeForPositionParameterizedAttribute;
+    id NSAccessibilityRoleAttribute;
+    id NSAccessibilityRoleDescriptionAttribute;
+    id NSAccessibilityRowRole;
+    id NSAccessibilityScrollAreaRole;
+    id NSAccessibilityScrollBarRole;
+    id NSAccessibilitySelectedAttribute;
+    id NSAccessibilitySelectedChildrenAttribute;
+    id NSAccessibilitySelectedChildrenChangedNotification;
+    id NSAccessibilitySelectedTextAttribute;
+    id NSAccessibilitySelectedTextChangedNotification;
+    id NSAccessibilitySelectedTextRangeAttribute;
+    id NSAccessibilitySelectedTextRangesAttribute;
+    id NSAccessibilitySizeAttribute;
+    id NSAccessibilitySliderRole;
+    id NSAccessibilitySortButtonRole;
+    id NSAccessibilitySplitterRole;
+    id NSAccessibilityStandardWindowSubrole;
+    id NSAccessibilityStaticTextRole;
+    id NSAccessibilityStringForRangeParameterizedAttribute;
+    id NSAccessibilityStyleRangeForIndexParameterizedAttribute;
+    id NSAccessibilitySubroleAttribute;
+    id NSAccessibilitySystemDialogSubrole;
+    id NSAccessibilityTabGroupRole;
+    id NSAccessibilityTableRole;
+    id NSAccessibilityTableRowSubrole;
+    id NSAccessibilityTabsAttribute;
+    id NSAccessibilityTextAreaRole;
+    id NSAccessibilityTextFieldRole;
+    id NSAccessibilityTextLinkSubrole;
+    id NSAccessibilityTitleAttribute;
+    id NSAccessibilityTitleUIElementAttribute;
+    id NSAccessibilityToolbarRole;
+    id NSAccessibilityTopLevelUIElementAttribute;
+    id NSAccessibilityUnknownRole;
+    id NSAccessibilityUnknownSubrole;
+    id NSAccessibilityValueAttribute;
+    id NSAccessibilityValueChangedNotification;
+    id NSAccessibilityValueDescriptionAttribute;
+    id NSAccessibilityValueIndicatorRole;
+    id NSAccessibilityVerticalOrientationValue;
+    id NSAccessibilityVerticalScrollBarAttribute;
+    id NSAccessibilityVisibleCharacterRangeAttribute;
+    id NSAccessibilityVisibleChildrenAttribute;
+    id NSAccessibilityWindowAttribute;
+    id NSAccessibilityWindowRole;
+    id NSBackgroundColorAttributeName;
+    id NSBaselineOffsetAttributeName;
+    id NSCalibratedRGBColorSpace;
+    id NSDeviceRGBColorSpace;
+    id NSDeviceResolution;
+    id NSDragPboard;
+    id NSFilenamesPboardType;
+    id NSFontAttributeName;
+    id NSForegroundColorAttributeName;
+    id NSHTMLPboardType;
+    id NSLinkAttributeName;
+    id NSParagraphStyleAttributeName;
+    id NSPrintAllPages;
+    id NSPrintCopies;
+    id NSPrintFirstPage;
+    id NSPrintJobDisposition;
+    id NSPrintLastPage;
+    id NSPrintMustCollate;
+    id NSPrintPreviewJob;
+    id NSPrintSaveJob;
+    id NSPrintSavePath;
+    id NSPrintSpoolJob;
+    id NSRTFPboardType;
+    id NSStrikethroughColorAttributeName;
+    id NSStrikethroughStyleAttributeName;
+    id NSStringPboardType;
+    id NSTIFFPboardType;
+    id NSURLPboardType;
+    id NSUnderlineColorAttributeName;
+    id NSUnderlineStyleAttributeName;
+    id NSDefaultRunLoopMode;
+    id NSErrorFailingURLStringKey;
+}
+
+
+
+//NSAccessibility.h
+alias bindings.NSAccessibilityActionDescription NSAccessibilityActionDescription;
+alias bindings.NSAccessibilityPostNotification NSAccessibilityPostNotification;
+alias bindings.NSAccessibilityRaiseBadArgumentException NSAccessibilityRaiseBadArgumentException;
+alias bindings.NSAccessibilityRoleDescription NSAccessibilityRoleDescription;
+alias bindings.NSAccessibilityRoleDescriptionForUIElement NSAccessibilityRoleDescriptionForUIElement;
+alias bindings.NSAccessibilityUnignoredAncestor NSAccessibilityUnignoredAncestor;
+alias bindings.NSAccessibilityUnignoredChildren NSAccessibilityUnignoredChildren;
+alias bindings.NSAccessibilityUnignoredChildrenForOnlyChild NSAccessibilityUnignoredChildrenForOnlyChild;
+alias bindings.NSAccessibilityUnignoredDescendant NSAccessibilityUnignoredDescendant;
+
+
+
+// NSDragging.h
+enum NSDragOperation : uint
+{
+    NSDragOperationNone = 0,
+    NSDragOperationCopy = 1,
+    NSDragOperationLink = 2,
+    NSDragOperationGeneric = 4,
+    NSDragOperationPrivate = 8,
+    NSDragOperationAll_Obsolete = 15,
+    NSDragOperationMove = 16,
+    NSDragOperationDelete = 32,
+    NSDragOperationEvery = uint.max // UINT_MAX
+}
+
+
+
+// NSGraphics.h
+alias int NSWindowDepth;
+
+alias bindings.NSBeep NSBeep;
+alias bindings.NSBitsPerPixelFromDepth NSBitsPerPixelFromDepth;
+
+enum NSCompositingOperation
+{
+    NSCompositeClear = 0,
+    NSCompositeCopy = 1,
+    NSCompositeSourceOver = 2,
+    NSCompositeSourceIn = 3,
+    NSCompositeSourceOut = 4,
+    NSCompositeSourceAtop = 5,
+    NSCompositeDestinationOver = 6,
+    NSCompositeDestinationIn = 7,
+    NSCompositeDestinationOut = 8,
+    NSCompositeDestinationAtop = 9,
+    NSCompositeXOR = 10,
+    NSCompositePlusDarker = 11,
+    NSCompositeHighlight = 12,
+    NSCompositePlusLighter = 13
+}
+
+enum NSWindowOrderingMode
+{
+    NSWindowAbove = 1,
+    NSWindowBelow = -1,
+    NSWindowOut = 0
+}
+
+enum NSFocusRingType
+{
+    NSFocusRingTypeDefault = 0,
+    NSFocusRingTypeNone = 1,
+    NSFocusRingTypeExterior = 2
+}
+
+enum NSBackingStoreType
+{
+    NSBackingStoreRetained     = 0,
+    NSBackingStoreNonretained  = 1,
+    NSBackingStoreBuffered     = 2
+}
+
+
+
+//NSGeometry.h
+alias bindings.NSIntersectionRect NSIntersectionRect;
+
+
+
+// NSHFSFileTypes.h
+alias bindings.NSFileTypeForHFSTypeCode NSFileTypeForHFSTypeCode;
+
+
+
+//IKPictureTaker.h
+alias c_long NSInteger;
+alias c_ulong NSUInteger;
+
+
+
+// NSObjCRuntime.h
+alias bindings.NSGetSizeAndAlignment NSGetSizeAndAlignment;
+
+
+
+// NSPathUtilities.h
+enum NSSearchPathDirectory
+{
+    NSApplicationDirectory = 1,
+    NSDemoApplicationDirectory,
+    NSDeveloperApplicationDirectory,
+    NSAdminApplicationDirectory,
+    NSLibraryDirectory,
+    NSDeveloperDirectory,
+    NSUserDirectory,
+    NSDocumentationDirectory,
+    NSDocumentDirectory,
+    NSCoreServiceDirectory,
+    NSDesktopDirectory = 12,
+    NSCachesDirectory = 13,
+    NSApplicationSupportDirectory = 14,
+    NSDownloadsDirectory = 15,
+    NSAllApplicationsDirectory = 100,
+    NSAllLibrariesDirectory = 101
+}
+
+enum NSSearchPathDomainMask
+{
+    NSUserDomainMask = 1,
+    NSLocalDomainMask = 2,
+    NSNetworkDomainMask = 4,
+    NSSystemDomainMask = 8,
+    NSAllDomainsMask = 0x0ffff,
+} 
+ 
+alias bindings.NSSearchPathForDirectoriesInDomains NSSearchPathForDirectoriesInDomains;
+alias bindings.NSTemporaryDirectory NSTemporaryDirectory;
+
+
+
+// NSZone.h
+alias void* _NSZone;
+alias _NSZone NSZone;
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/objc/cocoa/bindings.d	Mon Dec 01 17:07:00 2008 +0100
@@ -0,0 +1,52 @@
+/**
+ * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Nov 18, 2008
+ * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
+ * 
+ */
+module dwt.internal.objc.cocoa.bindings;
+
+import dwt.internal.c.Carbon;
+import dwt.internal.cocoa.NSInteger;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.objc.cocoa.Cocoa;
+import dwt.internal.objc.runtime;
+
+extern (C):
+
+//NSAccessibility.h
+id NSAccessibilityActionDescription (id action);
+void NSAccessibilityPostNotification (id element, id notification);
+void NSAccessibilityRaiseBadArgumentException (id element, id attribute, id value);
+id NSAccessibilityRoleDescription (id role, id subrole);
+id NSAccessibilityRoleDescriptionForUIElement (id element);
+id NSAccessibilityUnignoredAncestor (id element);
+id NSAccessibilityUnignoredChildren (id originalChildren);
+id NSAccessibilityUnignoredChildrenForOnlyChild (id originalChild);
+id NSAccessibilityUnignoredDescendant (id element);
+
+//NSGraphics.h
+void NSBeep ();
+NSInteger NSBitsPerPixelFromDepth (NSWindowDepth depth);
+
+
+
+// NSGeometry.h
+NSRect NSIntersectionRect (NSRect aRect, NSRect bRect);
+
+
+
+// NSHFSFileTypes.h
+id NSFileTypeForHFSTypeCode (OSType hfsFileTypeCode);
+
+
+
+// NSObjCRuntime.h
+/*const*/ char * NSGetSizeAndAlignment (/*const*/ char* typePtr, NSUInteger* sizep, NSUInteger* alignp);
+
+
+
+// NSPathUtilities.h 
+id NSSearchPathForDirectoriesInDomains (NSSearchPathDirectory directory,NSSearchPathDomainMask domainMask,BOOL expandTilde);
+id NSTemporaryDirectory ();
\ No newline at end of file
--- a/dwt/internal/objc/coregraphics/CGRemoteOperation.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 24, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.coregraphics.CGRemoteOperation;
-
-import bindings = dwt.internal.objc.coregraphics.bindings;
-
-alias int CGError;
-
-alias bindings.CGWarpMouseCursorPosition CGWarpMouseCursorPosition;
\ No newline at end of file
--- a/dwt/internal/objc/coregraphics/bindings.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 24, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.coregraphics.bindings;
-
-import dwt.internal.cocoa.CGPoint;
-import dwt.internal.objc.coregraphics.CGRemoteOperation;
-
-extern (C):
-    
-CGError CGWarpMouseCursorPosition (CGPoint newCursorPosition);
\ No newline at end of file
--- a/dwt/internal/objc/foundation/Foundation.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.foundation.Foundation;
-
-public:
-    
-import dwt.internal.objc.foundation.NSHFSFileTypes;
-import dwt.internal.objc.foundation.NSRunLoop;
--- a/dwt/internal/objc/foundation/NSGeometry.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: Aug 24, 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.foundation.NSGeometry;
-
-import bindings = dwt.internal.objc.foundation.bindings;
-
-alias bindings.NSIntersectionRect NSIntersectionRect;
\ No newline at end of file
--- a/dwt/internal/objc/foundation/NSHFSFileTypes.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.foundation.NSHFSFileTypes;
-
-import dwt.internal.cocoa.NSString;
-import bindings = dwt.internal.objc.foundation.bindings;
-
-NSString NSFileTypeForHFSTypeCode (uint hfsFileTypeCode)
-{
-    return new NSString(bindings.NSFileTypeForHFSTypeCode(hfsFileTypeCode));
-}
\ No newline at end of file
--- a/dwt/internal/objc/foundation/NSRunLoop.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.foundation.NSRunLoop;
-
-import dwt.internal.objc.foundation.bindings;
-import dwt.internal.objc.runtime;
-
-id NSDefaultRunLoopMode ()
-{
-    return DCB_NSDefaultRunLoopMode;
-}
\ No newline at end of file
--- a/dwt/internal/objc/foundation/bindings.d	Tue Oct 21 15:20:04 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-/**
- * Copyright: Copyright (c) 2008 Jacob Carlborg. All rights reserved.
- * Authors: Jacob Carlborg
- * Version: Initial created: 2008
- * License: $(LINK2 http://opensource.org/licenses/bsd-license.php, BSD Style)
- * 
- */
-module dwt.internal.objc.foundation.bindings;
-
-import dwt.internal.cocoa.NSRect;
-import dwt.internal.objc.runtime;
-
-extern (C):
-    
-id DCB_NSDefaultRunLoopMode ();
-id NSFileTypeForHFSTypeCode (uint hfsFileTypeCode);
-NSRect NSIntersectionRect (NSRect aRect, NSRect bRect);
-
-version (build)
-    pragma (link, "dwt-cocoa-bindings");
\ No newline at end of file
--- a/dwt/internal/objc/runtime.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/internal/objc/runtime.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,16 +9,14 @@
 
 import tango.stdc.stringz;
 
-import dwt.dwthelper.utils : String;
+import derelict.sdl.macinit.runtime;
+import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSRect;
 static import dwt.internal.objc.bindings;
 
-
-extern (C)
-{
 alias objc_ivar* Ivar;
 alias objc_method* Method;
 alias objc_object Protocol;
@@ -30,21 +28,21 @@
 alias extern (C) id function(id, SEL, ...) IMP;
 
 struct objc_object
-    {
+{
     Class isa;
-    }
+}
 
 struct objc_super
-    {
+{
     id receiver;
     Class clazz;
     
     // for dwt compatibility
     alias clazz cls;
-    }
+}
 
 struct objc_class
-    {
+{
     Class isa;
     Class super_class;
     const char* name;
@@ -55,20 +53,20 @@
     objc_method_list** methodLists;
     objc_cache* cache;
     objc_protocol_list* protocols;
-    }
+}
 
 struct objc_ivar
-    {
+{
     char* ivar_name;
     char* ivar_type;
     int ivar_offset;
     
     version (X86_64)
     int space;
-    }
+}
 
 struct objc_ivar_list
-    {
+{
     int ivar_count;
     
     version (X86_64)
@@ -76,17 +74,17 @@
     
     /* variable length structure */
     objc_ivar ivar_list[1];
-    }
+}
 
 struct objc_method
-    {
+{
     SEL method_name;
     char* method_types;
     IMP method_imp;
-    }
+}
 
 struct objc_method_list
-    {
+{
     objc_method_list* obsolete;
     
     int method_count;
@@ -96,36 +94,49 @@
     
     /* variable length structure */
     objc_method method_list[1];
-    }
+}
 
 struct objc_cache
-    {
+{
     uint mask /* total = mask + 1 */;
     uint occupied;
     Method buckets[1];
-    }
+}
 
 struct objc_protocol_list
-    {
+{
     objc_protocol_list* next;
     long count;
     Protocol* list[1];
-    }
 }
 
 
 
+alias dwt.internal.objc.bindings.objc_registerClassPair objc_registerClassPair;
+alias dwt.internal.objc.bindings.class_addProtocol class_addProtocol;
+alias dwt.internal.objc.bindings.instrumentObjcMessageSends instrumentObjcMessageSends;
+alias dwt.internal.objc.bindings.object_getClass object_getClass;
+alias dwt.internal.objc.bindings.object_setClass object_setClass;
 
-alias dwt.internal.objc.bindings.objc_registerClassPair objc_registerClassPair;
 
 bool class_addIvar (Class cls, String name, size_t size, byte alignment, String types)
 {
     return dwt.internal.objc.bindings.class_addIvar(cls, name.ptr, size, alignment, types.ptr);
 }
 
-bool class_addMethod (Class cls, String name, IMP imp, String types)
+bool class_addMethod (Class cls, SEL name, IMP imp, String types)
+{
+    return dwt.internal.objc.bindings.class_addMethod(cls, name, imp, types.ptr);
+}
+
+IMP class_getMethodImplementation (Class cls, SEL name)
 {
-    return dwt.internal.objc.bindings.class_addMethod(cls, name.ptr, imp, types.ptr);
+     return dwt.internal.objc.bindings.class_getMethodImplementation(cls, name);
+}
+
+String class_getName (Class cls)
+{
+    return fromStringz(dwt.internal.objc.bindings.class_getName(cls));
 }
 
 Class objc_allocateClassPair (Class superclass, String name, size_t extraBytes)
@@ -138,14 +149,19 @@
     return dwt.internal.objc.bindings.objc_getClass(name.ptr);
 }
 
+Protocol* objc_getProtocol (String name)
+{
+    return dwt.internal.objc.bindings.objc_getProtocol(name.ptr);
+}
+
 id objc_lookUpClass (String name)
 {
     return dwt.internal.objc.bindings.objc_lookUpClass(name.ptr);
 }
 
-String object_getClassName (id obj)
+SEL object_getClassName (id obj)
 {
-    return fromStringz(dwt.internal.objc.bindings.object_getClassName(obj));
+    return dwt.internal.objc.bindings.object_getClassName(obj);
 }
 
 Ivar object_getInstanceVariable (id obj, String name, void** outValue)
@@ -158,53 +174,40 @@
     return dwt.internal.objc.bindings.object_setInstanceVariable(obj, name.ptr, value);
 }
 
-String sel_registerName (String str)
+SEL sel_registerName (String str)
 {
-    return fromStringz(dwt.internal.objc.bindings.sel_registerName(str.ptr));
+    return dwt.internal.objc.bindings.sel_registerName(str.ptr);
 }
 
-id objc_msgSend (ARGS...)(id theReceiver, String theSelector, ARGS args)
+id objc_msgSend (ARGS...) (id theReceiver, SEL theSelector, ARGS args)
 {
-    return dwt.internal.objc.bindings.objc_msgSend(theReceiver, theSelector.ptr, args);
+    return dwt.internal.objc.bindings.objc_msgSend(theReceiver, theSelector, args);
 }
 
-void objc_msgSend_struct (T, ARGS...)(T* result, id theReceiver, String theSelector, ARGS args)
+void objc_msgSend_struct (T, ARGS...) (T* result, id theReceiver, SEL theSelector, ARGS args)
 {
-    result = cast(T*) dwt.internal.objc.bindings.objc_msgSend(theReceiver, theSelector.ptr, args);
+    result = cast(T*) dwt.internal.objc.bindings.objc_msgSend(theReceiver, theSelector, args);
 }
 
-void objc_msgSend_stret (T, ARGS...)(T* stretAddr, id theReceiver, String theSelector, ARGS args)
+void objc_msgSend_stret (T, ARGS...) (out T stretAddr, id theReceiver, SEL theSelector, ARGS args)
 {
-    dwt.internal.objc.bindings.objc_msgSend_stret(stretAddr, theReceiver, theSelector.ptr, args);
+    dwt.internal.objc.bindings.objc_msgSend_stret(stretAddr, theReceiver, theSelector, args);
 }
 
-id objc_msgSendSuper (ARGS...)(objc_super* superr, String op, ARGS args)
+id objc_msgSendSuper (ARGS...) (objc_super* superr, SEL op, ARGS args)
 {
-    return dwt.internal.objc.bindings.objc_msgSendSuper(superr, op.ptr, args);
+    return dwt.internal.objc.bindings.objc_msgSendSuper(superr, op, args);
+}
+
+bool objc_msgSend_bool (ARGS...) (id theReceiver, SEL theSelector, ARGS args)
+{
+    return cast(bool) dwt.internal.objc.bindings.objc_msgSend(theReceiver, theSelector, args);
 }
 
 version (X86)
 {
-    double objc_msgSend_fpret(ARGS...)(id self, String op, ARGS args)
+    double objc_msgSend_fpret(ARGS...) (id self, SEL op, ARGS args)
     {
-        return dwt.internal.objc.bindings.objc_msgSend_fpret(self, op.ptr, args);
+        return dwt.internal.objc.bindings.objc_msgSend_fpret(self, op, args);
     }
-}
-
-
-// os_custom
-extern (C):
-//alias void function (id, SEL, NSRect*) funcPtr;
-static IMP drawRect_1CALLBACK;
-
-
-private void drawRect(id obj, SEL sel, NSRect rect)
-{
-    return cast(IMP) drawRect_1CALLBACK(obj, sel, &rect);
-}
-
-IMP drawRect_CALLBACK (IMP func)
-{
-    drawRect_1CALLBACK = func;
-    return cast(IMP) &drawRect;
 }
\ No newline at end of file
--- a/dwt/layout/FillLayout.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/layout/FillLayout.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/layout/FormAttachment.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/layout/FormAttachment.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/layout/FormData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/layout/FormData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/layout/FormLayout.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/layout/FormLayout.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/layout/GridData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/layout/GridData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/layout/GridLayout.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/layout/GridLayout.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/layout/RowData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/layout/RowData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/layout/RowLayout.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/layout/RowLayout.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwt/opengl/GLCanvas.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/opengl/GLCanvas.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,10 @@
 /**
  * GLCanvas is a widget capable of displaying OpenGL content.
  * 
+ * @see GLData
+ * @see <a href="http://www.eclipse.org/swt/snippets/#opengl">OpenGL snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ *
  * @since 3.2
  */
 
@@ -52,7 +56,7 @@
     if (data is null) DWT.error (DWT.ERROR_NULL_ARGUMENT);
     int attrib [] = new int [MAX_ATTRIBUTES];
     int pos = 0;
-    //TODO this is not working
+    //TODO use color options
 //  attrib [pos++] = OS.AGL_RGBA;
     if (data.doubleBuffer) attrib [pos++] = OS.NSOpenGLPFADoubleBuffer;
     if (data.stereo) attrib [pos++] = OS.NSOpenGLPFAStereo;
@@ -117,18 +121,22 @@
         dispose ();
         DWT.error (DWT.ERROR_UNSUPPORTED_DEPTH);
     }
-    glView.initWithFrame(parent.view.frame(), pixelFormat);
+    glView.initWithFrame(parent.view.bounds(), pixelFormat);
     glView.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewHeightSizable);
+    parent.view.addSubview(glView);
 
     Listener listener = new Listener () {
         public void handleEvent (Event event) {
             switch (event.type) {
-            case DWT.Dispose:
-                if (glView !is null) glView.release();
-                glView = null;
-                if (pixelFormat !is null) pixelFormat.release();
-                pixelFormat = null;
-                break;
+                case DWT.Dispose:
+                    if (glView !is null) {
+                        glView.clearGLContext();
+                        glView.release();
+                    }
+                    glView = null;
+                    if (pixelFormat !is null) pixelFormat.release();
+                    pixelFormat = null;
+                    break;
             }
         }
     };
@@ -148,6 +156,7 @@
     checkWidget ();
     GLData data = new GLData ();
     int [] value = new int [1];
+    //TODO implement getGLData()
 //  AGL.aglDescribePixelFormat (pixelFormat, AGL.AGL_DOUBLEBUFFER, value);
 //  data.doubleBuffer = value [0] !is 0;
 //  AGL.aglDescribePixelFormat (pixelFormat, AGL.AGL_STEREO, value);
--- a/dwt/opengl/GLData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/opengl/GLData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,8 @@
  * of the pixel format attributes of a GL drawable.
  *
  * @see GLCanvas
+ * @see <a href="http://www.eclipse.org/swt/snippets/#opengl">OpenGL snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.2
  */
--- a/dwt/printing/PrintDialog.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/printing/PrintDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,15 @@
 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.internal.cocoa.NSData;
+import dwt.internal.cocoa.NSKeyedArchiver;
+import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSPrintInfo;
 import dwt.internal.cocoa.NSPrintPanel;
+import dwt.internal.cocoa.NSPrinter;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
 import dwt.widgets.Dialog;
 import dwt.widgets.Shell;
 import dwt.widgets.Widget;
@@ -28,8 +35,12 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#printing">Printing snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Dialog tab</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
-public class PrintDialog : Dialog {
+public class PrintDialog extends Dialog {
     PrinterData printerData;
     int scope = PrinterData.ALL_PAGES;
     int startPage = 1, endPage = 1;
@@ -52,7 +63,7 @@
  * @see Widget#checkSubclass
  * @see Widget#getStyle
  */
-public this (Shell parent) {
+public PrintDialog (Shell parent) {
     this (parent, DWT.PRIMARY_MODAL);
 }
 
@@ -84,7 +95,7 @@
  * @see Widget#checkSubclass
  * @see Widget#getStyle
  */
-public this (Shell parent, int style) {
+public PrintDialog (Shell parent, int style) {
     super (parent, style);
     checkSubclass ();
 }
@@ -125,96 +136,47 @@
  * </ul>
  */
 public PrinterData open() {
+    PrinterData data = null;
     NSPrintPanel panel = NSPrintPanel.printPanel();
-    NSPrintInfo printInfo =cast(NSPrintInfo)new NSPrintInfo().alloc();
-    printInfo.initWithDictionary(null);
-    panel.runModalWithPrintInfo(printInfo);
+    NSPrintInfo printInfo = new NSPrintInfo(NSPrintInfo.sharedPrintInfo().copy());
+    NSMutableDictionary dict = printInfo.dictionary();  
+    if (printToFile) {
+        dict.setValue(OS.NSPrintSaveJob, OS.NSPrintJobDisposition);
+    }
+    //TODO - setting range not work. why?
+    dict.setValue(NSNumber.numberWithBool(scope is PrinterData.ALL_PAGES), OS.NSPrintAllPages);
+    if (scope is PrinterData.PAGE_RANGE) {
+        dict.setValue(NSNumber.numberWithInt(startPage), OS.NSPrintFirstPage);
+        dict.setValue(NSNumber.numberWithInt(endPage), OS.NSPrintLastPage);
+    }
+    panel.setOptions(OS.NSPrintPanelShowsPageSetupAccessory | panel.options());
+    if (panel.runModalWithPrintInfo(printInfo) !is OS.NSCancelButton) {
+        NSPrinter printer = printInfo.printer();
+        NSString str = printer.name();
+        data = new PrinterData(Printer.DRIVER, str.getString());
+        data.printToFile = printInfo.jobDisposition().isEqual(OS.NSPrintSaveJob);
+        if (data.printToFile) {
+            NSString filename = new NSString(dict.objectForKey(OS.NSPrintSavePath));
+            data.fileName = filename.getString();
+        }
+        data.scope = new NSNumber(dict.objectForKey(OS.NSPrintAllPages)).intValue() !is 0 ? PrinterData.ALL_PAGES : PrinterData.PAGE_RANGE;
+        if (data.scope is PrinterData.PAGE_RANGE) {
+            data.startPage = new NSNumber(dict.objectForKey(OS.NSPrintFirstPage)).intValue();
+            data.endPage = new NSNumber(dict.objectForKey(OS.NSPrintLastPage)).intValue();
+        }
+        data.collate = new NSNumber(dict.objectForKey(OS.NSPrintMustCollate)).intValue() !is 0;
+        data.copyCount = new NSNumber(dict.objectForKey(OS.NSPrintCopies)).intValue();
+        NSData nsData = NSKeyedArchiver.archivedDataWithRootObject(printInfo);
+        data.otherData = new byte[(int)/*64*/nsData.length()];
+        OS.memmove(data.otherData, nsData.bytes(), data.otherData.length);
+
+        printToFile = data.printToFile;
+        scope = data.scope;
+        startPage = data.startPage;
+        endPage = data.endPage;
+    }
     printInfo.release();
-//  int[] buffer = new int[1];
-//  if (OS.PMCreateSession(buffer) is OS.noErr) {
-//      int printSession = buffer[0];
-//      if (OS.PMCreatePrintSettings(buffer) is OS.noErr) {
-//          int printSettings = buffer[0];
-//          OS.PMSessionDefaultPrintSettings(printSession, printSettings);
-//          if (OS.PMCreatePageFormat(buffer) is OS.noErr) {
-//              int pageFormat = buffer[0];
-//              OS.PMSessionDefaultPageFormat(printSession, pageFormat);
-//              OS.PMSessionSetDestination(printSession, printSettings, cast(short) (printToFile ? OS.kPMDestinationFile : OS.kPMDestinationPrinter), 0, 0);
-//              if (scope is PrinterData.PAGE_RANGE) {
-//                  OS.PMSetFirstPage(printSettings, startPage, false);
-//                  OS.PMSetLastPage(printSettings, endPage, false);
-//                  OS.PMSetPageRange(printSettings, startPage, endPage);
-//              } else {
-//                  OS.PMSetPageRange(printSettings, 1, OS.kPMPrintAllPages);
-//              }
-//              bool[] accepted = new bool [1];
-//              OS.PMSessionPageSetupDialog(printSession, pageFormat, accepted);    
-//              if (accepted[0]) {      
-//                  OS.PMSessionPrintDialog(printSession, printSettings, pageFormat, accepted);
-//                  if (accepted[0]) {
-//                      short[] destType = new short[1];
-//                      OS.PMSessionGetDestinationType(printSession, printSettings, destType);
-//                      String name = Printer.getCurrentPrinterName(printSession);
-//                      String driver = Printer.DRIVER;
-//                      switch (destType[0]) {
-//                          case OS.kPMDestinationFax: driver = Printer.FAX_DRIVER; break;
-//                          case OS.kPMDestinationFile: driver = Printer.FILE_DRIVER; break;
-//                          case OS.kPMDestinationPreview: driver = Printer.PREVIEW_DRIVER; break;
-//                          case OS.kPMDestinationPrinter: driver = Printer.PRINTER_DRIVER; break;
-//                      }
-//                      PrinterData data = new PrinterData(driver, name);
-//                      if (destType[0] is OS.kPMDestinationFile) {
-//                          data.printToFile = true;
-//                          OS.PMSessionCopyDestinationLocation(printSession, printSettings, buffer);
-//                          int fileName = OS.CFURLCopyFileSystemPath(buffer[0],OS.kCFURLPOSIXPathStyle);
-//                          OS.CFRelease(buffer[0]);
-//                          data.fileName = Printer.getString(fileName);
-//                          OS.CFRelease(fileName);
-//                      }
-//                      OS.PMGetCopies(printSettings, buffer);
-//                      data.copyCount = buffer[0];                     
-//                      OS.PMGetFirstPage(printSettings, buffer);
-//                      data.startPage = buffer[0];
-//                      OS.PMGetLastPage(printSettings, buffer);
-//                      data.endPage = buffer[0];
-//                      OS.PMGetPageRange(printSettings, null, buffer);
-//                      if (data.startPage is 1 && data.endPage is OS.kPMPrintAllPages) {
-//                          data.scope = PrinterData.ALL_PAGES;
-//                      } else {
-//                          data.scope = PrinterData.PAGE_RANGE;
-//                      }
-//                      bool[] collate = new bool[1];
-//                      OS.PMGetCollate(printSettings, collate);
-//                      data.collate = collate[0];
-//                      
-//                      /* Serialize settings */
-//                      int[] flatSettings = new int[1];
-//                      OS.PMFlattenPrintSettings(printSettings, flatSettings);
-//                      int[] flatFormat = new int[1];
-//                      OS.PMFlattenPageFormat(pageFormat, flatFormat);
-//                      int settingsLength = OS.GetHandleSize (flatSettings[0]);
-//                      int formatLength = OS.GetHandleSize (flatFormat[0]);
-//                      byte[] otherData = data.otherData = new byte[settingsLength + formatLength + 8];
-//                      int offset = 0;
-//                      offset = Printer.packData(flatSettings[0], otherData, offset);
-//                      offset = Printer.packData(flatFormat[0], otherData, offset);
-//                      OS.DisposeHandle(flatSettings[0]);
-//                      OS.DisposeHandle(flatFormat[0]);
-//                      
-//                      scope = data.scope;
-//                      startPage = data.startPage;
-//                      endPage = data.endPage;
-//                      printToFile = data.printToFile;
-//                      return data;
-//                  }
-//              }
-//              OS.PMRelease(pageFormat);
-//          }
-//          OS.PMRelease(printSettings);
-//      }
-//      OS.PMRelease(printSession);
-//  }
-    return null;
+    return data;
 }
 
 /**
@@ -222,11 +184,11 @@
  * before pressing OK in the dialog. This will be one
  * of the following values:
  * <dl>
- * <dt><code>ALL_PAGES</code></dt>
+ * <dt><code>PrinterData.ALL_PAGES</code></dt>
  * <dd>Print all pages in the current document</dd>
- * <dt><code>PAGE_RANGE</code></dt>
+ * <dt><code>PrinterData.PAGE_RANGE</code></dt>
  * <dd>Print the range of pages specified by startPage and endPage</dd>
- * <dt><code>SELECTION</code></dt>
+ * <dt><code>PrinterData.SELECTION</code></dt>
  * <dd>Print the current selection</dd>
  * </dl>
  *
@@ -241,11 +203,11 @@
  * setting when the dialog is opened. This can have one of
  * the following values:
  * <dl>
- * <dt><code>ALL_PAGES</code></dt>
+ * <dt><code>PrinterData.ALL_PAGES</code></dt>
  * <dd>Print all pages in the current document</dd>
- * <dt><code>PAGE_RANGE</code></dt>
+ * <dt><code>PrinterData.PAGE_RANGE</code></dt>
  * <dd>Print the range of pages specified by startPage and endPage</dd>
- * <dt><code>SELECTION</code></dt>
+ * <dt><code>PrinterData.SELECTION</code></dt>
  * <dd>Print the current selection</dd>
  * </dl>
  *
@@ -260,7 +222,7 @@
  * before pressing OK in the dialog.
  * <p>
  * This value can be from 1 to the maximum number of pages for the platform.
- * Note that it is only valid if the scope is <code>PAGE_RANGE</code>.
+ * Note that it is only valid if the scope is <code>PrinterData.PAGE_RANGE</code>.
  * </p>
  *
  * @return the start page setting that the user selected
@@ -274,7 +236,7 @@
  * is opened.
  * <p>
  * This value can be from 1 to the maximum number of pages for the platform.
- * Note that it is only valid if the scope is <code>PAGE_RANGE</code>.
+ * Note that it is only valid if the scope is <code>PrinterData.PAGE_RANGE</code>.
  * </p>
  * 
  * @param startPage the startPage setting when the dialog is opened
@@ -288,7 +250,7 @@
  * before pressing OK in the dialog.
  * <p>
  * This value can be from 1 to the maximum number of pages for the platform.
- * Note that it is only valid if the scope is <code>PAGE_RANGE</code>.
+ * Note that it is only valid if the scope is <code>PrinterData.PAGE_RANGE</code>.
  * </p>
  *
  * @return the end page setting that the user selected
@@ -302,7 +264,7 @@
  * is opened.
  * <p>
  * This value can be from 1 to the maximum number of pages for the platform.
- * Note that it is only valid if the scope is <code>PAGE_RANGE</code>.
+ * Note that it is only valid if the scope is <code>PrinterData.PAGE_RANGE</code>.
  * </p>
  * 
  * @param endPage the end page setting when the dialog is opened
--- a/dwt/printing/Printer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/printing/Printer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,9 +20,22 @@
 import dwt.graphics.GCData;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSAffineTransform;
 import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSBezierPath;
+import dwt.internal.cocoa.NSData;
+import dwt.internal.cocoa.NSGraphicsContext;
+import dwt.internal.cocoa.NSKeyedUnarchiver;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSPrintInfo;
+import dwt.internal.cocoa.NSPrintOperation;
 import dwt.internal.cocoa.NSPrinter;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSView;
+import dwt.internal.cocoa.NSWindow;
+import dwt.internal.cocoa.OS;
 
 /**
  * Instances of this class are used to print to a printer.
@@ -43,17 +56,19 @@
  *
  * @see PrinterData
  * @see PrintDialog
+ * @see <a href="http://www.eclipse.org/swt/snippets/#printing">Printing snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
-public final class Printer : Device {
+public final class Printer extends Device {
     PrinterData data;
     NSPrinter printer;
-    bool inPage, isGCCreated;
+    NSPrintInfo printInfo;
+    NSPrintOperation operation;
+    NSView view;
+    NSWindow window;
+    bool isGCCreated;
 
     static final String DRIVER = "Mac";
-    static final String PRINTER_DRIVER = "Printer";
-    static final String FILE_DRIVER = "File";
-    static final String PREVIEW_DRIVER = "Preview";
-    static final String FAX_DRIVER = "Fax";
 
 /**
  * Returns an array of <code>PrinterData</code> objects
@@ -63,13 +78,11 @@
  */
 public static PrinterData[] getPrinterList() {
     NSArray printers = NSPrinter.printerNames();
-    int count = printers.count();
+    int count = (int)/*64*/printers.count();
     PrinterData[] result = new PrinterData[count];
     for (int i = 0; i < count; i++) {
         NSString str = new NSString(printers.objectAtIndex(i));
-        char[] buffer = new char[str.length()];
-        str.getCharacters_(buffer);
-        result[i] = new PrinterData(DRIVER, new String(buffer));
+        result[i] = new PrinterData(DRIVER, str.getString());
     }
     return result;
 }
@@ -84,43 +97,12 @@
  * @since 2.1
  */
 public static PrinterData getDefaultPrinterData() {
-    //TODO - get default
-    PrinterData[] printers = getPrinterList();
-    if (printers.length > 0) return printers[0];
-    return null;
+    NSPrinter printer = NSPrintInfo.defaultPrinter();
+    if (printer is null) return null;
+    NSString str = printer.name();
+    return new PrinterData(DRIVER, str.getString());
+    
 }
-//static int packData(int handle, byte[] buffer, int offset) {
-//  int length = OS.GetHandleSize (handle);
-//  buffer[offset++] = cast(byte)((length & 0xFF) >> 0);
-//  buffer[offset++] = cast(byte)((length & 0xFF00) >> 8);
-//  buffer[offset++] = cast(byte)((length & 0xFF0000) >> 16);
-//  buffer[offset++] = cast(byte)((length & 0xFF000000) >> 24);
-//  int [] ptr = new int [1];
-//  OS.HLock(handle);
-//  OS.memmove(ptr, handle, 4);
-//  byte[] buffer1 = new byte[length];
-//  OS.memmove(buffer1, ptr [0], length);
-//  OS.HUnlock(handle);
-//  System.arraycopy(buffer1, 0, buffer, offset, length);
-//  return offset + length;
-//}
-//static int unpackData(int[] handle, byte[] buffer, int offset) {
-//  int length = 
-//      ((buffer[offset++] & 0xFF) << 0) |
-//      ((buffer[offset++] & 0xFF) << 8) |
-//      ((buffer[offset++] & 0xFF) << 16) |
-//      ((buffer[offset++] & 0xFF) << 24);
-//  handle[0] = OS.NewHandle(length);
-//  if (handle[0] is 0) DWT.error(DWT.ERROR_NO_HANDLES);
-//  int[] ptr = new int[1];
-//  OS.HLock(handle[0]);
-//  OS.memmove(ptr, handle[0], 4);
-//  byte[] buffer1 = new byte[length];
-//  System.arraycopy(buffer, offset, buffer1, 0, length);
-//  OS.memmove(ptr[0], buffer1, length);
-//  OS.HUnlock(handle[0]);
-//  return offset + length;
-//}
 
 /**
  * Constructs a new printer representing the default printer.
@@ -134,7 +116,7 @@
  *
  * @see Device#dispose
  */
-public this() {
+public Printer() {
     this(null);
 }
 
@@ -156,33 +138,37 @@
  *
  * @see Device#dispose
  */
-public this(PrinterData data) {
+public Printer(PrinterData data) {
     super (checkNull(data));
 }
 
 /**
- * Given a desired <em>client area</em> for the receiver
- * (as described by the arguments), returns the bounding
- * rectangle which would be required to produce that client
- * area.
+ * Given a <em>client area</em> (as described by the arguments),
+ * returns a rectangle, relative to the client area's coordinates,
+ * that is the client area expanded by the printer's trim (or minimum margins).
  * <p>
- * In other words, it returns a rectangle such that, if the
- * receiver's bounds were set to that rectangle, the area
- * of the receiver which is capable of displaying data
- * (that is, not covered by the "trimmings") would be the
- * rectangle described by the arguments (relative to the
- * receiver's parent).
- * </p><p>
- * Note that there is no setBounds for a printer. This method
- * is usually used by passing in the client area (the 'printable
- * area') of the printer. It can also be useful to pass in 0, 0, 0, 0.
+ * Most printers have a minimum margin on each edge of the paper where the
+ * printer device is unable to print.  This margin is known as the "trim."
+ * This method can be used to calculate the printer's minimum margins
+ * by passing in a client area of 0, 0, 0, 0 and then using the resulting
+ * x and y coordinates (which will be <= 0) to determine the minimum margins
+ * for the top and left edges of the paper, and the resulting width and height
+ * (offset by the resulting x and y) to determine the minimum margins for the
+ * bottom and right edges of the paper, as follows:
+ * <ul>
+ *      <li>The left trim width is -x pixels</li>
+ *      <li>The top trim height is -y pixels</li>
+ *      <li>The right trim width is (x + width) pixels</li>
+ *      <li>The bottom trim height is (y + height) pixels</li>
+ * </ul>
  * </p>
  * 
- * @param x the desired x coordinate of the client area
- * @param y the desired y coordinate of the client area
- * @param width the desired width of the client area
- * @param height the desired height of the client area
- * @return the required bounds to produce the given client area
+ * @param x the x coordinate of the client area
+ * @param y the y coordinate of the client area
+ * @param width the width of the client area
+ * @param height the height of the client area
+ * @return a rectangle, relative to the client area's coordinates, that is
+ *      the client area expanded by the printer's trim (or minimum margins)
  *
  * @exception DWTException <ul>
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
@@ -193,12 +179,14 @@
  */
 public Rectangle computeTrim(int x, int y, int width, int height) {
     checkDevice();
-//  PMRect pageRect = new PMRect();
-//  PMRect paperRect = new PMRect();
-//  OS.PMGetAdjustedPageRect(pageFormat, pageRect);
-//  OS.PMGetAdjustedPaperRect(pageFormat, paperRect);
-//  return new Rectangle(x+cast(int)paperRect.left, y+cast(int)paperRect.top, width+cast(int)(paperRect.right-pageRect.right), height+cast(int)(paperRect.bottom-pageRect.bottom));
-    return null;
+    NSSize paperSize = printInfo.paperSize();
+    NSRect bounds = printInfo.imageablePageBounds();
+    Point dpi = getDPI (), screenDPI = getIndependentDPI();
+    x -= (bounds.x * dpi.x / screenDPI.x);
+    y -= (bounds.y * dpi.y / screenDPI.y);
+    width += (paperSize.width - bounds.width) * dpi.x / screenDPI.x;
+    height += (paperSize.height - bounds.height) * dpi.y / screenDPI.y;
+    return new Rectangle(x, y, width, height);
 }
 
 /**  
@@ -208,65 +196,37 @@
  * @param deviceData the device data
  */
 protected void create(DeviceData deviceData) {
-    data = cast(PrinterData)deviceData;
-    
-    printer = NSPrinter.static_printerWithName_(NSString.stringWith(data.name));
-    printer.retain();
-    
-//  int[] buffer = new int[1];
-//  if (OS.PMCreateSession(buffer) !is OS.noErr) DWT.error(DWT.ERROR_NO_HANDLES);
-//  printSession = buffer[0];
-//  if (printSession is 0) DWT.error(DWT.ERROR_NO_HANDLES);
-//      
-//  if (data.otherData !is null) {
-//      /* Deserialize settings */
-//      int offset = 0;
-//      byte[] otherData = data.otherData;
-//      offset = unpackData(buffer, otherData, offset);
-//      int flatSettings = buffer[0];
-//      offset = unpackData(buffer, otherData, offset);
-//      int flatFormat = buffer[0];
-//      if (OS.PMUnflattenPrintSettings(flatSettings, buffer) !is OS.noErr) DWT.error(DWT.ERROR_NO_HANDLES);
-//      printSettings = buffer[0];
-//      if (printSettings is 0) DWT.error(DWT.ERROR_NO_HANDLES);
-//      if (OS.PMUnflattenPageFormat(flatFormat, buffer) !is OS.noErr) DWT.error(DWT.ERROR_NO_HANDLES);
-//      pageFormat = buffer[0];
-//      if (pageFormat is 0) DWT.error(DWT.ERROR_NO_HANDLES);
-//      OS.DisposeHandle(flatSettings);
-//      OS.DisposeHandle(flatFormat);
-//  } else {
-//      /* Create default settings */
-//      if (OS.PMCreatePrintSettings(buffer) !is OS.noErr) DWT.error(DWT.ERROR_NO_HANDLES);
-//      printSettings = buffer[0];
-//      if (printSettings is 0) DWT.error(DWT.ERROR_NO_HANDLES);
-//      OS.PMSessionDefaultPrintSettings(printSession, printSettings);
-//      if (OS.PMCreatePageFormat(buffer) !is OS.noErr) DWT.error(DWT.ERROR_NO_HANDLES);
-//      pageFormat = buffer[0];
-//      if (pageFormat is 0) DWT.error(DWT.ERROR_NO_HANDLES);
-//      OS.PMSessionDefaultPageFormat(printSession, pageFormat);
-//  }
-//  
-//  if (PREVIEW_DRIVER.equals(data.driver)) {
-//      OS.PMSessionSetDestination(printSession, printSettings, cast(short) OS.kPMDestinationPreview, 0, 0);
-//  }
-//  String name = data.name;
-//  char[] buffer1 = new char[name.length ()];
-//  name.getChars(0, buffer1.length, buffer1, 0);
-//  int ptr = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, buffer1, buffer1.length);
-//  if (ptr !is 0) {
-//      OS.PMSessionSetCurrentPrinter(printSession, ptr); 
-//      OS.CFRelease(ptr);
-//  }
-//  
-//  OS.PMSessionValidatePrintSettings(printSession, printSettings, null);
-//  OS.PMSessionValidatePageFormat(printSession, pageFormat, null); 
-//  
-//  int graphicsContextsArray = OS.CFArrayCreateMutable(OS.kCFAllocatorDefault, 1, 0);
-//  if (graphicsContextsArray !is 0) {
-//      OS.CFArrayAppendValue(graphicsContextsArray, OS.kPMGraphicsContextCoreGraphics());
-//      OS.PMSessionSetDocumentFormatGeneration(printSession, OS.kPMDocumentFormatPDF(), graphicsContextsArray, 0);
-//      OS.CFRelease(graphicsContextsArray);
-//  }
+    data = (PrinterData)deviceData;
+    if (data.otherData !is null) {
+        NSData nsData = NSData.dataWithBytes(data.otherData, data.otherData.length);
+        printInfo = new NSPrintInfo(NSKeyedUnarchiver.unarchiveObjectWithData(nsData).id);
+    } else {
+        printInfo = NSPrintInfo.sharedPrintInfo();
+    }
+    printInfo.retain();
+    printer = NSPrinter.printerWithName(NSString.stringWith(data.name));
+    if (printer !is null) {
+        printer.retain();
+        printInfo.setPrinter(printer);
+    }
+    /*
+    * Bug in Cocoa.  For some reason, the output still goes to the printer when
+    * the user chooses the preview button.  The fix is to reset the job disposition.
+    */
+    NSString job = printInfo.jobDisposition();
+    if (job.isEqual(new NSString(OS.NSPrintPreviewJob()))) {
+        printInfo.setJobDisposition(job);
+    }
+    NSRect rect = new NSRect();
+    window = (NSWindow)new NSWindow().alloc();
+    window.initWithContentRect(rect, OS.NSBorderlessWindowMask, OS.NSBackingStoreBuffered, false);
+    view = (NSView)new NSView().alloc();
+    view.initWithFrame(rect);
+    window.setContentView(view);
+    operation = NSPrintOperation.printOperationWithView(view, printInfo);
+    operation.retain();
+    operation.setShowsPrintPanel(false);
+    operation.setShowsProgressPanel(false);
 }
 
 /**  
@@ -276,7 +236,14 @@
  */
 protected void destroy() {
     if (printer !is null) printer.release();
+    if (printInfo !is null) printInfo.release();
+    if (view !is null) view.release();
+    if (window !is null) window.release();
+    if (operation !is null) operation.release();
     printer = null;
+    printInfo = null;
+    view = null;
+    operation = null;
 }
 
 /**  
@@ -292,31 +259,22 @@
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
  */
-public int internal_new_GC(GCData data) {
+public int /*long*/ internal_new_GC(GCData data) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    setupNewPage();
-//  if (data !is null) {
-//      if (isGCCreated) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
-//      data.device = this;
-//      data.background = getSystemColor(DWT.COLOR_WHITE).handle;
-//      data.foreground = getSystemColor(DWT.COLOR_BLACK).handle;
-//      data.font = getSystemFont ();
-//      PMRect paperRect= new PMRect();
-//      OS.PMGetAdjustedPaperRect(pageFormat, paperRect);
-//      Rect portRect = new Rect();
-//      portRect.left = cast(short)paperRect.left;
-//      portRect.right = cast(short)paperRect.right;
-//      portRect.top = cast(short)paperRect.top;
-//      portRect.bottom = cast(short)paperRect.bottom;
-//      data.portRect = portRect;
-//      isGCCreated = true;
-//  }
-//  return context;
-    return 0;
+    if (data !is null) {
+        if (isGCCreated) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
+        data.device = this;
+        data.background = getSystemColor(DWT.COLOR_WHITE).handle;
+        data.foreground = getSystemColor(DWT.COLOR_BLACK).handle;
+        data.font = getSystemFont ();
+        data.size = printInfo.paperSize();
+        isGCCreated = true;
+    }
+    return operation.context().id;
 }
 
-protected void init_ () {
-    super.init_();
+protected void init () {
+    super.init();
 }
 
 /**  
@@ -332,7 +290,7 @@
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
  */
-public void internal_dispose_GC(int context, GCData data) {
+public void internal_dispose_GC(int /*long*/ context, GCData data) {
     if (data !is null) isGCCreated = false;
 }
 
@@ -368,16 +326,16 @@
  */
 public bool startJob(String jobName) {
     checkDevice();
-//  if (jobName !is null && jobName.length() !is 0) {
-//      char[] buffer = new char[jobName.length ()];
-//      jobName.getChars(0, buffer.length, buffer, 0);
-//      int ptr = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, buffer, buffer.length);
-//      if (ptr !is 0) {
-//          OS.PMSetJobNameCFString(printSettings, ptr); 
-//          OS.CFRelease (ptr);
-//      }
-//  }
-//  return OS.PMSessionBeginDocumentNoDialog(printSession, printSettings, pageFormat) is OS.noErr;
+    if (jobName !is null && jobName.length() !is 0) {
+        operation.setJobTitle(NSString.stringWith(jobName));
+    }
+    printInfo.setUpPrintOperationDefaultValues();
+    NSPrintOperation.setCurrentOperation(operation);
+    NSGraphicsContext context = operation.createContext();
+    if (context !is null) {
+        view.beginDocument();
+        return true;
+    }
     return false;
 }
 
@@ -394,12 +352,10 @@
  */
 public void endJob() {
     checkDevice();
-//  if (inPage) {
-//      OS.PMSessionEndPageNoDialog(printSession);
-//      inPage = false;
-//  }
-//  OS.PMSessionEndDocumentNoDialog(printSession);
-//  context = 0;
+    view.endDocument();
+    operation.deliverResult();
+    operation.destroyContext();
+    operation.cleanUpOperation();
 }
 
 /**
@@ -411,13 +367,8 @@
  */
 public void cancelJob() {
     checkDevice();
-//  OS.PMSessionSetError(printSession, OS.kPMCancel);
-//  if (inPage) {
-//      OS.PMSessionEndPageNoDialog(printSession);
-//      inPage = false;
-//  }
-//  OS.PMSessionEndDocumentNoDialog(printSession);
-//  context = 0;
+    operation.destroyContext();
+    operation.cleanUpOperation();
 }
 
 static DeviceData checkNull (PrinterData data) {
@@ -451,10 +402,20 @@
  */
 public bool startPage() {
     checkDevice();
-//  if (OS.PMSessionError(printSession) !is OS.noErr) return false;
-//  setupNewPage();
-//  return context !is 0;
-    return false;
+    NSSize paperSize = printInfo.paperSize();
+    NSRect rect = new NSRect();
+    rect.width = paperSize.width;
+    rect.height = paperSize.height;
+    view.beginPageInRect(rect, new NSPoint());
+    NSRect imageBounds = printInfo.imageablePageBounds();
+    NSBezierPath.bezierPathWithRect(imageBounds).setClip();
+    NSAffineTransform transform = NSAffineTransform.transform();
+    transform.translateXBy(imageBounds.x, rect.height - imageBounds.y);
+    transform.scaleXBy(1, -1);
+    Point dpi = getDPI (), screenDPI = getIndependentDPI();
+    transform.scaleXBy(screenDPI.x / (float)dpi.x, screenDPI.y / (float)dpi.y);
+    transform.concat();
+    return true;
 }
 
 /**
@@ -470,10 +431,7 @@
  */
 public void endPage() {
     checkDevice();
-//  if (inPage) {
-//      OS.PMSessionEndPageNoDialog(printSession);
-//      inPage = false;
-//  }
+    view.endPage();
 }
 
 /**
@@ -489,15 +447,19 @@
  */
 public Point getDPI() {
     checkDevice();
-//  PMResolution resolution = new PMResolution();
-//  OS.PMGetResolution(pageFormat, resolution);
-//  return new Point(cast(int)resolution.hRes, cast(int)resolution.vRes);
-    return null;
+    //TODO get output resolution
+    return getIndependentDPI();
+}
+
+Point getIndependentDPI() {
+    return super.getDPI();
 }
 
 /**
  * Returns a rectangle describing the receiver's size and location.
- * For a printer, this is the size of a physical page, in pixels.
+ * <p>
+ * For a printer, this is the size of the physical page, in pixels.
+ * </p>
  *
  * @return the bounding rectangle
  *
@@ -510,17 +472,18 @@
  */
 public Rectangle getBounds() {
     checkDevice();
-//  PMRect paperRect = new PMRect();
-//  OS.PMGetAdjustedPaperRect(pageFormat, paperRect);
-//  return new Rectangle(0, 0, cast(int)(paperRect.right-paperRect.left), cast(int)(paperRect.bottom-paperRect.top));
-    return null;
+    NSSize size = printInfo.paperSize();
+    Point dpi = getDPI (), screenDPI = getIndependentDPI();
+    return new Rectangle (0, 0, (int)(size.width * dpi.x / screenDPI.x), (int)(size.height * dpi.y / screenDPI.y));
 }
 
 /**
  * Returns a rectangle which describes the area of the
  * receiver which is capable of displaying data.
+ * <p>
  * For a printer, this is the size of the printable area
- * of a page, in pixels.
+ * of the page, in pixels.
+ * </p>
  * 
  * @return the client area
  *
@@ -533,10 +496,9 @@
  */
 public Rectangle getClientArea() {
     checkDevice();
-//  PMRect pageRect = new PMRect();
-//  OS.PMGetAdjustedPageRect(pageFormat, pageRect);
-//  return new Rectangle(0, 0, cast(int)(pageRect.right-pageRect.left), cast(int)(pageRect.bottom-pageRect.top));
-    return null;
+    NSRect rect = printInfo.imageablePageBounds();
+    Point dpi = getDPI (), screenDPI = getIndependentDPI();
+    return new Rectangle(0, 0, (int)(rect.width * dpi.x / screenDPI.x), (int)(rect.height * dpi.y / screenDPI.y));
 }
 
 /**
@@ -549,61 +511,4 @@
     checkDevice();
     return data;
 }
-
-/**
- * On the Mac the core graphics context for printing is only valid between PMSessionBeginPage and PMSessionEndPage,
- * so printing code has to retrieve and initializes a graphic context for every page like this:
- * 
- * <pre>
- * PMSessionBeginDocument
- *    PMSessionBeginPage
- *       PMSessionGetGraphicsContext
- *       // ... use context
- *    PMSessionEndPage
- * PMSessionEndDocument
- * </pre>
- * 
- * In DWT it is OK to create a GC once between startJob / endJob and use it for all pages in between:
- * 
- * <pre>
- * startJob(...);
- *    GC gc= new GC(printer);
- *    startPage();
- *       // ... use gc
- *    endPage();
- *    gc.dispose();
- * endJob();
- * </pre>
- * 
- * The solution to resolve this difference is to rely on the fact that Mac OS X returns the same but
- * reinitialized graphics context for every page. So we only have to account for the fact that DWT assumes
- * that the graphics context keeps it settings across a page break when it actually does not.
- * So we have to copy some settings that exist in the CGC before a PMSessionEndPage to the CGC after a PMSessionBeginPage.
- * <p>
- * In addition to this we have to cope with the situation that in DWT we can create a GC before a call to
- * PMSessionBeginPage. For this we decouple the call to PMSessionBeginPage from
- * DWT's method startPage as follows: if a new GC is created before a call to startPage, internal_new_GC
- * does the PMSessionBeginPage and the next following startPage does nothing.
- * </p>
- */
-void setupNewPage() {
-//  if (!inPage) {
-//      inPage= true;
-//      OS.PMSessionBeginPageNoDialog(printSession, pageFormat, null);
-//      int[] buffer = new int[1];
-//      OS.PMSessionGetGraphicsContext(printSession, 0, buffer);
-//      if (context is 0) {
-//          context = buffer[0];
-//      } else {
-//          if (context !is buffer[0]) DWT.error(DWT.ERROR_UNSPECIFIED);
-//      }
-//      PMRect paperRect= new PMRect();
-//      OS.PMGetAdjustedPaperRect(pageFormat, paperRect);
-//      OS.CGContextScaleCTM(context, 1, -1);
-//      OS.CGContextTranslateCTM(context, 0, -cast(float)(paperRect.bottom-paperRect.top));
-//      OS.CGContextSetStrokeColorSpace(context, colorspace);
-//      OS.CGContextSetFillColorSpace(context, colorspace);
-//  }
 }
-
-}
--- a/dwt/printing/PrinterData.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/printing/PrinterData.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,9 +30,11 @@
  * @see Printer
  * @see Printer#getPrinterList
  * @see PrintDialog#open
+ * @see <a href="http://www.eclipse.org/swt/snippets/#printing">Printing snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
-public final class PrinterData : DeviceData {
+public final class PrinterData extends DeviceData {
     
     /**
      * the printer driver
@@ -141,7 +143,7 @@
      * 
      * @see Printer#getDefaultPrinterData
      */
-    public this() {
+    public PrinterData() {
     }
 
     /**
@@ -154,7 +156,7 @@
      * @see #driver
      * @see #name
      */
-    public this(String driver, String name) {
+    public PrinterData(String driver, String name) {
         this.driver = driver;
         this.name = name;
     }
--- a/dwt/program/Program.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/program/Program.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,25 +13,49 @@
 import dwt.dwthelper.utils;
 
 
+import java.util.Vector;
+
 import dwt.DWT;
 import dwt.graphics.ImageData;
+import dwt.graphics.PaletteData;
+import dwt.internal.C;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSAutoreleasePool;
+import dwt.internal.cocoa.NSBitmapImageRep;
+import dwt.internal.cocoa.NSBundle;
+import dwt.internal.cocoa.NSDictionary;
+import dwt.internal.cocoa.NSDirectoryEnumerator;
+import dwt.internal.cocoa.NSEnumerator;
+import dwt.internal.cocoa.NSFileManager;
+import dwt.internal.cocoa.NSImage;
+import dwt.internal.cocoa.NSImageRep;
+import dwt.internal.cocoa.NSMutableSet;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSURL;
 import dwt.internal.cocoa.NSWorkspace;
+import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.id;
 
 /**
  * Instances of this class represent programs and
  * their associated file extensions in the operating
  * system.
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#program">Program snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class Program {
-    String name;
-    byte[] fsRef;
+    String name, fullPath, identifier;
+
+    static final String PREFIX_FILE = "file://"; //$NON-NLS-1$
+    static final String PREFIX_HTTP = "http://"; //$NON-NLS-1$
+    static final String PREFIX_HTTPS = "https://"; //$NON-NLS-1$
 
 /**
  * Prevents uninitialized instances from being created outside the package.
  */
-this () {
+Program () {
 }
 
 /**
@@ -50,25 +74,32 @@
 public static Program findProgram (String extension) {
     if (extension is null) DWT.error (DWT.ERROR_NULL_ARGUMENT);
     if (extension.length () is 0) return null;
-//  char[] chars;
-//  if (extension.charAt (0) !is '.') {
-//      chars = new char[extension.length()];
-//      extension.getChars(0, chars.length, chars, 0);
-//  } else {
-//      chars = new char[extension.length() - 1];
-//      extension.getChars(1, extension.length(), chars, 0);        
-//  }
-//  int ext = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
-//  Program program = null;
-//  if (ext !is 0) {
-//      byte[] fsRef = new byte[80];
-//      if (OS.LSGetApplicationForInfo(OS.kLSUnknownType, OS.kLSUnknownCreator, ext, OS.kLSRolesAll, fsRef, null) is OS.noErr) {
-//          program = getProgram(fsRef);
-//      }
-//      OS.CFRelease(ext);
-//  }
-//  return program;
-    return null;
+    if (extension.charAt(0) !is '.') extension = "." + extension;
+    NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSWorkspace workspace = NSWorkspace.sharedWorkspace();
+        int /*long*/ appName = OS.malloc(C.PTR_SIZEOF);
+        int /*long*/ type = OS.malloc(C.PTR_SIZEOF);
+        NSString temp = new NSString(OS.NSTemporaryDirectory());
+        NSString fileName = NSString.stringWith("swt" + System.currentTimeMillis() + extension);
+        NSString fullPath = temp.stringByAppendingPathComponent(fileName);
+        NSFileManager fileManager = NSFileManager.defaultManager();
+        fileManager.createFileAtPath(fullPath, null, null);
+        workspace.getInfoForFile(fullPath, appName, type);
+        fileManager.removeItemAtPath(fullPath, 0);
+        int /*long*/ [] buffer = new int /*long*/[1];
+        OS.memmove(buffer, appName, C.PTR_SIZEOF);
+        OS.free(appName);
+        OS.free(type);
+        if (buffer [0] !is 0) {
+            NSString appPath = new NSString(buffer[0]);
+            NSBundle bundle = NSBundle.bundleWithPath(appPath);
+            if (bundle !is null) return getProgram(bundle);
+        }
+        return null;
+    } finally {
+        pool.release();
+    }
 }
 
 /**
@@ -79,199 +110,79 @@
  * @return an array of extensions
  */
 public static String [] getExtensions () {
-    return new String [] {
-        // From System-Declared Uniform Type Identifiers
-        ".txt",
-        ".rtf",
-        ".html",
-        ".htm",
-        ".xml",
-        ".c",
-        ".m",
-        ".cp", ".cpp", ".c++", ".cc", ".cxx",
-        ".mm",
-        ".h",
-        ".hpp",
-        ".h++",
-        ".hxx",
-        ".java",
-        ".jav",
-        ".s",
-        ".r",
-        ".defs",
-        ".mig",
-        ".exp",
-        ".js",
-        ".jscript",
-        ".javascript",
-        ".sh",
-        ".command",
-        ".csh",
-        ".pl",
-        ".pm",
-        ".py",
-        ".rb",
-        ".rbw",
-        ".php",
-        ".php3",
-        ".php4",
-        ".ph3",
-        ".ph4",
-        ".phtml",
-        ".jnlp",
-        ".applescript",
-        ".scpt",
-        ".o",
-        ".exe",
-        ".dll",
-        ".class",
-        ".jar",
-        ".qtz",
-        ".gtar",
-        ".tar",
-        ".gz",
-        ".gzip",
-        ".tgz",
-        ".hqx",
-        ".bin",
-        ".vcf",
-        ".vcard",
-        ".jpg",
-        ".jpeg",
-        ".jp2",
-        ".tif",
-        ".tiff",
-        ".pic",
-        ".pct",
-        ".pict",
-        ".pntg",
-        ".png",
-        ".xbm",
-        ".qif",
-        ".qtif",
-        ".icns",
-        ".mov",
-        ".qt",
-        ".avi",
-        ".vfw",
-        ".mpg",
-        ".mpeg",
-        ".m75",
-        ".m15",
-        ".mp4",
-        ".3gp",
-        ".3gpp",
-        ".3g2",
-        ".3gp2",
-        ".mp3",
-        ".m4a",
-        ".m4p",
-        ".m4b",
-        ".au",
-        ".ulw",
-        ".snd",
-        ".aifc",
-        ".aiff",
-        ".aif",
-        ".caf",
-        ".bundle",
-        ".app",
-        ".plugin",
-        ".mdimporter",
-        ".wdgt",
-        ".cpio",
-        ".zip",
-        ".framework",
-        ".rtfd",
-        ".dfont",
-        ".otf",
-        ".ttf",
-        ".ttc",
-        ".suit",
-        ".pfb",
-        ".pfa",
-        ".icc",
-        ".icm",
-        ".pf",
-        ".pdf",
-        ".ps",
-        ".eps",
-        ".psd",
-        ".ai",
-        ".gif",
-        ".bmp",
-        ".ico",
-        ".doc",
-        ".xls",
-        ".ppt",
-        ".wav",
-        ".wave",
-        ".asf",
-        ".wm",
-        ".wmv",
-        ".wmp",
-        ".wma",
-        ".asx",
-        ".wmx",
-        ".wvx",
-        ".wax",
-        ".key",
-        ".kth",
-        ".tga",
-        ".sgi",
-        ".exr",
-        ".fpx",
-        ".jfx",
-        ".efx",
-        ".sd2",
-        ".rm",
-        ".ram",
-        ".ra",
-        ".smil",
-        ".sit",
-        ".sitx",
-        // Others
-        ".plist",
-        ".nib",
-        ".lproj",
-        // iChat
-        ".iPhoto",
-        // iChat
-        ".iChat",
-        ".chat",
-        // acrobat reader
-        ".rmf",
-        ".xfdf",
-        ".fdf",
-        // Chess
-        ".game",
-        ".pgn",
-        // iCal
-        ".ics",
-        ".vcs",
-        ".aplmodel",
-        ".icbu",
-        ".icalevent",
-        ".icaltodo",
-        // Mail
-        ".mailhold",
-        ".mbox",
-        ".imapmbox",
-        ".emlx",
-        ".mailextract",
-        // Sherlock
-        ".sherlock",
-        // Stickies
-        ".tpl",
-        // System Preferences
-        ".prefPane",
-        ".sliderSaver",
-        ".saver",
-        // Console
-        ".log",
-        // Grapher
-        ".gcx",
-    };
+    NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSMutableSet supportedDocumentTypes = (NSMutableSet)NSMutableSet.set();
+        NSWorkspace workspace = NSWorkspace.sharedWorkspace();
+        NSString CFBundleDocumentTypes = NSString.stringWith("CFBundleDocumentTypes");
+        NSString CFBundleTypeExtensions = NSString.stringWith("CFBundleTypeExtensions");
+        NSArray array = new NSArray(OS.NSSearchPathForDirectoriesInDomains(OS.NSAllApplicationsDirectory, OS.NSAllDomainsMask, true));
+        int count = (int)/*64*/array.count();
+        for (int i = 0; i < count; i++) {
+            NSString path = new NSString(array.objectAtIndex(i));
+            NSFileManager fileManager = NSFileManager.defaultManager();
+            NSDirectoryEnumerator enumerator = fileManager.enumeratorAtPath(path);
+            if (enumerator !is null) {
+                id id;
+                while ((id = enumerator.nextObject()) !is null) {
+                    enumerator.skipDescendents();
+                    NSString filePath = new NSString(id.id);
+                    NSString fullPath = path.stringByAppendingPathComponent(filePath);
+                    if (workspace.isFilePackageAtPath(fullPath)) {
+                        NSBundle bundle = NSBundle.bundleWithPath(fullPath);
+                        id = bundle.infoDictionary().objectForKey(CFBundleDocumentTypes);
+                        if (id !is null) {
+                            NSDictionary documentTypes = new NSDictionary(id.id);
+                            NSEnumerator documentTypesEnumerator = documentTypes.objectEnumerator();
+                            while ((id = documentTypesEnumerator.nextObject()) !is null) {
+                                NSDictionary documentType = new NSDictionary(id.id);
+                                id = documentType.objectForKey(CFBundleTypeExtensions);
+                                if (id !is null) {
+                                    supportedDocumentTypes.addObjectsFromArray(new NSArray(id.id));
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        int i = 0;
+        String[] exts = new String[(int)/*64*/supportedDocumentTypes.count()];
+        NSEnumerator enumerator = supportedDocumentTypes.objectEnumerator();
+        id id;
+        while ((id = enumerator.nextObject()) !is null) {
+            String ext = new NSString(id.id).getString();
+            if (!ext.equals("*")) exts[i++] = "." + ext;
+        }
+        if (i !is exts.length) {
+            String[] temp = new String[i];
+            System.arraycopy(exts, 0, temp, 0, i);
+            exts = temp;
+        }
+        return exts;
+    } finally {
+        pool.release();
+    }
+}
+
+static Program getProgram(NSBundle bundle) {
+    NSString CFBundleName = NSString.stringWith("CFBundleName");
+    NSString CFBundleDisplayName = NSString.stringWith("CFBundleDisplayName");
+    NSString fullPath = bundle.bundlePath();
+    NSString identifier = bundle.bundleIdentifier();
+    id bundleName = bundle.objectForInfoDictionaryKey(CFBundleDisplayName);
+    if (bundleName is null) {
+        bundleName = bundle.objectForInfoDictionaryKey(CFBundleName);
+    }
+    if (bundleName is null) {
+        bundleName = fullPath.lastPathComponent().stringByDeletingPathExtension();
+    }
+    NSString name = new NSString(bundleName.id);
+    Program program = new Program();
+    program.name = name.getString();
+    program.fullPath = fullPath.getString();
+    program.identifier = identifier !is null ? identifier.getString() : "";
+    return program;
 }
 
 /**
@@ -282,72 +193,43 @@
  * @return an array of programs
  */
 public static Program [] getPrograms () {
-    return new Program[0];
-//  Hashtable bundles = new Hashtable();
-//  String[] extensions = getExtensions();
-//  byte[] fsRef = new byte[80];
-//  for (int i = 0; i < extensions.length; i++) {
-//      String extension = extensions[i];
-//      char[] chars = new char[extension.length() - 1];
-//      extension.getChars(1, extension.length(), chars, 0);
-//      int ext = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
-//      if (ext !is 0) {
-//          if (OS.LSGetApplicationForInfo(OS.kLSUnknownType, OS.kLSUnknownCreator, ext, OS.kLSRolesAll, fsRef, null) is OS.noErr) {
-//              Program program = getProgram(fsRef);
-//              if (program !is null && bundles.get(program.getName()) is null) {
-//                  bundles.put(program.getName(), program);
-//                  fsRef = new byte[80];
-//              }
-//          }
-//          if (OS.VERSION >= 0x1040) {
-//              int utis = OS.UTTypeCreateAllIdentifiersForTag(OS.kUTTagClassFilenameExtension(), ext, 0);
-//              if (utis !is 0) {
-//                  int utiCount = OS.CFArrayGetCount(utis);
-//                  for (int j = 0; j < utiCount; j++) {
-//                      int uti = OS.CFArrayGetValueAtIndex(utis, j);
-//                      if (uti !is 0) {
-//                          int apps = OS.LSCopyAllRoleHandlersForContentType(uti, OS.kLSRolesAll);
-//                          if (apps !is 0) {
-//                              int appCount = OS.CFArrayGetCount(apps);
-//                              for (int k = 0; k < appCount; k++) {
-//                                  int app = OS.CFArrayGetValueAtIndex(apps, k);
-//                                  if (app !is 0) {;
-//                                      if (OS.LSFindApplicationForInfo(OS.kLSUnknownCreator, app, 0, fsRef, null) is OS.noErr) {
-//                                          Program program = getProgram(fsRef);
-//                                          if (program !is null && bundles.get(program.getName()) is null) {
-//                                              bundles.put(program.getName(), program);
-//                                              fsRef = new byte[80];
-//                                          }
-//                                      }
-//                                  }
-//                              }
-//                              OS.CFRelease(apps);
-//                          }
-//                      }
-//                  }
-//                  OS.CFRelease(utis);
-//              }
-//          }
-//          OS.CFRelease(ext);
-//      }
-//  }
-//  int count = 0;
-//  Program[] programs = new Program[bundles.size()];
-//  Enumeration values = bundles.elements();
-//  while (values.hasMoreElements()) {
-//      programs[count++] = cast(Program)values.nextElement();
-//  }
-//  return programs;
+    NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        Vector vector = new Vector();
+        NSWorkspace workspace = NSWorkspace.sharedWorkspace();
+        NSArray array = new NSArray(OS.NSSearchPathForDirectoriesInDomains(OS.NSAllApplicationsDirectory, OS.NSAllDomainsMask, true));
+        int count = (int)/*64*/array.count();
+        for (int i = 0; i < count; i++) {
+            NSString path = new NSString(array.objectAtIndex(i));
+            NSFileManager fileManager = NSFileManager.defaultManager();
+            NSDirectoryEnumerator enumerator = fileManager.enumeratorAtPath(path);
+            if (enumerator !is null) {
+                id id;
+                while ((id = enumerator.nextObject()) !is null) {
+                    enumerator.skipDescendents();
+                    NSString fullPath = path.stringByAppendingPathComponent(new NSString(id.id));
+                    if (workspace.isFilePackageAtPath(fullPath)) {
+                        NSBundle bundle = NSBundle.bundleWithPath(fullPath);
+                        vector.addElement(getProgram(bundle));
+                    }
+                }
+            }
+        }
+        Program[] programs = new Program[vector.size()];
+        vector.copyInto(programs);
+        return programs;
+    } finally {
+        pool.release();
+    }
 }
 
 /**
- * Launches the executable associated with the file in
- * the operating system.  If the file is an executable,
- * then the executable is launched.  Note that a <code>Display</code>
- * must already exist to guarantee that this method returns
- * an appropriate result.
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched.  Note that a <code>Display</code> must already
+ * exist to guarantee that this method returns an appropriate result.
  *
- * @param fileName the file or program name
+ * @param fileName the file or program name or URL (http:// or https://)
  * @return <code>true</code> if the file is launched, otherwise <code>false</code>
  * 
  * @exception IllegalArgumentException <ul>
@@ -356,9 +238,27 @@
  */
 public static bool launch (String fileName) {
     if (fileName is null) DWT.error (DWT.ERROR_NULL_ARGUMENT);
-    if (fileName.indexOf(':') is -1) fileName = "file://" + fileName;
-    NSWorkspace workspace = NSWorkspace.sharedWorkspace();
-    return workspace.openURL(NSURL.static_URLWithString_(NSString.stringWith(fileName)));
+    NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSString unescapedStr = NSString.stringWith("%"); //$NON-NLS-1$
+        if (fileName.indexOf(':') is -1) {
+            fileName = PREFIX_FILE + fileName;
+        } else {
+            String lowercaseName = fileName.toLowerCase ();
+            if (lowercaseName.startsWith (PREFIX_HTTP) || lowercaseName.startsWith (PREFIX_HTTPS)) {
+                unescapedStr = NSString.stringWith("%#"); //$NON-NLS-1$
+            }
+        }
+        NSString fullPath = NSString.stringWith(fileName);
+        int /*long*/ ptr = OS.CFURLCreateStringByAddingPercentEscapes(0, fullPath.id, unescapedStr.id, 0, OS.kCFStringEncodingUTF8);
+        NSString escapedString = new NSString(ptr);
+        NSWorkspace workspace = NSWorkspace.sharedWorkspace();
+        bool result = workspace.openURL(NSURL.URLWithString(escapedString));
+        OS.CFRelease(ptr);
+        return result;
+    } finally {
+        pool.release();
+    }
 }
 
 /**
@@ -376,45 +276,26 @@
  */
 public bool execute (String fileName) {
     if (fileName is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
-//  if (OS.VERSION < 0x1040) return launch(fileName);
-//  int rc = -1;
-//  int fsRefPtr = OS.NewPtr(fsRef.length);
-//  if (fsRefPtr !is 0) {
-//      OS.memmove(fsRefPtr, fsRef, fsRef.length);
-//      LSApplicationParameters params = new LSApplicationParameters();
-//      params.version = 0;
-//      params.flags = 0;
-//      params.application = fsRefPtr;
-//      if (fileName.length() is 0) {
-//          rc = OS.LSOpenApplication(params, null);
-//      } else {
-//          if (fileName.indexOf(':') is -1) fileName = "file://" + fileName;
-//          char[] chars = new char[fileName.length()];
-//          fileName.getChars(0, chars.length, chars, 0);
-//          int str = OS.CFStringCreateWithCharacters(0, chars, chars.length);
-//          if (str !is 0) {
-//              int unscapedStr = OS.CFStringCreateWithCharacters(0, new char[]{'%'}, 1);
-//              int escapedStr = OS.CFURLCreateStringByAddingPercentEscapes(OS.kCFAllocatorDefault, str, unscapedStr, 0, OS.kCFStringEncodingUTF8);
-//              if (escapedStr !is 0) {
-//                  int urls = OS.CFArrayCreateMutable(OS.kCFAllocatorDefault, 1, 0);
-//                  if (urls !is 0) {
-//                      int url = OS.CFURLCreateWithString(OS.kCFAllocatorDefault, escapedStr, 0);
-//                      if (url !is 0) {
-//                          OS.CFArrayAppendValue(urls, url);
-//                          rc = OS.LSOpenURLsWithRole(urls, OS.kLSRolesAll, 0, params, null, 0);
-//                      }
-//                      OS.CFRelease(urls);
-//                  }
-//                  OS.CFRelease(escapedStr);
-//              }
-//              if (unscapedStr !is 0) OS.CFRelease(unscapedStr);
-//              OS.CFRelease(str);
-//          }
-//      }
-//      OS.DisposePtr(fsRefPtr);
-//  }
-//  return rc is OS.noErr;
-    return false;
+    NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSWorkspace workspace = NSWorkspace.sharedWorkspace();
+        NSString fullPath = NSString.stringWith(fileName);
+        if (fileName.indexOf(':') is -1) {
+            return workspace.openFile(fullPath, NSString.stringWith(name));
+        }
+        NSString unescapedStr = NSString.stringWith("%"); //$NON-NLS-1$
+        String lowercaseName = fileName.toLowerCase ();
+        if (lowercaseName.startsWith (PREFIX_HTTP) || lowercaseName.startsWith (PREFIX_HTTPS)) {
+            unescapedStr = NSString.stringWith("%#"); //$NON-NLS-1$
+        }
+        int /*long*/ ptr = OS.CFURLCreateStringByAddingPercentEscapes(0, fullPath.id, unescapedStr.id, 0, OS.kCFStringEncodingUTF8);
+        NSString escapedString = new NSString(ptr);
+        NSArray urls = NSArray.arrayWithObject(NSURL.URLWithString(escapedString));
+        OS.CFRelease(ptr);
+        return workspace.openURLs(urls, NSString.stringWith(identifier), 0, null, 0);
+    } finally {
+        pool.release();
+    }
 }
 
 /**
@@ -425,51 +306,50 @@
  * @return the image data for the program, may be null
  */
 public ImageData getImageData () {
-//  int[] iconRef = new int[1];
-//  OS.GetIconRefFromFileInfo(fsRef, 0, null, 0, 0, 0, iconRef, null);
-//  int[] family = new int[1];
-//  int rc = OS.IconRefToIconFamily(iconRef[0], OS.kSelectorAlLAvailableData, family);
-//  OS.ReleaseIconRef(iconRef[0]);
-//  if (rc !is OS.noErr) return null;
-////    ImageData result = createImageFromFamily(family[0], OS.kLarge32BitData, OS.kLarge8BitMask, 32, 32);
-//  ImageData result = createImageFromFamily(family[0], OS.kSmall32BitData, OS.kSmall8BitMask, 16, 16);
-//  OS.DisposeHandle(family[0]);
-//  if (result is null) {
-//      RGB[] rgbs = new RGB[] {
-//          new RGB(0xff, 0xff, 0xff), 
-//          new RGB(0x5f, 0x5f, 0x5f),
-//          new RGB(0x80, 0x80, 0x80),
-//          new RGB(0xC0, 0xC0, 0xC0),
-//          new RGB(0xDF, 0xDF, 0xBF),
-//          new RGB(0xFF, 0xDF, 0x9F),
-//          new RGB(0x00, 0x00, 0x00),
-//      };  
-//      result = new ImageData(16, 16, 4, new PaletteData(rgbs) );
-//      result.transparentPixel = 6; // use black for transparency
-//      String[] p= {
-//          "CCCCCCCCGGG",
-//          "CFAAAAACBGG",
-//          "CAAAAAACFBG",
-//          "CAAAAAACBBB",
-//          "CAAAAAAAAEB",
-//          "CAAAAAAAAEB",
-//          "CAAAAAAAAEB",
-//          "CAAAAAAAAEB",
-//          "CAAAAAAAAEB",
-//          "CAAAAAAAAEB",
-//          "CAAAAAAAAEB",
-//          "CAAAAAAAAEB",
-//          "CDDDDDDDDDB",
-//          "CBBBBBBBBBB",
-//      };
-//      for (int y= 0; y < p.length; y++) {
-//          for (int x= 0; x < 11; x++) {
-//              result.setPixel(x+3, y+1, p[y].charAt(x)-'A');
-//          }
-//      }
-//  }
-//  return result;
-    return null;
+    NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    try {
+        NSWorkspace workspace = NSWorkspace.sharedWorkspace();
+        NSString fullPath;
+        if (this.fullPath !is null) {
+            fullPath = NSString.stringWith(this.fullPath);
+        } else {
+            fullPath = workspace.fullPathForApplication(NSString.stringWith(name));
+        }
+        if (fullPath !is null) {
+            NSImage nsImage = workspace.iconForFile(fullPath);
+            if (nsImage !is null) {
+                NSSize size = new NSSize();
+                size.width = size.height = 16;
+                nsImage.setSize(size);
+                NSBitmapImageRep imageRep = null;
+                NSImageRep rep = nsImage.bestRepresentationForDevice(null);
+                if (rep.isKindOfClass(OS.class_NSBitmapImageRep)) { 
+                    imageRep = new NSBitmapImageRep(rep.id);
+                }
+                if (imageRep !is null) {
+                    int width = (int)/*64*/imageRep.pixelsWide();
+                    int height = (int)/*64*/imageRep.pixelsHigh();
+                    int bpr = (int)/*64*/imageRep.bytesPerRow();
+                    int bpp = (int)/*64*/imageRep.bitsPerPixel();
+                    int dataSize = height * bpr;
+                    byte[] srcData = new byte[dataSize];
+                    OS.memmove(srcData, imageRep.bitmapData(), dataSize);
+                    //TODO check color info
+                    PaletteData palette = new PaletteData(0xFF000000, 0xFF0000, 0xFF00);
+                    ImageData data = new ImageData(width, height, bpp, palette, 4, srcData);
+                    data.bytesPerLine = bpr;
+                    data.alphaData = new byte[width * height];
+                    for (int i = 3, o = 0; i < srcData.length; i+= 4, o++) {
+                        data.alphaData[o] = srcData[i];
+                    }
+                    return data;
+                }
+            }
+        }
+        return null;
+    } finally {
+        pool.release();
+    }
 }
 
 /**
@@ -484,27 +364,6 @@
     return name;
 }
 
-//static Program getProgram(byte[] fsRef) {
-//  String name = "";
-//  int[] namePtr = new int[1];
-//  OS.LSCopyDisplayNameForRef(fsRef, namePtr);
-//  if (namePtr[0] !is 0) {
-//      int length = OS.CFStringGetLength(namePtr[0]);
-//      if (length !is 0) {
-//          char[] buffer= new char[length];
-//          CFRange range = new CFRange();
-//          range.length = length;
-//          OS.CFStringGetCharacters(namePtr[0], range, buffer);
-//          name = new String(buffer);
-//      }
-//      OS.CFRelease(namePtr[0]);
-//  }
-//  Program program = new Program();
-//  program.fsRef = fsRef;
-//  program.name = name;
-//  return program;
-//}
-
 /**
  * Compares the argument to the receiver, and returns true
  * if they represent the <em>same</em> object using a class
@@ -517,8 +376,8 @@
  */
 public bool equals(Object other) {
     if (this is other) return true;
-    if ( null !is cast(Program)other ) {
-        final Program program = cast(Program) other;
+    if (other instanceof Program) {
+        final Program program = (Program) other;
         return name.equals(program.name);
     }
     return false;
--- a/dwt/widgets/Button.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Button.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,27 +9,36 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Button;
 
 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
 import dwt.graphics.Image;
+import dwt.graphics.Point;
+import dwt.internal.cocoa.NSAffineTransform;
 import dwt.internal.cocoa.NSAttributedString;
+import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSButton;
 import dwt.internal.cocoa.NSButtonCell;
 import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSControl;
 import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSFont;
+import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSMutableDictionary;
 import dwt.internal.cocoa.NSMutableParagraphStyle;
+import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTButton;
+import dwt.internal.cocoa.id;
 
 import dwt.dwthelper.utils;
 import dwt.internal.cocoa.CGFloat;
@@ -63,6 +72,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#button">Button snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Button : Control {
     String text = "";
@@ -109,6 +122,37 @@
     super (parent, checkStyle (style));
 }
 
+int accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    NSString nsAttributeName = new NSString(arg0);
+    
+    if (accessible !is null) {
+        id returnObject = accessible.internal_accessibilityAttributeValue(nsAttributeName, ACC.CHILDID_SELF);
+        if (returnObject !is null) return returnObject.id;
+    }
+    
+    if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
+        NSString role = null;
+        
+        if ((style & DWT.RADIO) !is 0) {
+            role = OS.NSAccessibilityRadioButtonRole;
+        } else if ((style & DWT.ARROW) !is 0) {
+            role = OS.NSAccessibilityButtonRole;
+        }
+        
+        if (role !is null) {
+            if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute))
+                return role.id;
+            else {
+                int roleDescription = OS.NSAccessibilityRoleDescription(role.id, 0);
+                return roleDescription;
+            }
+        }
+    }
+    
+    return super.accessibilityAttributeValue(id, sel, arg0);
+}
+
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the control is selected by the user, by sending
@@ -160,15 +204,26 @@
     postEvent (DWT.Selection);
 }
 
+public Point computeSize (int wHint, int hHint, bool changed) {
+    checkWidget();
+    if ((style & DWT.ARROW) !is 0) {
+        // TODO use some OS metric instead of hardcoded values
+        int width = wHint !is DWT.DEFAULT ? wHint : 23;
+        int height = hHint !is DWT.DEFAULT ? hHint : 23;
+        return new Point (width, height);
+    }
+    return super.computeSize(wHint, hHint, changed);
+}
+
 NSAttributedString createString() {
     NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
     if (foreground !is null) {
         NSColor color = NSColor.colorWithDeviceRed(cast(CGFloat) foreground.handle[0], cast(CGFloat) foreground.handle[1], cast(CGFloat) foreground.handle[2], 1);
-        dict.setObject(color, OS.NSForegroundColorAttributeName());
+        dict.setObject(color, OS.NSForegroundColorAttributeName);
     }
-    if (font !is null) {
-        dict.setObject(font.handle, OS.NSFontAttributeName());
-    }
+
+    dict.setObject(getFont().handle, OS.NSFontAttributeName);
+
     NSTextAlignment alignment;
     if ((style & DWT.CENTER) !is 0) {
         alignment = NSCenterTextAlignment;
@@ -180,12 +235,12 @@
     NSMutableParagraphStyle pStyle = cast(NSMutableParagraphStyle)(new NSMutableParagraphStyle()).alloc().init();
     pStyle.autorelease();
     pStyle.setAlignment(alignment);
-    dict.setObject(pStyle, OS.NSParagraphStyleAttributeName());
+    dict.setObject(pStyle, OS.NSParagraphStyleAttributeName);
     char [] chars = new char [text.length ()];
     text.getChars (0, chars.length, chars, 0);
     NSUInteger length = fixMnemonic (chars);
     NSString str = NSString.stringWithCharacters(chars.toString16().ptr, length);
-    NSAttributedString attribStr = (cast(NSAttributedString)(new NSAttributedString()).alloc()).initWithString_attributes_(str, dict);
+    NSAttributedString attribStr = (cast(NSAttributedString)(new NSAttributedString()).alloc()).initWithString(str, dict);
     attribStr.autorelease();
     return attribStr;
 }
@@ -193,9 +248,14 @@
 void createHandle () {
     NSButton widget = cast(NSButton)(new SWTButton()).alloc();
     widget.initWithFrame(NSRect());
-    NSButtonType type = NSMomentaryPushButton;
+    NSButtonType type = NSMomentaryLightButton;
     if ((style & DWT.PUSH) !is 0) {
-        widget.setBezelStyle(NSRoundedBezelStyle);
+        if ((style & DWT.FLAT) !is 0) {
+            widget.setBezelStyle(OS.NSShadowlessSquareBezelStyle);
+//          if ((style & DWT.BORDER) is 0) widget.setShowsBorderOnlyWhileMouseInside(true);
+        } else {
+            widget.setBezelStyle(OS.NSRoundedBezelStyle);
+        }
     } else if ((style & DWT.CHECK) !is 0) {
         type = NSSwitchButton;
         widget.setAllowsMixedState (true);
@@ -204,20 +264,70 @@
     } else if ((style & DWT.TOGGLE) !is 0) {
         type = NSPushOnPushOffButton;
         widget.setBezelStyle(NSRegularSquareBezelStyle);
+            widget.setBezelStyle(OS.NSShadowlessSquareBezelStyle);
+//          if ((style & DWT.BORDER) is 0) widget.setShowsBorderOnlyWhileMouseInside(true);
+        } else {
+            widget.setBezelStyle(OS.NSRoundedBezelStyle);
+        }
     } else if ((style & DWT.ARROW) !is 0) {
-        widget.setBezelStyle(NSRoundedDisclosureBezelStyle);
+        widget.setBezelStyle(NSRegularSquareBezelStyle);
     }
     widget.setButtonType(type);
     widget.setTitle(NSString.stringWith(""));
     widget.setImagePosition(NSImageLeft);
     widget.setTarget(widget);
     widget.setAction(OS.sel_sendSelection);
-    widget.setTag(jniRef);
-    view = widget;  
-    parent.contentView().addSubview_(widget);
+    view = widget;
     _setAlignment(style);
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget(((NSControl)view).cell());
+}
+
+void drawWidget (int /*long*/ id, NSRect rect) {
+    if ((style & DWT.ARROW) !is 0) {    
+        NSRect frame = view.frame();
+        int arrowSize = Math.min((int)frame.height, (int)frame.width) / 2;
+        NSGraphicsContext context = NSGraphicsContext.currentContext();
+        context.saveGraphicsState();
+        NSPoint p1 = new NSPoint();
+        p1.x = (float)Math.floor(-arrowSize / 2);
+        p1.y = (float)Math.floor(-arrowSize / 2);
+        NSPoint p2 = new NSPoint();
+        p2.x = (float)Math.ceil(arrowSize / 2);
+        p2.y = p1.y;
+        NSPoint p3 = new NSPoint();
+        p3.y = (float)Math.ceil(arrowSize / 2);
+    
+        NSBezierPath path = NSBezierPath.bezierPath();
+        path.moveToPoint(p1);
+        path.lineToPoint(p2);
+        path.lineToPoint(p3);
+        path.closePath();
+    
+        NSAffineTransform transform = NSAffineTransform.transform();
+        if ((style & DWT.LEFT) !is 0) {
+            transform.rotateByDegrees(90);
+        } else if ((style & DWT.UP) !is 0) {
+            transform.rotateByDegrees(180);
+        } else if ((style & DWT.RIGHT) !is 0) {
+            transform.rotateByDegrees(-90);
+        }
+        path.transformUsingAffineTransform(transform);
+        transform = NSAffineTransform.transform();
+        transform.translateXBy(frame.width / 2, frame.height / 2);
+        path.transformUsingAffineTransform(transform);
+    
+        NSColor color = isEnabled() ? NSColor.blackColor() : NSColor.disabledControlTextColor();
+        color.set();
+        path.fill();
+        context.restoreGraphicsState();
+    }
+    super.drawWidget (id, rect);
+}
+
 /**
  * Returns a value which describes the position of the
  * text or image in the receiver. The value will be one of
@@ -249,6 +359,20 @@
     return DWT.LEFT;
 }
 
+/**
+ * Returns <code>true</code> if the receiver is grayed,
+ * and false otherwise. When the widget does not have
+ * the <code>CHECK</code> style, return false.
+ *
+ * @return the grayed state of the checkbox
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public bool getGrayed() {
     checkWidget ();
     if ((style &DWT.CHECK) !is 0) return false;
@@ -315,6 +439,11 @@
     return text;
 }
 
+void register() {
+    super.register();
+    display.addWidget(((NSControl)view).cell(), this);
+}
+
 void releaseWidget () {
     super.releaseWidget ();
     image = null;
@@ -470,14 +599,38 @@
 
 void setDefault (bool value) {
     if ((style & DWT.PUSH) is 0) return;
-//  int window = OS.GetControlOwner (handle);
-//  OS.SetWindowDefaultButton (window, value ? handle : 0);
+//  NSWindow window = view.window();
+//  NSButtonCell cell = null;
+//  if (value) {
+//      cell = new NSButtonCell(((NSButton)view).cell());
+//  }
+//  window.setDefaultButtonCell(cell);
+}
+
+void setFont (NSFont font) {
+    if (text !is null) {
+        ((NSButton)view).setAttributedTitle(createString());
+    }
 }
 
 void setForeground (float [] color) {
     (cast(NSButton)view).setAttributedTitle(createString());
 }
 
+/**
+ * Sets the grayed state of the receiver.  This state change 
+ * only applies if the control was created with the DWT.CHECK
+ * style.
+ *
+ * @param grayed the new grayed state
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public void setGrayed(bool grayed) {
     checkWidget ();
     if ((style & DWT.CHECK) is 0) return;
@@ -513,12 +666,12 @@
  */
 public void setImage (Image image) {
     checkWidget();
-    if ((style & DWT.ARROW) !is 0) return;
     if (image !is null && image.isDisposed ()) {
         error (DWT.ERROR_INVALID_ARGUMENT);
     }
+    if ((style & DWT.ARROW) !is 0) return;
     this.image = image;
-    (cast(NSButton)view).setImage(image.handle);
+    (cast(NSButton)view).setImage(image !is null ? image.handle : null);
 }
 
 bool setRadioSelection (bool value){
@@ -597,6 +750,7 @@
 
 int traversalCode (int key, NSEvent theEvent) {
     int code = super.traversalCode (key, theEvent);
+    if ((style & DWT.ARROW) !is 0) code &= ~(DWT.TRAVERSE_TAB_NEXT | DWT.TRAVERSE_TAB_PREVIOUS);
     if ((style & DWT.RADIO) !is 0) code |= DWT.TRAVERSE_ARROW_NEXT | DWT.TRAVERSE_ARROW_PREVIOUS;
     return code;
 }
--- a/dwt/widgets/Canvas.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Canvas.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Canvas;
 
@@ -22,8 +22,11 @@
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSCursor;
+import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.OS;
@@ -53,6 +56,9 @@
  * </p>
  *
  * @see Composite
+ * @see <a href="http://www.eclipse.org/swt/snippets/#canvas">Canvas snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Canvas : Composite {
     Caret caret;
@@ -62,14 +68,19 @@
     /* Do nothing */
 }
 
-bool becomeFirstResponder () {
-    if (caret !is null) caret.setFocus ();
-    return super.becomeFirstResponder();
+int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+    if (ime !is null) return ime.attributedSubstringFromRange (id, sel, range);
+    return super.attributedSubstringFromRange(id, sel, range);
 }
 
-bool resignFirstResponder () {
+bool becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+    if (caret !is null) caret.setFocus ();
+    return super.becomeFirstResponder(id, sel);
+}
+
+bool resignFirstResponder (int /*long*/ id, int /*long*/ sel) {
     if (caret !is null) caret.killFocus ();
-    return super.resignFirstResponder();
+    return super.resignFirstResponder(id, sel);
 }
 
 
@@ -104,6 +115,11 @@
     super (parent, style);
 }
 
+int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) {
+    if (ime !is null) return ime.characterIndexForPoint (id, sel, point);
+    return super.characterIndexForPoint (id, sel, point);
+}
+
 /** 
  * Fills the interior of the rectangle specified by the arguments,
  * with the receiver's background. 
@@ -131,14 +147,19 @@
     if (gc.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     Control control = findBackgroundControl ();
     if (control !is null) {
-//      control.fillBackground (handle, gc.handle, new Rectangle (x, y, width, height));
+        NSRect rect = new NSRect();
+        rect.x = x;
+        rect.y = y;
+        rect.width = width;
+        rect.height = height;
+        control.fillBackground (view, gc.handle, rect);
     } else {
         gc.fillRectangle (x, y, width, height);
     }
 }
 
-void drawRect(objc.id id, NSRect rect) {
-    super.drawRect(id, rect);
+void drawWidget (objc.id id_, NSRect rect) {
+    super.drawWidget (id, rect);
     if (caret is null) return;
     if (caret.isShowing) {
         NSGraphicsContext context = NSGraphicsContext.currentContext();
@@ -170,6 +191,11 @@
     }
 }
 
+NSRect firstRectForCharacterRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+    if (ime !is null) return ime.firstRectForCharacterRange (id, sel, range);
+    return super.firstRectForCharacterRange (id, sel, range);
+}
+
 /**
  * Returns the caret.
  * <p>
@@ -181,7 +207,7 @@
  * drawing in the window any other time.
  * </p>
  *
- * @return the caret
+ * @return the caret for the receiver, may be null
  *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -193,11 +219,40 @@
     return caret;
 }
 
+/**
+ * Returns the IME.
+ *
+ * @return the IME
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public IME getIME () {
     checkWidget();
     return ime;
 }
 
+bool hasMarkedText (int /*long*/ id, int /*long*/ sel) {
+    if (ime !is null) return ime.hasMarkedText (id, sel);
+    return super.hasMarkedText (id, sel);
+}
+
+bool insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+    if (ime !is null) {
+        if (!ime.insertText (id, sel, string)) return false;
+    }
+    return super.insertText (id, sel, string);
+}
+
+NSRange markedRange (int /*long*/ id, int /*long*/ sel) {
+    if (ime !is null) return ime.markedRange (id, sel);
+    return super.markedRange (id, sel);
+}
+
 //void redrawWidget (int control, bool children) {
 //  bool isFocus = OS.VERSION < 0x1040 && caret !is null && caret.isFocusCaret ();
 //  if (isFocus) caret.killFocus ();
@@ -291,6 +346,16 @@
     if (isFocus) caret.setFocus ();
 }
 
+NSRange selectedRange (int /*long*/ id, int /*long*/ sel) {
+    if (ime !is null) return ime.selectedRange (id, sel);
+    return super.selectedRange (id, sel);
+}
+
+bool sendKeyEvent (NSEvent nsEvent, int type) {
+    if (caret !is null) NSCursor.setHiddenUntilMouseMoves (true);
+    return super.sendKeyEvent (nsEvent, type);
+}
+
 /**
  * Sets the receiver's caret.
  * <p>
@@ -331,10 +396,37 @@
     super.setFont (font);
 }
 
+/**
+ * Sets the receiver's IME.
+ * 
+ * @param ime the new IME for the receiver, may be null
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if the IME has been disposed</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public void setIME (IME ime) {
     checkWidget ();
     if (ime !is null && ime.isDisposed()) error(DWT.ERROR_INVALID_ARGUMENT);
     this.ime = ime;
 }
 
+bool setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) {
+    if (ime !is null) {
+        if (!ime.setMarkedText_selectedRange (id, sel, string, range)) return false;
+    }
+    return super.setMarkedText_selectedRange (id, sel, string, range);
 }
+
+int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) {
+    if (ime !is null) return ime.validAttributesForMarkedText (id, sel);
+    return super.validAttributesForMarkedText(id, sel);
+}
+
+}
--- a/dwt/widgets/Caret.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Caret.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Caret;
 
@@ -40,6 +40,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#caret">Caret snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Canvas tab</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Caret : Widget {
     Canvas parent;
--- a/dwt/widgets/ColorDialog.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/ColorDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.ColorDialog;
 
@@ -21,7 +21,6 @@
 import dwt.internal.cocoa.NSApplication;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSColorPanel;
-import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTPanelDelegate;
 
@@ -44,6 +43,9 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Dialog tab</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class ColorDialog : Dialog {
     RGB rgb;
@@ -98,11 +100,11 @@
      * @see Widget#getStyle
      */
     public this(Shell parent, int style) {
-        super(parent, style);
+    super (parent, checkStyle (parent, style));
         checkSubclass ();
     }
     
-    void changeColor(int sender) {
+void changeColor(objc.id id, objc.SEL sel, objc.id sender) {
         //TODO
     }
     
@@ -139,17 +141,17 @@
         SWTPanelDelegate delegate_ = cast(SWTPanelDelegate)(new SWTPanelDelegate()).alloc().init();
         NSInteger jniRef = OS.NewGlobalRef(this);
         if (jniRef is 0) DWT.error(DWT.ERROR_NO_HANDLES);
-        delegate_.setTag(jniRef);
+    OS.object_setInstanceVariable(delegate_.id_, Display.DWT_OBJECT, jniRef);
         panel.setDelegate(delegate_);
         rgb = null;
         panel.orderFront(null);
-        NSApplication.sharedApplication().runModalForWindow_(panel);
+    NSApplication.sharedApplication().runModalForWindow(panel);
         panel.setDelegate(null);
         delegate_.release();
         OS.DeleteGlobalRef(jniRef);
         NSColor color = panel.color();
         if (color !is null) {
-            color = color.colorUsingColorSpaceName_(NSString.stringWith("NSCalibratedRGBColorSpace"));
+        color = color.colorUsingColorSpaceName(OS.NSCalibratedRGBColorSpace);
             rgb = new RGB(cast(int)(color.redComponent() * 255), cast(int)(color.greenComponent() * 255), cast(int)(color.blueComponent() * 255));
         }
         return rgb;
@@ -167,7 +169,7 @@
         this.rgb = rgb;
     }
     
-    void windowWillClose(int sender) {
+void windowWillClose(objc.id id, objc.SEL sel, objc.id sender) {
         NSApplication.sharedApplication().stop(null);
     }
     }
--- a/dwt/widgets/Combo.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Combo.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,12 +25,18 @@
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSComboBox;
 import dwt.internal.cocoa.NSControl;
+import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSMenuItem;
+import dwt.internal.cocoa.NSNotification;
 import dwt.internal.cocoa.NSPopUpButton;
+import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSText;
 import dwt.internal.cocoa.NSTextField;
+import dwt.internal.cocoa.NSTextFieldCell;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTComboBox;
 import dwt.internal.cocoa.SWTPopUpButton;
@@ -69,9 +75,14 @@
  * </p>
  *
  * @see List
+ * @see <a href="http://www.eclipse.org/swt/snippets/#combo">Combo snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Combo : Composite {
     int textLimit = LIMIT;
+    bool receivingFocus;
+    NSRange selectionRange;
 
     /**
      * the operating system limit for the number of characters
@@ -279,6 +290,13 @@
     addListener (DWT.Verify, typedListener);
 }
 
+bool becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+    receivingFocus = true;
+    bool result = super.becomeFirstResponder (id, sel);
+    receivingFocus = false;
+    return result;
+}
+
 static int checkStyle (int style) {
     /*
     * Feature in Windows.  It is not possible to create
@@ -337,7 +355,7 @@
     }
 }
 
-void comboBoxSelectionDidChange(int notification) {
+void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
     sendSelection();
 }
 
@@ -345,14 +363,22 @@
     checkWidget ();
     int width = 0, height = 0;
     NSControl widget = cast(NSControl)view;
-    NSRect oldRect = widget.frame();
-    widget.sizeToFit();
-    NSRect newRect = widget.frame();
-    widget.setFrame (oldRect);
-    width = cast(int)newRect.width;
-    height = cast(int)newRect.height;
+    NSRect rect = new NSRect ();
+    rect.width = rect.height = Float.MAX_VALUE;
+    NSSize size = widget.cell ().cellSizeForBounds (rect);
+    width = (int)Math.ceil (size.width);
+    height = cast(int)Math.ceil (size.height);
+    /*
+    * Feature in Cocoa.  Attempting to create an NSComboBox with a
+    * height > 27 spews a very long warning message to stdout and
+    * often draws the combo incorrectly.  The workaround is to limit
+    * the returned height of editable Combos to the height that is
+    * required to display their text, even if a larger hHint is specified.
+    */
+    if (hHint !is DWT.DEFAULT) {
+        if ((style & DWT.READ_ONLY) !is 0 || hHint < height) height = hHint;
+    }
     if (wHint !is DWT.DEFAULT) width = wHint;
-    if (hHint !is DWT.DEFAULT) height = hHint;
     return new Point (width, height);
 }
 
@@ -373,7 +399,7 @@
     checkWidget ();
     Point selection = getSelection ();
     if (selection.x is selection.y) return;
-//  copyToClipboard (getText (selection.x, selection.y));
+    copyToClipboard (getText (selection.x, selection.y));
 }
 
 void createHandle () {
@@ -383,16 +409,12 @@
         widget.menu().setAutoenablesItems(false);
         widget.setTarget(widget);
         widget.setAction(OS.sel_sendSelection);
-        widget.setTag(jniRef);
         view = widget;
-        parent.view.addSubview_(widget);
     } else {
         NSComboBox widget = cast(NSComboBox)new SWTComboBox().alloc();
         widget.initWithFrame(new NSRect());
-        widget.setTag(jniRef);
         widget.setDelegate(widget);
         view = widget;
-        parent.contentView().addSubview_(widget);
     }
 }
 
@@ -413,25 +435,25 @@
 public void cut () {
     checkWidget ();
     if ((style & DWT.READ_ONLY) !is 0) return;
-//  Point selection = getSelection ();
-//  if (selection.x is selection.y) return;
-//  int start = selection.x, end = selection.y;
-//  String text = getText ();
-//  String leftText = text.substring (0, start);
-//  String rightText = text.substring (end, text.length ());
-//  String oldText = text.substring (start, end);
-//  String newText = "";
-//  if (hooks (DWT.Verify) || filters (DWT.Verify)) {
-//      newText = verifyText (newText, start, end, null);
-//      if (newText is null) return;
-//  }
-//  char [] buffer = new char [oldText.length ()];
-//  oldText.getChars (0, buffer.length, buffer, 0);
-//  copyToClipboard (buffer);
-//  setText (leftText + newText + rightText, false);
-//  start += newText.length ();
-//  setSelection (new Point (start, start));
-//  sendEvent (DWT.Modify);
+    Point selection = getSelection ();
+    if (selection.x is selection.y) return;
+    int start = selection.x, end = selection.y;
+    String text = getText ();
+    String leftText = text.substring (0, start);
+    String rightText = text.substring (end, text.length ());
+    String oldText = text.substring (start, end);
+    String newText = "";
+    if (hooks (DWT.Verify) || filters (DWT.Verify)) {
+        newText = verifyText (newText, start, end, null);
+        if (newText is null) return;
+    }
+    char [] buffer = new char [oldText.length ()];
+    oldText.getChars (0, buffer.length, buffer, 0);
+    copyToClipboard (buffer);
+    setText (leftText + newText + rightText, false);
+    start += newText.length ();
+    setSelection (new Point (start, start));
+    sendEvent (DWT.Modify);
 }
 
 Color defaultBackground () {
@@ -442,6 +464,12 @@
     return display.getSystemColor (DWT.COLOR_LIST_FOREGROUND);
 }
 
+
+void deregister() {
+    super.deregister();
+    display.removeWidget(((NSControl)view).cell());
+}
+
 /**
  * Deselects the item at the given zero-relative index in the receiver's 
  * list.  If the item at the index was already deselected, it remains
@@ -498,7 +526,7 @@
     } else {
         str = new NSCell((cast(NSComboBox)view).cell()).title();
     }
-    return str.length();
+    return (int)/*64*/str.length();
 }
 
 /**
@@ -528,9 +556,7 @@
         str = new NSString((cast(NSComboBox)view).itemObjectValueAtIndex(index));
     }
     if (str is null) error(DWT.ERROR_CANNOT_GET_ITEM);
-    char[] buffer = new char[str.length()];
-    str.getCharacters_(buffer);
-    return new String (buffer);
+    return str.getString();
 }
 
 /**
@@ -546,9 +572,9 @@
 public int getItemCount () {
     checkWidget ();
     if ((style & DWT.READ_ONLY) !is 0) {
-        return (cast(NSPopUpButton)view).numberOfItems();
+        return cast(int)/*64*/(cast(NSPopUpButton)view).numberOfItems();
     } else {
-        return (cast(NSComboBox)view).numberOfItems();
+        return cast(int)/*64*/(cast(NSComboBox)view).numberOfItems();
     }
 }
 
@@ -638,15 +664,11 @@
     if ((style & DWT.READ_ONLY) !is 0) {
         return new Point (0, getCharCount ());
     } else {
-//      ControlEditTextSelectionRec selection;
-//      if (this.selection !is null) {
-//          selection = this.selection;
-//      } else {
-//          selection = new ControlEditTextSelectionRec ();
-//          OS.GetControlData (handle, cast(short) OS.kHIComboBoxEditTextPart, OS.kControlEditTextSelectionTag, 4, selection, null);
-//      }
-//      return new Point (selection.selStart, selection.selEnd);
-        return null;
+        if (selectionRange is null) {
+            NSString str = new NSTextFieldCell (((NSTextField) view).cell ()).title ();
+            return new Point((int)/*64*/str.length (), (int)/*64*/str.length ());
+        }
+        return new Point((int)/*64*/selectionRange.location, (int)/*64*/(selectionRange.location + selectionRange.length));
     }
 }
 
@@ -664,9 +686,9 @@
 public int getSelectionIndex () {
     checkWidget ();
     if ((style & DWT.READ_ONLY) !is 0) {
-        return (cast(NSPopUpButton)view).indexOfSelectedItem();
+        return cast(int)/*64*/(cast(NSPopUpButton)view).indexOfSelectedItem();
     } else {
-        return (cast(NSComboBox)view).indexOfSelectedItem();
+        return indexOf (getText ());
     }
 }
 
@@ -684,25 +706,28 @@
  */
 public String getText () {
     checkWidget ();
-    return getText(0, -1);
+    return new String (getText(0, -1));
 }
 
-String getText (int start, int end) {
+char [] getText (int start, int end) {
     NSString str;
     if ((style & DWT.READ_ONLY) !is 0) {
         str = (cast(NSPopUpButton)view).titleOfSelectedItem();
     } else {
         str = new NSCell((cast(NSComboBox)view).cell()).title();
     }
-    if (str is null) return "";
-    int length = str.length();
-    char[] buffer = new char[length];
-    str.getCharacters_(buffer);
-    String string = new String(buffer);
-    if (end is -1) end = length;
-    start = Math.max(0, Math.min(start, length));
-    end = Math.max(0, Math.min(end, length));
-    return string.substring(start, end);
+    if (str is null) return new char[0];
+    NSRange range = new NSRange ();
+    range.location = start;
+    if (end is -1) {
+        int /*long*/ length = str.length();
+        range.length = length - start;
+    } else {
+        range.length = end - start;
+    }
+    char [] buffer= new char [(int)/*64*/range.length];
+    str.getCharacters(buffer, range);
+    return buffer;
 }
 
 /**
@@ -763,7 +788,7 @@
     if ((style & DWT.READ_ONLY) !is 0) {
         return getItemCount ();
     } else {
-        return (cast(NSComboBox)view).numberOfVisibleItems();
+        return cast(int)/*64*/(cast(NSComboBox)view).numberOfVisibleItems();
     }
 }
     
@@ -820,6 +845,38 @@
     return -1;
 }
 
+void insertEditText (String string) {
+    int length = string.length ();
+    Point selection = getSelection ();
+    if (hasFocus ()) {
+        if (textLimit !is LIMIT) {
+            int charCount = getCharCount();
+            if (charCount - (selection.y - selection.x) + length > textLimit) {
+                length = textLimit - charCount + (selection.y - selection.x);
+            }
+        }
+        char [] buffer = new char [length];
+        string.getChars (0, buffer.length, buffer, 0);
+        NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
+        NSText editor = ((NSTextField) view).currentEditor ();
+        editor.replaceCharactersInRange (editor.selectedRange (), nsstring);
+        selectionRange = null;
+    } else {
+        String oldText = getText ();
+        if (textLimit !is LIMIT) {
+            int charCount = oldText.length ();
+            if (charCount - (selection.y - selection.x) + length > textLimit) {
+                string = string.substring(0, textLimit - charCount + (selection.y - selection.x));
+            }
+        }
+        String newText = oldText.substring (0, selection.x) + string + oldText.substring (selection.y);
+        NSString nsstring = NSString.stringWith(newText);
+        new NSCell (((NSTextField) view).cell ()).setTitle (nsstring);
+        selectionRange = null;
+        setSelection (new Point(selection.x + string.length (), 0));
+    }
+}
+
 /**
  * Pastes text from clipboard.
  * <p>
@@ -837,26 +894,36 @@
 public void paste () {
     checkWidget ();
     if ((style & DWT.READ_ONLY) !is 0) return;
-//  Point selection = getSelection ();
-//  int start = selection.x, end = selection.y;
-//  String text = getText ();
-//  String leftText = text.substring (0, start);
-//  String rightText = text.substring (end, text.length ());
-//  String newText = getClipboardText ();
-//  if (hooks (DWT.Verify) || filters (DWT.Verify)) {
-//      newText = verifyText (newText, start, end, null);
-//      if (newText is null) return;
-//  }
-//  if (textLimit !is LIMIT) {
-//      int charCount = text.length ();
-//      if (charCount - (end - start) + newText.length() > textLimit) {
-//          newText = newText.substring(0, textLimit - charCount + (end - start));
-//      }
-//  }
-//  setText (leftText + newText + rightText, false);
-//  start += newText.length ();
-//  setSelection (new Point (start, start));
-//  sendEvent (DWT.Modify);
+    Point selection = getSelection ();
+    int start = selection.x, end = selection.y;
+    String text = getText ();
+    String leftText = text.substring (0, start);
+    String rightText = text.substring (end, text.length ());
+    String newText = getClipboardText ();
+    if (hooks (DWT.Verify) || filters (DWT.Verify)) {
+        newText = verifyText (newText, start, end, null);
+        if (newText is null) return;
+    }
+    if (textLimit !is LIMIT) {
+        int charCount = text.length ();
+        if (charCount - (end - start) + newText.length() > textLimit) {
+            newText = newText.substring(0, textLimit - charCount + (end - start));
+        }
+    }
+    setText (leftText + newText + rightText, false);
+    start += newText.length ();
+    setSelection (new Point (start, start));
+    sendEvent (DWT.Modify);
+}
+
+void register() {
+    super.register();
+    display.addWidget(((NSControl)view).cell(), this);
+}
+
+void releaseWidget () {
+    super.releaseWidget ();
+    selectionRange = null;
 }
 
 /**
@@ -1117,6 +1184,77 @@
     postEvent(DWT.Selection);
 }
 
+bool sendKeyEvent (NSEvent nsEvent, int type) {
+    bool result = super.sendKeyEvent (nsEvent, type);
+    if (!result) return result;
+    int stateMask = 0;
+    int /*long*/ modifierFlags = nsEvent.modifierFlags();
+    if ((modifierFlags & OS.NSAlternateKeyMask) !is 0) stateMask |= DWT.ALT;
+    if ((modifierFlags & OS.NSShiftKeyMask) !is 0) stateMask |= DWT.SHIFT;
+    if ((modifierFlags & OS.NSControlKeyMask) !is 0) stateMask |= DWT.CONTROL;
+    if ((modifierFlags & OS.NSCommandKeyMask) !is 0) stateMask |= DWT.COMMAND;
+    if (type !is DWT.KeyDown)  return result;
+    if (stateMask is DWT.COMMAND) {
+        short keyCode = nsEvent.keyCode ();
+        switch (keyCode) {
+            case 7: /* X */
+                cut ();
+                return false;
+            case 8: /* C */
+                copy ();
+                return false;
+            case 9: /* V */
+                paste ();
+                return false;
+        }
+    }
+    if ((style & DWT.SINGLE) !is 0) {
+        short keyCode = nsEvent.keyCode ();
+        switch (keyCode) {
+            case 76: /* KP Enter */
+            case 36: /* Return */
+                postEvent (DWT.DefaultSelection);
+        }
+    }
+    if ((style & DWT.READ_ONLY) !is 0) return result;
+    if ((stateMask & DWT.COMMAND) !is 0) return result;
+    String oldText = "";
+    int charCount = getCharCount ();
+    Point selection = getSelection ();
+    int start = selection.x, end = selection.y;
+    short keyCode = nsEvent.keyCode ();
+    NSString characters = nsEvent.charactersIgnoringModifiers();
+    char character = (char) characters.characterAtIndex(0);
+    switch (keyCode) {
+        case 51: /* Backspace */
+            if (start is end) {
+                if (start is 0) return true;
+                start = Math.max (0, start - 1);
+            }
+            break;
+        case 117: /* Delete */
+            if (start is end) {
+                if (start is charCount) return true;
+                end = Math.min (end + 1, charCount);
+            }
+            break;
+        default:
+            if (character !is '\t' && character < 0x20) return true;
+            oldText = new String (new char [] {character});
+    }
+    String newText = verifyText (oldText, start, end, nsEvent);
+    if (newText is null) return false;
+    if (charCount - (end - start) + newText.length () > textLimit) {
+        return false;
+    }
+    result = newText is oldText;
+    if (newText !is oldText) {
+        insertEditText (newText);
+        if (newText.length () !is 0) sendEvent (DWT.Modify);
+    }
+    return result;
+}
+
 void setBackground (float [] color) {
     NSColor nsColor;
     if (color is null) {
@@ -1124,7 +1262,29 @@
     } else {
         nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], 1);
     }
-    (cast(NSTextField)view).setBackgroundColor(nsColor);
+    if ((style & DWT.READ_ONLY) !is 0) {
+        //TODO
+    } else {
+        (cast(NSTextField)view).setBackgroundColor(nsColor);
+    }
+}
+
+void setBounds (int x, int y, int width, int height, bool move, bool resize) {
+    /*
+     * Feature in Cocoa.  Attempting to create an NSComboBox with a
+     * height > 27 spews a very long warning message to stdout and
+     * often draws the combo incorrectly.  The workaround is to limit
+     * the height of editable Combos to the height that is required
+     * to display their text.
+     */
+    if ((style & DWT.READ_ONLY) is 0) {
+        NSControl widget = (NSControl)view;
+        NSRect rect = new NSRect ();
+        rect.width = rect.height = Float.MAX_VALUE;
+        NSSize size = widget.cell ().cellSizeForBounds (rect);
+        height = Math.min (height, (int)Math.ceil (size.height));
+    }
+    super.setBounds (x, y, width, height, move, resize);
 }
 
 void setForeground (float [] color) {
@@ -1134,7 +1294,11 @@
     } else {
         nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], 1);
     }
-    (cast(NSTextField)view).setTextColor(nsColor);
+    if ((style & DWT.READ_ONLY) !is 0) {
+        //TODO
+    } else {
+        (cast(NSTextField)view).setTextColor(nsColor);
+    }
 }
 
 /**
@@ -1205,6 +1369,24 @@
     }
 }
 
+/**
+ * Marks the receiver's list as visible if the argument is <code>true</code>,
+ * and marks it invisible otherwise.
+ * <p>
+ * If one of the receiver's ancestors is not visible or some
+ * other condition makes the receiver not visible, marking
+ * it visible may not actually cause it to be displayed.
+ * </p>
+ *
+ * @param visible the new visibility state
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 /*public*/ void setListVisible (bool visible) {
     checkWidget ();
     if ((style & DWT.READ_ONLY) !is 0) {
@@ -1251,16 +1433,17 @@
     checkWidget ();
     if (selection is null) error (DWT.ERROR_NULL_ARGUMENT);
     if ((style & DWT.READ_ONLY) is 0) {
-//      int length = getCharCount ();
-//      int start = selection.x, end = selection.y;
-//      ControlEditTextSelectionRec sel = new ControlEditTextSelectionRec ();
-//      sel.selStart = cast(short) Math.min (Math.max (Math.min (start, end), 0), length);
-//      sel.selEnd = cast(short) Math.min (Math.max (Math.max (start, end), 0), length);
-//      if (hasFocus ()) {
-//          OS.SetControlData (handle, OS.kHIComboBoxEditTextPart, OS.kControlEditTextSelectionTag, 4, sel);
-//      } else {
-//          this.selection = sel;
-//      }
+        NSString str = new NSCell(((NSComboBox)view).cell()).title();
+        int length = (int)/*64*/str.length();
+        int start = Math.min (Math.max (Math.min (selection.x, selection.y), 0), length);
+        int end = Math.min (Math.max (Math.max (selection.x, selection.y), 0), length);
+        selectionRange = NSRange();
+        selectionRange.location = start;
+        selectionRange.length = end - start;
+        if (this is display.getFocusControl ()) {
+            NSText editor = view.window().fieldEditor(false, view);
+            editor.setSelectedRange(selectionRange);
+        }
     }
 }
 
@@ -1308,6 +1491,7 @@
         new NSCell((cast(NSComboBox)view).cell()).setTitle(NSString.stringWith(string));
         if (notify) sendEvent (DWT.Modify);
     }
+    selectionRange = null;
 }
 
 /**
@@ -1363,16 +1547,36 @@
     }
 }
 
-String verifyText (String string, int start, int end, Event keyEvent) {
+void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    NSNotification notification = new NSNotification(aNotification);
+    NSText editor = new NSText(notification.object().id);
+    selectionRange = editor.selectedRange();
+}
+
+void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    postEvent (DWT.Modify);
+}
+
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) {
+    /*
+    * If the selection is changing as a result of the receiver getting focus
+    * then return the receiver's last selection range, otherwise the full
+    * text will be automatically selected.
+    */
+    if (receivingFocus && selectionRange !is null) return selectionRange;
+
+    /* allow the selection change to proceed */
+    NSRange result = new NSRange();
+    OS.memmove(result, newSelectedCharRange, NSRange.sizeof);
+    return result;
+}
+
+String verifyText (String string, int start, int end, NSEvent keyEvent) {
     Event event = new Event ();
+    if (keyEvent !is null) setKeyState(event, DWT.MouseDown, keyEvent);
     event.text = string;
     event.start = start;
     event.end = end;
-    if (keyEvent !is null) {
-        event.character = keyEvent.character;
-        event.keyCode = keyEvent.keyCode;
-        event.stateMask = keyEvent.stateMask;
-    }
     /*
      * It is possible (but unlikely), that application
      * code could have disposed the widget in the verify
--- a/dwt/widgets/Composite.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Composite.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,22 +9,26 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Composite;
 
 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSScrollView;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTScrollView;
 import dwt.internal.cocoa.SWTView;
+import dwt.internal.cocoa.id;
 
 import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSInteger;
@@ -67,11 +71,12 @@
  * </p>
  *
  * @see Canvas
+ * @see <a href="http://www.eclipse.org/swt/snippets/#composite">Composite snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Composite : Scrollable {
     Layout layout_;
     Control[] tabList;
-    int scrolledVisibleRgn, siblingsVisibleRgn;
     int layoutCount, backgroundMode;
 
 this () {
@@ -114,18 +119,14 @@
 
 Control [] _getChildren () {
     NSArray views = contentView().subviews();
-    NSUInteger count = views.count();
+    int count = cast(int)/*64*/views.count();
     Control [] children = new Control [count];
+    if (count is 0) return children;
     int j = 0;
     for (int i=0; i<count; i++){
-        NSInteger tag = (new NSView(views.objectAtIndex(i))).tag();
-        if (tag !is 0 && tag !is -1) {
-            Object widget = OS.JNIGetObject(tag);
-            if (widget !is null && widget !is this) {
-                if ( null !is cast(Control)widget ) {
-                    children [j++] = cast(Control) widget;
-                }
-            }
+        Widget widget = display.getWidget (views.objectAtIndex (count - i - 1).id);
+        if (widget !is null && widget !is this && widget instanceof Control) {
+            children [j++] = cast(Control) widget;
         }
     }
     if (j is count) return children;
@@ -152,13 +153,38 @@
     return tabList;
 }
 
-bool acceptsFirstResponder () {
+bool acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
     if ((state & CANVAS) !is 0) {
         return ((style & DWT.NO_FOCUS) is 0);
     }
-    return super.acceptsFirstResponder ();
+    return super.acceptsFirstResponder (id, sel);
 }
 
+int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+    
+    if (id is view.id) {
+        if (accessible !is null) {
+            // If there is an accessible, it may provide its own list of attributes if it's a lightweight control.
+            // If not, let Cocoa handle it for this view.
+            id returnObject = accessible.internal_accessibilityAttributeNames(ACC.CHILDID_SELF);
+            if (returnObject !is null) return returnObject.id;
+        }
+    }
+    
+    return super.accessibilityAttributeNames(id, sel);
+}
+
+bool accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+    // If we have an accessible and it represents a valid accessible role, this view is not ignored.
+    if (view !is null && id is view.id) {
+        if (accessible !is null) {
+            id role = accessible.internal_accessibilityAttributeValue(OS.NSAccessibilityRoleAttribute, ACC.CHILDID_SELF);
+            if (role !is null) return false; 
+        }
+    }
+
+    return super.accessibilityIsIgnored(id, sel);   
+}
 
 /**
  * Clears any data that has been cached by a Layout for all widgets that 
@@ -250,40 +276,33 @@
     return result;
 }
 
-NSView contentView () {
-    return view;
-}
-
 void createHandle () {
-    createHandle (parent.contentView());
-}
-
-void createHandle (NSView parent) {
     state |= CANVAS;
     NSRect rect = NSRect();
     if ((style & (DWT.V_SCROLL | DWT.H_SCROLL)) !is 0 || hasBorder ()) {
-        SWTScrollView scrollWidget = cast(SWTScrollView)(new SWTScrollView()).alloc();
+        NSScrollView scrollWidget = cast(NSScrollView)(new SWTScrollView()).alloc();
         scrollWidget.initWithFrame (rect);
         scrollWidget.setDrawsBackground(false);
         if ((style & DWT.H_SCROLL) !is 0) scrollWidget.setHasHorizontalScroller(true);
         if ((style & DWT.V_SCROLL) !is 0) scrollWidget.setHasVerticalScroller(true);
         scrollWidget.setBorderType(hasBorder() ? NSBezelBorder : NSNoBorder);
-        scrollWidget.setTag(jniRef);
         scrollView = scrollWidget;
         rect.width = rect.height = 100000;
     }
-    SWTView widget = cast(SWTView)(new SWTView()).alloc();
+    NSView widget = cast(NSView)(new SWTView()).alloc();
     widget.initWithFrame (rect);
 //  widget.setFocusRingType(OS.NSFocusRingTypeExterior);
-    widget.setTag(jniRef);
     view = widget;
-    if (scrollView !is null) {
-//      view.setAutoresizingMask (OS.NSViewWidthSizable | OS.NSViewHeightSizable);
-        scrollView.setDocumentView(view);
-        if (parent !is null) parent.addSubview_(scrollView);
-    } else {
-        if (parent !is null) parent.addSubview_(view);
+}
+
+void drawWidget (int /*long*/ id, NSRect rect) {
+    if ((state & CANVAS) !is 0) {
+        if ((style & DWT.NO_BACKGROUND) is 0) {
+            NSGraphicsContext context = NSGraphicsContext.currentContext();
+            fillBackground (view, context, rect);
+        }
     }
+    super.drawWidget (id, rect);
 }
 
 Composite findDeferredControl () {
@@ -492,11 +511,31 @@
     return findDeferredControl () !is null;
 }
 
+bool isOpaque (int /*long*/ id, int /*long*/ sel) {
+    if ((state & CANVAS) !is 0) {
+        if (id is view.id) {
+            if (region is null && background !is null && background.handle[3] is 1) {
+                return true;
+            }
+        }
+    }
+    return super.isOpaque (id, sel);
+}
+
 bool isTabGroup () {
     if ((state & CANVAS) !is 0) return true;
     return super.isTabGroup ();
 }
 
+void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    if ((state & CANVAS) !is 0) {
+        NSArray array = NSArray.arrayWithObject (new NSEvent (theEvent));
+        view.interpretKeyEvents (array);
+        return;
+    }
+    super.keyDown (id, sel, theEvent);
+}
+
 /**
  * If the receiver has a layout, asks the layout to <em>lay out</em>
  * (that is, set the size and location of) the receiver's children. 
@@ -694,6 +733,21 @@
     return new Point (width, height);
 }
 
+void pageDown(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+    if ((state & CANVAS) !is 0) return;
+    super.pageDown(id, sel, sender);
+}
+
+void pageUp(int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+    if ((state & CANVAS) !is 0) return;
+    super.pageUp(id, sel, sender);
+}
+
+void reflectScrolledClipView (int /*long*/ id, int /*long*/ sel, int /*long*/ aClipView) {
+    if ((state & CANVAS) !is 0) return;
+    super.reflectScrolledClipView (id, sel, aClipView);
+}
+
 void releaseChildren (bool destroy) {
     Control [] children = _getChildren ();
     for (int i=0; i<children.length; i++) {
@@ -715,6 +769,56 @@
     fixTabList (control);
 }
 
+void resized () {
+    super.resized ();
+    if (layout !is null) {
+        markLayout (false, false);
+        updateLayout (false);
+    }
+}
+
+void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    if ((state & CANVAS) !is 0) {
+        NSView view = scrollView !is null ? scrollView : this.view;
+        if (id is view.id) {
+            NSEvent nsEvent = new NSEvent(theEvent);
+            float /*double*/ delta = nsEvent.deltaY();
+            if (delta !is 0) {
+                if (hooks (DWT.MouseWheel) || filters (DWT.MouseWheel)) {
+                    if (!sendMouseEvent(nsEvent, DWT.MouseWheel, true)) {
+                        return;
+                    }
+                }
+            }
+            bool handled = false;
+            ScrollBar bar = verticalBar;
+            if (delta !is 0 && bar !is null && bar.getEnabled ()) {
+                int selection = Math.max (0, (int)(0.5f + bar.getSelection () - bar.getIncrement () * delta));
+                bar.setSelection (selection);
+                Event event = new Event ();
+                event.detail = delta > 0 ? DWT.PAGE_UP : DWT.PAGE_DOWN; 
+                bar.sendEvent (DWT.Selection, event);
+                handled = true;
+            }
+            bar = horizontalBar;
+            delta = nsEvent.deltaX ();
+            if (delta !is 0 && bar !is null && bar.getEnabled ()) {
+                int selection = Math.max (0, (int)(0.5f + bar.getSelection () - bar.getIncrement () * delta));
+                bar.setSelection (selection);
+                Event event = new Event ();
+                event.detail = delta > 0 ? DWT.PAGE_UP : DWT.PAGE_DOWN; 
+                bar.sendEvent (DWT.Selection, event);
+                handled = true;
+            }
+            if (!handled) view.superview().scrollWheel(nsEvent);
+            return;
+        }
+        callSuper(id, sel, theEvent);
+        return;
+    }
+    super.scrollWheel (id, sel, theEvent);
+}
+
 /**
  * Sets the background drawing mode to the argument which should
  * be one of the following constants defined in class <code>DWT</code>:
@@ -741,15 +845,6 @@
     }
 }
 
-int setBounds (int x, int y, int width, int height, bool move, bool resize) {
-    int result = super.setBounds (x, y, width, height, move, resize);
-    if (layout_ !is null && (result & RESIZED) !is 0) {
-        markLayout (false, false);
-        updateLayout (false);
-    }
-    return result;
-}
-
 public bool setFocus () {
     checkWidget ();
     Control [] children = _getChildren ();
--- a/dwt/widgets/Control.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Control.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,13 +9,14 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Control;
 
 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.accessibility.Accessible;
 import dwt.events.ControlListener;
 import dwt.events.DragDetectListener;
@@ -40,18 +41,25 @@
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
 import dwt.graphics.Region;
+import dwt.internal.cocoa.NSApplication;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSAttributedString;
+import dwt.internal.cocoa.NSBezierPath;
+import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSControl;
+import dwt.internal.cocoa.NSDate;
 import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSGraphicsContext;
+import dwt.internal.cocoa.NSInputManager;
+import dwt.internal.cocoa.NSMutableArray;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
-import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
-import dwt.internal.cocoa.objc_super;
+import dwt.internal.cocoa.id;
 
 import tango.core.Thread;
 
@@ -89,6 +97,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#control">Control snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public abstract class Control : Widget , Drawable {
     
@@ -159,29 +171,156 @@
     createWidget ();
 }
 
-bool acceptsFirstResponder () {
-    objc_super super_struct = objc_super();
-    super_struct.receiver = view.id_;
-    super_struct.cls = cast(objc.Class) OS.objc_msgSend(view.id_, OS.sel_superclass);
-    return OS.objc_msgSendSuper(&super_struct, OS.sel_acceptsFirstResponder) !is null;
+int accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
+    if (accessible !is null) {
+        NSArray returnValue = accessible.internal_accessibilityActionNames(ACC.CHILDID_SELF);
+        if (returnValue !is null) return returnValue.id_;
+    }
+    
+    return super.accessibilityActionNames(id, sel);
+}
+
+int accessibilityAttributeNames(objc.id id, objc.SEL sel) {
+    
+    if (id is view.id_ || (cast(NSControl)view && (cast(NSControl)view).cell() !is null && (cast(NSControl)view).cell().id_ is id)) {
+        if (accessible !is null) {
+            
+            // First, see if the accessible is going to define a set of attributes for the control.
+            // If it does, return that.
+            NSArray returnValue = accessible.internal_accessibilityAttributeNames(ACC.CHILDID_SELF);
+            if (returnValue !is null) return returnValue.id;
+            
+            // If not, see if it will override or augment the standard list.
+            // Help, title, and description can be overridden.
+            NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
+            extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
+            extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
+            extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
+
+            for (int i = extraAttributes.count() - 1; i >= 0; i--) {
+                NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
+                if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) is null) {
+                    extraAttributes.removeObjectAtIndex(i);
+                }
+            }
+
+            if (extraAttributes.count() > 0) {
+                int superResult = super.accessibilityAttributeNames(id, sel);
+                NSArray baseAttributes = new NSArray(superResult);
+                NSMutableArray mutableAttributes = NSMutableArray.arrayWithCapacity(baseAttributes.count() + 1);
+                mutableAttributes.addObjectsFromArray(baseAttributes);
+                
+                for (int i = 0; i < extraAttributes.count(); i++) {
+                    id currAttribute = extraAttributes.objectAtIndex(i);
+                    if (!mutableAttributes.containsObject(currAttribute)) {
+                        mutableAttributes.addObject(currAttribute);
+                    }
+                }
+                
+                return mutableAttributes.id;
+            }
+        }
+    }
+
+    return super.accessibilityAttributeNames(id, sel);
+}
+
+int accessibilityParameterizedAttributeNames(int /*long*/ id, int /*long*/ sel) {
+
+    if (id is view.id || (view instanceof NSControl && ((NSControl)view).cell() !is null && ((NSControl)view).cell().id is id)) {
+        if (accessible !is null) {
+            NSArray returnValue = accessible.internal_accessibilityParameterizedAttributeNames(ACC.CHILDID_SELF);
+            if (returnValue !is null) return returnValue.id;
+        }
+    }
+
+    return super.accessibilityParameterizedAttributeNames(id, sel);
 }
 
-bool becomeFirstResponder () {
-//TODO - query focusControl() in DWT.FocusIn/Out is the control
-    sendEvent (DWT.FocusIn);
-    objc_super super_struct = objc_super();
-    super_struct.receiver = view.id_;
-    super_struct.cls = cast(objc.Class) OS.objc_msgSend(view.id_, OS.sel_superclass);
-    return OS.objc_msgSendSuper(&super_struct, OS.sel_becomeFirstResponder) !is null;
+
+bool accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+
+    // TODO: Carbon didn't support setting attributes, so for now Cocoa doesn't as well.
+    //  NSString attribute = new NSString(arg0);
+    //      
+    //  if (accessible !is null) {
+    //      return accessible.accessibilityIsAttributeSettable(attribute, ACC.CHILDID_SELF);
+    //  }   
+    //
+    //  return super.accessibilityIsAttributeSettable(id, sel, arg0);
+    return false;
+}
+
+int accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
+    id returnValue = null;
+
+    if (id is view.id || (view instanceof NSControl && ((NSControl)view).cell() !is null && ((NSControl)view).cell().id is id)) {
+        if (accessible !is null) {
+            returnValue = accessible.internal_accessibilityFocusedUIElement(ACC.CHILDID_SELF);
+        }
+    }
+
+    // If we had an accessible and it didn't handle the attribute request, let the
+    // superclass handle it.
+    if (returnValue is null)
+        return super.accessibilityFocusedUIElement(id, sel);
+    else
+        return returnValue.id;
 }
 
-bool resignFirstResponder () {
-//TODO - query focusControl() in DWT.FocusIn/Out is the control
-    sendEvent (DWT.FocusOut);
-    objc_super super_struct = objc_super();
-    super_struct.receiver = view.id_;
-    super_struct.cls = cast(objc.Class) OS.objc_msgSend(view.id_, OS.sel_superclass);
-    return OS.objc_msgSendSuper(&super_struct, OS.sel_resignFirstResponder) !is null;
+int accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint point) {
+    id returnValue = null;
+
+    if (id is view.id || (view instanceof NSControl && ((NSControl)view).cell() !is null && ((NSControl)view).cell().id is id)) {
+        if (accessible !is null) {
+            returnValue = accessible.internal_accessibilityHitTest(point, ACC.CHILDID_SELF);
+        }
+    }
+
+    // If we had an accessible and it didn't handle the attribute request, let the
+    // superclass handle it.
+    if (returnValue is null)
+        return super.accessibilityHitTest(id, sel, point);
+    else
+        return returnValue.id;
+}
+
+int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    NSString attribute = new NSString(arg0);
+    int returnValue = 0;
+    id returnObject = null;
+    
+    if (accessible !is null) {
+        returnObject = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
+    }
+
+    // If we had an accessible and it didn't handle the attribute request, let the
+    // superclass handle it.
+    if (returnObject is null) {
+        returnValue = super.accessibilityAttributeValue(id, sel, arg0);
+    } else {
+        returnValue = returnObject.id;
+    }
+    
+    return returnValue;
+}
+
+int accessibilityAttributeValue_forParameter(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+    NSString attribute = new NSString(arg0);
+    
+    id returnValue = null;
+    
+    if (accessible !is null) {
+        id parameter = new id(arg1);
+        returnValue = accessible.internal_accessibilityAttributeValue_forParameter(attribute, parameter, ACC.CHILDID_SELF);
+    }
+    
+    // If we had an accessible and it didn't handle the attribute request, let the
+    // superclass handle it.
+    if (returnValue is null)
+        return super.accessibilityAttributeValue_forParameter(id, sel, arg0, arg1);
+    else
+        return returnValue.id;
 }
 
 /**
@@ -618,18 +757,22 @@
     checkWidget();
     int width = DEFAULT_WIDTH;
     int height = DEFAULT_HEIGHT;
-//  if (wHint !is DWT.DEFAULT) width = wHint;
-//  if (hHint !is DWT.DEFAULT) height = hHint;
-//  int border = getBorderWidth ();
-//  width += border * 2;
-//  height += border * 2;
-//  return new Point (width, height);
     if (cast(NSControl) topView()) {
         NSRect oldRect = topView().frame();
         (cast(NSControl)topView()).sizeToFit();
         NSRect newRect = topView().frame();
         topView().setFrame (oldRect);
-        return new Point (cast(int)newRect.width, cast(int)newRect.height);
+        width = cast(int) newRect.width;
+        height = cast(int)newRect.height;
+    }
+    int border = getBorderWidth ();
+    if (wHint !is DWT.DEFAULT) {
+        width = wHint;
+        width += border * 2;
+    }
+    if (hHint !is DWT.DEFAULT) {
+        height = hHint;
+        height += border * 2;
     }
     return new Point (width, height);
 }
@@ -663,6 +806,10 @@
     return parent.computeTabRoot ();
 }
 
+NSView contentView () {
+    return view;
+}
+
 void createWidget () {
     state |= DRAG_DETECT;
     checkOrientation (parent);
@@ -692,12 +839,42 @@
     return display.getSystemColor (DWT.COLOR_WIDGET_FOREGROUND);
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (view);
+}
+
 void destroyWidget () {
     NSView view = topView ();
     view.removeFromSuperview ();
     releaseHandle ();
 }
 
+void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ selector) {
+    if (view.window ().firstResponder ().id is id) {
+        NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
+        if (nsEvent !is null && nsEvent.type () is OS.NSKeyDown) {
+            // TODO is this workaround ok?
+            /*
+             * Feature in Cocoa.  Pressing Alt+UpArrow invokes doCommandBySelector 
+             * twice, with selectors moveBackward and moveToBeginningOfParagraph
+             * (Alt+DownArrow behaves similarly).  In order to avoid sending
+             * multiple events for these keys, do not send a KeyDown if the
+             * selector is moveToBeginningOfParagraph or moveToEndOfParagraph.
+             */
+            if (selector is OS.sel_moveToBeginningOfParagraph_|| selector is OS.sel_moveToEndOfParagraph_) return;
+
+            bool [] consume = new bool [1];
+            if (translateTraversal (nsEvent.keyCode (), nsEvent, consume)) return;
+            if (isDisposed ()) return;
+            if (!sendKeyEvent (nsEvent, DWT.KeyDown)) return;
+            if (consume [0]) return;
+        }
+        if ((state & CANVAS) !is 0) return;
+    }
+    super.doCommandBySelector (id, sel, selector);
+}
+
 /**
  * Detects a drag and drop gesture.  This method is used
  * to detect a drag gesture when called from within a mouse
@@ -737,7 +914,7 @@
 public bool dragDetect (Event event) {
     checkWidget ();
     if (event is null) error (DWT.ERROR_NULL_ARGUMENT);
-    return dragDetect (event.button, event.count, event.stateMask, event.x, event.y);
+    return dragDetect ();
 }
 
 /**
@@ -779,38 +956,25 @@
 public bool dragDetect (MouseEvent event) {
     checkWidget ();
     if (event is null) error (DWT.ERROR_NULL_ARGUMENT);
-    return dragDetect (event.button, event.count, event.stateMask, event.x, event.y);
+    return dragDetect();
 }
 
-bool dragDetect (int button, int count, int stateMask, int x, int y) {
-    if (button !is 1 || count !is 1) return false;
-    if (!dragDetect (x, y, false, null)) return false;
-    return sendDragEvent (button, stateMask, x, y);
+bool dragDetect () {
+    NSApplication application = NSApplication.sharedApplication();
+    NSEvent event = application.nextEventMatchingMask(OS.NSLeftMouseDraggedMask, NSDate.dateWithTimeIntervalSinceNow(0.2), OS.NSDefaultRunLoopMode, false);
+    return (event !is null);
 }
 
 bool dragDetect (int x, int y, bool filter, bool [] consume) {
-//  Rect rect = new Rect ();
-//  int window = OS.GetControlOwner (handle);
-//  CGPoint pt = new CGPoint ();
-//  OS.HIViewConvertPoint (pt, handle, 0);
-//  x += cast(int) pt.x;
-//  y += cast(int) pt.y;
-//  OS.GetWindowBounds (window, cast(short) OS.kWindowStructureRgn, rect);
-//  x += rect.left;
-//  y += rect.top;
-//  dwt.internal.carbon.Point pt1 = new dwt.internal.carbon.Point ();
-//  pt1.h = cast(short) x;
-//  pt1.v = cast(short) y;
-//  return OS.WaitMouseMoved (pt1);
-    return false;
+    return dragDetect();
 }
 
 bool drawGripper (int x, int y, int width, int height, bool vertical) {
     return false;
 }
 
-void drawRect(objc.id id, NSRect rect) {
-    super.drawRect(id, rect);
+void drawWidget (objc.id id, NSRect rect) {
+    if (id !is view.id) return;
     if (!hooks (DWT.Paint) && !filters (DWT.Paint)) return;
 
     /* Send paint event */
@@ -830,12 +994,39 @@
 }
 
 void enableWidget (bool enabled) {
-    //TODO - other views
     if (cast(NSControl) view) {
         (cast(NSControl)view).setEnabled(enabled);
     }
 }
 
+void fillBackground (NSView view, NSGraphicsContext context, NSRect rect) {
+    Control control = findBackgroundControl();
+    if (control is null) control = this;
+    Image image = control.backgroundImage;
+    if (image !is null && !image.isDisposed()) {
+        context.saveGraphicsState();
+        NSColor.colorWithPatternImage(image.handle).setFill();
+        NSPoint phase = new NSPoint();
+        NSView controlView = control.view;
+        NSView contentView = controlView.window().contentView();
+        phase = controlView.convertPoint_toView_(phase, contentView);
+        phase.y = contentView.bounds().height - phase.y;
+        context.setPatternPhase(phase);
+        NSBezierPath.fillRect(rect);
+        context.restoreGraphicsState();
+        return;
+    }
+    Color background = control.getBackgroundColor ();
+    if (background !is null && !background.isDisposed ()) {
+        float [] color = background.handle;
+        context.saveGraphicsState();
+        NSColor.colorWithDeviceRed(color [0], color [1], color [2], getThemeAlpha()).setFill();
+        NSBezierPath.fillRect(rect);
+        context.restoreGraphicsState();
+        return;
+    }
+}
+
 Cursor findCursor () {
     if (cursor !is null) return cursor;
     return parent.findCursor ();
@@ -867,6 +1058,43 @@
 //  OS.ClearKeyboardFocus (window);
 }
 
+void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    if (view.window ().firstResponder ().id is id) {
+        if ((state & SAFARI_EVENTS_FIX) is 0) {
+            int mask = 0;
+            NSEvent nsEvent = new NSEvent (theEvent);
+            int /*long*/ modifiers = nsEvent.modifierFlags ();
+            int keyCode = Display.translateKey (nsEvent.keyCode ());
+            switch (keyCode) {
+                case DWT.ALT: mask = OS.NSAlternateKeyMask; break;
+                case DWT.CONTROL: mask = OS.NSControlKeyMask; break;
+                case DWT.COMMAND: mask = OS.NSCommandKeyMask; break;
+                case DWT.SHIFT: mask = OS.NSShiftKeyMask; break;
+                case DWT.CAPS_LOCK:
+                    Event event = new Event();
+                    event.keyCode = keyCode;
+                    setInputState (event, nsEvent, DWT.KeyDown);
+                    sendKeyEvent (DWT.KeyDown, event);
+                    setInputState (event, nsEvent, DWT.KeyUp);
+                    sendKeyEvent (DWT.KeyUp, event);
+                    break;
+            }
+            if (mask !is 0) {
+                int type = (mask & modifiers) !is 0 ? DWT.KeyDown : DWT.KeyUp;
+                Event event = new Event();
+                event.keyCode = keyCode;
+                setInputState (event, nsEvent, type);
+                if (!sendKeyEvent (type, event)) return;
+            }
+        }
+    }
+    super.flagsChanged (id, sel, theEvent);
+}
+
+NSView focusView () {
+    return view;
+}
+
 /**
  * Forces the receiver to have the <em>keyboard focus</em>, causing
  * all keyboard events to be delivered to it.
@@ -882,7 +1110,6 @@
  */
 public bool forceFocus () {
     checkWidget();
-//  if (display.focusEvent is DWT.FocusOut) return false;
     Decorations shell = menuShell ();
     shell.setSavedFocus (this);
     if (!isEnabled () || !isVisible ()/* || !isActive ()*/) return false;
@@ -890,10 +1117,10 @@
     shell.setSavedFocus (null);
     shell.bringToTop (false);
     if (isDisposed ()) return false;
-    view.window ().makeFirstResponder (view);
+    bool result = view.window ().makeFirstResponder (focusView ());
     if (isDisposed ()) return false;
     shell.setSavedFocus (this);
-    return hasFocus ();
+    return result;
 }
 
 /**
@@ -918,7 +1145,7 @@
     if (accessible is null) accessible = new_Accessible (this);
     return accessible;
 }
-    
+
 /**
  * Returns the receiver's background color.
  *
@@ -1011,13 +1238,19 @@
     return (state & DRAG_DETECT) !is 0;
 }
 
+NSBezierPath getClipping() {
+    return parent.getClipping ();
+}
+
 /**
  * Returns the receiver's cursor, or null if it has not been set.
  * <p>
  * When the mouse pointer passes over a control its appearance
  * is changed to match the control's cursor.
  * </p>
- * </ul>
+ *
+ * @return the receiver's cursor or <code>null</code>
+ *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
@@ -1215,6 +1448,19 @@
     return result;
 }
 
+/** 
+ * Returns the region that defines the shape of the control,
+ * or null if the control has the default shape.
+ *
+ * @return the region that defines the shape of the shell (or null)
+ *  
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.4
+ */
 public Region getRegion () {
     checkWidget ();
     return region;
@@ -1259,6 +1505,10 @@
     return new Point(cast(int)rect.width, cast(int)rect.height);
 }
 
+float getThemeAlpha () {
+    return 1 * parent.getThemeAlpha ();
+}
+
 /**
  * Returns the receiver's tool tip text, or null if it has
  * not been set.
@@ -1302,7 +1552,35 @@
 }
 
 bool hasFocus () {
-    return this is display.getFocusControl ();
+    return (view.window().firstResponder().id is view.id);
+}
+
+int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+    if ((state & DISABLED) !is 0) return 0;
+    return super.hitTest(id, sel, point);
+}
+
+bool insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+    if (view.window ().firstResponder ().id is id) {
+        NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
+        if (nsEvent !is null && nsEvent.type () is OS.NSKeyDown) {
+            NSString str = new NSString (string);
+            if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) {
+                str = new NSAttributedString (string).string ();
+            }
+            int length = (int)/*64*/str.length ();
+            char[] buffer = new char [length];
+            str.getCharacters(buffer);
+            for (int i = 0; i < buffer.length; i++) {
+                Event event = new Event ();
+                if (length is 1) setKeyState (event, DWT.KeyDown, nsEvent);
+                event.character = buffer [i];
+                if (!sendKeyEvent (nsEvent, DWT.KeyDown)) return false;
+            }
+        }
+        if ((state & CANVAS) !is 0) return true;
+    }
+    return super.insertText (id, sel, string);
 }
 
 /**  
@@ -1324,7 +1602,9 @@
     if (data !is null && data.paintRect !is null) {
         context = NSGraphicsContext.currentContext().id_;
     } else {
-        context = NSGraphicsContext.graphicsContextWithWindow(view.window()).id_;
+        NSGraphicsContext graphicsContext = NSGraphicsContext.graphicsContextWithWindow (view.window ());
+        display.addContext (graphicsContext);
+        context = graphicsContext.id_;
     }
     if (data !is null) {
         int mask = DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT;
@@ -1332,12 +1612,13 @@
             data.style |= style & (mask | DWT.MIRRORED);
         }
         data.device = display;
+        data.thread = display.thread;
         data.view = view;
         data.foreground = getForegroundColor ().handle;
         Control control = findBackgroundControl ();
         if (control is null) control = this;
         data.background = control.getBackgroundColor ().handle;
-        data.font = font !is null ? font : defaultFont ();       
+        data.font = font !is null ? font : defaultFont ();      
     }
     return context;
 }
@@ -1356,7 +1637,16 @@
  * @param data the platform specific GC data 
  */
 public void internal_dispose_GC (objc.id context, GCData data) {
-    checkWidget (); 
+    checkWidget ();
+    NSGraphicsContext graphicsContext = new NSGraphicsContext (context);
+    display.removeContext (graphicsContext);
+    if (data !is null) {
+        if (data.paintRect !is null) {
+            NSGraphicsContext.setCurrentContext (graphicsContext);
+        } else {
+            graphicsContext.flushGraphics ();
+        }
+    }
 }
 
 /**
@@ -1404,10 +1694,6 @@
  */
 public bool isFocusControl () {
     checkWidget();
-//  Control focusControl = display.focusControl;
-//  if (focusControl !is null && !focusControl.isDisposed ()) {
-//      return this is focusControl;
-//  }
     return hasFocus ();
 }
 
@@ -1467,6 +1753,10 @@
     return (code & (DWT.TRAVERSE_ARROW_PREVIOUS | DWT.TRAVERSE_ARROW_NEXT)) !is 0;
 }
 
+bool isTrim (NSView view) {
+    return false;
+}
+
 /**
  * Returns <code>true</code> if the receiver is visible and all
  * ancestors up to and including the receiver's nearest ancestor
@@ -1486,10 +1776,36 @@
     return getVisible () && parent.isVisible ();
 }
 
-objc.id menuForEvent (objc.id nsEvent) {
-    NSPoint pt = NSEvent.mouseLocation();   
-    NSWindow window = view.window();
-    pt.y = cast(int) (window.screen().frame().height - pt.y);
+void keyDown (objc.id id, objc.SEL sel, objc.id theEvent) {
+    if (view.window ().firstResponder ().id_ is id) {
+        bool textInput = OS.objc_msgSend (id, OS.sel_conformsToProtocol_, OS.objc_getProtocol ("NSTextInput")) !is null;
+        if (!textInput) {
+            NSEvent nsEvent = new NSEvent (theEvent);
+            bool [] consume = new bool [1];
+            if (translateTraversal (nsEvent.keyCode (), nsEvent, consume)) return;
+            if (isDisposed ()) return;
+            if (!sendKeyEvent (nsEvent, DWT.KeyDown)) return;
+            if (consume [0]) return;
+        }
+    }
+    super.keyDown (id, sel, theEvent);
+}
+
+void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    if (view.window ().firstResponder ().id is id) {
+        NSEvent nsEvent = new NSEvent (theEvent);
+        if (!sendKeyEvent (nsEvent, DWT.KeyUp)) return;
+    }
+    super.keyUp (id, sel, theEvent);
+}
+
+void markLayout (bool changed, bool all) {
+    /* Do nothing */
+}
+
+int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    NSPoint pt = NSEvent.mouseLocation();
+    pt.y = (int) (display.getPrimaryFrame().height - pt.y);
     int x = cast(int) pt.x;
     int y = cast(int) pt.y;
     Event event = new Event ();
@@ -1504,133 +1820,36 @@
         }
         return menu.nsMenu.id_;
     }
-    objc_super super_struct = objc_super();
-    super_struct.receiver = view.id_;
-    super_struct.cls = cast(objc.Class) OS.objc_msgSend(view.id_, OS.sel_superclass);
-    return OS.objc_msgSendSuper(&super_struct, OS.sel_menuForEvent_1, nsEvent);
+    return super.menuForEvent (id, sel, theEvent);
 }
 
 Decorations menuShell () {
     return parent.menuShell ();
 }
 
-bool setInputState (Event event, NSEvent nsEvent, int type) {
-    int modifierFlags = nsEvent.modifierFlags();
-    if ((modifierFlags & OS.NSAlternateKeyMask) !is 0) event.stateMask |= DWT.ALT;
-    if ((modifierFlags & OS.NSShiftKeyMask) !is 0) event.stateMask |= DWT.SHIFT;
-    if ((modifierFlags & OS.NSControlKeyMask) !is 0) event.stateMask |= DWT.CONTROL;
-    if ((modifierFlags & OS.NSCommandKeyMask) !is 0) event.stateMask |= DWT.COMMAND;
-    
-    //WRONG
-    if ((modifierFlags & OS.NSLeftMouseDownMask) !is 0) event.stateMask |= DWT.BUTTON1;
-    if ((modifierFlags & OS.NSLeftMouseDraggedMask) !is 0) event.stateMask |= DWT.BUTTON1;
-    if ((modifierFlags & OS.NSLeftMouseUpMask) !is 0) event.stateMask |= DWT.BUTTON1;
-    if ((modifierFlags & OS.NSOtherMouseDownMask) !is 0) event.stateMask |= DWT.BUTTON2;
-    if ((modifierFlags & OS.NSOtherMouseDraggedMask) !is 0) event.stateMask |= DWT.BUTTON2;
-    if ((modifierFlags & OS.NSOtherMouseUpMask) !is 0) event.stateMask |= DWT.BUTTON1;
-    if ((modifierFlags & OS.NSRightMouseDownMask) !is 0) event.stateMask |= DWT.BUTTON3;
-    if ((modifierFlags & OS.NSRightMouseDraggedMask) !is 0) event.stateMask |= DWT.BUTTON3;
-    if ((modifierFlags & OS.NSRightMouseUpMask) !is 0) event.stateMask |= DWT.BUTTON3;
-    
-//  if (OS.GetKeyState (OS.VK_XBUTTON1) < 0) event.stateMask |= DWT.BUTTON4;
-//  if (OS.GetKeyState (OS.VK_XBUTTON2) < 0) event.stateMask |= DWT.BUTTON5;
-//  switch (type) {
-//      case DWT.MouseDown:
-//      case DWT.MouseDoubleClick:
-//          if (event.button is 1) event.stateMask &= ~DWT.BUTTON1;
-//          if (event.button is 2) event.stateMask &= ~DWT.BUTTON2;
-//          if (event.button is 3) event.stateMask &= ~DWT.BUTTON3;
-//          if (event.button is 4) event.stateMask &= ~DWT.BUTTON4;
-//          if (event.button is 5) event.stateMask &= ~DWT.BUTTON5;
-//          break;
-//      case DWT.MouseUp:
-//          if (event.button is 1) event.stateMask |= DWT.BUTTON1;
-//          if (event.button is 2) event.stateMask |= DWT.BUTTON2;
-//          if (event.button is 3) event.stateMask |= DWT.BUTTON3;
-//          if (event.button is 4) event.stateMask |= DWT.BUTTON4;
-//          if (event.button is 5) event.stateMask |= DWT.BUTTON5;
-//          break;
-//      case DWT.KeyDown:
-//      case DWT.Traverse:
-//          if (event.keyCode is DWT.ALT) event.stateMask &= ~DWT.ALT;
-//          if (event.keyCode is DWT.SHIFT) event.stateMask &= ~DWT.SHIFT;
-//          if (event.keyCode is DWT.CONTROL) event.stateMask &= ~DWT.CONTROL;
-//          break;
-//      case DWT.KeyUp:
-//          if (event.keyCode is DWT.ALT) event.stateMask |= DWT.ALT;
-//          if (event.keyCode is DWT.SHIFT) event.stateMask |= DWT.SHIFT;
-//          if (event.keyCode is DWT.CONTROL) event.stateMask |= DWT.CONTROL;
-//          break;
-//  }       
-    return true;
+void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    if (id is view.id) {
+        if (hooks (DWT.MouseWheel) || filters (DWT.MouseWheel)) {
+            NSEvent nsEvent = new NSEvent(theEvent);
+            if (nsEvent.deltaY() !is 0) {
+                if (!sendMouseEvent(nsEvent, DWT.MouseWheel, true)) {
+                    return;
+                }
+            }
+        }
+    }
+    super.scrollWheel(id, sel, theEvent);
 }
 
-void sendMouseEvent (NSEvent nsEvent, int type, int button) {
-    Event event = new Event ();
-    event.button = button;
-//  event.detail = detail;
-    event.count = nsEvent.clickCount();
-    NSPoint location = nsEvent.locationInWindow();
-    NSPoint point = view.convertPoint_fromView_(location, null);
-    event.x = cast(int) point.x;
-    event.y = cast(int) point.y;
-    setInputState (event, nsEvent, type);
-    sendEvent (type, event);
-}
-
-void mouseDown(objc.id theEvent) {
-    NSEvent nsEvent = new NSEvent (theEvent);
-    sendMouseEvent (nsEvent, DWT.MouseDown, 1);
-}
-
-void mouseDragged(objc.id theEvent) {
-    NSEvent nsEvent = new NSEvent (theEvent);
-    sendMouseEvent (nsEvent, DWT.MouseMove, 1);
-}
-
-void mouseUp(objc.id theEvent) {
-    NSEvent nsEvent = new NSEvent (theEvent);
-    sendMouseEvent (nsEvent, DWT.MouseUp, 1);
-}
-
-bool sendKeyEvent (Event event) {
-    sendEvent (event);
-    return event.doit;
+void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    Display display = this.display;
+    display.trackingControl = this;
+    super.mouseDown(id, sel, theEvent);
+    display.trackingControl = null;
 }
 
-//TODO - missing modifier keys (see flagsChanged:)
-bool sendKeyEvent (NSEvent nsEvent, int type) {
-    if ((state & SAFARI_EVENTS_FIX) !is 0) return false;
-    int count = 0;
-    NSString keys = nsEvent.characters();
-    //TODO - check lowercase doesn't mangle char codes
-    NSString keyCodes = nsEvent.charactersIgnoringModifiers().lowercaseString();
-    char [] chars = new char [keys.length()];
-    for (int i=0; i<keys.length(); i++) {
-        Event event = new Event ();
-        int keyCode = Display.translateKey (keys.characterAtIndex (i) & 0xFFFF);
-        if (keyCode !is 0) {
-            event.keyCode = keyCode;
-        } else {
-            event.character = cast(char) keys.characterAtIndex (i);
-            //TODO - get unshifted values for Shift+1
-            event.keyCode = keyCodes.characterAtIndex (i);
-        }
-        setInputState (event, nsEvent, type);
-        if (!setKeyState(event, type, nsEvent)) return false;
-        if ((cast(Widget)this).sendKeyEvent (type, event)) {
-            chars [count++] = chars [i];
-        }
-    }
-//  if (count is 0) return false;
-    if (count !is keys.length () - 1) {
-//      OS.SetEventParameter (theEvent, OS.kEventParamKeyUnicodes, OS.typeUnicodeText, count * 2, chars);
-    }
-    return count is keys.length ();
-}
-
-void markLayout (bool changed, bool all) {
-    /* Do nothing */
+void moved () {
+    sendEvent (DWT.Move);
 }
 
 /**
@@ -1738,6 +1957,23 @@
     setSize (computeSize (DWT.DEFAULT, DWT.DEFAULT, changed));
 }
 
+/**
+ * Prints the receiver and all children.
+ * 
+ * @param gc the gc where the drawing occurs
+ * @return <code>true</code> if the operation was successful and <code>false</code> otherwise
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public bool print (GC gc) {
     checkWidget ();
     if (gc is null) error (DWT.ERROR_NULL_ARGUMENT);
@@ -1827,23 +2063,31 @@
     view.setNeedsDisplayInRect(rect);
 }
 
+void register () {
+    super.register ();
+    display.addWidget (view, this);
+}
+
 void releaseHandle () {
     super.releaseHandle ();
-    if (view !is null) {
-        OS.objc_msgSend(view.id_, OS.sel_setTag_1, -1);
-        view.release();
-    }
+    if (view !is null) view.release();
     view = null;
     parent = null;
 }
 
 void releaseParent () {
-//  setVisible (topHandle (), false);
     parent.removeControl (this);
 }
 
 void releaseWidget () {
     super.releaseWidget ();
+    if (display.currentControl is this) {
+        display.currentControl = null;
+        display.timerExec(-1, display.hoverTimer);
+    }
+    if (display.grabControl is this) {
+        display.grabControl = null;
+    }
     if (menu !is null && !menu.isDisposed ()) {
         menu.dispose ();
     }
@@ -2158,6 +2402,10 @@
     eventTable.unhook (DWT.Traverse, listener);
 }
 
+void resized () {
+    sendEvent (DWT.Resize);
+}
+
 bool sendDragEvent (int button, int stateMask, int x, int y) {
     Event event = new Event ();
     event.button = button;
@@ -2168,38 +2416,18 @@
     return event.doit;
 }
 
-bool sendDragEvent (int button, int chord, int modifiers, int x, int y) {
-    Event event = new Event ();
-    switch (button) {
-        case 1: event.button = 1; break;
-        case 2: event.button = 3; break;
-        case 3: event.button = 2; break;
-        case 4: event.button = 4; break;
-        case 5: event.button = 5; break;
-    }
-    event.x = x;
-    event.y = y;
-    setInputState (event, DWT.DragDetect, chord, modifiers);
-    postEvent (DWT.DragDetect, event);
-    return event.doit;
+bool sendDragEvent (NSEvent nsEvent) {
+    return sendMouseEvent(nsEvent, DWT.DragDetect, true);
 }
 
 void sendFocusEvent (int type, bool post) {
     Display display = this.display;
     Shell shell = getShell ();
-    /*
-    * Feature in the Macintosh.  GetKeyboardFocus() returns NULL during
-    * kEventControlSetFocusPart if the focus part is not kControlFocusNoPart.
-    * The fix is to remember the focus control and return it during
-    * kEventControlSetFocusPart.
-    */
-//  display.focusControl = this;
-//  display.focusEvent = type;
     if (post) {
         postEvent (type);
     } else {
         sendEvent (type);
-    }   
+    }
     /*
     * It is possible that the shell may be
     * disposed at this point.  If this happens
@@ -2218,58 +2446,59 @@
                 break;
         }
     }
-//  display.focusEvent = DWT.None;
-//  display.focusControl = null;
-}
-
-bool sendMouseEvent (int type, short button, int count, int detail, bool send, int theEvent) {
-//  CGPoint pt = new CGPoint ();
-//  OS.GetEventParameter (theEvent, OS.kEventParamWindowMouseLocation, OS.typeHIPoint, null, CGPoint.sizeof, null, pt);
-//  OS.HIViewConvertPoint (pt, 0, handle);
-//  int x = cast(int) pt.x;
-//  int y = cast(int) pt.y;
-//  display.lastX = x;
-//  display.lastY = y;
-//  int [] chord = new int [1];
-//  OS.GetEventParameter (theEvent, OS.kEventParamMouseChord, OS.typeUInt32, null, 4, null, chord);
-//  int [] modifiers = new int [1];
-//  OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);
-//  return sendMouseEvent (type, button, count, detail, send, chord [0], cast(short) x, cast(short) y, modifiers [0]);
-    return false;
 }
 
-bool sendMouseEvent (int type, short button, int count, bool send, int chord, short x, short y, int modifiers) {
-    return sendMouseEvent (type, button, count, 0, send, chord, x, y, modifiers);
-}
-
-bool sendMouseEvent (int type, short button, int count, int detail, bool send, int chord, short x, short y, int modifiers) {
-    if (!hooks (type) && !filters (type)) return true;
+bool sendMouseEvent (NSEvent nsEvent, int type, bool send) {
+    NSInputManager manager = NSInputManager.currentInputManager ();
+    if (manager !is null && manager.wantsToHandleMouseEvents ()) {
+        if (manager.handleMouseEvent (nsEvent)) {
+            return true;
+        }
+    }
+    Shell shell = null;
     Event event = new Event ();
-    switch (button) {
-        case 1: event.button = 1; break;
-        case 2: event.button = 3; break;
-        case 3: event.button = 2; break;
-        case 4: event.button = 4; break;
-        case 5: event.button = 5; break;
+    switch (type) {
+        case DWT.MouseDown:
+            shell = getShell ();
+            //FALL THROUGH
+        case DWT.MouseUp:
+        case DWT.MouseDoubleClick:
+            int button = (int)/*64*/nsEvent.buttonNumber();
+            switch (button) {
+                case 0: event.button = 1; break;
+                case 1: event.button = 3; break;
+                case 2: event.button = 2; break;
+                case 3: event.button = 4; break;
+                case 4: event.button = 5; break;
+            }
+            break;
+        case DWT.MouseWheel:
+            event.detail = DWT.SCROLL_LINE;
+            float /*double*/ delta = nsEvent.deltaY();
+            event.count = delta > 0 ? Math.max (1, (int)delta) : Math.min (-1, (int)delta);
+            break;
     }
-    event.x = x;
-    event.y = y;
-    event.count = count;
-    event.detail = detail;
-    setInputState (event, type, chord, modifiers);
+    if (event.button !is 0) event.count = (int)/*64*/nsEvent.clickCount();
+    NSPoint windowPoint;
+    if (nsEvent is null || nsEvent.type() is OS.NSMouseMoved) {
+        windowPoint = view.window().convertScreenToBase(NSEvent.mouseLocation()); 
+    } else {
+        windowPoint = nsEvent.locationInWindow();
+    }
+    NSPoint point = view.convertPoint_fromView_(windowPoint, null);
+    event.x = (int) point.x;
+    event.y = (int) point.y;
+    setInputState (event, nsEvent, type);
     if (send) {
         sendEvent (type, event);
         if (isDisposed ()) return false;
     } else {
         postEvent (type, event);
     }
+    if (shell !is null) shell.setActiveControl(this);
     return event.doit;
 }
 
-bool sendMouseWheel (short wheelAxis, int wheelDelta) {
-    return false;
-}
-
 void setBackground () {
 //  redrawWidget (handle, false);
 }
@@ -2378,44 +2607,26 @@
     setBounds (x, y, Math.max (0, width), Math.max (0, height), true, true);
 }
 
-int setBounds (int x, int y, int width, int height, bool move, bool resize) {
-    int result = 0;
+void setBounds (int x, int y, int width, int height, bool move, bool resize) {
     NSView topView = topView();
-    NSRect rect = topView.frame();
     if (move && resize) {
-        if (rect.x !is x || rect.y !is y) result |= MOVED;
-        if (rect.width !is width || rect.height !is height) result |= RESIZED;
-        if (result !is 0) {
-            rect.x = x;
-            rect.y = y;
-            rect.width = width;
-            rect.height = height;
-            topView.setFrame (rect);
-        }
+        NSRect rect = new NSRect();
+        rect.x = x;
+        rect.y = y;
+        rect.width = width;
+        rect.height = height;
+        topView.setFrame (rect);
     } else if (move) {
-        if (rect.x !is x || rect.y !is y) {
-            result |= MOVED;
             NSPoint point = NSPoint();
-            point.x = x;
-            point.y = y;
-            topView.setFrameOrigin(point);
-        }
+        point.x = x;
+        point.y = y;
+        topView.setFrameOrigin(point);
     } else if (resize) {
-        if (rect.width !is width || rect.height !is height) {
-            result |= RESIZED;
             NSSize size = NSSize();
-            size.width = width;
-            size.height = height;
-            topView.setFrameSize(size);
-        }
+        size.width = width;
+        size.height = height;
+        topView.setFrameSize(size);
     }
-    if ((result & MOVED) !is 0) {
-        sendEvent(DWT.Move);
-    }
-    if ((result & RESIZED) !is 0) {
-        sendEvent(DWT.Resize);
-    }
-    return result;
 }
 
 /**
@@ -2445,7 +2656,8 @@
 /**
  * If the argument is <code>true</code>, causes the receiver to have
  * all mouse events delivered to it until the method is called with
- * <code>false</code> as the argument.
+ * <code>false</code> as the argument.  Note that on some platforms,
+ * a mouse button must currently be down for capture to be assigned.
  *
  * @param capture <code>true</code> to capture the mouse, and <code>false</code> to release it
  *
@@ -2481,8 +2693,8 @@
     checkWidget();
     if (cursor !is null && cursor.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     this.cursor = cursor;
-    //TODO null
-//  view.addCursorRect(view.frame(), cursor.handle);
+    if (!isEnabled()) return;
+    display.setCursor (display.currentControl);
 }
 
 void setDefaultFont () {
@@ -2531,10 +2743,8 @@
     Control control = null;
     bool fixFocus_ = false;
     if (!enabled) {
-//      if (display.focusEvent !is DWT.FocusOut) {
-            control = display.getFocusControl ();
-            fixFocus_ = isFocusAncestor (control);
-//      }
+        control = display.getFocusControl ();
+        fixFocus = isFocusAncestor (control);
     }
     if (enabled) {
         state &= ~DISABLED;
@@ -2641,6 +2851,32 @@
 //  OS.SetControlFontStyle (control, fontStyle);
 }
 
+void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+    NSView topView = topView ();
+    if (topView.id !is id) {
+        super.setFrameOrigin(id, sel, point);
+        return;
+    }
+    NSRect frame = topView.frame();
+    super.setFrameOrigin(id, sel, point);
+    if (frame.x !is point.x || frame.y !is point.y) {
+        moved ();
+    }
+}
+
+void setFrameSize (int /*long*/ id, int /*long*/ sel, NSSize size) {
+    NSView topView = topView ();
+    if (topView.id !is id) {
+        super.setFrameSize(id, sel, size);
+        return;
+    }
+    NSRect frame = topView.frame();
+    super.setFrameSize(id, sel, size);
+    if (frame.width !is size.width || frame.height !is size.height) {
+        resized ();
+    }
+}
+
 /**
  * Sets the layout data associated with the receiver to the argument.
  * 
@@ -2765,10 +3001,11 @@
         Menu [] menus = oldShell.findMenus (this);
         fixChildren (newShell, oldShell, newDecorations, oldDecorations, menus);
     }
-//  int topHandle = topHandle ();
-//  OS.HIViewAddSubview (parent.handle, topHandle);
-//  OS.HIViewSetVisible (topHandle, (state & HIDDEN) is 0);
-//  OS.HIViewSetZOrder (topHandle, OS.kHIViewZOrderBelow, 0);
+    NSView topView = topView ();
+    topView.retain();
+    topView.removeFromSuperview();
+    parent.contentView().addSubview(topView, OS.NSWindowBelow, null);
+    topView.release();
     this.parent = parent;
     return true;
 }
@@ -2813,6 +3050,23 @@
     }
 }
 
+/**
+ * Sets the shape of the control to the region specified
+ * by the argument.  When the argument is null, the
+ * default shape of the control is restored.
+ *
+ * @param region the region that defines the shape of the control (or null)
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if the region has been disposed</li>
+ * </ul>  
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.4
+ */
 public void setRegion (Region region) {
     checkWidget ();
     if (region !is null && region.isDisposed()) error (DWT.ERROR_INVALID_ARGUMENT);
@@ -2941,10 +3195,8 @@
     Control control = null;
     bool fixFocus_ = false;
     if (!visible) {
-//      if (display.focusEvent !is DWT.FocusOut) {
-            control = display.getFocusControl ();
-            fixFocus_ = isFocusAncestor (control);
-//      }
+        control = display.getFocusControl ();
+        fixFocus = isFocusAncestor (control);
     }
     topView().setHidden(!visible);
     if (!visible) {
@@ -2960,21 +3212,15 @@
 }
 
 void setZOrder () {
-//  int topHandle = topHandle ();
-//  int parentHandle = parent.handle;
-//  OS.HIViewAddSubview (parentHandle, topHandle);
-//  OS.HIViewSetZOrder (topHandle, OS.kHIViewZOrderBelow, 0);
-//  Rect rect = getInset ();
-//  rect.right = rect.left;
-//  rect.bottom = rect.top;
-//  OS.SetControlBounds (topHandle, rect);
+    NSView topView = topView ();
+    parent.contentView().addSubview(topView, OS.NSWindowBelow, null);
 }
 
 void setZOrder (Control control, bool above) {
     NSView otherView = control is null ? null : control.topView ();
     view.retain();
     view.removeFromSuperview();
-    parent.contentView().addSubview_positioned_relativeTo_(view, above ? NSWindowAbove : NSWindowBelow, otherView);
+    parent.contentView().addSubview(view, above ? NSWindowAbove : NSWindowBelow, otherView);
     view.release();
 }
 
@@ -3101,7 +3347,7 @@
             break;
         }
         case 48: /* Tab */ {
-            int modifiers = display.lastModifiers;
+            int /*long*/ modifiers = theEvent.modifierFlags ();
             bool next = (modifiers & OS.NSShiftKeyMask) is 0;
             detail = next ? DWT.TRAVERSE_TAB_NEXT : DWT.TRAVERSE_TAB_PREVIOUS;
             break;
@@ -3117,10 +3363,9 @@
         case 116: /* Page up */
         case 121: /* Page down */ {
             all = true;
-//          int [] modifiers = new int [1];
-//          OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);
-//          if ((modifiers [0] & OS.controlKey) is 0) return false;
-//          detail = key is 121 /* Page down */ ? DWT.TRAVERSE_PAGE_NEXT : DWT.TRAVERSE_PAGE_PREVIOUS;
+            int /*long*/ modifiers = theEvent.modifierFlags ();
+            if ((modifiers & OS.NSControlKeyMask) is 0) return false;
+            detail = key is 121 /* Page down */ ? DWT.TRAVERSE_PAGE_NEXT : DWT.TRAVERSE_PAGE_PREVIOUS;
             break;
         }
         default:
@@ -3144,7 +3389,7 @@
 }
 
 int traversalCode (short key, NSEvent theEvent) {
-    int code = DWT.TRAVERSE_RETURN | DWT.TRAVERSE_TAB_NEXT | DWT.TRAVERSE_TAB_PREVIOUS;
+    int code = DWT.TRAVERSE_RETURN | DWT.TRAVERSE_TAB_NEXT | DWT.TRAVERSE_TAB_PREVIOUS | DWT.TRAVERSE_PAGE_NEXT | DWT.TRAVERSE_PAGE_PREVIOUS;
     Shell shell = getShell ();
     if (shell.parent !is null) code |= DWT.TRAVERSE_ESCAPE;
     return code;
@@ -3292,7 +3537,7 @@
 void update (bool all) {
 //  checkWidget();
     //TODO - not all
-//  OS.HIViewRender (handle);
+    view.displayIfNeeded ();
 }
 
 void updateBackgroundMode () {
--- a/dwt/widgets/CoolBar.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/CoolBar.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,6 +43,10 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#coolbar">CoolBar snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class CoolBar : Composite {
     CoolItem[][] items = new CoolItem[0][0];
@@ -893,7 +897,7 @@
         if (height !is size.x) super.setSize(trim.width, size.y);
     } else {
         Rectangle trim = computeTrim (0, 0, 0, height);
-        if (height !is size.y) super.setSize(size.x, trim.height);       
+        if (height !is size.y) super.setSize(size.x, trim.height);      
     }
 }
 /**
--- a/dwt/widgets/CoolItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/CoolItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,8 @@
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class CoolItem : Item {
     Control control;
--- a/dwt/widgets/DateTime.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/DateTime.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,6 +46,10 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#datetime">DateTime snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  *
  * @since 3.3
  */
@@ -176,9 +180,12 @@
     widget.setDateValue(date);
     widget.setTarget(widget);
     widget.setAction(OS.sel_sendSelection);
-    widget.setTag(jniRef);
-    view = widget;  
-    parent.contentView().addSubview_(widget);
+    view = widget;
+}
+
+NSCalendarDate getCalendarDate () {
+    NSDate date = ((NSDatePicker)view).dateValue();
+    return date.dateWithCalendarFormat(null, null);
 }
 
 /**
@@ -196,9 +203,7 @@
  */
 public int getDay () {
     checkWidget ();
-    NSDate date = (cast(NSDatePicker)view).dateValue();
-    NSCalendarDate calendarDate = date.dateWithCalendarFormat(null, null);
-    return calendarDate.dayOfMonth();
+    return cast(int)/*64*/getCalendarDate().dayOfMonth();
 }
 
 /**
@@ -216,7 +221,7 @@
  */
 public int getHours () {
     checkWidget ();
-    return new NSCalendarDate((cast(NSDatePicker)view).dateValue().id).hourOfDay();
+    return cast(int)/*64*/getCalendarDate().hourOfDay();
 }
 
 /**
@@ -234,7 +239,7 @@
  */
 public int getMinutes () {
     checkWidget ();
-    return new NSCalendarDate((cast(NSDatePicker)view).dateValue().id).minuteOfHour();
+    return csat(int)/*64*/getCalendarDate().minuteOfHour();
 }
 
 /**
@@ -252,7 +257,7 @@
  */
 public int getMonth () {
     checkWidget ();
-    return new NSCalendarDate((cast(NSDatePicker)view).dateValue().id).monthOfYear() - 1;
+    return csat(int)/*64*/getCalendarDate().monthOfYear() - 1;
 }
 
 String getNameText() {
@@ -275,7 +280,7 @@
  */
 public int getSeconds () {
     checkWidget ();
-    return new NSCalendarDate((cast(NSDatePicker)view).dateValue().id).secondOfMinute();
+    return cast(int)/*64*/getCalendarDate().secondOfMinute();
 }
 
 /**
@@ -293,7 +298,7 @@
  */
 public int getYear () {
     checkWidget ();
-    return new NSCalendarDate((cast(NSDatePicker)view).dateValue().id).yearOfCommonEra();
+    return cast(int)/*64*/getCalendarDate().yearOfCommonEra();
 }
 
 /**
@@ -355,7 +360,7 @@
  */
 public void setDate (int year, int month, int day) {
     checkWidget ();
-    NSCalendarDate date = new NSCalendarDate((cast(NSDatePicker)view).dateValue().id);
+    NSCalendarDate date = getCalendarDate();
     NSCalendarDate newDate = NSCalendarDate.dateWithYear(year, month + 1, day,
             date.hourOfDay(), date.minuteOfHour(), date.secondOfMinute(), date.timeZone());
     if (newDate.yearOfCommonEra() is year && newDate.monthOfYear() is month + 1 && newDate.dayOfMonth() is day) {
@@ -378,7 +383,7 @@
  */
 public void setDay (int day) {
     checkWidget ();
-    NSCalendarDate date = new NSCalendarDate((cast(NSDatePicker)view).dateValue().id);
+    NSCalendarDate date = getCalendarDate();
     NSCalendarDate newDate = NSCalendarDate.dateWithYear(date.yearOfCommonEra(), date.monthOfYear(), day,
             date.hourOfDay(), date.minuteOfHour(), date.secondOfMinute(), date.timeZone());
     if (newDate.yearOfCommonEra() is date.yearOfCommonEra() && newDate.monthOfYear() is date.monthOfYear() && newDate.dayOfMonth() is day) {
@@ -412,7 +417,7 @@
 public void setHours (int hours) {
     checkWidget ();
     if (hours < 0 || hours > 23) return;
-    NSCalendarDate date = new NSCalendarDate((cast(NSDatePicker)view).dateValue().id);
+    NSCalendarDate date = getCalendarDate();
     NSCalendarDate newDate = NSCalendarDate.dateWithYear(date.yearOfCommonEra(), date.monthOfYear(), date.dayOfMonth(),
             hours, date.minuteOfHour(), date.secondOfMinute(), date.timeZone());
     (cast(NSDatePicker)view).setDateValue(newDate);
@@ -434,7 +439,7 @@
 public void setMinutes (int minutes) {
     checkWidget ();
     if (minutes < 0 || minutes > 59) return;
-    NSCalendarDate date = new NSCalendarDate((cast(NSDatePicker)view).dateValue().id);
+    NSCalendarDate date = getCalendarDate();
     NSCalendarDate newDate = NSCalendarDate.dateWithYear(date.yearOfCommonEra(), date.monthOfYear(), date.dayOfMonth(),
             date.hourOfDay(), minutes, date.secondOfMinute(), date.timeZone());
     (cast(NSDatePicker)view).setDateValue(newDate);
@@ -455,7 +460,7 @@
  */
 public void setMonth (int month) {
     checkWidget ();
-    NSCalendarDate date = new NSCalendarDate((cast(NSDatePicker)view).dateValue().id);
+    NSCalendarDate date = getCalendarDate();
     NSCalendarDate newDate = NSCalendarDate.dateWithYear(date.yearOfCommonEra(), month + 1, date.dayOfMonth(),
             date.hourOfDay(), date.minuteOfHour(), date.secondOfMinute(), date.timeZone());
     if (newDate.yearOfCommonEra() is date.yearOfCommonEra() && newDate.monthOfYear() is month + 1 && newDate.dayOfMonth() is date.dayOfMonth()) {
@@ -479,7 +484,7 @@
 public void setSeconds (int seconds) {
     checkWidget ();
     if (seconds < 0 || seconds > 59) return;
-    NSCalendarDate date = new NSCalendarDate((cast(NSDatePicker)view).dateValue().id);
+    NSCalendarDate date = getCalendarDate();
     NSCalendarDate newDate = NSCalendarDate.dateWithYear(date.yearOfCommonEra(), date.monthOfYear(), date.dayOfMonth(),
             date.hourOfDay(), date.minuteOfHour(), seconds, date.timeZone());
     (cast(NSDatePicker)view).setDateValue(newDate);
@@ -502,7 +507,7 @@
 public void setTime (int hours, int minutes, int seconds) {
     checkWidget ();
     if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59 || seconds < 0 || seconds > 59) return;
-    NSCalendarDate date = new NSCalendarDate((cast(NSDatePicker)view).dateValue().id);
+    NSCalendarDate date = getCalendarDate();
     NSCalendarDate newDate = NSCalendarDate.dateWithYear(date.yearOfCommonEra(), date.monthOfYear(), date.dayOfMonth(),
             hours, minutes, seconds, date.timeZone());
     (cast(NSDatePicker)view).setDateValue(newDate);
@@ -523,7 +528,7 @@
  */
 public void setYear (int year) {
     checkWidget ();
-    NSCalendarDate date = new NSCalendarDate((cast(NSDatePicker)view).dateValue().id);
+    NSCalendarDate date = getCalendarDate();
     NSCalendarDate newDate = NSCalendarDate.dateWithYear(year, date.monthOfYear(), date.dayOfMonth(),
             date.hourOfDay(), date.minuteOfHour(), date.secondOfMinute(), date.timeZone());
     if (newDate.yearOfCommonEra() is year && newDate.monthOfYear() is date.monthOfYear() && newDate.dayOfMonth() is date.dayOfMonth()) {
--- a/dwt/widgets/Decorations.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Decorations.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Decorations;
 
@@ -103,6 +103,7 @@
  * @see #getMaximized
  * @see Shell
  * @see DWT
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Decorations : Canvas {
     Image image;
@@ -399,17 +400,16 @@
     } 
     Display display = this.display;
     super.releaseChildren (destroy);
-    //TODO
-//  Menu [] menus = display.getMenus (this);
-//  if (menus !is null) {
-//      for (int i=0; i<menus.length; i++) {
-//          Menu menu = menus [i];
-//          if (menu !is null && !menu.isDisposed ()) {
-//              menu.dispose ();
-//          }
-//      }
-//      menus = null;
-//  }
+    Menu [] menus = display.getMenus (this);
+    if (menus !is null) {
+        for (int i=0; i<menus.length; i++) {
+            Menu menu = menus [i];
+            if (menu !is null && !menu.isDisposed ()) {
+                menu.dispose ();
+            }
+        }
+        menus = null;
+    }
 }
 void releaseWidget () {
     super.releaseWidget ();
@@ -497,13 +497,9 @@
     if (image !is null && image.isDisposed()) error(DWT.ERROR_INVALID_ARGUMENT);
     this.image = image;
     if (parent !is null) return;
-//  if (display.dockImage is 0) {
-//      if (image !is null) {
-//          OS.SetApplicationDockTileImage (image.handle);
-//      } else {
-//          OS.RestoreApplicationDockTileImage ();
-//      }
-//  }
+    if (display.dockImage is null) {
+        display.application.setApplicationIconImage (image !is null ? image.handle : null);
+    }
 }
 
 /**
@@ -538,15 +534,19 @@
     }
     this.images = images;
     if (parent !is null) return;
-//  if (display.dockImage is 0) {
-//      if (images !is null && images.length > 1) {
-//          Image [] bestImages = new Image [images.length];
-//          System.arraycopy (images, 0, bestImages, 0, images.length);
-//          sort (bestImages);
-//          images = bestImages;
-//      }
-//      OS.SetApplicationDockTileImage (images [0].handle);
-//  }
+    if (display.dockImage is null) {
+        if (images !is null && images.length > 1) {
+            Image [] bestImages = new Image [images.length];
+            System.arraycopy (images, 0, bestImages, 0, images.length);
+            sort (bestImages);
+            images = bestImages;
+        }
+        if (images !is null && images.length > 0) {
+            display.application.setApplicationIconImage (images [0].handle);
+        } else {
+            display.application.setApplicationIconImage (null);
+        }
+    }
 }
 
 /**
--- a/dwt/widgets/Dialog.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Dialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Dialog;
 
@@ -80,6 +80,8 @@
  * </p>
  * 
  * @see Shell
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public abstract class Dialog {
@@ -173,6 +175,9 @@
 }
 
 static int checkStyle (Shell parent, int style) {
+    if ((style & (DWT.PRIMARY_MODAL | DWT.APPLICATION_MODAL | DWT.SYSTEM_MODAL)) is 0) {
+        style |= DWT.APPLICATION_MODAL;
+    }
     style &= ~DWT.MIRRORED;
     if ((style & (DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT)) is 0) {
         if (parent !is null) {
--- a/dwt/widgets/DirectoryDialog.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/DirectoryDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#directorydialog">DirectoryDialog snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Dialog tab</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class DirectoryDialog : Dialog {
     String message = "", filterPath = "";
@@ -79,7 +83,7 @@
  * </ul>
  */
 public this (Shell parent, int style) {
-    super (parent, style);
+    super (parent, checkStyle (parent, style));
     checkSubclass ();
 }
 
@@ -126,12 +130,10 @@
     panel.setTitle(NSString.stringWith(title !is null ? title : ""));
     panel.setCanChooseFiles(false);
     panel.setCanChooseDirectories(true);
-    int response = panel.runModal();
+    int /*long*/ response = panel.runModal();
     if (response is OS.NSFileHandlingPanelOKButton) {
         NSString filename = panel.filename();
-        char[] buffer = new char[filename.length()];
-        filename.getCharacters_(buffer);
-        directoryPath = filterPath = new String(buffer);
+        directoryPath = filterPath = filename.getString();
     }
 //  options.optionFlags = OS.kNavSupportPackages | OS.kNavAllowOpenPackages | OS.kNavAllowInvisibleFiles;
     return directoryPath;
--- a/dwt/widgets/Display.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Display.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Display;
 
@@ -24,29 +24,42 @@
 import dwt.graphics.Image;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.C;
 import dwt.internal.cocoa.CGPoint;
 import dwt.internal.cocoa.NSApplication;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSBundle;
+import dwt.internal.cocoa.NSButton;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSColorSpace;
+import dwt.internal.cocoa.NSComboBox;
 import dwt.internal.cocoa.NSDate;
 import dwt.internal.cocoa.NSDictionary;
 import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSImage;
+import dwt.internal.cocoa.NSImageView;
 import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSMenuItem;
+import dwt.internal.cocoa.NSMutableDictionary;
 import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSObject;
 import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSPopUpButton;
+import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSResponder;
 import dwt.internal.cocoa.NSRunLoop;
 import dwt.internal.cocoa.NSScreen;
+import dwt.internal.cocoa.NSSearchField;
+import dwt.internal.cocoa.NSSize;
+import dwt.internal.cocoa.NSSlider;
+import dwt.internal.cocoa.NSStepper;
 import dwt.internal.cocoa.NSString;
-import dwt.internal.cocoa.NSText;
+import dwt.internal.cocoa.NSTextField;
+import dwt.internal.cocoa.NSTextView;
+import dwt.internal.cocoa.NSThread;
 import dwt.internal.cocoa.NSTimer;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.NSWindow;
@@ -55,6 +68,7 @@
 import dwt.internal.cocoa.SWTApplicationDelegate;
 import dwt.internal.cocoa.SWTWindowDelegate;
 import dwt.internal.cocoa.id;
+import dwt.internal.cocoa.objc_super;
 
 import tango.core.Thread;
 
@@ -158,6 +172,8 @@
  * @see #readAndDispatch
  * @see #sleep
  * @see Device#dispose
+ * @see <a href="http://www.eclipse.org/swt/snippets/#display">Display snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Display : Device {
     
@@ -170,21 +186,41 @@
     Synchronizer synchronizer;
     Thread thread;
     bool allowTimers, runAsyncMessages_;
-    
-    int lastModifiers;
+
+    NSGraphicsContext[] contexts;
 
     Caret currentCaret;
     
+    bool dragging;
+    Control currentControl, grabControl, trackingControl;
+
+    NSDictionary markedAttributes;
+
+    Shell [] modalShells;
+    
     Menu menuBar;
+    Menu[] menus, popups;
 
     NSApplication application;
+    int /*long*/ applicationClass;
+    NSImage dockImage;
+    bool isEmbedded;
+    
+    Control focusControl;
+    
+    NSWindow screenWindow;
     NSAutoreleasePool pool;
+    int loopCounter = 0;
+    bool idle;
+    static final short DWT_IDLE_TYPE = 1;
 
-    NSPoint cascade = NSPoint();
+    int[] screenID = new int[32];
+    NSPoint[] screenCascade = new NSPoint[32];
+    static Callback dialogCallback3;
+    static Callback applicationCallback2, applicationCallback3, applicationCallback6;
     
     /* Menus */
 //  Menu menuBar;
-//  Menu [] menus, popups;
 //  static final int ID_TEMPORARY = 1000;
 //  static final int ID_START = 1001;
     
@@ -202,83 +238,84 @@
     static int [] [] KeyTable = [
 
          /* Keyboard and Mouse Masks */
-//       [58,    DWT.ALT],
-//       [56,    DWT.SHIFT],
-//       [59,    DWT.CONTROL],
-//       [55,    DWT.COMMAND],
+        {58,    DWT.ALT},
+        {56,    DWT.SHIFT},
+        {59,    DWT.CONTROL},
+        {55,    DWT.COMMAND},       
+        {61,    DWT.ALT},
+        {62,    DWT.CONTROL},
+        {60,    DWT.SHIFT},
+        {54,    DWT.COMMAND},
 
          /* Non-Numeric Keypad Keys */
-         [OS.NSUpArrowFunctionKey, DWT.ARROW_UP],
-         [OS.NSDownArrowFunctionKey, DWT.ARROW_DOWN],
-         [OS.NSLeftArrowFunctionKey, DWT.ARROW_LEFT],
-         [OS.NSRightArrowFunctionKey, DWT.ARROW_RIGHT],
-         [OS.NSPageUpFunctionKey, DWT.PAGE_UP],
-         [OS.NSPageDownFunctionKey, DWT.PAGE_DOWN],
-         [OS.NSHomeFunctionKey, DWT.HOME],
-         [OS.NSEndFunctionKey, DWT.END],
-         
+        {126, DWT.ARROW_UP},
+        {125, DWT.ARROW_DOWN},
+        {123, DWT.ARROW_LEFT},
+        {124, DWT.ARROW_RIGHT},
+        {116, DWT.PAGE_UP},
+        {121, DWT.PAGE_DOWN},
+        {115, DWT.HOME},
+        {119, DWT.END},
 //       [??,    DWT.INSERT],
 
          /* Virtual and Ascii Keys */
-         [OS.NSDeleteCharacter, DWT.BS],
-//       [36,    DWT.CR],
-         [OS.NSDeleteFunctionKey, DWT.DEL],
-//       [53,    DWT.ESC],
-//       [76,    DWT.LF],
-//       [48,    DWT.TAB],   
+        {51,    DWT.BS},
+        {36,    DWT.CR},
+        {117,   DWT.DEL},
+        {53,    DWT.ESC},
+        {76,    DWT.LF},
+        {48,    DWT.TAB},   
          
          /* Functions Keys */
-         [OS.NSF1FunctionKey, DWT.F1],
-         [OS.NSF2FunctionKey, DWT.F2],
-         [OS.NSF3FunctionKey, DWT.F3],
-         [OS.NSF4FunctionKey, DWT.F4],
-         [OS.NSF5FunctionKey, DWT.F5],
-         [OS.NSF6FunctionKey, DWT.F6],
-         [OS.NSF7FunctionKey, DWT.F7],
-         [OS.NSF8FunctionKey, DWT.F8],
-         [OS.NSF9FunctionKey, DWT.F9],
-         [OS.NSF10FunctionKey, DWT.F10],
-         [OS.NSF11FunctionKey, DWT.F11],
-         [OS.NSF12FunctionKey, DWT.F12],
-         [OS.NSF13FunctionKey, DWT.F13],
-         [OS.NSF14FunctionKey, DWT.F14],
-         [OS.NSF15FunctionKey, DWT.F15],
+        {122, DWT.F1},
+        {120, DWT.F2},
+        {99,    DWT.F3},
+        {118, DWT.F4},
+        {96,    DWT.F5},
+        {97,    DWT.F6},
+        {98,    DWT.F7},
+        {100, DWT.F8},
+        {101, DWT.F9},
+        {109, DWT.F10},
+        {103, DWT.F11},
+        {111, DWT.F12},
+        {105, DWT.F13},
+        {107, DWT.F14},
+        {113, DWT.F15},
          
          /* Numeric Keypad Keys */
-//       [67, DWT.KEYPAD_MULTIPLY],
-//       [69, DWT.KEYPAD_ADD],
-//       [76, DWT.KEYPAD_CR],
-//       [78, DWT.KEYPAD_SUBTRACT],
-//       [65, DWT.KEYPAD_DECIMAL],
-//       [75, DWT.KEYPAD_DIVIDE],
-//       [82, DWT.KEYPAD_0],
-//       [83, DWT.KEYPAD_1],
-//       [84, DWT.KEYPAD_2],
-//       [85, DWT.KEYPAD_3],
-//       [86, DWT.KEYPAD_4],
-//       [87, DWT.KEYPAD_5],
-//       [88, DWT.KEYPAD_6],
-//       [89, DWT.KEYPAD_7],
-//       [91, DWT.KEYPAD_8],
-//       [92, DWT.KEYPAD_9],
-//       [81, DWT.KEYPAD_EQUAL],
+        {67, DWT.KEYPAD_MULTIPLY},
+        {69, DWT.KEYPAD_ADD},
+        {76, DWT.KEYPAD_CR},
+        {78, DWT.KEYPAD_SUBTRACT},
+        {65, DWT.KEYPAD_DECIMAL},
+        {75, DWT.KEYPAD_DIVIDE},
+        {82, DWT.KEYPAD_0},
+        {83, DWT.KEYPAD_1},
+        {84, DWT.KEYPAD_2},
+        {85, DWT.KEYPAD_3},
+        {86, DWT.KEYPAD_4},
+        {87, DWT.KEYPAD_5},
+        {88, DWT.KEYPAD_6},
+        {89, DWT.KEYPAD_7},
+        {91, DWT.KEYPAD_8},
+        {92, DWT.KEYPAD_9},
+        {81, DWT.KEYPAD_EQUAL},
 
          /* Other keys */
-//       [??,    DWT.CAPS_LOCK],
-         
-//       [71,    DWT.NUM_LOCK],
-         
+        {57,    DWT.CAPS_LOCK},
+        {71,    DWT.NUM_LOCK},
 //       [??,    DWT.SCROLL_LOCK],
 //       [??,    DWT.PAUSE],
 //       [??,    DWT.BREAK],
 //       [??,    DWT.PRINT_SCREEN],
-         
-         [OS.NSHelpFunctionKey, DWT.HELP],
+        {114, DWT.HELP},
          
      ];
 
     static String APP_NAME = "DWT";
     static const String ADD_WIDGET_KEY = "dwt.internal.addWidget";
+    static const String DWT_OBJECT = "DWT_OBJECT"; //$NON-NLS-1$
 
     /* Multiple Displays. */
     static Display Default;
@@ -347,6 +384,20 @@
     return 0;
 }
 
+void addContext (NSGraphicsContext context) {
+    if (contexts is null) contexts = new NSGraphicsContext [12];
+    for (int i=0; i<contexts.length; i++) {
+        if (contexts[i] !is null && contexts [i].id is context.id) {
+            contexts [i] = context;
+            return;
+        }
+    }
+    NSGraphicsContext [] newContexts = new NSGraphicsContext [contexts.length + 12];
+    newContexts [contexts.length] = context;
+    System.arraycopy (contexts, 0, newContexts, 0, contexts.length);
+    contexts = newContexts;
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when an event of the given type occurs anywhere
@@ -421,40 +472,43 @@
     eventTable.hook (eventType, listener);
 }
 
-//void addMenu (Menu menu) {
-//  if (menus is null) menus = new Menu [12];
-//  for (int i=0; i<menus.length; i++) {
-//      if (menus [i] is null) {
-//          menu.id = cast(short)(ID_START + i);
-//          menus [i] = menu;
-//          return;
-//      }
-//  }
-//  Menu [] newMenus = new Menu [menus.length + 12];
-//  menu.id = cast(short)(ID_START + menus.length);
-//  newMenus [menus.length] = menu;
-//  System.arraycopy (menus, 0, newMenus, 0, menus.length);
-//  menus = newMenus;
-//}
-//
-//void addPopup (Menu menu) {
-//  if (popups is null) popups = new Menu [4];
-//  int length = popups.length;
-//  for (int i=0; i<length; i++) {
-//      if (popups [i] is menu) return;
-//  }
-//  int index = 0;
-//  while (index < length) {
-//      if (popups [index] is null) break;
-//      index++;
-//  }
-//  if (index is length) {
-//      Menu [] newPopups = new Menu [length + 4];
-//      System.arraycopy (popups, 0, newPopups, 0, length);
-//      popups = newPopups;
-//  }
-//  popups [index] = menu;
-//}
+void addMenu (Menu menu) {
+    if (menus is null) menus = new Menu [12];
+    for (int i=0; i<menus.length; i++) {
+        if (menus [i] is null) {
+            menus [i] = menu;
+            return;
+        }
+    }
+    Menu [] newMenus = new Menu [menus.length + 12];
+    newMenus [menus.length] = menu;
+    System.arraycopy (menus, 0, newMenus, 0, menus.length);
+    menus = newMenus;
+}
+
+void addPopup (Menu menu) {
+    if (popups is null) popups = new Menu [4];
+    int length = popups.length;
+    for (int i=0; i<length; i++) {
+        if (popups [i] is menu) return;
+    }
+    int index = 0;
+    while (index < length) {
+        if (popups [index] is null) break;
+        index++;
+    }
+    if (index is length) {
+        Menu [] newPopups = new Menu [length + 4];
+        System.arraycopy (popups, 0, newPopups, 0, length);
+        popups = newPopups;
+    }
+    popups [index] = menu;
+}
+
+void addWidget (NSObject view, Widget widget) {
+    if (view is null) return;
+    OS.object_setInstanceVariable (view.id, DWT_OBJECT, widget.jniRef);
+}
 
 /**
  * Causes the <code>run()</code> method of the runnable to
@@ -496,6 +550,23 @@
  */
 public void beep () {
     checkDevice ();
+    OS.NSBeep ();
+}
+
+void cascadeWindow (NSWindow window, NSScreen screen) {
+    NSDictionary dictionary = screen.deviceDescription();
+    int screenNumber = new NSNumber(dictionary.objectForKey(NSString.stringWith("NSScreenNumber")).id).intValue();
+    int index = 0;
+    while (screenID[index] !is 0 && screenID[index] !is screenNumber) index++;
+    screenID[index] = screenNumber;
+    NSPoint cascade = screenCascade[index];
+    if (cascade is null) {
+        NSRect frame = screen.frame();
+        cascade = new NSPoint();
+        cascade.x = frame.x;
+        cascade.y = frame.y + frame.height;
+    }
+    screenCascade[index] = window.cascadeTopLeftFromPoint(cascade);
 }
 
 protected void checkDevice () {
@@ -616,6 +687,22 @@
     return result.toString ();
 }
 
+void clearModal (Shell shell) {
+    if (modalShells is null) return;
+    int index = 0, length = modalShells.length;
+    while (index < length) {
+        if (modalShells [index] is shell) break;
+        if (modalShells [index] is null) return;
+        index++;
+    }
+    if (index is length) return;
+    System.arraycopy (modalShells, index + 1, modalShells, index, --length - index);
+    modalShells [length] = null;
+    if (index is 0 && modalShells [0] is null) modalShells = null;
+    Shell [] shells = getShells ();
+    for (int i=0; i<shells.length; i++) shells [i].updateModal ();
+}
+
 /**
  * Requests that the connection between DWT and the underlying
  * operating system be closed.
@@ -664,61 +751,77 @@
         error(DWT.ERROR_NOT_IMPLEMENTED);
     }
 
+    NSThread nsthread = NSThread.currentThread();
+    NSMutableDictionary dictionary = nsthread.threadDictionary();
+    NSString key = NSString.stringWith("DWT_NSAutoreleasePool");
+    pool = new NSAutoreleasePool(dictionary.objectForKey(key));
+
+    application = NSApplication.sharedApplication();
+
     /*
-    * Feature in the Macintosh.  On OS 10.2, it is necessary
-    * to explicitly check in with the Process Manager and set
-    * the current process to be the front process in order for
-    * windows to come to the front by default.  The fix is call
-    * both GetCurrentProcess() and SetFrontProcess().
-    * 
-    * NOTE: It is not actually necessary to use the process
-    * serial number returned by GetCurrentProcess() in the
-    * call to SetFrontProcess() (ie. kCurrentProcess can be
-    * used) but both functions must be called in order for
-    * windows to come to the front.
-    */
+     * TODO: If an NSApplication is already running we don't want to create another NSApplication.
+     * But if we don't we won't get mouse events, since we currently need to subclass NSApplication and intercept sendEvent to
+     * deliver mouse events correctly to widgets.   
+     */
+    if (!application.isRunning()) {
+        /*
+         * Feature in the Macintosh.  On OS 10.2, it is necessary
+         * to explicitly check in with the Process Manager and set
+         * the current process to be the front process in order for
+         * windows to come to the front by default.  The fix is call
+         * both GetCurrentProcess() and SetFrontProcess().
+         * 
+         * NOTE: It is not actually necessary to use the process
+         * serial number returned by GetCurrentProcess() in the
+         * call to SetFrontProcess() (ie. kCurrentProcess can be
+         * used) but both functions must be called in order for
+         * windows to come to the front.
+         */
     ProcessSerialNumber* psn;
-    if (OS.GetCurrentProcess (psn) is OS.noErr) {
-//      int pid = OS.getpid ();
-//      byte [] buffer = null;
-//      int ptr = OS.getenv (ascii ("APP_NAME_" + pid));
-//      if (ptr !is 0) {
-//          buffer = new byte [OS.strlen (ptr) + 1];
-//          OS.memmove (buffer, ptr, buffer.length);
-//      } else {
-//          if (APP_NAME !is null) {
-//              char [] chars = new char [APP_NAME.length ()];
-//              APP_NAME.getChars (0, chars.length, chars, 0);
-//              int cfstring = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, chars, chars.length);
-//              if (cfstring !is 0) {
-//                  CFRange range = new CFRange ();
-//                  range.length = chars.length;
-//                  int encoding = OS.CFStringGetSystemEncoding ();
-//                  int [] size = new int [1];
-//                  int numChars = OS.CFStringGetBytes (cfstring, range, encoding, cast(byte) '?', true, null, 0, size);
-//                  if (numChars !is 0) {
-//                      buffer = new byte [size [0] + 1];
-//                      numChars = OS.CFStringGetBytes (cfstring, range, encoding, cast(byte) '?', true, buffer, size [0], size);
-//                  }
-//                  OS.CFRelease (cfstring);
-//              }
-//          }
-//      }
-//      if (buffer !is null) OS.CPSSetProcessName (psn, buffer); 
-        OS.TransformProcessType (psn, OS.kProcessTransformToForegroundApplication);
-        OS.SetFrontProcess (psn);
-//      ptr = OS.getenv (ascii ("APP_ICON_" + pid));
-//      if (ptr !is 0) {
-//          int image = readImageRef (ptr);
-//          if (image !is 0) {
-//              dockImage = image;
-//              OS.SetApplicationDockTileImage (dockImage);
-//          }
-//      }
+        if (OS.GetCurrentProcess (psn) is OS.noErr) {
+            int pid = OS.getpid ();
+            int /*long*/ ptr = OS.getenv (ascii ("APP_NAME_" + pid));
+            if (ptr  is 0 && APP_NAME !is null) {
+                ptr = NSString.stringWith(APP_NAME).UTF8String();   
+            }
+            if (ptr !is 0) OS.CPSSetProcessName (psn, ptr);
+            OS.TransformProcessType (psn, OS.kProcessTransformToForegroundApplication);
+            OS.SetFrontProcess (psn);
+            ptr = OS.getenv (ascii ("APP_ICON_" + pid));
+            if (ptr !is 0) {
+                NSString path = NSString.stringWithUTF8String (ptr);
+                NSImage image = (NSImage) new NSImage().alloc();
+                image = image.initByReferencingFile(path);
+                dockImage = image;
+                application.setApplicationIconImage(image);
+            }
+        }
+
+        String className = "SWTApplication";
+        int /*long*/ cls;
+        if ((cls = OS.objc_lookUpClass (className)) is 0) {
+            Class clazz = getClass();
+            applicationCallback2 = new Callback(clazz, "applicationProc", 2);
+            int /*long*/ proc2 = applicationCallback2.getAddress();
+            if (proc2 is 0) error (DWT.ERROR_NO_MORE_CALLBACKS);
+            applicationCallback3 = new Callback(clazz, "applicationProc", 3);
+            int /*long*/ proc3 = applicationCallback3.getAddress();
+            if (proc3 is 0) error (DWT.ERROR_NO_MORE_CALLBACKS);
+            applicationCallback6 = new Callback(clazz, "applicationProc", 6);
+            int /*long*/ proc6 = applicationCallback6.getAddress();
+            if (proc6 is 0) error (DWT.ERROR_NO_MORE_CALLBACKS);
+            cls = OS.objc_allocateClassPair(OS.class_NSApplication, className, 0);
+            OS.class_addMethod(cls, OS.sel_sendEvent_, proc3, "@:@");
+            OS.class_addMethod(cls, OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_, proc6, "@:i@@B");
+            OS.class_addMethod(cls, OS.sel_isRunning, proc2, "@:");
+            OS.objc_registerClassPair(cls);
+        }
+        applicationClass = OS.object_setClass(application.id, cls);
+    } else {
+        isEmbedded = true;
     }
-    
-    pool = cast(NSAutoreleasePool)(new NSAutoreleasePool()).alloc().init();
-    application = NSApplication.sharedApplication();
+
+    //  application = new NSApplication(OS.objc_msgSend(cls, OS.sel_sharedApplication));
 }
 
 static void deregister (Display display) {
@@ -746,8 +849,6 @@
 }
 
 void destroyDisplay () {
-    if (pool !is null) pool.release();
-    pool = null;
     application = null;
 }
 
@@ -813,16 +914,7 @@
  */
 public Widget findWidget (objc.id handle) {
     checkDevice ();
-    if (handle !is null && OS.objc_msgSend(handle, OS.sel_respondsToSelector_1, OS.sel_tag) !is null) {
-        NSInteger tag = cast(NSInteger) OS.objc_msgSend(handle, OS.sel_tag);
-        if (tag !is -1) {
-            Object object = OS.JNIGetObject(tag);
-            if (cast(Widget) object) {
-                return cast(Widget)object;
-            }
-        }
-    }
-    return null;
+    return getWidget (handle);
 }
 
 /**
@@ -849,7 +941,7 @@
  */
 public Widget findWidget (objc.id handle, int id) {
     checkDevice ();
-    return null;
+    return getWidget (handle);
 }
 
 /**
@@ -910,16 +1002,14 @@
  */
 public Shell getActiveShell () {
     checkDevice ();
-    NSWindow window = application.keyWindow();
-    if (window !is null) {
-        NSView view = window.contentView();
-        if (view !is null && view.respondsToSelector(OS.sel_tag)) {
-            NSInteger tag = cast(NSInteger) OS.objc_msgSend(view.id_, OS.sel_tag);
-            if (tag !is -1) {
-                Object object = OS.JNIGetObject(tag);
-                if (cast(Shell) object) {
-                    return cast(Shell)object;
-                }
+    NSArray windows = application.windows();
+    int count = (int)/*64*/windows.count();
+    for (int i = 0; i < count; i++) {
+        NSWindow win = new NSWindow(windows.objectAtIndex(i));
+        if (win.isKeyWindow()) {
+            Widget widget = getWidget(win.contentView());
+            if (widget instanceof Shell) {
+                return cast(Shell)widget;
             }
         }
     }
@@ -927,7 +1017,8 @@
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location.
+ * Returns a rectangle describing the receiver's size and location. Note that
+ * on multi-monitor systems the origin can be negative.
  *
  * @return the bounding rectangle
  *
@@ -938,7 +1029,30 @@
  */
 public Rectangle getBounds () {
     checkDevice ();
-    return super.getBounds ();
+    NSArray screens = NSScreen.screens();
+    return getBounds (screens);
+}
+
+Rectangle getBounds (NSArray screens) {
+    NSRect primaryFrame = new NSScreen(screens.objectAtIndex(0)).frame();
+    float /*double*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
+    float /*double*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
+    int /*long*/ count = screens.count();
+    for (int i = 0; i < count; i++) {
+        NSScreen screen = new NSScreen(screens.objectAtIndex(i));
+        NSRect frame = screen.frame();
+        float /*double*/ x1 = frame.x, x2 = frame.x + frame.width;
+        float /*double*/ y1 = primaryFrame.height - frame.y, y2 = primaryFrame.height - (frame.y + frame.height);
+        if (x1 < minX) minX = x1;
+        if (x2 < minX) minX = x2;
+        if (x1 > maxX) maxX = x1;
+        if (x2 > maxX) maxX = x2;
+        if (y1 < minY) minY = y1;
+        if (y2 < minY) minY = y2;
+        if (y1 > maxY) maxY = y1;
+        if (y2 > maxY) maxY = y2;
+    }
+    return new Rectangle ((int)minX, (int)minY, (int)(maxX - minX), (int)(maxY - minY));
 }
 
 /**
@@ -972,7 +1086,13 @@
  */
 public Rectangle getClientArea () {
     checkDevice ();
-    return super.getClientArea ();
+    NSArray screens = NSScreen.screens();
+    if (screens.count() !is 1) return getBounds (screens);
+    NSScreen screen = new NSScreen(screens.objectAtIndex(0));
+    NSRect frame = screen.frame();
+    NSRect visibleFrame = screen.visibleFrame();
+    float /*double*/ y = frame.height - (visibleFrame.y + visibleFrame.height);
+    return new Rectangle((int)visibleFrame.x, (int)y, (int)visibleFrame.width, (int)visibleFrame.height);
 }
 
 /**
@@ -989,7 +1109,7 @@
  */
 public Control getCursorControl () {
     checkDevice();
-    return null;
+    return findControl(null, false, false, true);
 }
 
 /**
@@ -1006,9 +1126,8 @@
 public Point getCursorLocation () {
     checkDevice ();
     NSPoint location = NSEvent.mouseLocation();
-    //TODO bad for other screens
-    NSRect rect = NSScreen.mainScreen().frame();
-    return new Point (cast(int) location.x, cast(int) (rect.height - location.y));
+    NSRect primaryFrame = getPrimaryFrame();
+    return new Point (cast(int) location.x, cast(int) (primaryFrame.height - location.y));
 }
 
 /**
@@ -1161,46 +1280,29 @@
 public Control getFocusControl () {
     checkDevice ();
     NSWindow window = application.keyWindow();
+    return GetFocusControl(window);
+}
+
+static Control GetFocusControl(NSWindow window) {
     if (window !is null) {
-        NSResponder view = window.firstResponder();
-        if (view !is null && view.respondsToSelector(OS.sel_tag)) {
-            NSInteger tag = cast(NSInteger) OS.objc_msgSend(view.id_, OS.sel_tag);
-            if (tag !is -1) {
-                Object object = OS.JNIGetObject(tag);
-                if (cast(Control) object) {
-                    //TODO go up hierarchy
-                    return cast(Control)object;
+        NSResponder responder = window.firstResponder();
+        if (responder !is null && !responder.respondsToSelector(OS.sel_superview)) {
+            return null;
+        }
+        NSView view = new NSView(responder.id);
+        if (view !is null) {
+            do {
+                Widget widget = GetWidget (view.id);
+                if (widget instanceof Control) {
+                    return (Control)widget;
                 }
-            } else {
-                /*
-                * If the first responder is the shared field editor then answer its
-                * delegate as the focus control.
-                */
-                if (view.isKindOfClass(NSText.static_class())) {
-                    NSText text = new NSText(view.id_);
-                    if (text.isFieldEditor()) {
-                        id delegateId = text.delegate_();
-                        if (delegateId !is null) {
-                            NSObject delegate_ = new NSObject(delegateId.id_);
-                            if (delegate_.respondsToSelector(OS.sel_tag)) {
-                                tag = cast(NSInteger) OS.objc_msgSend(delegate_.id_, OS.sel_tag);
-                                if (tag !is 0 && tag !is -1) {
-                                    Object object = OS.JNIGetObject(tag);
-                                    if (cast(Control) object) {
-                                        return cast(Control)object;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
+                view = view.superview();
+            } while (view !is null);
         }
     }
     return null;
 }
 
-
 /**
  * Returns true when the high contrast mode is enabled.
  * Otherwise, false is returned.
@@ -1270,34 +1372,23 @@
     return cast(int) System.currentTimeMillis ();
 }
 
-//Menu [] getMenus (Decorations shell) {
-//  if (menus is null) return new Menu [0];
-//  int count = 0;
-//  for (int i = 0; i < menus.length; i++) {
-//      Menu menu = menus[i];
-//      if (menu !is null && menu.parent is shell) count++;
-//  }
-//  int index = 0;
-//  Menu[] result = new Menu[count];
-//  for (int i = 0; i < menus.length; i++) {
-//      Menu menu = menus[i];
-//      if (menu !is null && menu.parent is shell) {
-//          result[index++] = menu;
-//      }
-//  }
-//  return result;
-//}
-//
-//Menu getMenu (int id) {
-//  if (menus is null) return null;
-//  int index = id - ID_START;
-//  if (0 <= index && index < menus.length) return menus [index];
-//  return null;
-//}
-//
-//Menu getMenuBar () {
-//  return menuBar;
-//}
+Menu [] getMenus (Decorations shell) {
+    if (menus is null) return new Menu [0];
+    int count = 0;
+    for (int i = 0; i < menus.length; i++) {
+        Menu menu = menus[i];
+        if (menu !is null && menu.parent is shell) count++;
+    }
+    int index = 0;
+    Menu[] result = new Menu[count];
+    for (int i = 0; i < menus.length; i++) {
+        Menu menu = menus[i];
+        if (menu !is null && menu.parent is shell) {
+            result[index++] = menu;
+        }
+    }
+    return result;
+}
 
 int getMessageCount () {
     return synchronizer.getMessageCount ();
@@ -1313,19 +1404,19 @@
 public dwt.widgets.Monitor.Monitor [] getMonitors () {
     checkDevice ();
     NSArray screens = NSScreen.screens();
-    int count = screens.count();
-    dwt.widgets.Monitor.Monitor [] monitors = new dwt.widgets.Monitor.Monitor [count];
+    NSRect primaryFrame = new NSScreen(screens.objectAtIndex(0)).frame();
+    int count = (int)/*64*/screens.count();
     for (int i=0; i<count; i++) {
         dwt.widgets.Monitor.Monitor monitor = new dwt.widgets.Monitor.Monitor ();
         NSScreen screen = new NSScreen(screens.objectAtIndex(i));
         NSRect frame = screen.frame();
         monitor.x = cast(int)frame.x;
-        monitor.y = cast(int)frame.y;
+        monitor.y = (int)(primaryFrame.height - (frame.y + frame.height));
         monitor.width = cast(int)frame.width;
         monitor.height = cast(int)frame.height;
         NSRect visibleFrame = screen.visibleFrame();
         monitor.clientX = cast(int)visibleFrame.x;
-        monitor.clientY = cast(int)visibleFrame.y;
+        monitor.clientY = (int)(primaryFrame.height - (visibleFrame.y + visibleFrame.height));
         monitor.clientWidth = cast(int)visibleFrame.width;
         monitor.clientHeight = cast(int)visibleFrame.height;
         monitors [i] = monitor;
@@ -1333,6 +1424,11 @@
     return monitors;
 }
 
+NSRect getPrimaryFrame () {
+    NSArray screens = NSScreen.screens();
+    return new NSScreen(screens.objectAtIndex(0)).frame();
+}
+
 /**
  * Returns the primary monitor for that device.
  * 
@@ -1343,15 +1439,16 @@
 public dwt.widgets.Monitor.Monitor getPrimaryMonitor () {
     checkDevice ();
     dwt.widgets.Monitor.Monitor monitor = new dwt.widgets.Monitor.Monitor ();
-    NSScreen screen = NSScreen.mainScreen();
+    NSArray screens = NSScreen.screens();
+    NSScreen screen = new NSScreen(screens.objectAtIndex(0));
     NSRect frame = screen.frame();
     monitor.x = cast(int)frame.x;
-    monitor.y = cast(int)frame.y;
+    monitor.y = (int)(frame.height - (frame.y + frame.height));
     monitor.width = cast(int)frame.width;
     monitor.height = cast(int)frame.height;
     NSRect visibleFrame = screen.visibleFrame();
     monitor.clientX = cast(int)visibleFrame.x;
-    monitor.clientY = cast(int)visibleFrame.y;
+    monitor.clientY = (int)(frame.height - (visibleFrame.y + visibleFrame.height));
     monitor.clientWidth = cast(int)visibleFrame.width;
     monitor.clientHeight = cast(int)visibleFrame.height;
     return monitor;
@@ -1372,18 +1469,12 @@
     checkDevice ();
     NSArray windows = application.windows();
     int index = 0;
-    Shell [] result = new Shell [windows.count()];
+    Shell [] result = new Shell [(int)/*64*/windows.count()];
     for (int i = 0; i < result.length; i++) {
         NSWindow window = new NSWindow(windows.objectAtIndex(i));
-        NSView view = window.contentView();
-        if (view !is null) {
-            NSInteger jniRef = cast(NSInteger) OS.objc_msgSend(view.id_, OS.sel_tag);
-            if (jniRef !is 0 && jniRef !is -1) {
-                Object object = OS.JNIGetObject(jniRef);
-                if (cast(Shell) object) {
-                    result[index++] = cast(Shell)object;
-                }
-            }
+        Widget widget = getWidget(window.contentView());
+        if (widget instanceof Shell) {
+            result[index++] = (Shell)widget;
         }
     }
     if (index is result.length) return result;
@@ -1479,9 +1570,9 @@
     if (color is null) return super.getSystemColor(id);
     color = color.colorUsingColorSpace(NSColorSpace.deviceRGBColorSpace());
     if (color is null) return super.getSystemColor(id);
-    float[] components = new float[color.numberOfComponents()];
+    float /*double*/[] components = new float /*double*/[(int)/*64*/color.numberOfComponents()];
     color.getComponents(components);    
-    return Color.cocoa_new (this, [components[0], components[1], components[2], components[3]]);
+    return Color.cocoa_new (this, [cast(float)/*64*/ components[0], cast(float)/*64*/ components[1], cast(float)/*64*/ components[2], cast(float)/*64*/ components[3]]);
 }
 
 /**
@@ -1563,25 +1654,32 @@
  */
 public Image getSystemImage (int id) {
     checkDevice ();
-    int code;
     switch(id) {
-        case DWT.ICON_ERROR:
-            code = OS.kAlertStopIcon;
-            break;
+        case DWT.ICON_ERROR: {  
+            if (errorImage !is null) return errorImage;
+            NSImage nsImage = NSWorkspace.sharedWorkspace ().iconForFileType (new NSString (OS.NSFileTypeForHFSTypeCode (OS.kAlertStopIcon)));
+            if (nsImage is null) return null;
+            nsImage.retain ();
+            return errorImage = Image.cocoa_new (this, DWT.ICON, nsImage);
+        }
         case DWT.ICON_INFORMATION:
-        case DWT.ICON_WORKING:
         case DWT.ICON_QUESTION:
-            code = OS.kAlertNoteIcon;
-            break;
-        case DWT.ICON_WARNING:
-            code = OS.kAlertCautionIcon;
-            break;
-        default:
-            return null;
+        case DWT.ICON_WORKING: {
+            if (infoImage !is null) return infoImage;
+            NSImage nsImage = NSWorkspace.sharedWorkspace ().iconForFileType (new NSString (OS.NSFileTypeForHFSTypeCode (OS.kAlertNoteIcon)));
+            if (nsImage is null) return null;
+            nsImage.retain ();
+            return infoImage = Image.cocoa_new (this, DWT.ICON, nsImage);
+        }
+        case DWT.ICON_WARNING: {
+            if (warningImage !is null) return warningImage;
+            NSImage nsImage = NSWorkspace.sharedWorkspace ().iconForFileType (new NSString (OS.NSFileTypeForHFSTypeCode (OS.kAlertCautionIcon)));
+            if (nsImage is null) return null;
+            nsImage.retain ();
+            return warningImage = Image.cocoa_new (this, DWT.ICON, nsImage);
+        }
     }
-    NSImage nsImage = NSWorkspace.sharedWorkspace().iconForFileType(OS.NSFileTypeForHFSTypeCode(code));
-    if (nsImage is null) return null;
-    return Image.cocoa_new(this, DWT.ICON, nsImage);
+    return null;
 }
 
 /**
@@ -1618,6 +1716,29 @@
     }
 }
 
+int getToolTipTime () {
+    checkDevice ();
+    //TODO get OS value (NSTooltipManager?)
+    return 560;
+}
+
+Widget getWidget (int /*long*/ id) {
+    return GetWidget (id);
+}
+
+static Widget GetWidget (int /*long*/ id) {
+    if (id is 0) return null;
+    int /*long*/ [] jniRef = new int /*long*/ [1];
+    OS.object_getInstanceVariable(id, DWT_OBJECT, jniRef);
+    if (jniRef[0] is 0) return null;
+    return (Widget)OS.JNIGetObject(jniRef[0]);
+}
+
+Widget getWidget (NSView view) {
+    if (view is null) return null;
+    return getWidget(view.id);
+}
+
 /**
  * Initializes any internal resources needed by the
  * device.
@@ -1630,264 +1751,455 @@
 protected void init_ () {
     super.init_ ();
     initClasses ();
-    initApplicationDelegate();  
-    application.finishLaunching();
+    
+    if (!isEmbedded) {
+        initApplicationDelegate();  
+        application.finishLaunching();
+    }
+        
+    timerDelegate = (SWTWindowDelegate)new SWTWindowDelegate().alloc().init();
+    
+    NSTextView textView = cast(NSTextView)(new NSTextView()).alloc();
+    textView.initWithFrame (NSRect ());
+    markedAttributes = textView.markedTextAttributes ();
+    markedAttributes.retain ();
+    textView.release ();
 }
 
 void initApplicationDelegate() {
-    objc.IMP appProc3 = cast(objc.IMP) &applicationDelegateProc;
-
     String className = "SWTApplicationDelegate";
-    objc.Class cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSObject, className, 0);
-    OS.class_addMethod(cls, OS.sel_applicationWillFinishLaunching_1, appProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_terminate_1, appProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_orderFrontStandardAboutPanel_1, appProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_hideOtherApplications_1, appProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_hide_1, appProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_unhideAllApplications_1, appProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_applicationShouldTerminate_1, appProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_applicationWillTerminate_1, appProc3, "@:@");
-    OS.objc_registerClassPair(cls);
-    
+    if (OS.objc_lookUpClass (className) is null) {
+        Class clazz = getClass ();
+        applicationDelegateCallback3 = new Callback(clazz, "applicationDelegateProc", 3);
+        int /*long*/ appProc3 = applicationDelegateCallback3.getAddress();
+        if (appProc3 is 0) error (DWT.ERROR_NO_MORE_CALLBACKS);
+        int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+        OS.class_addMethod(cls, OS.sel_applicationWillFinishLaunching_, appProc3, "@:@");
+        OS.class_addMethod(cls, OS.sel_terminate_, appProc3, "@:@");
+        OS.class_addMethod(cls, OS.sel_orderFrontStandardAboutPanel_, appProc3, "@:@");
+        OS.class_addMethod(cls, OS.sel_hideOtherApplications_, appProc3, "@:@");
+        OS.class_addMethod(cls, OS.sel_hide_, appProc3, "@:@");
+        OS.class_addMethod(cls, OS.sel_unhideAllApplications_, appProc3, "@:@");
+        OS.class_addMethod(cls, OS.sel_applicationShouldTerminate_, appProc3, "@:@");
+        OS.class_addMethod(cls, OS.sel_applicationWillTerminate_, appProc3, "@:@");
+        OS.class_addMethod(cls, OS.sel_applicationWillResignActive_, appProc3, "@:@");
+        OS.objc_registerClassPair(cls);
+    }   
     applicationDelegate = cast(SWTApplicationDelegate)(new SWTApplicationDelegate()).alloc().init();    
     application.setDelegate(applicationDelegate);
 }
 
+void addEventMethods (int /*long*/ cls, int /*long*/ proc2, int /*long*/ proc3, int /*long*/ drawRectProc) {
+    OS.class_addMethod(cls, OS.sel_mouseDown_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_mouseUp_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_scrollWheel_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_rightMouseDown_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_rightMouseUp_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_otherMouseDown_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_otherMouseUp_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_mouseDragged_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_mouseMoved_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_mouseEntered_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_mouseExited_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_menuForEvent_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_resignFirstResponder, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_becomeFirstResponder, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_keyDown_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_keyUp_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_flagsChanged_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_drawRect_, drawRectProc, "@:{NSRect}");
+}
+
+void addFrameMethods(int /*long*/ cls, int /*long*/ setFrameOriginProc, int /*long*/ setFrameSizeProc) {
+    OS.class_addMethod(cls, OS.sel_setFrameOrigin_, setFrameOriginProc, "@:{NSPoint}"); 
+    OS.class_addMethod(cls, OS.sel_setFrameSize_, setFrameSizeProc, "@:{NSSize}");  
+}
+
+void addAccessibilityMethods(int /*long*/ cls, int /*long*/ proc2, int /*long*/ proc3, int /*long*/ proc4, int /*long*/ accessibilityHitTestProc) {
+    OS.class_addMethod(cls, OS.sel_accessibilityActionNames, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_accessibilityAttributeNames, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_accessibilityParameterizedAttributeNames, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_accessibilityFocusedUIElement, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_accessibilityIsIgnored, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_accessibilityAttributeValue_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_accessibilityIsAttributeSettable_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_accessibilityHitTest_, accessibilityHitTestProc, "@:{NSPoint}");
+    OS.class_addMethod(cls, OS.sel_accessibilityAttributeValue_forParameter_, proc4, "@:@@");   
+    OS.class_addMethod(cls, OS.sel_accessibilityPerformAction_, proc3, "@:@");  
+    OS.class_addMethod(cls, OS.sel_accessibilityActionDescription_, proc3, "@:@");  
+}
+
+int registerCellSubclass(int cellClass, int size, int align, String types) {
+    String cellClassName = OS.class_getName(cellClass);
+    int cls = OS.objc_allocateClassPair(cellClass, "DWT" + cellClassName, 0);   
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.objc_registerClassPair(cls);
+    return cls;
+}
+
 void initClasses () {
-    objc.IMP dialogProc3 = cast(objc.IMP) &dialogProc;
+    if (OS.objc_lookUpClass ("SWTView") !is null) return;
     
-    objc.IMP proc3 = cast(objc.IMP) &windowDelegateProc3;
-    objc.IMP proc2 = cast(objc.IMP) &windowDelegateProc2;
-    objc.IMP proc4 = cast(objc.IMP) &windowDelegateProc4;
-    objc.IMP proc5 = cast(objc.IMP) &windowDelegateProc5;
-    objc.IMP proc6 = cast(objc.IMP) &windowDelegateProc6;
+    Class clazz = getClass ();
+    dialogCallback3 = new Callback(clazz, "dialogProc", 3);
+    int /*long*/ dialogProc3 = dialogCallback3.getAddress();
+    if (dialogProc3 is 0) error (DWT.ERROR_NO_MORE_CALLBACKS);  
+    windowDelegateCallback3 = new Callback(clazz, "windowDelegateProc", 3);
+    int /*long*/ proc3 = windowDelegateCallback3.getAddress();
+
+    objc.IMP drawRectProc = OS.drawRect_CALLBACK(proc3);
+    int /*long*/ drawInteriorWithFrameInViewProc = OS.drawInteriorWithFrame_inView_CALLBACK (proc4);
+    int /*long*/ setFrameOriginProc = OS.setFrameOrigin_CALLBACK(proc3);
+    int /*long*/ setFrameSizeProc = OS.setFrameSize_CALLBACK(proc3);
+    int /*long*/ hitTestProc = OS.hitTest_CALLBACK(proc3);
+    int /*long*/ markedRangeProc = OS.markedRange_CALLBACK(proc2);
+    int /*long*/ selectedRangeProc = OS.selectedRange_CALLBACK(proc2);
+    int /*long*/ highlightSelectionInClipRectProc = OS.highlightSelectionInClipRect_CALLBACK(proc3);
+    int /*long*/ setMarkedText_selectedRangeProc = OS.setMarkedText_selectedRange_CALLBACK(proc4);
+    int /*long*/ attributedSubstringFromRangeProc = OS.attributedSubstringFromRange_CALLBACK(proc3);
+    int /*long*/ characterIndexForPointProc = OS.characterIndexForPoint_CALLBACK(proc3);
+    int /*long*/ firstRectForCharacterRangeProc = OS.firstRectForCharacterRange_CALLBACK(proc3);    
+    int /*long*/ textWillChangeSelectionProc = OS.textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK(proc5);
+    int /*long*/ accessibilityHitTestProc = OS.accessibilityHitTest_CALLBACK(proc3);
     
-    objc.IMP drawRectProc = OS.drawRect_CALLBACK(proc3);
+    String types = "*";
+    int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF is 4 ? 2 : 3;
 
     String className = "SWTWindowDelegate";
-    objc.Class cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSObject, className, 0);
-    
-    static if ((void*).sizeof > int.sizeof) // 64bit target
-        OS.class_addIvar(cls, "dObject", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "q");
-    else
-        OS.class_addIvar(cls, "dObject", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    
-    OS.class_addMethod(cls, OS.sel_windowDidResize_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_windowShouldClose_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_windowWillClose_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_windowWillClose_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_windowDidResignKey_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_windowDidBecomeKey_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
-    OS.class_addMethod(cls, OS.sel_timerProc_1, proc3, "@:@");
+    int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_windowDidResize_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_windowDidMove_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_windowShouldClose_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_windowWillClose_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_windowDidResignKey_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_windowDidBecomeKey_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_timerProc_, proc3, "@:@");
     OS.objc_registerClassPair(cls);
     
     className = "SWTPanelDelegate";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSObject, className, 0);
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_windowWillClose_1, dialogProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_changeColor_1, dialogProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_changeFont_1, dialogProc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_windowWillClose_, dialogProc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_changeColor_, dialogProc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_changeFont_, dialogProc3, "@:@");
     OS.objc_registerClassPair(cls);
     
     className = "SWTMenu";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSMenu, className, 0);
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
-//  OS.class_addMethod(cls, OS.sel_menuWillOpen_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_menuWillClose_1, proc3, "@:@");
-//  OS.class_addMethod(cls, OS.sel_numberOfItemsInMenu_1, proc3, "@:@");    
-    OS.class_addMethod(cls, OS.sel_menu_1willHighlightItem_1, proc4, "@:@@");
-    OS.class_addMethod(cls, OS.sel_menuNeedsUpdate_1, proc3, "@:@");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_menuWillOpen_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_menuDidClose_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_menu_willHighlightItem_, proc4, "@:@@");
+    OS.class_addMethod(cls, OS.sel_menuNeedsUpdate_, proc3, "@:@");
     OS.objc_registerClassPair(cls);
 
     className = "SWTView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSView, className, 0);
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
+    OS.class_addProtocol(cls, OS.objc_getProtocol("NSTextInput"));
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_drawRect_1, drawRectProc, "@:i");
-    OS.class_addMethod(cls, OS.sel_mouseDown_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_mouseDragged_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_mouseEntered_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_mouseUp_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
     OS.class_addMethod(cls, OS.sel_acceptsFirstResponder, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_resignFirstResponder, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_becomeFirstResponder, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_isOpaque, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_hitTest_, hitTestProc, "@:{NSPoint}");
+    
+    //NSTextInput protocol
+    OS.class_addMethod(cls, OS.sel_hasMarkedText, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_markedRange, markedRangeProc, "@:");
+    OS.class_addMethod(cls, OS.sel_selectedRange, selectedRangeProc, "@:");
+    OS.class_addMethod(cls, OS.sel_setMarkedText_selectedRange_, setMarkedText_selectedRangeProc, "@:@{NSRange}");
+    OS.class_addMethod(cls, OS.sel_unmarkText, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_validAttributesForMarkedText, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_attributedSubstringFromRange_, attributedSubstringFromRangeProc, "@:{NSRange}");
+    OS.class_addMethod(cls, OS.sel_insertText_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_characterIndexForPoint_, characterIndexForPointProc, "@:{NSPoint}");
+    OS.class_addMethod(cls, OS.sel_firstRectForCharacterRange_, firstRectForCharacterRangeProc, "@:{NSRange}");
+    OS.class_addMethod(cls, OS.sel_doCommandBySelector_, proc3, "@::");
+    
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
     
     className = "SWTScrollView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSScrollView, className, 0);
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.class_addMethod(cls, OS.sel_sendVerticalSelection, proc2, "@:");
     OS.class_addMethod(cls, OS.sel_sendHorizontalSelection, proc2, "@:");
-//  OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_pageDown_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_pageUp_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_reflectScrolledClipView_, proc3, "@:@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
     
     className = "SWTButton";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSButton, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-//  OS.class_addMethod(cls, OS.sel_mouseDown_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_drawRect_1, drawRectProc, "@:i");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_sendArrowSelection, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
     
+    cls = registerCellSubclass(NSButton.cellClass(), size, align, types);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);    
+    NSButton.setCellClass(cls);
+
     className = "SWTTableView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSTableView, className, 0);
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_highlightSelectionInClipRect_, highlightSelectionInClipRectProc, "@:{NSRect}");
     OS.class_addMethod(cls, OS.sel_sendDoubleSelection, proc2, "@:");
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_numberOfRowsInTableView_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_tableView_1objectValueForTableColumn_1row_1, proc5, "@:@:@:@");
-    OS.class_addMethod(cls, OS.sel_tableView_1shouldEditTableColumn_1row_1, proc5, "@:@:@:@");
-    OS.class_addMethod(cls, OS.sel_tableViewSelectionDidChange_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_tableView_1willDisplayCell_1forTableColumn_1row_1, proc6, "@:@@@i");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_tableView_1setObjectValue_1forTableColumn_1row_1, proc6, "@:@@@i");
+    OS.class_addMethod(cls, OS.sel_numberOfRowsInTableView_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_tableView_objectValueForTableColumn_row_, proc5, "@:@:@:@");
+    OS.class_addMethod(cls, OS.sel_tableView_shouldEditTableColumn_row_, proc5, "@:@:@:@");
+    OS.class_addMethod(cls, OS.sel_tableViewSelectionDidChange_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_tableView_willDisplayCell_forTableColumn_row_, proc6, "@:@@@i");
+    OS.class_addMethod(cls, OS.sel_tableView_setObjectValue_forTableColumn_row_, proc6, "@:@@@i");
+    OS.class_addMethod(cls, OS.sel_tableViewColumnDidMove_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_tableViewColumnDidResize_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_tableView_didClickTableColumn_, proc4, "@:@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
-    
+
+    className = "SWTTableHeaderCell";
+    cls = OS.objc_allocateClassPair (OS.class_NSTableHeaderCell, className, 0);
+    OS.class_addIvar (cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod (cls, OS.sel_drawInteriorWithFrame_inView_, drawInteriorWithFrameInViewProc, "@:{NSRect}@");
+    OS.objc_registerClassPair (cls);
+
+    className = "SWTBrowserCell";
+    cls = OS.objc_allocateClassPair (OS.class_NSBrowserCell, className, 0);
+    OS.class_addIvar (cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod (cls, OS.sel_drawInteriorWithFrame_inView_, drawInteriorWithFrameInViewProc, "@:{NSRect}@");
+    OS.objc_registerClassPair (cls);
+
+    className = "SWTTableHeaderView";
+    cls = OS.objc_allocateClassPair(OS.class_NSTableHeaderView, className, 0);
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_mouseDown_, proc3, "@:@");
+    OS.objc_registerClassPair(cls);
+
     className = "SWTOutlineView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSOutlineView, className, 0);
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_highlightSelectionInClipRect_, highlightSelectionInClipRectProc, "@:{NSRect}");
     OS.class_addMethod(cls, OS.sel_sendDoubleSelection, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_outlineViewSelectionDidChange_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_outlineView_1shouldCollapseItem_1, proc4, "@:@@");
-    OS.class_addMethod(cls, OS.sel_outlineView_1shouldExpandItem_1, proc4, "@:@@");
-    OS.class_addMethod(cls, OS.sel_outlineView_1child_1ofItem_1, proc5, "@:@i@");
-    OS.class_addMethod(cls, OS.sel_outlineView_1isItemExpandable_1, proc4, "@:@@");
-    OS.class_addMethod(cls, OS.sel_outlineView_1numberOfChildrenOfItem_1, proc4, "@:@@");
-    OS.class_addMethod(cls, OS.sel_outlineView_1objectValueForTableColumn_1byItem_1, proc5, "@:@@@");
-    OS.class_addMethod(cls, OS.sel_outlineView_1willDisplayCell_1forTableColumn_1item_1, proc6, "@:@@@@");
-    OS.class_addMethod(cls, OS.sel_outlineView_1setObjectValue_1forTableColumn_1byItem_1, proc6, "@:@@@@");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_outlineViewSelectionDidChange_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_outlineViewItemDidExpand_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_outlineView_shouldCollapseItem_, proc4, "@:@@");
+    OS.class_addMethod(cls, OS.sel_outlineView_shouldExpandItem_, proc4, "@:@@");
+    OS.class_addMethod(cls, OS.sel_outlineView_child_ofItem_, proc5, "@:@i@");
+    OS.class_addMethod(cls, OS.sel_outlineView_isItemExpandable_, proc4, "@:@@");
+    OS.class_addMethod(cls, OS.sel_outlineView_numberOfChildrenOfItem_, proc4, "@:@@");
+    OS.class_addMethod(cls, OS.sel_outlineView_objectValueForTableColumn_byItem_, proc5, "@:@@@");
+    OS.class_addMethod(cls, OS.sel_outlineView_willDisplayCell_forTableColumn_item_, proc6, "@:@@@@");
+    OS.class_addMethod(cls, OS.sel_outlineView_setObjectValue_forTableColumn_byItem_, proc6, "@:@@@@");
+    OS.class_addMethod(cls, OS.sel_outlineViewColumnDidMove_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_outlineViewColumnDidResize_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_outlineView_didClickTableColumn_, proc4, "@:@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
 
     className = "SWTTreeItem";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSObject, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.objc_registerClassPair(cls);
 
     className = "SWTTabView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSTabView, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tabView_1willSelectTabViewItem_1, proc4, "@:@@");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_tabView_willSelectTabViewItem_, proc4, "@:@@");
+    OS.class_addMethod(cls, OS.sel_tabView_didSelectTabViewItem_, proc4, "@:@@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
     
     className = "SWTBox";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSBox, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
     
     className = "SWTProgressIndicator";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSProgressIndicator, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls); 
 
     className = "SWTSlider";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSSlider, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls); 
     
+    cls = registerCellSubclass(NSSlider.cellClass(), size, align, types);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);    
+    NSSlider.setCellClass(cls);
+
     className = "SWTPopUpButton";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSPopUpButton, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
     
+    cls = registerCellSubclass(NSPopUpButton.cellClass(), size, align, types);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);    
+    NSPopUpButton.setCellClass(cls);
+
     className = "SWTComboBox";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSComboBox, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_comboBoxSelectionDidChange_1, proc3, "@:@");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_comboBoxSelectionDidChange_, proc3, "@:@");
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textDidChange_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textViewDidChangeSelection_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
     
+    cls = registerCellSubclass(NSComboBox.cellClass(), size, align, types);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);    
+    NSComboBox.setCellClass(cls);
+
     className = "SWTDatePicker";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSDatePicker, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
 
     className = "SWTImageView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSImageView, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_drawRect_1, OS.drawRect_CALLBACK(proc3), "@:i");
-    OS.class_addMethod(cls, OS.sel_mouseDown_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_mouseUp_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_rightMouseDown_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
 
+    cls = registerCellSubclass(NSImageView.cellClass(), size, align, types);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);    
+    NSImageView.setCellClass(cls);
+
     className = "SWTStepper";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSStepper, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
 
+    cls = registerCellSubclass(NSStepper.cellClass(), size, align, types);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);    
+    NSStepper.setCellClass(cls);
+
     className = "SWTScroller";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSScroller, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
-
+    
     className = "SWTMenuItem";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSMenuItem, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
     OS.objc_registerClassPair(cls);
 
     className = "SWTTextView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSTextView, className, 0);
-//  OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
-//  OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
-    OS.class_addMethod(cls, OS.sel_menuForEvent_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_textView_1clickedOnLink_1atIndex_1, proc5, "@:@@i");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+    OS.class_addMethod(cls, OS.sel_insertText_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_doCommandBySelector_, proc3, "@::");
+    OS.class_addMethod(cls, OS.sel_textDidChange_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textView_clickedOnLink_atIndex_, proc5, "@:@@@");
+    OS.objc_registerClassPair(cls);
+    
+    className = "SWTEditorView";
+    cls = OS.objc_allocateClassPair(OS.class_NSTextView, className, 0);
+    OS.class_addMethod(cls, OS.sel_keyDown_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_keyUp_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_insertText_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_doCommandBySelector_, proc3, "@::");
     OS.objc_registerClassPair(cls);
     
     className = "SWTTextField";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSTextField, className, 0);
-    OS.class_addMethod(cls, OS.sel_drawRect_1, drawRectProc, "@:i");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+    OS.class_addMethod(cls, OS.sel_textDidChange_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textViewDidChangeSelection_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
+    OS.objc_registerClassPair(cls);
+    
+    cls = registerCellSubclass(NSTextField.cellClass(), size, align, types);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);    
+    NSTextField.setCellClass(cls);
+
+    className = "SWTSearchField";
+    cls = OS.objc_allocateClassPair(OS.class_NSSearchField, className, 0);
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+    OS.class_addMethod(cls, OS.sel_textDidChange_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textViewDidChangeSelection_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
+    OS.objc_registerClassPair(cls);
+    
+    cls = registerCellSubclass(NSSearchField.cellClass(), size, align, types);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);    
+    NSSearchField.setCellClass(cls);
+
+    className = "SWTSecureTextField";
+    cls = OS.objc_allocateClassPair(OS.class_NSSecureTextField, className, 0);
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    addEventMethods(cls, proc2, proc3, drawRectProc);
+    addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+    OS.class_addMethod(cls, OS.sel_textDidChange_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textViewDidChangeSelection_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
     OS.objc_registerClassPair(cls);
 
+    // Don't subclass NSSecureTextFieldCell -- you'll get an NSException from [NSSecureTextField setCellClass:]!
+    
     className = "SWTWindow";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSWindow, className, 0);
-    OS.class_addIvar(cls, "tag", OS.PTR_SIZEOF, cast(byte)(Math.log(OS.PTR_SIZEOF) / Math.log(2)), "i");
-    OS.class_addMethod(cls, OS.sel_tag, proc2, "@:");
-    OS.class_addMethod(cls, OS.sel_setTag_1, proc3, "@:i");
-    OS.class_addMethod(cls, OS.sel_sendEvent_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_flagsChanged_1, proc3, "@:@");
-    OS.class_addMethod(cls, OS.sel_helpRequested_1, proc3, "@:@");
+    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addMethod(cls, OS.sel_sendEvent_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_helpRequested_, proc3, "@:@");
+    OS.class_addMethod(cls, OS.sel_canBecomeKeyWindow, proc2, "@:");
+    OS.class_addMethod(cls, OS.sel_makeFirstResponder_, proc3, "@:@");
+    addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
 }
 
@@ -1913,7 +2225,14 @@
  */
 public objc.id internal_new_GC (GCData data) {
     if (isDisposed()) DWT.error(DWT.ERROR_DEVICE_DISPOSED);
-    NSGraphicsContext context = application.context();
+    if (screenWindow is null) {
+        NSWindow window = (NSWindow) new NSWindow ().alloc ();
+        NSRect rect = new NSRect();
+        window = window.initWithContentRect(rect, OS.NSBorderlessWindowMask, OS.NSBackingStoreBuffered, false);
+        window.setReleasedWhenClosed(false);
+        screenWindow = window;
+    }
+    NSGraphicsContext context = screenWindow.graphicsContext();
 //  NSAffineTransform transform = NSAffineTransform.transform();
 //  NSSize size = handle.size();
 //  transform.translateXBy(0, size.height);
@@ -1945,7 +2264,7 @@
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
  */
-public override void internal_dispose_GC (objc.id context, GCData data) {
+public void internal_dispose_GC (objc.id context, GCData data) {
     if (isDisposed()) DWT.error(DWT.ERROR_DEVICE_DISPOSED);
     
 }
@@ -2245,15 +2564,18 @@
     if (toWindow !is null && fromWindow !is null && toWindow.id_ is fromWindow.id_) {
         pt = from.view.convertPoint_toView_(pt, to.view);
     } else {
+        NSRect primaryFrame = getPrimaryFrame();
         if (from !is null) {
-            pt = from.view.convertPoint_toView_(pt, null);
+            NSView view = from.contentView ();
+            pt = view.convertPoint_toView_(pt, null);
             pt = fromWindow.convertBaseToScreen(pt);
-            pt.y = fromWindow.screen().frame().height - pt.y;
+            pt.y = primaryFrame.height - pt.y;
         }
         if (to !is null) {
-            pt.y = toWindow.screen().frame().height - pt.y;
+            NSView view = to.contentView ();
+            pt.y = primaryFrame.height - pt.y;
             pt = toWindow.convertScreenToBase(pt);
-            pt = to.view.convertPoint_fromView_(pt, null);
+            pt = view.convertPoint_fromView_(pt, null);
         }
     }
     point.x = cast(int)pt.x;
@@ -2355,15 +2677,18 @@
     if (toWindow !is null && fromWindow !is null && toWindow.id_ is fromWindow.id_) {
         pt = from.view.convertPoint_toView_(pt, to.view);
     } else {
+        NSRect primaryFrame = getPrimaryFrame();
         if (from !is null) {
-            pt = from.view.convertPoint_toView_(pt, null);
+            NSView view = from.contentView ();
+            pt = view.convertPoint_toView_(pt, null);
             pt = fromWindow.convertBaseToScreen(pt);
-            pt.y = fromWindow.screen().frame().height - pt.y;
+            pt.y = primaryFrame.height - pt.y;
         }
         if (to !is null) {
-            pt.y = toWindow.screen().frame().height - pt.y;
+            NSView view = to.contentView ();
+            pt.y = primaryFrame.height - pt.y;
             pt = toWindow.convertScreenToBase(pt);
-            pt = to.view.convertPoint_fromView_(pt, null);
+            pt = view.convertPoint_fromView_(pt, null);
         }
     }
     rectangle.x = cast(int)pt.x;
@@ -2397,23 +2722,36 @@
  */
 public bool readAndDispatch () {
     checkDevice ();
-    NSAutoreleasePool pool = cast(NSAutoreleasePool)(new NSAutoreleasePool()).alloc().init();
+    if (loopCounter is 0) {
+        pool.release();
+        pool = (NSAutoreleasePool)new NSAutoreleasePool().alloc().init();
+    }
+    loopCounter ++;
+    bool events = false;
+    events |= runTimers ();
+    events |= runContexts ();
+    events |= runPopups ();
+    NSEvent event = application.nextEventMatchingMask(0, null, OS.NSDefaultRunLoopMode, true);
+    
     try {
-        bool events = false;
-        events |= runTimers ();
-        NSEvent event = application.nextEventMatchingMask(0, null, OS.NSDefaultRunLoopMode, true);
-        if (event !is null) {
-            events = true;
-            application.sendEvent(event);
-        }
+    if (event !is null) {
+        events = true;
+        application.sendEvent(event);
+    }
+//      NSEvent event = NSEvent.otherEventWithType(OS.NSApplicationDefined, new NSPoint(), 0, 0, 0, null, DWT_IDLE_TYPE, 0, 0);
+//      application.postEvent(event, false);
+//      idle = true;
+//      application.run();
+//      events |= !idle;
         if (events) {
             runDeferredEvents ();
             return true;
         }
         return runAsyncMessages (false);
     } finally {
-        pool.release();
+        loopCounter --;
     }
+    
 }
 
 static void register (Display display) {
@@ -2465,7 +2803,7 @@
     }
     if (tray !is null) tray.dispose ();
     tray = null;
-//  while (readAndDispatch ()) {}
+    while (readAndDispatch ()) {}
     if (disposeList !is null) {
         for (int i=0; i<disposeList.length; i++) {
             if (disposeList [i] !is null) disposeList [i].run ();
@@ -2485,26 +2823,69 @@
     if (warningImage !is null) warningImage.dispose ();
     errorImage = infoImage = warningImage = null;
     
-    //TODO - stop caret
     currentCaret = null;
     
     /* Release Timers */
+    if (hoverTimer !is null) timerExec(-1, hoverTimer);
+    hoverTimer = null;
+    if (caretTimer !is null) timerExec(-1, caretTimer);
+    caretTimer = null;
     if (nsTimers !is null) {
         for (int i=0; i<nsTimers.length; i++) {
-            //TODO - check -1 as sentinal
-            if (nsTimers [i] !is null /*&& timerIds [i] !is -1*/) {
+            if (nsTimers [i] !is null) {
                 nsTimers [i].invalidate();
                 nsTimers [i].release();
             }
         }
     }
     nsTimers = null;
+    if (timerDelegate !is null) timerDelegate.release();
+    timerDelegate = null;
     
     /* Release the System Cursors */
     for (int i = 0; i < cursors.length; i++) {
         if (cursors [i] !is null) cursors [i].dispose ();
     }
     cursors = null;
+    
+    /* Release Dock image */
+    if (dockImage !is null) dockImage.release();
+    dockImage = null;
+
+    if (screenWindow !is null) screenWindow.release();
+    screenWindow = null;
+    
+    modalShells = null;
+    menuBar = null;
+    menus = null;
+    
+    if (markedAttributes !is null) markedAttributes.release();
+    markedAttributes = null;
+
+    /* The release pool needs to be released before the call backs. */
+    if (pool !is null) pool.release();
+    pool = null;
+
+    if (application !is null && applicationClass !is 0) {
+        OS.object_setClass (application.id, applicationClass);
+    }
+    application = null;
+    applicationClass = 0;
+}
+
+void removeContext (NSGraphicsContext context) {
+    if (contexts is null) return;
+    int count = 0;
+    for (int i = 0; i < contexts.length; i++) {
+        if (contexts[i] !is null) {
+            if (contexts [i].id is context.id) {
+                contexts[i] = null;
+            } else {
+                count++;
+            }
+        }
+    }
+    if (count is 0) contexts = null;
 }
 
 /**
@@ -2544,7 +2925,7 @@
  * is one of the event constants defined in class <code>DWT</code>.
  *
  * @param eventType the type of event to listen for
- * @param listener the listener which should no longer be notified when the event occurs
+ * @param listener the listener which should no longer be notified
  *
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -2567,25 +2948,49 @@
     eventTable.unhook (eventType, listener);
 }
 
-//void removeMenu (Menu menu) {
-//  if (menus is null) return;
-//  menus [menu.id - ID_START] = null;
-//}
-//
-//void removePopup (Menu menu) {
-//  if (popups is null) return;
-//  for (int i=0; i<popups.length; i++) {
-//      if (popups [i] is menu) {
-//          popups [i] = null;
-//          return;
-//      }
-//  }
-//}
+Widget removeWidget (NSObject view) {
+    if (view is null) return null;
+    int /*long*/ [] jniRef = new int /*long*/ [1];
+    OS.object_getInstanceVariable(view.id, DWT_OBJECT, jniRef);
+    if (jniRef[0] is 0) return null;
+    Widget widget = (Widget)OS.JNIGetObject(jniRef[0]);
+    OS.object_setInstanceVariable(view.id, DWT_OBJECT, 0);
+    return widget;
+}
+
+void removeMenu (Menu menu) {
+    if (menus is null) return;
+    for (int i = 0; i < menus.length; i++) {
+        if (menus [i] is menu) {
+            menus[i] = null;
+            break;
+        }
+    }
+}
+
+void removePopup (Menu menu) {
+    if (popups is null) return;
+    for (int i=0; i<popups.length; i++) {
+        if (popups [i] is menu) {
+            popups [i] = null;
+            return;
+        }
+    }
+}
 
 bool runAsyncMessages (bool all) {
     return synchronizer.runAsyncMessages (all);
 }
 
+bool runContexts () {
+    if (contexts !is null) {
+        for (int i = 0; i < contexts.length; i++) {
+            if (contexts[i] !is null) contexts[i].flushGraphics();
+        }
+    }
+    return false;
+}
+
 bool runDeferredEvents () {
     /*
     * Run deferred events.  This code is always
@@ -2622,6 +3027,25 @@
     return true;
 }
 
+bool runPopups () {
+    if (popups is null) return false;
+    bool result = false;
+    while (popups !is null) {
+        Menu menu = popups [0];
+        if (menu is null) break;
+        int length = popups.length;
+        System.arraycopy (popups, 1, popups, 0, --length);
+        popups [length] = null;
+//      clearMenuFlags ();
+        runDeferredEvents ();
+        if (!menu.isDisposed ()) menu._setVisible (true);
+//      clearMenuFlags ();
+        result = true;
+    }
+    popups = null;
+    return result;
+}
+
 bool runTimers () {
     if (timerList is null) return false;
     bool result = false;
@@ -2663,6 +3087,14 @@
     APP_NAME = name;
 }
 
+//TODO use custom timer instead of timerExec
+Runnable hoverTimer = new Runnable () {
+    public void run () {
+        if (currentControl !is null && !currentControl.isDisposed()) {
+            currentControl.sendMouseEvent (null, DWT.MouseHover, trackingControl !is null);
+        }
+    }
+};
 //TODO - use custom timer instead of timerExec
 Runnable caretTimer;
     
@@ -2676,6 +3108,13 @@
     }
 }
 
+void setCursor (Control control) {
+    Cursor cursor = null;
+    if (control !is null) cursor = control.findCursor ();
+    if (cursor is null) cursor = getSystemCursor (DWT.CURSOR_ARROW);
+    cursor.handle.set ();
+}
+
 /**
  * Sets the location of the on-screen pointer relative to the top left corner
  * of the screen.  <b>Note: It is typically considered bad practice for a
@@ -2748,6 +3187,17 @@
     checkDevice ();
     //if (key is null) error (DWT.ERROR_NULL_ARGUMENT);
     
+    if (key.equals (ADD_WIDGET_KEY)) {
+        Object [] data = (Object [])value;
+        NSObject object = (NSObject)data [0];
+        Widget widget = (Widget)data [1];
+        if (widget is null) {
+            removeWidget (object);
+        } else {
+            addWidget (object, widget);
+        }
+    }
+    
     /* Remove the key/value pair */
     if (value is null) {
         if (keys is null) return;
@@ -2793,13 +3243,6 @@
 }
 
 void setMenuBar (Menu menu) {
-    /*
-    * Feature in the Macintosh.  SetRootMenu() does not
-    * accept NULL to indicate that their should be no
-    * menu bar. The fix is to create a temporary empty
-    * menu, set that to be the menu bar, clear the menu
-    * bar and then delete the temporary menu.
-    */
     if (menu is menuBar) return;
     menuBar = menu;
     //remove all existing menu items except the application menu
@@ -2819,6 +3262,24 @@
     }
 }
 
+void setModalShell (Shell shell) {
+    if (modalShells is null) modalShells = new Shell [4];
+    int index = 0, length = modalShells.length;
+    while (index < length) {
+        if (modalShells [index] is shell) return;
+        if (modalShells [index] is null) break;
+        index++;
+    }
+    if (index is length) {
+        Shell [] newModalShells = new Shell [length + 4];
+        System.arraycopy (modalShells, 0, newModalShells, 0, length);
+        modalShells = newModalShells;
+    }
+    modalShells [index] = shell;
+    Shell [] shells = getShells ();
+    for (int i=0; i<shells.length; i++) shells [i].updateModal ();
+}
+
 /**
  * Sets the application defined, display specific data
  * associated with the receiver, to the argument.
@@ -2893,15 +3354,14 @@
 public bool sleep () {
     checkDevice ();
     if (getMessageCount () !is 0) return true;
-    NSAutoreleasePool pool = cast(NSAutoreleasePool)(new NSAutoreleasePool()).alloc().init();
-    try {
-        allowTimers = runAsyncMessages_ = false;
-        NSRunLoop.currentRunLoop().runMode(OS.NSDefaultRunLoopMode, NSDate.distantFuture());
-        allowTimers = runAsyncMessages_ = true;
-        return true;
-    } finally {
+    if (loopCounter is 0) {
         pool.release();
+        pool = cast(NSAutoreleasePool)(new NSAutoreleasePool()).alloc().init();
     }
+    allowTimers = runAsyncMessages = false;
+    NSRunLoop.currentRunLoop().runMode(OS.NSDefaultRunLoopMode, NSDate.distantFuture());
+    allowTimers = runAsyncMessages = true;
+    return true;
 }
 
 int sourceProc (int info) {
@@ -2977,14 +3437,18 @@
     }
     if (index !is timerList.length) {
         NSTimer timer = nsTimers [index];
-        if (milliseconds < 0) {
-            timer.invalidate();
+        if (timer is null) {
             timerList [index] = null;
-            nsTimers [index] = null;
         } else {
-            timer.setFireDate(NSDate.dateWithTimeIntervalSinceNow (milliseconds / 1000.0));
+            if (milliseconds < 0) {
+                timer.invalidate();
+                timerList [index] = null;
+                nsTimers [index] = null;
+            } else {
+                timer.setFireDate(NSDate.dateWithTimeIntervalSinceNow (milliseconds / 1000.0));
+            }
+            return;
         }
-        return;
     } 
     if (milliseconds < 0) return;
     index = 0;
@@ -3001,7 +3465,7 @@
         nsTimers = newTimerIds;
     }
     NSNumber userInfo = NSNumber.numberWithInt(index);
-    NSTimer timer = NSTimer.static_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(milliseconds / 1000.0, timerDelegate, OS.sel_timerProc_1, userInfo.id_, false);
+    NSTimer timer = NSTimer.scheduledTimerWithTimeInterval(milliseconds / 1000.0, timerDelegate, OS.sel_timerProc_, userInfo, false);
     timer.retain();
     if (timer !is null) {
         nsTimers [index] = timer;
@@ -3009,8 +3473,8 @@
     }
 }
 
-objc.id timerProc (objc.id ID) {
-    NSTimer timer = new NSTimer (ID);
+objc.id timerProc (objc.id id, objc.SEL sel, objc.id timerID) {
+    NSTimer timer = new NSTimer (timerID);
     NSNumber number = new NSNumber(timer.userInfo());
     int index = number.intValue();
     if (timerList is null) return null;
@@ -3071,23 +3535,204 @@
 
 void wakeThread () {
     NSObject object = (new NSObject()).alloc().init();
-    object.performSelectorOnMainThread_withObject_waitUntilDone_(OS.sel_release, null, false);
+    object.performSelectorOnMainThread(OS.sel_release, null, false);
+}
+
+Control findControl (NSEvent nsEvent, bool checkGrab, bool checkTrim, bool checkWindows) {
+    if (checkGrab && grabControl !is null && !grabControl.isDisposed()) return grabControl;
+    NSPoint point = NSEvent.mouseLocation();
+    NSView view = null;
+    NSWindow window = nsEvent !is null ? nsEvent.window() : null;
+    if (window !is null) {
+        view = window.contentView().hitTest (window.convertScreenToBase(point));
+    }
+    if (view is null && checkWindows) {
+        NSArray windows = application.orderedWindows();
+        for (int i = 0; i < windows.count() && view is null; i++) {
+            window = new NSWindow(windows.objectAtIndex(i));
+            NSView contentView = window.contentView();
+            if (contentView !is null) view = contentView.hitTest (window.convertScreenToBase(point));
+        }
+    }
+    Control control = null;
+    if (view !is null) {
+        do {
+            Widget widget = getWidget (view);
+            if (widget instanceof Control) {
+                control = (Control)widget;
+                break;
+            }
+            view = view.superview();
+        } while (view !is null);
+    }
+    if (checkTrim) {
+        if (control !is null && control.isTrim (view)) control = null;
+    }
+    return control;
+}
+
+int /*long*/ applicationNextEventMatchingMask (int /*long*/ id, int /*long*/ sel, int /*long*/ mask, int /*long*/ expiration, int /*long*/ mode, int /*long*/ dequeue) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    int /*long*/ result = OS.objc_msgSendSuper(super_struct, sel, mask, expiration, mode, dequeue !is 0);
+    if (result !is 0) {
+        if (trackingControl !is null && dequeue !is 0) {
+            NSEvent nsEvent = new NSEvent(result);
+            applicationSendMouseEvent(nsEvent, true);
+        }
+    }
+    return result;
 }
 
-extern (C) private static:
+void applicationSendMouseEvent (NSEvent nsEvent, bool send) {
+    if (send) runDeferredEvents();
+    bool up = false;
+    int type = (int)/*64*/nsEvent.type();
+    switch (type) {
+        case OS.NSLeftMouseDown:
+        case OS.NSRightMouseDown:
+        case OS.NSOtherMouseDown: {
+            Control control = grabControl = findControl(nsEvent, false, true, false);
+            if (control !is null) {
+                if (nsEvent.clickCount() is 1 && (control.state & Widget.DRAG_DETECT) !is 0 && control.hooks (DWT.DragDetect) && control.dragDetect()) {
+                    dragging = true;
+                }
+                control.sendMouseEvent (nsEvent, DWT.MouseDown, send);
+                if (nsEvent.clickCount() is 2) {
+                    control.sendMouseEvent (nsEvent, DWT.MouseDoubleClick, send);
+                }
+            }
+            break;
+        }
+        case OS.NSLeftMouseUp:
+        case OS.NSRightMouseUp:
+        case OS.NSOtherMouseUp: {
+            Control control = findControl(nsEvent, true, true, false);
+            if (control !is null) {
+                control.sendMouseEvent (nsEvent, DWT.MouseUp, send);
+            }
+            grabControl = null;
+            up = true;
+            //FALL THROUGH
+        }
+        case OS.NSLeftMouseDragged:
+        case OS.NSRightMouseDragged:
+        case OS.NSOtherMouseDragged:
+        case OS.NSMouseMoved: {
+            Control control = findControl(nsEvent, true, true, type is OS.NSMouseMoved);
+            if (dragging) {
+                dragging = false;
+                control.sendDragEvent(nsEvent);
+            }
+            if (control !is currentControl) {
+                if (currentControl !is null) {
+                    currentControl.sendMouseEvent (nsEvent, DWT.MouseExit, send);
+                }
+                currentControl = control;
+                if (control !is null) {
+                    control.sendMouseEvent (nsEvent, DWT.MouseEnter, send);
+                    if (up) timerExec (getToolTipTime (), hoverTimer);
+                }
+                setCursor (control);
+            }
+            if (!up && control !is null) {
+                timerExec (getToolTipTime (), hoverTimer);
+                control.sendMouseEvent (nsEvent, DWT.MouseMove, send);
+            }
+            break;
+        }
+    }
+}
 
-objc.id applicationDelegateProc(objc.id ID, objc.SEL selector, objc.id arg0_) {
-    Display display = Display.findDisplay(Thread.getThis);
-    int arg0 = cast(int) arg0_;
-    String sel = fromStringz(selector);
-    with (display) {
-    
-    if (sel == OS.sel_applicationWillFinishLaunching_1) {
-        id dict = NSDictionary.dictionaryWithObject(applicationDelegate, NSString.stringWith("NSOwner"));
+void applicationSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+    NSEvent nsEvent = new NSEvent(event);
+    int type = nsEvent.type ();
+    bool beep = false;
+    switch (type) {
+        case OS.NSLeftMouseDown:
+        case OS.NSRightMouseDown:
+        case OS.NSOtherMouseDown:
+            beep = true;
+        case OS.NSLeftMouseUp:
+        case OS.NSRightMouseUp:
+        case OS.NSMouseMoved:
+        case OS.NSLeftMouseDragged:
+        case OS.NSRightMouseDragged:
+        case OS.NSMouseEntered:
+        case OS.NSMouseExited:
+        case OS.NSKeyDown:
+        case OS.NSKeyUp:
+        case OS.NSOtherMouseUp:
+        case OS.NSOtherMouseDragged:
+        case OS.NSScrollWheel:
+            NSWindow window = nsEvent.window ();
+            if (window !is null) {
+                Shell shell = (Shell) getWidget (window.id);
+                if (shell !is null && shell.getModalShell () !is null) {
+                    if (beep) beep ();  
+                    return;
+                }
+            }
+            break;
+    }
+    applicationSendMouseEvent (nsEvent, false);
+    objc_super super_struct = new objc_super ();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend (id, OS.sel_superclass);
+    OS.objc_msgSendSuper (super_struct, sel, event);
+//  if (nsEvent.type() is OS.NSApplicationDefined && nsEvent.subtype() is DWT_IDLE_TYPE) {
+//      idle = true;
+//  } else {
+//      idle = false;
+//  }
+//  application.stop(null);
+}
+
+// #245724: [NSApplication isRunning] must return true to allow the AWT to load correctly.
+static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel) {
+    //TODO optimize getting the display
+    Display display = getCurrent ();
+    if (display is null) return 0;
+    if (sel is OS.sel_isRunning) {
+        return display.isDisposed() ? 0 : 1;
+    }
+    return 0;
+}
+
+static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+    //TODO optimize getting the display
+    Display display = getCurrent ();
+    if (display is null) return 0;
+    if (sel is OS.sel_sendEvent_) {
+        display.applicationSendEvent (id, sel, event);
+        return 0;
+    }
+    return 0;
+}
+
+static objc.id applicationProc(objc.id id, objc.SEL sel, objc.id arg0, objc.id arg1, objc.id arg2, objc.id arg3) {
+    //TODO optimize getting the display
+    Display display = getCurrent ();
+    if (display is null) return null;
+    if (sel is OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_) {
+        return display.applicationNextEventMatchingMask(id, sel, arg0, arg1, arg2, arg3);
+    }
+    return 0;
+}
+
+static objc.id applicationDelegateProc(objc.id id, objc.SEL sel, objc.id arg0) {
+    //TODO optimize getting the display
+    Display display = getCurrent ();
+    if (display is null) return 0;
+    id applicationDelegate = display.applicationDelegate;
+    NSApplication application = display.application;
+    if (sel is OS.sel_applicationWillFinishLaunching_) {
+        NSDictionary dict = NSDictionary.dictionaryWithObject(applicationDelegate, NSString.stringWith("NSOwner"));
         NSString nibFile = NSString.stringWith("/System/Library/Frameworks/JavaVM.framework/Resources/English.lproj/DefaultApp.nib");
-        if (!NSBundle.loadNibFile(nibFile, dict, null)) {
+        if (!NSBundle.loadNibFile(nibFile, dict, 0)) {
             nibFile = NSString.stringWith("/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Resources/English.lproj/DefaultApp.nib");
-            NSBundle.loadNibFile(nibFile, dict, null);  
+            NSBundle.loadNibFile(nibFile, dict, 0); 
         }
         //replace %@ with application name
         NSMenu mainmenu = application.mainMenu();
@@ -3097,251 +3742,341 @@
             NSArray ia = sm.itemArray();
             for(int i = 0; i < ia.count(); i++) {
                 NSMenuItem ni = new NSMenuItem(ia.objectAtIndex(i));
-                NSString title = ni.title().stringByReplacingOccurrencesOfString_withString_(NSString.stringWith("%@"), NSString.stringWith(APP_NAME));
+                NSString title = ni.title().stringByReplacingOccurrencesOfString(NSString.stringWith("%@"), NSString.stringWith(APP_NAME));
                 ni.setTitle(title);
             }
         }
-    } else if (sel == OS.sel_terminate_1) {
+    } else if (sel == OS.sel_terminate_) {
         application.terminate(application);
-    } else if (sel == OS.sel_orderFrontStandardAboutPanel_1) {
-        Event event = new Event ();
-        sendEvent (DWT.ABORT, event);
-    } else if (sel == OS.sel_hideOtherApplications_1) {
+    } else if (sel == OS.sel_orderFrontStandardAboutPanel_) {
+//      Event event = new Event ();
+//      sendEvent (DWT.ABORT, event);
+    } else if (sel == OS.sel_hideOtherApplications_) {
         application.hideOtherApplications(application);
-    } else if (sel == OS.sel_hide_1) {
+    } else if (sel == OS.sel_hide_) {
         application.hide(application);
-    } else if (sel == OS.sel_unhideAllApplications_1) {
+    } else if (sel == OS.sel_unhideAllApplications_) {
         application.unhideAllApplications(application);
-    } else if (sel == OS.sel_applicationShouldTerminate_1) {
-        if (!disposing) {
+    } else if (sel == OS.sel_applicationShouldTerminate_) {
+        if (!display.disposing) {
             Event event = new Event ();
-            sendEvent (DWT.Close, event);
+            display.sendEvent (DWT.Close, event);
             if (event.doit) {
                 return cast(objc.id) OS.NSTerminateNow;
             }
         }
         return cast(objc.id) OS.NSTerminateCancel;
-    } else if (sel == OS.sel_applicationWillTerminate_1) {
-        dispose();
-    } 
-    return null;
+    } else if (sel == OS.sel_applicationWillTerminate_) {
+        display.dispose();
+    } else if (sel == OS.sel_applicationWillResignActive_) {
+        Shell[] shells = display.getShells();
+        for (int i = 0; i < shells.length; i++) {
+            shells[i].clearLevel();
+        }
+    }
     }
 }
 
-
-objc.id dialogProc(objc.id id, objc.SEL selector, objc.id arg0_) {
+static objc.id dialogProc(objc.id id, objc.SEL selector, objc.id arg0) {
     String sel = fromStringz(selector);
-    int arg0 = cast(int) arg0_;
-        
-    NSInteger jniRef = cast(NSInteger) OS.objc_msgSend(id, OS.sel_tag);
-    if (jniRef is 0 || jniRef is -1) return null;
-    if (sel == OS.sel_changeColor_1) {
-        ColorDialog dialog = cast(ColorDialog)OS.JNIGetObject(jniRef);
+    
+    objc.id jniRef;
+    OS.object_getInstanceVariable(id, DWT_OBJECT, jniRef);
+    if (jniRef is null) return 0;
+    if (sel == OS.sel_changeColor_) {
+        ColorDialog dialog = (ColorDialog)OS.JNIGetObject(jniRef);
+    if (jniRef is null) return null;
+        dialog.changeColor(id, sel, arg0);
+    } else if (sel == OS.sel_changeFont_) {
+        FontDialog dialog = cast(FontDialog)OS.JNIGetObject(jniRef);
         if (dialog is null) return null;
-        dialog.changeColor(arg0);
-    } else if (sel == OS.sel_changeFont_1) {
-        FontDialog dialog = cast(FontDialog )OS.JNIGetObject(jniRef);
-        if (dialog is null) return null;
-        dialog.changeFont(arg0);
-    } else if (sel == OS.sel_windowWillClose_1) {
-        Object object = OS.JNIGetObject(jniRef);
+        dialog.changeFont(id, sel, arg0);
+    } else if (sel == OS.sel_windowWillClose_) {
+        Object object = OS.JNIGetObject(jniRef[0]);
         if (cast(FontDialog) object) {
-            (cast(FontDialog)object).windowWillClose(arg0);
+            (cast(FontDialog)object).windowWillClose(id, sel, arg0);
         } else if (cast(ColorDialog) object) {
-            (cast(ColorDialog)object).windowWillClose(arg0);
+            (cast(ColorDialog)object).windowWillClose(id, sel, arg0);
         }
     }
     return null;
 }
 	
-objc.id windowDelegateProc2(objc.id delegate_, objc.SEL selector) { 
+static int objc.id windowDelegateProc2(objc.id id, objc.SEL selector) {
     String sel = fromStringz(selector);
-    
-    /*if (sel == OS.sel_tag) {
-        NSInteger* tag;
-        OS.object_getInstanceVariable(delegate_, "tag", cast(void**) &tag);    
-        return cast(objc.id) tag[0];
-    }
-    NSInteger jniRef = cast(NSInteger) OS.objc_msgSend(delegate_, OS.sel_tag);
-    if (jniRef is 0 || jniRef is -1) return null;*/
-    Widget widget = getWidget(delegate_);//cast(Widget)OS.JNIGetObject(jniRef);
+
+    Widget widget = GetWidget(id);
     if (widget is null) return null;
-    if (sel == OS.sel_isFlipped) {
-        return widget.isFlipped() ? cast(objc.id) 1 : null;
-    }
     if (sel == OS.sel_sendSelection) {
         widget.sendSelection();
-        return null;
-    }
-    if (sel == OS.sel_sendArrowSelection) {
-        widget.sendArrowSelection();
-        return null;
-    }
-    if (sel == OS.sel_sendDoubleSelection) {
+    } else if (sel == OS.sel_sendDoubleSelection) {
         widget.sendDoubleSelection();
-        return null;
-    }
-    if (sel == OS.sel_sendVerticalSelection) {
+    } else if (sel == OS.sel_sendVerticalSelection) {
         widget.sendVerticalSelection();
-        return null;
-    }
-    if (sel == OS.sel_sendHorizontalSelection) {
+    } else if (sel == OS.sel_sendHorizontalSelection) {
         widget.sendHorizontalSelection();
-        return null;
-    }
-    if (sel == OS.sel_acceptsFirstResponder) {
-        return widget.acceptsFirstResponder() ? cast(objc.id) 1 : null;
-    }
-    if (sel == OS.sel_becomeFirstResponder) {
-        return widget.becomeFirstResponder() ? cast(objc.id) 1 : null;
-    }
-    if (sel == OS.sel_resignFirstResponder) {
-        return widget.resignFirstResponder() ? cast(objc.id) 1 : null;
+    } else if (sel == OS.sel_acceptsFirstResponder) {
+        return widget.acceptsFirstResponder(id, sel) ? cast(objc.id) 1 : null;
+    } else if (sel is OS.sel_becomeFirstResponder) {
+        return widget.becomeFirstResponder(id, sel) ? cast(objc.id) 1 : null;
+    } else if (sel is OS.sel_resignFirstResponder) {
+        return widget.resignFirstResponder(id, sel) ? cast(objc.id) 1 : null;
+    } else  if (sel == OS.sel_isFlipped) {
+        return widget.isFlipped(id, sel) ? cast(objc.id) 1 : null;
+    } else if (sel == OS.sel_isOpaque) {
+        return widget.isOpaque(id, sel) ? cast(objc.id) 1 : null;
+    } else if (sel is OS.sel_unmarkText) {
+        //TODO not called?
+    } else if (sel is OS.sel_validAttributesForMarkedText) {
+        return widget.validAttributesForMarkedText (id, sel);
+    } else if (sel is OS.sel_markedRange) {
+        NSRange range = widget.markedRange (id, sel);
+        /* NOTE that this is freed in C */
+        int /*long*/ result = OS.malloc (NSRange.sizeof);
+        OS.memmove (result, range, NSRange.sizeof);
+        return result;
+    } else if (sel is OS.sel_selectedRange) {
+        NSRange range = widget.selectedRange (id, sel);
+        /* NOTE that this is freed in C */
+        int /*long*/ result = OS.malloc (NSRange.sizeof);
+        OS.memmove (result, range, NSRange.sizeof);
+        return result;
+    } else if (sel is OS.sel_hasMarkedText) {
+        return widget.hasMarkedText (id, sel) ? 1 : 0;
+    } else if (sel is OS.sel_canBecomeKeyWindow) {
+        return widget.canBecomeKeyWindow (id, sel) ? 1 : 0;
+    } else if (sel is OS.sel_accessibilityActionNames) {
+        return widget.accessibilityActionNames(id, sel);
+    } else if (sel is OS.sel_accessibilityAttributeNames) {
+        return widget.accessibilityAttributeNames(id, sel);
+    } else if (sel is OS.sel_accessibilityParameterizedAttributeNames) {
+        return widget.accessibilityParameterizedAttributeNames(id, sel);
+    } else if (sel is OS.sel_accessibilityFocusedUIElement) {
+        return widget.accessibilityFocusedUIElement(id, sel);
+    } else if (sel is OS.sel_accessibilityIsIgnored) {
+        return (widget.accessibilityIsIgnored(id, sel) ? 1 : 0);
     }
     return null;
 }
 
-objc.id windowDelegateProc3(objc.id ID, objc.SEL selector, objc.id arg0_) {
-    Display display = Display.findDisplay(Thread.getThis);
+static objc.id windowDelegateProc3(objc.id ID, objc.SEL selector, objc.id arg0) {
     String sel = fromStringz(selector);
-    int arg0 = cast(int) arg0_;
-    
-    with (display) {
+
+    if (sel == OS.sel_timerProc_) {
+        //TODO optimize getting the display
+        Display display = getCurrent ();
+        if (display is null) return null;
+        return display.timerProc (id, sel, arg0);
     
     if (sel == OS.sel_timerProc_1) {
         return timerProc (arg0_);
     }
-    if (sel == OS.sel_setTag_1) {
-        OS.object_setInstanceVariable(ID, "tag", &arg0);
-        return null;
+    Widget widget = GetWidget(id);
+    if (widget is null && (sel == OS.sel_keyDown_ ||sel == OS.sel_keyUp_ ||sel == OS.sel_insertText_ ||sel == OS.sel_doCommandBySelector_))  {
+        widget = GetFocusControl (new NSView (id).window ());
     }
-    NSInteger jniRef = cast(NSInteger) OS.objc_msgSend(ID, OS.sel_tag);
-    if (jniRef is 0 || jniRef is -1) return null;
-    Widget widget = cast(Widget)OS.JNIGetObject(jniRef);
     if (widget is null) return null;
-    if (sel == OS.sel_windowWillClose_1) {
-        widget.windowWillClose(arg0);
-    } else if (sel == OS.sel_drawRect_1) {
+    if (sel == OS.sel_windowWillClose_) {
+        widget.windowWillClose(id, sel, arg0);
+    } else if (sel == OS.sel_drawRect_) {
         NSRect rect = NSRect();
         OS.memmove(&rect, arg0_, NSRect.sizeof);
-        widget.drawRect(ID, rect);
-    } else if (sel == OS.sel_windowShouldClose_1) {
-        return widget.windowShouldClose(arg0) ? cast(objc.id) 1 : null;
-    } else if (sel == OS.sel_mouseDown_1) {
-        widget.mouseDown(arg0);
-    } else if (sel == OS.sel_rightMouseDown_1) {
-        widget.rightMouseDown(arg0);
-    } else if (sel == OS.sel_mouseDragged_1) {
-        widget.mouseDragged(arg0);
-    } else if (sel == OS.sel_mouseUp_1) {
-        widget.mouseUp(arg0);
-    } else if (sel == OS.sel_mouseEntered_1) {
-        widget.mouseEntered(arg0);
-    } else if (sel == OS.sel_flagsChanged_1) {
-        widget.flagsChanged(arg0);
-    } else if (sel == OS.sel_numberOfRowsInTableView_1) {
-        return cast(objc.id) widget.numberOfRowsInTableView(arg0);
-    } else if (sel == OS.sel_comboBoxSelectionDidChange_1) {
-        widget.comboBoxSelectionDidChange(arg0);
-    } else if (sel == OS.sel_tableViewSelectionDidChange_1) {
-        widget.tableViewSelectionDidChange(arg0);
-    } else if (sel == OS.sel_windowDidResignKey_1) {
-        widget.windowDidResignKey(arg0);
-    } else if (sel == OS.sel_windowDidBecomeKey_1) {
-        widget.windowDidBecomeKey(arg0);
-    } else if (sel == OS.sel_windowDidResize_1) {
-        widget.windowDidResize(arg0);
-    } else if (sel == OS.sel_windowDidMove_1) {
-        widget.windowDidMove(arg0);
-    } else if (sel == OS.sel_menuForEvent_1) {
-        return cast(objc.id) widget.menuForEvent(arg0);
-    } else if (sel == OS.sel_menuWillOpen_1) {
-        widget.menuWillOpen(arg0);
-    } else if (sel == OS.sel_menuWillClose_1) {
-        widget.menuWillClose(arg0);
-    } else if (sel == OS.sel_menuNeedsUpdate_1) {
-        widget.menuNeedsUpdate(arg0);
-    } else if (sel == OS.sel_outlineViewSelectionDidChange_1) {
-        widget.outlineViewSelectionDidChange(arg0);
-    } else if (sel == OS.sel_sendEvent_1) {
-        widget.windowSendEvent(ID, arg0_);
-    } else if (sel == OS.sel_helpRequested_1) {
-        widget.helpRequested(arg0);
-    }
-    return null;
+        widget.drawRect(id, sel, rect);
+    } else if (sel == OS.sel_setFrameOrigin_) {
+        NSPoint point = NSPoint();
+        OS.memmove(point, arg0, NSPoint.sizeof);
+        widget.setFrameOrigin(id, sel, point);
+    } else if (sel == OS.sel_setFrameSize_) {
+        NSSize size = new NSSize();
+        OS.memmove(size, arg0, NSSize.sizeof);
+        widget.setFrameSize(id, sel, size);
+    } else if (sel == OS.sel_hitTest_) {
+        NSPoint point = new NSPoint();
+        OS.memmove(point, arg0, NSPoint.sizeof);
+        return widget.hitTest(id, sel, point);
+    } else if (sel == OS.sel_windowShouldClose_) {
+        return widget.windowShouldClose(id, sel, arg0) ? 1 : 0;
+    } else if (sel == OS.sel_mouseDown_) {
+        widget.mouseDown(id, sel, arg0);
+    } else if (sel == OS.sel_keyDown_) {
+        widget.keyDown(id, sel, arg0);
+    } else if (sel == OS.sel_keyUp_) {
+        widget.keyUp(id, sel, arg0);
+    } else if (sel == OS.sel_flagsChanged_) {
+        widget.flagsChanged(id, sel, arg0);
+    } else if (sel == OS.sel_mouseUp_) {
+        widget.mouseUp(id, sel, arg0);
+    } else if (sel == OS.sel_rightMouseDown_) {
+        widget.rightMouseDown(id, sel, arg0);
+    } else if (sel == OS.sel_rightMouseUp_) {
+        widget.rightMouseUp(id, sel, arg0);
+    } else if (sel == OS.sel_otherMouseDown_) {
+        widget.otherMouseDown(id, sel, arg0);
+    } else if (sel == OS.sel_otherMouseUp_) {
+        widget.otherMouseUp(id, sel, arg0);
+    } else if (sel == OS.sel_mouseMoved_) {
+        widget.mouseMoved(id, sel, arg0);
+    } else if (sel == OS.sel_mouseDragged_) {
+        widget.mouseDragged(id, sel, arg0);
+    } else if (sel == OS.sel_mouseEntered_) {
+        widget.mouseEntered(id, sel, arg0);
+    } else if (sel == OS.sel_mouseExited_) {
+        widget.mouseExited(id, sel, arg0);
+    } else if (sel == OS.sel_menuForEvent_) {
+        return widget.menuForEvent(id, sel, arg0);
+    } else if (sel == OS.sel_numberOfRowsInTableView_) {
+        return widget.numberOfRowsInTableView(id, sel, arg0);
+    } else if (sel is OS.sel_comboBoxSelectionDidChange_) {
+        widget.comboBoxSelectionDidChange(id, sel, arg0);
+    } else if (sel is OS.sel_tableViewSelectionDidChange_) {
+        widget.tableViewSelectionDidChange(id, sel, arg0);
+    } else if (sel is OS.sel_windowDidResignKey_) {
+        widget.windowDidResignKey(id, sel, arg0);
+    } else if (sel is OS.sel_windowDidBecomeKey_) {
+        widget.windowDidBecomeKey(id, sel, arg0);
+    } else if (sel is OS.sel_windowDidResize_) {
+        widget.windowDidResize(id, sel, arg0);
+    } else if (sel is OS.sel_windowDidMove_) {
+        widget.windowDidMove(id, sel, arg0);
+    } else if (sel is OS.sel_menuWillOpen_) {
+        widget.menuWillOpen(id, sel, arg0);
+    } else if (sel is OS.sel_menuDidClose_) {
+        widget.menuDidClose(id, sel, arg0);
+    } else if (sel is OS.sel_menuNeedsUpdate_) {
+        widget.menuNeedsUpdate(id, sel, arg0);
+    } else if (sel is OS.sel_outlineViewSelectionDidChange_) {
+        widget.outlineViewSelectionDidChange(id, sel, arg0);
+    } else if (sel is OS.sel_outlineViewItemDidExpand_) {
+        widget.outlineViewItemDidExpand(id, sel, arg0);
+    } else if (sel is OS.sel_sendEvent_) {
+        widget.windowSendEvent(id, sel, arg0);
+    } else if (sel is OS.sel_helpRequested_) {
+        widget.helpRequested(id, sel, arg0);
+    } else if (sel is OS.sel_scrollWheel_) {
+        widget.scrollWheel(id, sel, arg0);
+    } else if (sel is OS.sel_pageDown_) {
+        widget.pageDown(id, sel, arg0);
+    } else if (sel is OS.sel_pageUp_) {
+        widget.pageUp(id, sel, arg0);
+    } else if (sel is OS.sel_textViewDidChangeSelection_) {
+        widget.textViewDidChangeSelection(id, sel, arg0);
+    } else if (sel is OS.sel_textDidChange_) {
+        widget.textDidChange(id, sel, arg0);
+    } else if (sel is OS.sel_attributedSubstringFromRange_) {
+        return widget.attributedSubstringFromRange (id, sel, arg0);
+    } else if (sel is OS.sel_characterIndexForPoint_) {
+        return widget.characterIndexForPoint (id, sel, arg0);
+    } else if (sel is OS.sel_firstRectForCharacterRange_) {
+        NSRect rect = widget.firstRectForCharacterRange (id, sel, arg0);
+        /* NOTE that this is freed in C */
+        int /*long*/ result = OS.malloc (NSRect.sizeof);
+        OS.memmove (result, rect, NSRect.sizeof);
+        return result;
+    } else if (sel is OS.sel_insertText_) {
+        widget.insertText (id, sel, arg0);
+    } else if (sel is OS.sel_doCommandBySelector_) {
+        widget.doCommandBySelector (id, sel, arg0);
+    } else if (sel is OS.sel_highlightSelectionInClipRect_) {
+        widget.highlightSelectionInClipRect (id, sel, arg0);
+    } else if (sel is OS.sel_reflectScrolledClipView_) {
+        widget.reflectScrolledClipView (id, sel, arg0);
+    } else if (sel is OS.sel_accessibilityHitTest_) {
+        NSPoint point = new NSPoint();
+        OS.memmove(point, arg0, NSPoint.sizeof);
+        return widget.accessibilityHitTest(id, sel, point);
+    } else if (sel is OS.sel_accessibilityAttributeValue_) {
+        return widget.accessibilityAttributeValue(id, sel, arg0);
+    } else if (sel is OS.sel_accessibilityIsAttributeSettable_) {
+        return (widget.accessibilityIsAttributeSettable(id, sel, arg0) ? 1 : 0);
+    } else if (sel is OS.sel_accessibilityPerformAction_) {
+        widget.accessibilityPerformAction(id, sel, arg0);
+    } else if (sel is OS.sel_accessibilityActionDescription_) {
+        widget.accessibilityActionDescription(id, sel, arg0);
+    } else if (sel is OS.sel_makeFirstResponder_) {
+        return widget.makeFirstResponder(id, sel, arg0) ? 1 : 0;
+    } else if (sel is OS.sel_tableViewColumnDidMove_) {
+        widget.tableViewColumnDidMove(id, sel, arg0);
+    } else if (sel is OS.sel_tableViewColumnDidResize_) {
+        widget.tableViewColumnDidResize(id, sel, arg0);
+    } else if (sel is OS.sel_outlineViewColumnDidMove_) {
+        widget.outlineViewColumnDidMove(id, sel, arg0);
+    } else if (sel is OS.sel_outlineViewColumnDidResize_) {
+        widget.outlineViewColumnDidResize(id, sel, arg0);
     }
 }
 
-
-objc.id windowDelegateProc4(objc.id delegate_, objc.SEL selector, objc.id arg0_, objc.id arg1_) {
+static objc.id windowDelegateProc4(objc.id id, objc.SEL selector, objc.id arg0, objc.id arg1) {
     String sel = fromStringz(selector);
-    int arg0 = cast(int) arg0_;
-    int arg1 = cast(int) arg1_;
+    
+    Widget widget = GetWidget(id);    
     
-    NSInteger jniRef = cast(NSInteger) OS.objc_msgSend(delegate_, OS.sel_tag);
-    if (jniRef is 0 || jniRef is -1) return null;
-    Widget widget = cast(Widget)OS.JNIGetObject(jniRef);
-    if (widget is null) return null;
-    if (sel == OS.sel_tabView_1willSelectTabViewItem_1) {
-        widget.willSelectTabViewItem(arg0, arg1);
-    } else if (sel == OS.sel_outlineView_1isItemExpandable_1) {
-        return widget.outlineView_isItemExpandable(arg0, arg1) ? cast(objc.id) 1 : null;
-    } else if (sel == OS.sel_outlineView_1numberOfChildrenOfItem_1) {
-        return cast(objc.id) widget.outlineView_numberOfChildrenOfItem(arg0, arg1);
-    } else if (sel == OS.sel_outlineView_1shouldCollapseItem_1) {
-        return widget.outlineView_shouldCollapseItem(arg0, arg1) ? cast(objc.id) 1 : null;
-    } else if (sel == OS.sel_outlineView_1shouldExpandItem_1) {
-        return widget.outlineView_shouldExpandItem(arg0, arg1) ? cast(objc.id) 1 : null;
-    } else if (sel == OS.sel_menu_1willHighlightItem_1) {
-        widget.menu_willHighlightItem(arg0, arg1);
+    if (sel == OS.sel_tabView_willSelectTabViewItem_) {
+        widget.tabView_willSelectTabViewItem(id, sel, arg0, arg1);
+    } else if (sel ==is OS.sel_tabView_didSelectTabViewItem_) {
+        widget.tabView_didSelectTabViewItem(id, sel, arg0, arg1);
+    } else if (sel == OS.sel_outlineView_isItemExpandable_) {
+        return widget.outlineView_isItemExpandable(id, sel, arg0, arg1) ? 1 : 0;
+    } else if (sel == OS.sel_outlineView_numberOfChildrenOfItem_) {
+        return widget.outlineView_numberOfChildrenOfItem(id, sel, arg0, arg1);
+    } else if (sel == OS.sel_outlineView_shouldCollapseItem_) {
+        return widget.outlineView_shouldCollapseItem(id, sel, arg0, arg1) ? 1 : 0;
+    } else if (sel == OS.sel_outlineView_shouldExpandItem_) {
+        return widget.outlineView_shouldExpandItem(id, sel, arg0, arg1) ? 1 : 0;
+    } else if (sel == OS.sel_menu_willHighlightItem_) {
+        widget.menu_willHighlightItem(id, sel, arg0, arg1);
+    } else if (sel == OS.sel_setMarkedText_selectedRange_) {
+        widget.setMarkedText_selectedRange (id, sel, arg0, arg1);
+    } else if (sel is OS.sel_drawInteriorWithFrame_inView_) {
+        widget.drawInteriorWithFrame_inView (id, sel, arg0, arg1);
+    } else if (sel is OS.sel_accessibilityAttributeValue_forParameter_) {
+        return widget.accessibilityAttributeValue_forParameter(id, sel, arg0, arg1);
+    } else if (sel is OS.sel_tableView_didClickTableColumn_) {
+        widget.tableView_didClickTableColumn (id, sel, arg0, arg1);
+    } else if (sel is OS.sel_outlineView_didClickTableColumn_) {
+        widget.outlineView_didClickTableColumn (id, sel, arg0, arg1);
     }
     return null;
 }
 
-objc.id windowDelegateProc5(objc.id delegate_, objc.SEL selector, objc.id arg0_, objc.id arg1_, objc.id arg2_) {
+objc.id windowDelegateProc5(objc.id id, objc.SEL selector, objc.id arg0, objc.id arg1, objc.id arg2) {
     String sel = fromStringz(selector);
-    int arg0 = cast(int) arg0_;
-    int arg1 = cast(int) arg1_;
-    int arg2 = cast(int) arg2_;
     
-    NSInteger jniRef = cast(NSInteger) OS.objc_msgSend(delegate_, OS.sel_tag);
-    if (jniRef is 0 || jniRef is -1) return null;
-    Widget widget = cast(Widget)OS.JNIGetObject(jniRef);
-    if (widget is null) return null;
-    if (sel == OS.sel_tableView_1objectValueForTableColumn_1row_1) {
-        return cast(objc.id) widget.tableView_objectValueForTableColumn_row(arg0, arg1, arg2);
-    }
-    if (sel == OS.sel_tableView_1shouldEditTableColumn_1row_1) {
-        return cast(objc.id) widget.tableView_shouldEditTableColumn_row(arg0, arg1, arg2) ? cast(objc.id) 1 : null;
-    } else if (sel == OS.sel_textView_1clickedOnLink_1atIndex_1) {
-         return cast(objc.id) widget.clickOnLink(arg0, arg1, arg2) ? cast(objc.id) 1 : null;
-    } else if (sel == OS.sel_outlineView_1child_1ofItem_1) {
-         return cast(objc.id) widget.outlineView_child_ofItem(arg0, arg1, arg2);
-    } else if (sel == OS.sel_outlineView_1objectValueForTableColumn_1byItem_1) {
-         return cast(objc.id) widget.outlineView_objectValueForTableColumn_byItem(arg0, arg1, arg2);
+    Widget widget = GetWidget(id); 
+      
+    if (sel == OS.sel_tableView_objectValueForTableColumn_row_) {
+        return widget.tableView_objectValueForTableColumn_row(id, sel, arg0, arg1, arg2);
+    } else if (sel == OS.sel_tableView_shouldEditTableColumn_row_) {
+        return widget.tableView_shouldEditTableColumn_row(id, sel, arg0, arg1, arg2) ? cast(objc.id) 1 : null;
+    } else if (sel == OS.sel_textView_clickedOnLink_atIndex_) {
+         return widget.textView_clickOnLink_atIndex(id, sel, arg0, arg1, arg2) ? cast(objc.id) 1 : null;
+    } else if (sel == OS.sel_outlineView_child_ofItem_) {
+         return widget.outlineView_child_ofItem(id, sel, arg0, arg1, arg2);
+    } else if (sel == OS.sel_outlineView_objectValueForTableColumn_byItem_) {
+         return widget.outlineView_objectValueForTableColumn_byItem(id, sel, arg0, arg1, arg2);
+    } else if (sel == OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_) {
+        NSRange range = widget.textView_willChangeSelectionFromCharacterRange_toCharacterRange(id, sel, arg0, arg1, arg2);
+        /* NOTE that this is freed in C */
+        void* result = OS.malloc (NSRange.sizeof);
+        OS.memmove (result, range, NSRange.sizeof);
+        return result;
     }
     return null;
 }
 
-objc.id windowDelegateProc6(objc.id delegate_, objc.SEL selector, objc.id arg0_, objc.id arg1_, objc.id arg2_, objc.id arg3_) {
+objc.id windowDelegateProc6(objc.id id, objc.SEL selector, objc.id arg0, objc.id arg1, objc.id arg2, objc.id arg3) {
     String sel = fromStringz(selector);
-    int arg0 = cast(int) arg0_;
-    int arg1 = cast(int) arg1_;
-    int arg2 = cast(int) arg2_;
-    int arg3 = cast(int) arg3_;
     
-    NSInteger jniRef = cast(NSInteger) OS.objc_msgSend(delegate_, OS.sel_tag);
-    if (jniRef is 0 || jniRef is -1) return null;
-    Widget widget = cast(Widget)OS.JNIGetObject(jniRef);
-    if (widget is null) return null;
-    if (sel == OS.sel_tableView_1willDisplayCell_1forTableColumn_1row_1) {
-        widget.tableView_willDisplayCell_forTableColumn_row(arg0, arg1, arg2, cast(NSInteger) arg3);
+    Widget widget = GetWidget(id);
+
+    if (sel == OS.sel_tableView_willDisplayCell_forTableColumn_row_) {
+        widget.tableView_willDisplayCell_forTableColumn_row(id, sel, arg0, arg1, arg2, arg3);
+    } else if (sel == OS.sel_outlineView_willDisplayCell_forTableColumn_item_) {
+        widget.outlineView_willDisplayCell_forTableColumn_item(id, sel, arg0, arg1, arg2, arg3);
+    } else  if (sel == OS.sel_outlineView_setObjectValue_forTableColumn_byItem_) {
+        widget.outlineView_setObjectValue_forTableColumn_byItem(id, sel, arg0, arg1, arg2, arg3);
+    } else if (sel == OS.sel_tableView_setObjectValue_forTableColumn_row_) {
+        widget.tableView_setObjectValue_forTableColumn_row(id, sel, arg0, arg1, arg2, arg3);
     } else if (sel == OS.sel_outlineView_1willDisplayCell_1forTableColumn_1item_1) {
-        widget.outlineView_willDisplayCell_forTableColumn_item(arg0, arg1, arg2, arg3);
-    } else  if (sel == OS.sel_outlineView_1setObjectValue_1forTableColumn_1byItem_1) {
-        widget.outlineView_setObjectValue_forTableColumn_byItem(arg0, arg1, arg2, arg3);
-    } else if (sel == OS.sel_tableView_1setObjectValue_1forTableColumn_1row_1) {
-        widget.tableView_setObjectValue_forTableColumn_row(arg0, arg1, arg2, cast(NSInteger) arg3);
     }
     return null;
 }
--- a/dwt/widgets/Event.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Event.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Event;
 
@@ -36,6 +36,8 @@
  * 
  * @see Listener
  * @see dwt.events.TypedEvent
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Listeners</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public class Event {
@@ -174,7 +176,8 @@
     
     /**
      * depending on the event, the range of text being modified.
-     * Setting these fields has no effect.
+     * Setting these fields only has effect during ImeComposition 
+     * events.
      */
     public int start, end;
     
--- a/dwt/widgets/EventTable.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/EventTable.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,11 +9,12 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.EventTable;
 
 
+
 import dwt.DWT;
 import dwt.internal.DWTEventListener;
 
--- a/dwt/widgets/ExpandBar.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/ExpandBar.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,9 @@
  * @see ExpandEvent
  * @see ExpandListener
  * @see ExpandAdapter
+ * @see <a href="http://www.eclipse.org/swt/snippets/#expandbar">ExpandBar snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.2
  */
@@ -421,6 +424,8 @@
 /**
  * Sets the receiver's spacing. Spacing specifies the number of pixels allocated around 
  * each item.
+ * 
+ * @param spacing the spacing around each item
  *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
--- a/dwt/widgets/ExpandItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/ExpandItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@
  * </p>
  * 
  * @see ExpandBar
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.2
  */
--- a/dwt/widgets/FileDialog.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/FileDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/snippets/#filedialog">FileDialog snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Dialog tab</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class FileDialog : Dialog {
     String [] filterNames = new String [0];
@@ -88,7 +92,7 @@
  * </ul>
  */
 public this (Shell parent, int style) {
-    super (parent, style);
+    super (parent, checkStyle (parent, style));
     checkSubclass ();
 }
 
@@ -205,21 +209,33 @@
     }
     if (filterPath !is null) panel.setDirectory(NSString.stringWith(filterPath));
     panel.setTitle(NSString.stringWith(title !is null ? title : ""));
-    int response = panel.runModal();
+    int /*long*/ response = panel.runModal();
     if (response is OS.NSFileHandlingPanelOKButton) {
         NSString filename = panel.filename();
-        char[] buffer = new char[filename.length()];
-        filename.getCharacters_(buffer);
-        fullPath = new String(buffer);
+        fullPath = filename.getString();
         if ((style & DWT.SAVE) is 0) {
             NSArray filenames = (cast(NSOpenPanel)panel).filenames();
-            int count = filenames.count();
+            int count = (int)/*64*/filenames.count();
             fileNames = new String[count];
+            
             for (int i = 0; i < count; i++) {
                 filename = new NSString(filenames.objectAtIndex(i));
-                buffer = new char[filename.length()];
-                filename.getCharacters_(buffer);
-                fileNames[i] = new String(buffer);
+                NSString filenameOnly = filename.lastPathComponent();
+                NSString pathOnly = filename.stringByDeletingLastPathComponent();
+                
+                if (i is 0) {
+                    /* Filter path */
+                    filterPath = pathOnly.getString();
+
+                    /* File name */
+                    fileName = fileNames [0] = filenameOnly.getString();
+                } else {                                    
+                    if (pathOnly.getString().equals (filterPath)) {
+                        fileNames [i] = filenameOnly.getString();
+                    } else {
+                        fileNames [i] = filename.getString();
+                    }
+                }
             }
         }
         filterIndex = -1;
@@ -245,8 +261,10 @@
  * which may be null.
  * <p>
  * The strings are platform specific. For example, on
- * Windows, an extension filter string is typically of
- * the form "*.extension", where "*.*" matches all files.
+ * some platforms, an extension filter string is typically
+ * of the form "*.extension", where "*.*" matches all files.
+ * For filters with multiple extensions, use semicolon as
+ * a separator, e.g. "*.jpg;*.png".
  * </p>
  *
  * @param extensions the file extension filter
@@ -279,7 +297,7 @@
 }
 
 /**
- * Sets the the names that describe the filter extensions
+ * Sets the names that describe the filter extensions
  * which the dialog will use to filter the files it shows
  * to the argument, which may be null.
  * <p>
--- a/dwt/widgets/FontDialog.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/FontDialog.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.FontDialog;
 
@@ -22,7 +22,6 @@
 import dwt.graphics.RGB;
 import dwt.internal.cocoa.NSApplication;
 import dwt.internal.cocoa.NSFont;
-import dwt.internal.cocoa.NSFontManager;
 import dwt.internal.cocoa.NSFontPanel;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
@@ -47,11 +46,14 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Dialog tab</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class FontDialog : Dialog {
     FontData fontData;
     RGB rgb;
-    bool open_;
+    bool selected;
     int fontID, fontSize;
     
     /**
@@ -96,11 +98,12 @@
      * </ul>
      */
     public this (Shell parent, int style) {
-        super (parent, style);
+    super (parent, checkStyle (parent, style));
         checkSubclass ();
     }
     
-    void changeFont(int arg0) {
+void changeFont(objc.id id, objc.SEL sel, objc.id arg0) {
+    selected = true;
     }
     
     /**
@@ -218,31 +221,31 @@
      * </ul>
      */
     public FontData open () {
-        Display display = parent !is null ? parent.display : Display.getCurrent ();
-        
+    Display display = parent !is null ? parent.display : Display.getCurrent (); 
         NSFontPanel panel = NSFontPanel.sharedFontPanel();
         panel.setTitle(NSString.stringWith(title !is null ? title : ""));
-        if (fontData !is null) {
-            Font font = new Font(display, fontData);
-            NSFontManager.sharedFontManager().setSelectedFont(font.handle, false);
-            font.dispose();
-        }
+    bool create = fontData !is null;
+    Font font = create ? new Font(display, fontData) : display.getSystemFont();
+    panel.setPanelFont(font.handle, false);
         SWTPanelDelegate delegate_ = cast(SWTPanelDelegate)(new SWTPanelDelegate()).alloc().init();
-        NSInteger jniRef = OS.NewGlobalRef(this);
-        if (jniRef is 0) DWT.error(DWT.ERROR_NO_HANDLES);
-        delegate_.setTag(jniRef);
+    char* jniRef = OS.NewGlobalRef(this);
+        if (jniRef is null) DWT.error(DWT.ERROR_NO_HANDLES);
+    OS.object_setInstanceVariable(delegate.id, Display.DWT_OBJECT, jniRef);
         panel.setDelegate(delegate_);
         fontData = null;
+    selected = false;
         panel.orderFront(null);
-        NSApplication.sharedApplication().runModalForWindow_(panel);
+    NSApplication.sharedApplication().runModalForWindow(panel);
+    if (selected) {
+        NSFont nsFont = panel.panelConvertFont(font.handle);
+        if (nsFont !is null) {
+            fontData = Font.cocoa_new(display, nsFont).getFontData()[0];
+        }
+    }
         panel.setDelegate(null);
         delegate_.release();
         OS.DeleteGlobalRef(jniRef);
-        NSFont font = NSFontManager.sharedFontManager().selectedFont();
-        if (font !is null) {
-            //TODO - this does work
-            fontData = Font.cocoa_new(display, font).getFontData()[0];
-        }
+    if (create) font.dispose();
         return fontData;
     }
     
@@ -293,7 +296,7 @@
         this.rgb = rgb;
     }
     
-    void windowWillClose(int sender) {
+void windowWillClose(objc.id id, objc.SEL sel, objc.id sender) {
         NSApplication.sharedApplication().stop(null);
     }
     
--- a/dwt/widgets/Group.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Group.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,10 +17,12 @@
 import dwt.DWTException;
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSBox;
+import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
+import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTBox;
 import dwt.internal.cocoa.SWTView;
 
@@ -43,9 +45,12 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Group : Composite {
-    SWTView contentView;
+    NSView contentView;
     String text = "";
     
 /**
@@ -103,10 +108,11 @@
 public Rectangle computeTrim (int x, int y, int width, int height) {
     checkWidget ();
     NSBox widget = cast(NSBox)view;
+    int border = (int)Math.ceil (widget.borderWidth ());
     NSSize margins = widget.contentViewMargins();
     NSRect frame = contentView.frame();
-    width += margins.width * 2;
-    height += margins.height * 2 + frame.y;
+    width += (margins.width + border) * 2;
+    height += (margins.height + border) * 2 + frame.y;
     return super.computeTrim(x, y, width, height);
 }
 
@@ -114,19 +120,23 @@
     return contentView;
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (contentView);
+    SWTBox box = (SWTBox)view;
+    display.removeWidget (box.titleCell());
+}
+
 void createHandle () {
-    SWTBox widget = cast(SWTBox)new SWTBox().alloc();
+    NSBox widget = cast(NSBox)(new SWTBox()).alloc();
     widget.initWithFrame(new NSRect());
-    widget.setTitle(NSString.stringWith(""));
-    widget.setTag(jniRef);
-    SWTView contentWidget = cast(SWTView)new SWTView().alloc();
+    widget.setTitlePosition(OS.NSNoTitle);
+    NSView contentWidget = (NSView)new SWTView().alloc();
     contentWidget.initWithFrame(new NSRect());
-    contentWidget.setTag(jniRef);
 //  contentWidget.setDrawsBackground(false);
     widget.setContentView(contentWidget);
     contentView = contentWidget;
-    view = widget;  
-    parent.contentView().addSubview_(widget);
+    view = widget;
 }
 
 public Rectangle getClientArea () {
@@ -156,15 +166,27 @@
     return text;
 }
 
+float getThemeAlpha () {
+    return 0.25f * parent.getThemeAlpha ();
+}
+
+void register () {
+    super.register ();
+    display.addWidget (contentView, this);
+    SWTBox box = (SWTBox)view;
+    display.addWidget (box.titleCell(), this);
+}
+
 void releaseHandle () {
     super.releaseHandle ();
-    if (contentView !is null) {
-        contentView.setTag(-1);
-        contentView.release();
-    }
+    if (contentView !is null) contentView.release();
     contentView = null;
 }
 
+void setFont(NSFont font) {
+    ((NSBox) view).setTitleFont(font);
+}
+
 /**
  * Sets the receiver's text, which is the string that will
  * be displayed as the receiver's <em>title</em>, to the argument,
@@ -196,7 +218,9 @@
     char [] buffer = new char [text.length ()];
     text.getChars (0, buffer.length, buffer, 0);
     int length = fixMnemonic (buffer);
-    (cast(NSBox)view).setTitle(NSString.stringWithCharacters(buffer, length));
+    NSBox box = cast(NSBox)view;
+    box.setTitlePosition(length is 0 ? OS.NSNoTitle : OS.NSAtTop);
+    box.setTitle(NSString.stringWithCharacters(buffer, length));
 }
 
 }
--- a/dwt/widgets/IME.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/IME.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,18 +9,53 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.IME;
 
-
 import dwt.DWT;
+import dwt.DWTException;
+import dwt.graphics.Color;
+import dwt.graphics.Font;
 import dwt.graphics.TextStyle;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSAttributedString;
+import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSDictionary;
+import dwt.internal.cocoa.NSFont;
+import dwt.internal.cocoa.NSMutableArray;
+import dwt.internal.cocoa.NSNumber;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRange;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSView;
+import dwt.internal.cocoa.OS;
 
 import dwt.dwthelper.utils;
 import dwt.widgets.Canvas;
 import dwt.widgets.Widget;
 
+/**
+ * Instances of this class represent input method editors.
+ * These are typically in-line pre-edit text areas that allow
+ * the user to compose characters from Far Eastern languages
+ * such as Japanese, Chinese or Korean.
+ * 
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dd>(none)</dd>
+ * <dt><b>Events:</b></dt>
+ * <dd>ImeComposition</dd>
+ * </dl>
+ * <p>
+ * IMPORTANT: This class is <em>not</em> intended to be subclassed.
+ * </p>
+ * 
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
+ * @since 3.4
+ */
 public class IME : Widget {
     Canvas parent;
     int caretOffset;
@@ -30,6 +65,8 @@
     int [] ranges;
     TextStyle [] styles;
     
+    static final int UNDERLINE_THICK = 1 << 16;
+    
 /**
  * Prevents uninitialized instances from being created outside the package.
  */
@@ -37,8 +74,31 @@
 }
 
 /**
- * 
- * @see DWT
+ * Constructs a new instance of this class given its parent
+ * and a style value describing its behavior and appearance.
+ * <p>
+ * The style value is either one of the style constants defined in
+ * class <code>DWT</code> which is applicable to instances of this
+ * class, or must be built by <em>bitwise OR</em>'ing together 
+ * (that is, using the <code>int</code> "|" operator) two or more
+ * of those <code>DWT</code> style constants. The class description
+ * lists the style constants that are applicable to the class.
+ * Style bits are also inherited from superclasses.
+ * </p>
+ *
+ * @param parent a canvas control which will be the parent of the new instance (cannot be null)
+ * @param style the style of control to construct
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
+ *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
+ * </ul>
+ *
+ * @see Widget#checkSubclass
+ * @see Widget#getStyle
  */
 public this (Canvas parent, int style) {
     super (parent, style);
@@ -46,6 +106,39 @@
     createWidget ();
 }
 
+int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ rangePtr) {
+    Event event = new Event ();
+    event.detail = DWT.COMPOSITION_SELECTION;
+    sendEvent (DWT.ImeComposition, event);
+    NSRange range = new NSRange ();
+    OS.memmove (range, rangePtr, NSRange.sizeof);
+    int start = (int)/*64*/range.location;
+    int end = (int)/*64*/(range.location + range.length);
+    if (event.start <= start && start <= event.end && event.start <= end && end <= event.end) {
+        NSString str = NSString.stringWith (event.text.substring(start - event.start, end - event.start));
+        NSAttributedString attriStr = ((NSAttributedString)new NSAttributedString().alloc()).initWithString(str, null);
+        attriStr.autorelease ();
+        return attriStr.id;
+    }
+    return 0;
+}
+
+int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) {
+    if (!isInlineEnabled ()) return OS.NSNotFound;
+    NSPoint pt = new NSPoint ();
+    OS.memmove (pt, point, NSPoint.sizeof);
+    NSView view = parent.view;
+    pt = view.window ().convertScreenToBase (pt);
+    pt = view.convertPoint_fromView_ (pt, null);
+    Event event = new Event ();
+    event.detail = DWT.COMPOSITION_OFFSET;
+    event.x = (int) pt.x;
+    event.y = (int) pt.y;
+    sendEvent (DWT.ImeComposition, event);
+    int offset = event.index + event.count;
+    return offset !is -1 ? offset : OS.NSNotFound;
+}
+
 void createWidget () {
     text = "";
     startOffset = -1;
@@ -54,40 +147,255 @@
     }
 }
 
+NSRect firstRectForCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+    NSRect rect = new NSRect ();
+    Caret caret = parent.caret;
+    if (caret !is null) {
+        NSView view = parent.view;
+        NSPoint pt = new NSPoint ();
+        pt.x = caret.x;
+        pt.y = caret.y + caret.height;
+        pt = view.convertPoint_toView_ (pt, null);
+        pt = view.window ().convertBaseToScreen (pt);
+        rect.x = pt.x;
+        rect.y = pt.y;
+        rect.width = caret.width;
+        rect.height = caret.height;
+    }
+    return rect;
+}
+
+/**
+ * Returns the offset of the caret from the start of the document.
+ * The caret is within the current composition.
+ *
+ * @return the caret offset
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
 public int getCaretOffset () {
     checkWidget ();
     return startOffset + caretOffset;
 }
 
+/**
+ * Returns the commit count of the composition.  This is the
+ * number of characters that have been composed.  When the
+ * commit count is equal to the length of the composition
+ * text, then the in-line edit operation is complete.
+ * 
+ * @return the commit count
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @see IME#getText
+ */
 public int getCommitCount () {
     checkWidget ();
     return commitCount;
 }
 
+/**
+ * Returns the offset of the composition from the start of the document.
+ * This is the start offset of the composition within the document and
+ * in not changed by the input method editor itself during the in-line edit
+ * session.
+ *
+ * @return the offset of the composition
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
 public int getCompositionOffset () {
     checkWidget ();
     return startOffset;
 }
 
+/**
+ * Returns the ranges for the style that should be applied during the
+ * in-line edit session.
+ * <p>
+ * The ranges array contains start and end pairs.  Each pair refers to
+ * the corresponding style in the styles array.  For example, the pair
+ * that starts at ranges[n] and ends at ranges[n+1] uses the style
+ * at styles[n/2] returned by <code>getStyles()</code>.
+ * </p>
+ * @return the ranges for the styles
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @see IME#getStyles
+ */
 public int [] getRanges () {
     checkWidget ();
-    return ranges !is null ? ranges : new int [0];
+    if (ranges is null) return new int [0];
+    int [] result = new int [ranges.length];
+    for (int i = 0; i < result.length; i++) {
+        result [i] = ranges [i] + startOffset; 
+    }
+    return result;
+}
+
+/**
+ * Returns the styles for the ranges.
+ * <p>
+ * The ranges array contains start and end pairs.  Each pair refers to
+ * the corresponding style in the styles array.  For example, the pair
+ * that starts at ranges[n] and ends at ranges[n+1] uses the style
+ * at styles[n/2].
+ * </p>
+ * 
+ * @return the ranges for the styles
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @see IME#getRanges
+ */
+public TextStyle [] getStyles () {
+    checkWidget ();
+    if (styles is null) return new TextStyle [0];
+    TextStyle [] result = new TextStyle [styles.length];
+    System.arraycopy (styles, 0, result, 0, styles.length);
+    return result;
 }
 
-public TextStyle [] getStyles () {
-    checkWidget ();
-    return styles !is null ? styles : new TextStyle [0];
+TextStyle getStyle (NSDictionary attribs) {
+    NSArray keys = attribs.allKeys ();
+    int /*long*/ count = keys.count ();
+    TextStyle style = new TextStyle ();
+    for (int j = 0; j < count; j++) {
+        NSString key = new NSString (keys.objectAtIndex (j));
+        if (key.isEqualTo (OS.NSBackgroundColorAttributeName)) {
+            NSColor color = new NSColor (attribs.objectForKey (key)).colorUsingColorSpaceName (OS.NSCalibratedRGBColorSpace);
+            float [] rgbColor = new float []{(float)/*64*/color.redComponent(), (float)/*64*/color.greenComponent(), (float)/*64*/color.blueComponent(), (float)/*64*/color.alphaComponent()};
+            style.background = Color.cocoa_new (display, rgbColor);
+        } else if (key.isEqualTo (OS.NSForegroundColorAttributeName)) {
+            NSColor color = new NSColor (attribs.objectForKey (key)).colorUsingColorSpaceName (OS.NSCalibratedRGBColorSpace);
+            float [] rgbColor = new float []{(float)/*64*/color.redComponent(), (float)/*64*/color.greenComponent(), (float)/*64*/color.blueComponent(), (float)/*64*/color.alphaComponent()};
+            style.foreground = Color.cocoa_new (display, rgbColor);
+        } else if (key.isEqualTo (OS.NSUnderlineColorAttributeName)) {
+            NSColor color = new NSColor (attribs.objectForKey (key)).colorUsingColorSpaceName (OS.NSCalibratedRGBColorSpace);
+            float [] rgbColor = new float []{(float)/*64*/color.redComponent(), (float)/*64*/color.greenComponent(), (float)/*64*/color.blueComponent(), (float)/*64*/color.alphaComponent()};
+            style.underlineColor = Color.cocoa_new (display, rgbColor);
+        } else if (key.isEqualTo (OS.NSUnderlineStyleAttributeName)) {
+            NSNumber value = new NSNumber (attribs.objectForKey (key));
+            switch (value.intValue ()) {
+                case OS.NSUnderlineStyleSingle: style.underlineStyle = DWT.UNDERLINE_SINGLE; break;
+                case OS.NSUnderlineStyleDouble: style.underlineStyle = DWT.UNDERLINE_DOUBLE; break;
+                case OS.NSUnderlineStyleThick: style.underlineStyle = UNDERLINE_THICK; break;
+            }
+            style.underline = value.intValue () !is OS.NSUnderlineStyleNone;
+        } else if (key.isEqualTo (OS.NSStrikethroughColorAttributeName)) {
+            NSColor color = new NSColor (attribs.objectForKey (key)).colorUsingColorSpaceName (OS.NSCalibratedRGBColorSpace);
+            float [] rgbColor = new float []{(float)/*64*/color.redComponent(), (float)/*64*/color.greenComponent(), (float)/*64*/color.blueComponent(), (float)/*64*/color.alphaComponent()};
+            style.strikeoutColor = Color.cocoa_new (display, rgbColor);
+        } else if (key.isEqualTo (OS.NSStrikethroughStyleAttributeName)) {
+            NSNumber value = new NSNumber (attribs.objectForKey (key));
+            style.strikeout = value.intValue () !is OS.NSUnderlineStyleNone;
+        } else if (key.isEqualTo (OS.NSFontAttributeName)) {
+            NSFont font = new NSFont (attribs.objectForKey (key));
+            style.font = Font.cocoa_new (display, font);
+        } 
+    }
+    return style;
 }
 
+/**
+ * Returns the composition text.
+ * <p>
+ * The text for an IME is the characters in the widget that
+ * are in the current composition. When the commit count is
+ * equal to the length of the composition text, then the
+ * in-line edit operation is complete.
+ * </p>
+ *
+ * @return the widget text
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
 public String getText () {
     checkWidget ();
     return text;
 }
 
+/**
+ * Returns <code>true</code> if the caret should be wide, and
+ * <code>false</code> otherwise.  In some languages, for example
+ * Korean, the caret is typically widened to the width of the
+ * current character in the in-line edit session.
+ * 
+ * @return the wide caret state
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
 public bool getWideCaret() {
     return false; 
 }
 
+bool hasMarkedText (int /*long*/ id, int /*long*/ sel) {
+    return text.length () !is 0;
+}
+
+bool insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+    if (startOffset is -1) return true;
+    NSString str = new NSString (string);
+    if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) {
+        str = new NSAttributedString (string).string ();
+    }
+    int length = (int)/*64*/str.length ();
+    int end = startOffset + text.length ();
+    ranges = null;
+    styles = null;
+    caretOffset = commitCount = length;
+    Event event = new Event ();
+    event.detail = DWT.COMPOSITION_CHANGED;
+    event.start = startOffset;
+    event.end = end;
+    event.text = text = str.getString();
+    sendEvent (DWT.ImeComposition, event);
+    text = "";
+    caretOffset = commitCount = 0;
+    startOffset = -1;
+    return event.doit;
+}
+
+bool isInlineEnabled () {
+    return hooks (DWT.ImeComposition);
+}
+
+NSRange markedRange (int /*long*/ id, int /*long*/ sel) {
+    if (startOffset is -1) {
+        Event event = new Event ();
+        event.detail = DWT.COMPOSITION_SELECTION;
+        sendEvent (DWT.ImeComposition, event);
+        startOffset = event.start;
+    }
+    NSRange range = new NSRange ();
+    range.location = startOffset;
+    range.length = text.length ();
+    return range;
+}
+
 void releaseParent () {
     super.releaseParent ();
     if (this is parent.getIME ()) parent.setIME (null);
@@ -101,4 +409,108 @@
     ranges = null;
 }
 
+NSRange selectedRange (int /*long*/ id, int /*long*/ sel) {
+    Event event = new Event ();
+    event.detail = DWT.COMPOSITION_SELECTION;
+    sendEvent (DWT.ImeComposition, event);
+    NSRange range = new NSRange ();
+    range.location = event.start;
+    range.length = event.text.length ();
+    return range;
 }
+
+/**
+ * Sets the offset of the composition from the start of the document.
+ * This is the start offset of the composition within the document and
+ * in not changed by the input method editor itself during the in-line edit
+ * session but may need to be changed by clients of the IME.  For example,
+ * if during an in-line edit operation, a text editor inserts characters
+ * above the IME, then the IME must be informed that the composition
+ * offset has changed.
+ *
+ * @return the offset of the composition
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setCompositionOffset (int offset) {
+    checkWidget ();
+    if (offset < 0) return;
+    if (startOffset !is -1) {
+        startOffset = offset;
+    }
+}
+
+bool setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ selRange) {
+    if (!isInlineEnabled ()) return true;
+    ranges = null;
+    styles = null;
+    caretOffset = commitCount = 0;
+    int end = startOffset + text.length ();
+    if (startOffset is -1) {
+        Event event = new Event ();
+        event.detail = DWT.COMPOSITION_SELECTION;
+        sendEvent (DWT.ImeComposition, event);
+        startOffset = event.start;
+        end = event.end;
+    }
+    NSString str = new NSString (string);
+    if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) {
+        NSAttributedString attribStr = new NSAttributedString (string);
+        str = attribStr.string ();
+        int length = (int)/*64*/str.length ();
+        styles = new TextStyle [length];
+        ranges = new int [length * 2];
+        NSRange rangeLimit = new NSRange (), effectiveRange = new NSRange ();
+        rangeLimit.length = length;
+        int rangeCount = 0;
+        int /*long*/ ptr = OS.malloc (NSRange.sizeof);
+        for (int i = 0; i < length;) {
+            NSDictionary attribs = attribStr.attributesAtIndex(i, ptr, rangeLimit);
+            OS.memmove (effectiveRange, ptr, NSRange.sizeof);
+            i = (int)/*64*/(effectiveRange.location + effectiveRange.length);
+            ranges [rangeCount * 2] = (int)/*64*/effectiveRange.location;
+            ranges [rangeCount * 2 + 1] = (int)/*64*/(effectiveRange.location + effectiveRange.length - 1);
+            styles [rangeCount++] = getStyle (attribs);
+        }
+        OS.free (ptr);
+        if (rangeCount !is styles.length) {
+            TextStyle [] newStyles = new TextStyle [rangeCount];
+            System.arraycopy (styles, 0, newStyles, 0, newStyles.length);
+            styles = newStyles;
+            int [] newRanges = new int [rangeCount * 2];
+            System.arraycopy (ranges, 0, newRanges, 0, newRanges.length);
+            ranges = newRanges;
+        }
+    }
+    int length = (int)/*64*/str.length ();
+    if (ranges is null && length > 0) {
+        styles = new TextStyle []{getStyle (display.markedAttributes)};
+        ranges = new int[]{0, length - 1};
+    }
+    NSRange range = new NSRange ();
+    OS.memmove (range, selRange, NSRange.sizeof);
+    caretOffset = (int)/*64*/range.location;
+    Event event = new Event ();
+    event.detail = DWT.COMPOSITION_CHANGED;
+    event.start = startOffset;
+    event.end = end;
+    event.text = text = str.getString();
+    sendEvent (DWT.ImeComposition, event);
+    return true;
+}
+
+int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) {
+    NSMutableArray attribs = NSMutableArray.arrayWithCapacity (6);
+    attribs.addObject (new NSString (OS.NSForegroundColorAttributeName ()));
+    attribs.addObject (new NSString (OS.NSBackgroundColorAttributeName ()));
+    attribs.addObject (new NSString (OS.NSUnderlineStyleAttributeName ()));
+    attribs.addObject (new NSString (OS.NSUnderlineColorAttributeName ()));
+    attribs.addObject (new NSString (OS.NSStrikethroughStyleAttributeName ()));
+    attribs.addObject (new NSString (OS.NSStrikethroughColorAttributeName ()));
+    return attribs.id;
+}
+
+}
--- a/dwt/widgets/Item.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Item.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Item;
 
@@ -31,6 +31,8 @@
  * <dt><b>Events:</b></dt>
  * <dd>(none)</dd>
  * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 
 public abstract class Item : Widget {
--- a/dwt/widgets/Label.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Label.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,29 +15,42 @@
 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.graphics.Image;
 import dwt.graphics.Point;
-import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSAttributedString;
 import dwt.internal.cocoa.NSBox;
 import dwt.internal.cocoa.NSCell;
 import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSFont;
+import dwt.internal.cocoa.NSImage;
 import dwt.internal.cocoa.NSImageView;
+import dwt.internal.cocoa.NSMutableArray;
 import dwt.internal.cocoa.NSMutableDictionary;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTextField;
 import dwt.internal.cocoa.NSTextFieldCell;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTBox;
 import dwt.internal.cocoa.SWTImageView;
 import dwt.internal.cocoa.SWTTextField;
+import dwt.internal.cocoa.id;
 
 /**
  * Instances of this class represent a non-selectable
  * user interface object that displays a string or image.
  * When SEPARATOR is specified, displays a single
  * vertical or horizontal line.
+ * <p>
+ * Shadow styles are hints and may not be honoured
+ * by the platform.  To create a separator label
+ * with the default shadow style for the platform,
+ * do not specify a shadow style.
+ * </p>
  * <dl>
  * <dt><b>Styles:</b></dt>
  * <dd>SEPARATOR, HORIZONTAL, VERTICAL</dd>
@@ -54,6 +67,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#label">Label snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Label : Control {
     String text = "";
@@ -103,6 +120,50 @@
     super (parent, checkStyle (style));
 }
 
+int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+    
+    if (accessible !is null) {      
+        if ((textView !is null && (id is textView.id || id is textView.cell().id)) || (imageView !is null && (id is imageView.id || id is imageView.cell().id))) {
+            // See if the accessible will override or augment the standard list.
+            // Help, title, and description can be overridden.
+            NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
+            extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
+            extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
+            extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
+
+            for (int i = extraAttributes.count() - 1; i >= 0; i--) {
+                NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
+                if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) is null) {
+                    extraAttributes.removeObjectAtIndex(i);
+                }
+            }
+
+            if (extraAttributes.count() > 0) {
+                int superResult = super.accessibilityAttributeNames(id, sel);
+                NSArray baseAttributes = new NSArray(superResult);
+                NSMutableArray mutableAttributes = NSMutableArray.arrayWithCapacity(baseAttributes.count() + 1);
+                mutableAttributes.addObjectsFromArray(baseAttributes);
+                
+                for (int i = 0; i < extraAttributes.count(); i++) {
+                    id currAttribute = extraAttributes.objectAtIndex(i);
+                    if (!mutableAttributes.containsObject(currAttribute)) {
+                        mutableAttributes.addObject(currAttribute);
+                    }
+                }
+                
+                return mutableAttributes.id;
+            }
+        }
+    }
+
+    return super.accessibilityAttributeNames(id, sel);
+}
+
+bool accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+    if (id is view.id) return true;
+    return super.accessibilityIsIgnored(id, sel);   
+}
+
 static int checkStyle (int style) {
     style |= DWT.NO_FOCUS;
     if ((style & DWT.SEPARATOR) !is 0) {
@@ -114,27 +175,32 @@
 
 public Point computeSize (int wHint, int hHint, bool changed) {
     checkWidget();
-    int width = 0, height = 0;
+    NSRect oldRect = view.frame ();
+    int width = DEFAULT_WIDTH;
+    int height = DEFAULT_HEIGHT;
     if ((style & DWT.SEPARATOR) !is 0) {
-        if ((style & DWT.HORIZONTAL) !is 0) {
-            width = DEFAULT_WIDTH;
-            height = 3;
-        } else {
-            width = 3;
-            height = DEFAULT_HEIGHT;
-        }
+        ((NSBox) view).sizeToFit ();
+        NSRect newRect = view.frame ();
+        width = (int) newRect.width;
+        height = (int) newRect.height;
+        view.setFrame (oldRect);
     } else {
-        if (image !is null && isImage) {
-            Rectangle bounds = image.getBounds();
-            width = bounds.width;
-            height = bounds.height;
+        if (isImage) {
+            if (image !is null) {
+                NSImage nsimage = image.handle;
+                NSSize size = nsimage.size ();
+                width = (int)size.width;
+                height = (int)size.height;
+            } else {
+                width = height = 0;
+            }
         } else {
-            NSRect oldRect = textView.frame();
-            textView.sizeToFit();
-            NSRect newRect = textView.frame();
-            textView.setFrame (oldRect);
-            width = cast(int)newRect.width;
-            height = cast(int)newRect.height;
+            NSRect rect = new NSRect ();
+            rect.width = wHint !is DWT.DEFAULT ? wHint : Float.MAX_VALUE;
+            rect.height = hHint !is DWT.DEFAULT ? hHint : Float.MAX_VALUE;
+            NSSize size = textView.cell ().cellSizeForBounds (rect);
+            width = cast(int)Math.ceil (size.width);
+            height = cast(int)Math.ceil (size.height);
         }
     }
     if (wHint !is DWT.DEFAULT) width = wHint;
@@ -143,32 +209,34 @@
 }
 
 void createHandle () {
-    SWTBox widget = cast(SWTBox)new SWTBox().alloc();
+    NSBox widget = cast(NSBox)(new SWTBox()).alloc();
     widget.initWithFrame(new NSRect());
-    widget.setTag(jniRef);
     widget.setTitle(NSString.stringWith(""));
     if ((style & DWT.SEPARATOR) !is 0) {
         widget.setBoxType(OS.NSBoxSeparator);
+        NSView child = (NSView) new NSView().alloc().init().autorelease();
+        widget.setContentView(child);
     } else {
         widget.setBorderType(OS.NSNoBorder);
+        widget.setBorderWidth (0);
+        widget.setBoxType (OS.NSBoxCustom);
+        NSSize offsetSize = new NSSize ();
+        widget.setContentViewMargins (offsetSize);
 
-        NSImageView imageWidget = cast(NSImageView)new SWTImageView().alloc();
-        imageWidget.initWithFrame(new NSRect());
-        imageWidget.setTag(jniRef);
+        NSImageView imageWidget = cast(NSImageView) new SWTImageView ().alloc ();
+        imageWidget.initWithFrame(new NSRect ());
+        imageWidget.setImageScaling (OS.NSScaleNone);
         
-        SWTTextField textWidget = cast(SWTTextField)new SWTTextField().alloc();
+        NSTextField textWidget = cast(NSTextField)(new SWTTextField()).alloc();
         textWidget.initWithFrame(new NSRect());
         textWidget.setBordered(false);
         textWidget.setEditable(false);
         textWidget.setDrawsBackground(false);
-        textWidget.setTag(jniRef);
-        if ((style & DWT.WRAP) !is 0) {
-            NSTextFieldCell cell = new NSTextFieldCell(textWidget.cell());
-            cell.setWraps(true);
-        }
+        NSTextFieldCell cell = new NSTextFieldCell(textWidget.cell());
+        cell.setWraps ((style & DWT.WRAP) !is 0);
         
-        widget.addSubview_(imageWidget);
-        widget.addSubview_(textWidget);
+        widget.addSubview(imageWidget);
+        widget.addSubview(textWidget);
         widget.setContentView(textWidget);
         
         imageView = imageWidget;
@@ -176,28 +244,39 @@
         _setAlignment();
     }
     view = widget;
-    parent.contentView().addSubview_(widget);
 }
 
 NSAttributedString createString() {
     NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
     if (foreground !is null) {
         NSColor color = NSColor.colorWithDeviceRed(foreground.handle[0], foreground.handle[1], foreground.handle[2], 1);
-        dict.setObject(color, OS.NSForegroundColorAttributeName());
+        dict.setObject(color, OS.NSForegroundColorAttributeName);
     }
     if (font !is null) {
-        dict.setObject(font.handle, OS.NSFontAttributeName());
+        dict.setObject(font.handle, OS.NSFontAttributeName);
     }
     char [] chars = new char [text.length ()];
     text.getChars (0, chars.length, chars, 0);
     int length = fixMnemonic (chars);
 
     NSString str = NSString.stringWithCharacters(chars, length);
-    NSAttributedString attribStr = (cast(NSAttributedString)new NSAttributedString().alloc()).initWithString_attributes_(str, dict);
+    NSAttributedString attribStr = (cast(NSAttributedString)new NSAttributedString().alloc()).initWithString(str, dict);
     attribStr.autorelease();
     return attribStr;
 }
 
+void deregister () {
+    super.deregister ();
+    if (textView !is null) {
+        display.removeWidget(textView);
+        display.removeWidget(textView.cell());
+    }
+    if (imageView !is null) {
+        display.removeWidget (imageView);
+        display.removeWidget (imageView.cell());
+    }
+}
+
 /**
  * Returns a value which describes the position of the
  * text or image in the receiver. The value will be one of
@@ -258,6 +337,26 @@
     return text;
 }
 
+void register () {
+    super.register ();
+    if (textView !is null) {
+        display.addWidget (textView, this);
+        display.addWidget (textView.cell(), this);
+    }
+    if (imageView !is null) {
+        display.addWidget (imageView, this);
+        display.addWidget (imageView.cell(), this);
+    }
+}
+
+void releaseHandle () {
+    super.releaseHandle ();
+    if (textView !is null) textView.release();
+    if (imageView !is null) imageView.release();
+    textView = null;
+    imageView = null;
+}
+
 /**
  * Controls how text and images will be displayed in the receiver.
  * The argument should be one of <code>LEFT</code>, <code>RIGHT</code>
@@ -285,8 +384,7 @@
     textView.setDrawsBackground(color !is null);
     if (color is null) return;
     NSColor nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], 1);
-    NSTextFieldCell cell = new NSTextFieldCell(textView.cell());
-    cell.setBackgroundColor(nsColor);
+    ((NSTextField)textView).setBackgroundColor(nsColor);
 }
 
 void _setAlignment() {
@@ -304,16 +402,11 @@
     }
 }
 
-int setBounds (int x, int y, int width, int height, bool move, bool resize) {
-    int result = super.setBounds(x, y, width, height, move, resize);
-    if ((result & RESIZED) !is 0) {
-        if (imageView !is null || textView !is null) {
-            NSRect rect = view.bounds();
-            imageView.setFrame(rect);
-            textView.setFrame(rect);
-        }
+void setFont(NSFont font) {
+    if (textView !is null) {
+        NSCell cell = new NSCell(textView.cell());
+        cell.setAttributedStringValue(createString());
     }
-    return result;
 }
 
 void setForeground (float [] color) {
@@ -390,4 +483,5 @@
     (cast(NSBox)view).setContentView(textView);
 }
 
+
 }
--- a/dwt/widgets/Layout.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Layout.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Layout;
 
@@ -26,7 +26,8 @@
  * This class is the abstract base class for
  * layouts.
  * 
- *  @see Composite#setLayout(Layout)
+ * @see Composite#setLayout(Layout)
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public abstract class Layout {
 
--- a/dwt/widgets/Link.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Link.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
 import dwt.graphics.Point;
+import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSScrollView;
@@ -43,6 +44,10 @@
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#link">Link snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.1
  */
@@ -117,12 +122,10 @@
     addListener (DWT.DefaultSelection, typedListener);
 }
 
-bool clickOnLink(int textView, int link, int charIndex) {
+bool textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*long*/ textView, int /*long*/ link, int /*long*/ charIndex) {
     NSString str = new NSString (link);
-    char [] buffer = new char [str.length ()];
-    str.getCharacters_ (buffer);
     Event event = new Event ();
-    event.text = new String (buffer);
+    event.text = str.getString();
     sendEvent (DWT.Selection, event);
     return true;
 }
@@ -144,30 +147,34 @@
     int border = getBorderWidth ();
     width += border * 2;
     height += border * 2;
+
+    // TODO is this true?  if so, can this rounding be turned off?
+    /*
+     * Bug in Cocoa.  NSTextStorage.size() seems to return a width
+     * value that is rounded down, because its result is never
+     * fractional.  The workaround is to increment width by 1
+     * to ensure that it is wide enough to show the full text.  
+     */
+    width += 1;
     return new Point (width, height);
 }
 
 void createHandle () {
-    SWTScrollView scrollWidget = cast(SWTScrollView)new SWTScrollView().alloc();
+    NSScrollView scrollWidget = cast(NSScrollView)(new SWTScrollView()).alloc();
     scrollWidget.initWithFrame(new NSRect ());
     scrollWidget.setDrawsBackground(false);
     scrollWidget.setBorderType(hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder);
-    scrollWidget.setTag(jniRef);
 
-    SWTTextView widget = cast(SWTTextView)new SWTTextView().alloc();
+    NSTextView widget = cast(NSTextView)new SWTTextView().alloc();
     widget.initWithFrame(new NSRect());
     widget.setEditable(false);
     widget.setDrawsBackground(false);
     widget.setDelegate(widget);
     widget.setAutoresizingMask (OS.NSViewWidthSizable | OS.NSViewHeightSizable);
-    widget.setTag(jniRef);
     widget.textContainer().setLineFragmentPadding(0);
     
     scrollView = scrollWidget;
     view = widget;
-    scrollView.addSubview_(view);
-    scrollView.setDocumentView(view);
-    parent.contentView().addSubview_(scrollView);
 }
 
 void createWidget () {
@@ -175,6 +182,11 @@
     text = "";
 }
 
+void deregister () {
+    super.deregister ();
+    if (scrollView !is null) display.removeWidget (scrollView);
+}
+
 String getNameText () {
     return getText ();
 }
@@ -196,6 +208,11 @@
     return text;
 }
 
+void register () {
+    super.register ();
+    if (scrollView !is null) display.addWidget (scrollView, this);
+}
+
 void releaseWidget () {
     super.releaseWidget ();
     offsets = null;
@@ -378,6 +395,10 @@
     return mnemonic;
 }
 
+void setFont(NSFont font) {
+    ((NSTextView) view).setFont(font);
+}
+
 /**
  * Sets the receiver's text.
  * <p>
@@ -413,10 +434,15 @@
     for (int i = 0; i < offsets.length; i++) {
         range.location = offsets[i].x;
         range.length = offsets[i].y - offsets[i].x + 1;
-        textStorage.addAttribute(OS.NSLinkAttributeName(), NSString.stringWith(ids[i]), range);
+        textStorage.addAttribute(OS.NSLinkAttributeName, NSString.stringWith(ids[i]), range);
     }
 }
 
+void setZOrder () {
+    super.setZOrder ();
+    if (scrollView !is null) scrollView.setDocumentView (view);
+}
+
 NSView topView () {
     return scrollView;
 }
--- a/dwt/widgets/List.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/List.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@
 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
 import dwt.graphics.Color;
@@ -23,18 +24,22 @@
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSAttributedString;
 import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSIndexSet;
 import dwt.internal.cocoa.NSMutableDictionary;
 import dwt.internal.cocoa.NSMutableIndexSet;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSScrollView;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTableColumn;
 import dwt.internal.cocoa.NSTableView;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTScrollView;
 import dwt.internal.cocoa.SWTTableView;
+import dwt.internal.cocoa.id;
 
 /** 
  * Instances of this class represent a selectable user interface
@@ -52,6 +57,10 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#list">List snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class List : Scrollable {
     NSTableColumn column;
@@ -92,6 +101,36 @@
     super (parent, checkStyle (style));
 }
 
+int accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    
+    if (accessible !is null) {
+        NSString attribute = new NSString(arg0);
+        id returnValue = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
+        if (returnValue !is null) return returnValue.id;
+    }
+    
+    NSString attributeName = new NSString(arg0);
+    
+    // Accessibility Verifier queries for a title or description.  NSOutlineView doesn't
+    // seem to return either, so we return a default description value here.
+    if (attributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
+        return NSString.stringWith("").id;
+    }
+
+//  if (attributeName.isEqualToString(OS.NSAccessibilityHeaderAttribute)) {
+//      /*
+//      * Bug in the Macintosh.  Even when the header is not visible,
+//      * VoiceOver still reports each column header's role for every row.
+//      * This is confusing and overly verbose.  The fix is to return
+//      * "no header" when the screen reader asks for the header, by
+//      * returning noErr without setting the event parameter.
+//      */
+//      return 0;
+//  }
+    
+    return super.accessibilityAttributeValue(id, sel, arg0);
+}
+
 /**
  * Adds the argument to the end of the receiver's list.
  *
@@ -221,13 +260,12 @@
 }
 
 void createHandle () {
-    SWTScrollView scrollWidget = cast(SWTScrollView)new SWTScrollView().alloc();
+    NSScrollView scrollWidget = cast(NSScrollView)new SWTScrollView().alloc();
     scrollWidget.initWithFrame(new NSRect ());
     if ((style & DWT.H_SCROLL) !is 0) scrollWidget.setHasHorizontalScroller(true);
     if ((style & DWT.V_SCROLL) !is 0) scrollWidget.setHasVerticalScroller(true);
     scrollWidget.setAutohidesScrollers(true);
     scrollWidget.setBorderType((style & DWT.BORDER) !is 0 ? OS.NSBezelBorder : OS.NSNoBorder);
-    scrollWidget.setTag(jniRef);
     
     NSTableView widget = cast(NSTableView)new SWTTableView().alloc();
     widget.initWithFrame(new NSRect());
@@ -237,7 +275,6 @@
     widget.setDelegate(widget);
     widget.setDoubleAction(OS.sel_sendDoubleSelection);
     if (!hasBorder()) widget.setFocusRingType(OS.NSFocusRingTypeNone);
-    widget.setTag(jniRef);
     
     column = cast(NSTableColumn)new NSTableColumn().alloc();
     column.initWithIdentifier(NSString.stringWith(""));
@@ -245,8 +282,6 @@
     
     scrollView = scrollWidget;
     view = widget;
-    scrollView.setDocumentView(widget);
-    parent.contentView().addSubview_(scrollView);
 }
 
 void createWidget () {
@@ -305,14 +340,12 @@
     if (end < 0 || start >= itemCount) return;
     start = Math.max (0, start);
     end = Math.min (itemCount - 1, end);
-    int length = end - start + 1;
-    if (length <= 0) return;
     if (start is 0 && end is itemCount - 1) {
         deselectAll ();
     } else {
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
-        for (int i=0; i<length; i++) {
+        for (int i=start; i<=end; i++) {
             widget.deselectRow (i);
         }
         ignoreSelect = false;
@@ -396,10 +429,7 @@
  */
 public int getFocusIndex () {
     checkWidget();
-//  int [] first = new int [1], last = new int [1];
-//  if (OS.GetDataBrowserSelectionAnchor (handle, first, last) !is OS.noErr) return -1;
-//    return first [0] - 1;
-    return -1;
+    return (int)/*64*/((NSTableView)view).selectedRow();
 }
 
 /**
@@ -500,12 +530,12 @@
         return new String [0];
     }
     NSIndexSet selection = widget.selectedRowIndexes();
-    int count = selection.count();
-    int [] indexBuffer = new int [count];
+    int count = (int)/*64*/selection.count();
+    int /*long*/ [] indexBuffer = new int /*long*/ [count];
     selection.getIndexes(indexBuffer, count, 0);
     String [] result = new String  [count];
     for (int i=0; i<count; i++) {
-        result [i] = items [indexBuffer [i]];
+        result [i] = items [(int)/*64*/indexBuffer [i]];
     }
     return result;
 }
@@ -522,7 +552,7 @@
  */
 public int getSelectionCount () {
     checkWidget ();
-    return (cast(NSTableView)view).numberOfSelectedRows();
+    return cast(int)/*64*/(cast(NSTableView)view).numberOfSelectedRows();
 }
 
 /**
@@ -538,8 +568,15 @@
  */
 public int getSelectionIndex () {
     checkWidget();
-    //TODO - check empty selection case
-    return (cast(NSTableView)view).selectedRow();
+    NSTableView widget = (NSTableView)view;
+    if (widget.numberOfSelectedRows() is 0) {
+        return -1;
+    }
+    NSIndexSet selection = widget.selectedRowIndexes();
+    int count = (int)/*64*/selection.count();
+    int /*long*/ [] result = new int /*long*/ [count];
+    selection.getIndexes(result, count, 0);
+    return (int)/*64*/result [0];
 }
 
 /**
@@ -565,9 +602,13 @@
         return new int [0];
     }
     NSIndexSet selection = widget.selectedRowIndexes();
-    int count = selection.count();
+    int count = (int)/*64*/selection.count();
+    int /*long*/ [] indices = new int /*long*/ [count];
+    selection.getIndexes(indices, count, 0);
     int [] result = new int [count];
-    selection.getIndexes(result, count, 0);
+    for (int i = 0; i < result.length; i++) {
+        result [i] = (int)/*64*/indices [i];
+    }
     return result;
 }
 
@@ -590,7 +631,9 @@
     NSPoint point = new NSPoint();
     point.x = rect.x;
     point.y = rect.y;
-    return (cast(NSTableView)view).rowAtPoint(point);
+    int result = (int)/*64*/(cast(NSTableView)view).rowAtPoint(point);
+    if (result is -1) result = 0;
+    return result;
 }
 
 /**
@@ -664,11 +707,11 @@
  */
 public bool isSelected (int index) {
     checkWidget();
-    //TODO - range check
+    if (!(0 <= index && index < itemCount)) return false;
     return (cast(NSTableView)view).isRowSelected(index);
 }
 
-int numberOfRowsInTableView(int aTableView) {
+int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) {
     return itemCount;
 }
 
@@ -852,7 +895,7 @@
         indexes.initWithIndex(index);
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
-        (cast(NSTableView)view).selectRowIndexes(indexes, true);
+        widget.selectRowIndexes(indexes, (style & DWT.MULTI) !is 0);
         ignoreSelect = false;
     }
 }
@@ -896,7 +939,7 @@
         indexes.initWithIndexesInRange(range);
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
-        widget.selectRowIndexes(indexes, true);
+        widget.selectRowIndexes(indexes, (style & DWT.MULTI) !is 0);
         ignoreSelect = false;
     }
 }
@@ -931,7 +974,7 @@
     int count = 0;
     NSMutableIndexSet indexes = cast(NSMutableIndexSet)new NSMutableIndexSet().alloc().init();
     for (int i=0; i<length; i++) {
-        int index = indices [length - i - 1];
+        int index = indices [i];
         if (index >= 0 && index < itemCount) {
             indexes.addIndex (indices [i]);
             count++;
@@ -940,7 +983,7 @@
     if (count > 0) {
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
-        widget.selectRowIndexes(indexes, true);
+        widget.selectRowIndexes(indexes, (style & DWT.MULTI) !is 0);
         ignoreSelect = false;
     }
 }
@@ -977,6 +1020,39 @@
     postEvent (DWT.DefaultSelection);   
 }
 
+bool sendKeyEvent (NSEvent nsEvent, int type) {
+    bool result = super.sendKeyEvent (nsEvent, type);
+    if (!result) return result;
+    if (type !is DWT.KeyDown) return result;
+    short keyCode = nsEvent.keyCode ();
+    switch (keyCode) {
+        case 76: /* KP Enter */
+        case 36: { /* Return */
+            postEvent (DWT.DefaultSelection);
+            break;
+        }
+    }
+    return result;
+}
+
+void setBackground (float [] color) {
+    super.setBackground (color);
+    NSColor nsColor;
+    if (color is null) {
+        nsColor = null;
+    } else {
+        nsColor = NSColor.colorWithDeviceRed (color [0], color [1], color [2], 1);
+    }
+    ((NSTableView) view).setBackgroundColor (nsColor);
+}
+
+void setFont (NSFont font) {
+    super.setFont (font);
+    float ascent = font.ascender ();
+    float descent = -font.descender () + font.leading ();
+    ((NSTableView)view).setRowHeight ((int)Math.ceil (ascent + descent) + 1);
+}
+
 /**
  * Sets the text of the item in the receiver's list at the given
  * zero-relative index to the string argument.
@@ -1231,35 +1307,30 @@
     if (index >= 0) showIndex (index);
 }
 
-void tableViewSelectionDidChange (int aNotification) {
+void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
     if (ignoreSelect) return;
     postEvent (DWT.Selection);
 }
 
-bool tableView_shouldEditTableColumn_row(int aTableView, int aTableColumn, int rowIndex) {
+bool tableView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
     return false;
 }
 
-int tableView_objectValueForTableColumn_row(int aTableView, int aTableColumn, int rowIndex) {
+int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
     NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
     if (foreground !is null) {
         NSColor color = NSColor.colorWithDeviceRed(foreground.handle[0], foreground.handle[1], foreground.handle[2], 1);
-        dict.setObject(color, OS.NSForegroundColorAttributeName());
+        dict.setObject(color, OS.NSForegroundColorAttributeName);
     }
     if (font !is null) {
-        dict.setObject(font.handle, OS.NSFontAttributeName());
+        dict.setObject(font.handle, OS.NSFontAttributeName);
     }
-    if (background !is null) {
-        NSColor color = NSColor.colorWithDeviceRed(background.handle[0], background.handle[1], background.handle[2], 1);
-        dict.setObject(color, OS.NSBackgroundColorAttributeName());
-    }
-    String text = items[rowIndex];
+    String text = items[(int)/*64*/rowIndex];
     int length = text.length();
     char[] chars = new char[length];
     text.getChars(0, length, chars, 0);
     NSString str = NSString.stringWithCharacters(chars, length);
-    NSAttributedString attribStr = (cast(NSAttributedString)new NSAttributedString().alloc()).initWithString_attributes_(str, dict);
-    attribStr.autorelease();
+    NSAttributedString attribStr = (cast(NSAttributedString)new NSAttributedString().alloc()).initWithString_(str, dict);
     return attribStr.id;
 }
 
--- a/dwt/widgets/Listener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Listener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Listener;
 
--- a/dwt/widgets/Menu.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Menu.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Menu;
 
@@ -57,6 +57,10 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#menu">Menu snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Menu : Widget {
     /**
@@ -70,18 +74,21 @@
      * </p>
      */
     NSMenu nsMenu;
-    short id;
     int x, y, itemCount;
-//  int width, height;
-    bool hasLocation, modified, closed;
+    bool hasLocation, visible;
     MenuItem [] items;
-    MenuItem cascade, defaultItem, lastTarget;
+    MenuItem cascade, defaultItem;
     Decorations parent;
 
 /**
  * Constructs a new instance of this class given its parent,
  * and sets the style for the instance so that the instance
  * will be a popup menu on the given parent's shell.
+ * <p>
+ * After constructing a menu, it can be set into its parent
+ * using <code>parent.setMenu(menu)</code>.  In this case, the parent may
+ * be any control in the same widget tree as the parent.
+ * </p>
  *
  * @param parent a control which will be the parent of the new instance (cannot be null)
  *
@@ -113,6 +120,9 @@
  * of those <code>DWT</code> style constants. The class description
  * lists the style constants that are applicable to the class.
  * Style bits are also inherited from superclasses.
+ * </p><p>
+ * After constructing a menu or menuBar, it can be set into its parent
+ * using <code>parent.setMenu(menu)</code> or <code>parent.setMenuBar(menuBar)</code>.
  * </p>
  *
  * @param parent a decorations control which will be the parent of the new instance (cannot be null)
@@ -143,6 +153,10 @@
  * (which must be a <code>Menu</code>) and sets the style
  * for the instance so that the instance will be a drop-down
  * menu on the given parent's parent.
+ * <p>
+ * After constructing a drop-down menu, it can be set into its parentMenu
+ * using <code>parentMenu.setMenu(menu)</code>.
+ * </p>
  *
  * @param parentMenu a menu which will be the parent of the new instance (cannot be null)
  *
@@ -167,6 +181,10 @@
  * (which must be a <code>MenuItem</code>) and sets the style
  * for the instance so that the instance will be a drop-down
  * menu on the given parent's parent menu.
+ * <p>
+ * After constructing a drop-down menu, it can be set into its parentItem
+ * using <code>parentItem.setMenu(menu)</code>.
+ * </p>
  *
  * @param parentItem a menu item which will be the parent of the new instance (cannot be null)
  *
@@ -221,7 +239,7 @@
             location = window.mouseLocationOutsideOfEventStream();
         }
         NSEvent nsEvent = NSEvent.otherEventWithType(NSApplicationDefined, location, 0, 0.0, window.windowNumber(), window.graphicsContext(), cast(short)0, 0, 0);
-        NSMenu.static_popUpContextMenu_withEvent_forView_ (nsMenu, nsEvent, shell.view);
+        NSMenu.popUpContextMenu(nsMenu, nsEvent, shell.view);
     } else {
         nsMenu.cancelTracking ();
     }
@@ -281,17 +299,15 @@
 }
 
 void createHandle () {
-//  display.addMenu (this);
-    SWTMenu widget = cast(SWTMenu)(new SWTMenu()).alloc();
+    display.addMenu (this);
+    NSMenu widget = cast(NSMenu)(new SWTMenu()).alloc();
     widget.initWithTitle(NSString.stringWith(""));
     widget.setAutoenablesItems(false);
-    widget.setTag(jniRef);
     widget.setDelegate(widget); 
     nsMenu = widget;    
 }
 
 void createItem (MenuItem item, int index) {
-    checkWidget ();
     if (!(0 <= index && index <= itemCount)) error (DWT.ERROR_INVALID_RANGE);
     NSMenuItem nsItem = null;
     if ((item.style & DWT.SEPARATOR) !is 0) {
@@ -302,10 +318,10 @@
         nsItem.initWithTitle(NSString.stringWith(""), null, NSString.stringWith(""));
         nsItem.setTarget(nsItem);
         nsItem.setAction(OS.sel_sendSelection);
-        //item.createJNIRef();
-        nsItem.setTag(item.jniRef);
     }
     item.nsItem = nsItem;
+    item.createJNIRef();
+    item.register();
     nsMenu.insertItem(nsItem, index);
     if (itemCount is items.length) {
         MenuItem [] newItems = new MenuItem [items.length + 4];
@@ -314,11 +330,12 @@
     }
     System.arraycopy (items, index, items, index + 1, itemCount++ - index);
     items [index] = item;
-    
     NSMenu emptyMenu = item.createEmptyMenu ();
     if (emptyMenu !is null) {
-        item.nsItem.setSubmenu (emptyMenu);
+        nsItem.setSubmenu (emptyMenu);
     }
+    //TODO - find a way to disable the menu instead of each item
+    if (!getEnabled ()) nsItem.setEnabled (false);
 }
 
 void createWidget () {
@@ -327,6 +344,11 @@
     items = new MenuItem [4];
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (nsMenu);
+}
+
 void destroyItem (MenuItem item) {
     int index = 0;
     while (index < itemCount) {
@@ -567,18 +589,15 @@
         return this is parent.menuShell ().menuBar;
     }
     if ((style & DWT.POP_UP) !is 0) {
-//      Menu [] popups = display.popups;
-//      if (popups is null) return false;
-//      for (int i=0; i<popups.length; i++) {
-//          if (popups [i] is this) return true;
-//      }
+        Menu [] popups = display.popups;
+        if (popups is null) return false;
+        for (int i=0; i<popups.length; i++) {
+            if (popups [i] is this) return true;
+        }
     }
-//  MenuTrackingData outData = new MenuTrackingData ();
-//  return OS.GetMenuTrackingData (handle, outData) is OS.noErr;
-    return false;
+    return visible;
 }
 
-
 /**
  * Searches the receiver's list starting at the first item
  * (index 0) until an item is found that is equal to the 
@@ -648,51 +667,52 @@
     return getVisible ();
 }
 
-void menu_willHighlightItem(int menu, objc.id itemID) {
-    NSInteger jniRef = cast(NSInteger) OS.objc_msgSend(itemID, OS.sel_tag);
-    if (jniRef !is -1 && jniRef !is 0) {
-        Object object = OS.JNIGetObject(jniRef);
-        if ( null !is cast(MenuItem)object ) {
-            MenuItem item = cast(MenuItem)object;
-            item.sendEvent (DWT.Arm);
+void menu_willHighlightItem(objc.id id, objc.SEL sel, objc.id menu, objc.id itemID) {
+    Widget widget = display.getWidget(itemID);
+    if (widget instanceof MenuItem) {
+        MenuItem item = (MenuItem)widget;
+        item.sendEvent (DWT.Arm);
+    }
+}
+
+void menuNeedsUpdate(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+    //This code is intentionally commented
+    //sendEvent (DWT.Show);
+}
+
+void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+    visible = true;
+    sendEvent (DWT.Show);
+    for (int i=0; i<items.length; i++) {
+        MenuItem item = items [i];
+        if (item !is null) {
+            if (item.accelerator is 0) {
+                if (item.nsItem.keyEquivalent ().length () !is 0 || item.nsItem.keyEquivalentModifierMask () !is 0) {
+                    item.nsItem.setHidden (false);
+                }
+            }
         }
     }
 }
 
-void menuNeedsUpdate(int menu) {
-    sendEvent (DWT.Show);
-}
-
-void menuWillClose(int menu) {
+void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
     sendEvent (DWT.Hide);
-}
-
-void menuWillOpen(int menu) {
+    visible = false;
+    for (int i=0; i<items.length; i++) {
+        MenuItem item = items [i];
+        if (item !is null) {
+            if (item.accelerator is 0) {
+                if (item.nsItem.keyEquivalent().length () !is 0 || item.nsItem.keyEquivalentModifierMask () !is 0) {
+                    item.nsItem.setHidden (true);
+                }
+            }
+        }
+    }
 }
 
-int modifierIndex (String accelText) {
-    int start = accelText.length () - 1;
-    int index = start;
-    while (index >= 0) {
-        char c = accelText.charAt (index);
-        switch (c) {
-            case ' ':
-                if (index !is start) return index;
-                break;
-            case '\u2303':
-            case '\u2325':
-            case '\u21E7':
-            case '\u2318':
-                return index;
-        }
-        index--;
-    }
-    return -1;
-}
-
-int numberOfItemsInMenu(int menu) {
-    System.Out.println("numver");
-    return 4;
+void register () {
+    super.register ();
+    display.addWidget (nsMenu, this);
 }
 
 void releaseChildren (bool destroy) {
@@ -723,9 +743,9 @@
 
 void releaseWidget () {
     super.releaseWidget ();
-//  display.removeMenu (this);
+    display.removeMenu (this);
     parent = null;
-    cascade = defaultItem = lastTarget = null;
+    cascade = defaultItem = null;
 }
 
 /**
@@ -814,10 +834,22 @@
     checkWidget();
     if (enabled) {
         state &= ~DISABLED;
-        //OS.EnableMenuItem (handle, cast(short)0);
     } else {
         state |= DISABLED;
-        //OS.DisableMenuItem (handle, cast(short)0);
+    }
+    //TODO - find a way to disable the menu instead of each item
+    for (int i=0; i<items.length; i++) {
+        MenuItem item = items [i];
+        if (item !is null) {
+            /*
+            * Feature in the Macintosh.  When a cascade menu
+            * item is disabled, rather than disabling the item,
+            * the submenu is disabled.
+            * 
+            * There is no fix for this at this time.
+            */
+            item.nsItem.setEnabled (enabled && item.getEnabled ());
+        }
     }
 }
 
@@ -898,12 +930,9 @@
     checkWidget ();
     if ((style & (DWT.BAR | DWT.DROP_DOWN)) !is 0) return;
     if (visible) {
-//      display.addPopup (this);
-        //TODO -WRONG
-        _setVisible (true);
+        display.addPopup (this);
     } else {
-//      display.removePopup (this);
-        _setVisible (false);
+        display.removePopup (this);
     }
 }
     
--- a/dwt/widgets/MenuItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/MenuItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,9 +8,9 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
 *     
- * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
- *******************************************************************************/
+* Port to the D programming language:
+*     Jacob Carlborg <doob@me.com>
+*******************************************************************************/
 module dwt.widgets.MenuItem;
 
 
@@ -21,6 +21,8 @@
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
 import dwt.graphics.Image;
+import dwt.internal.cocoa.NSApplication;
+import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSMenu;
 import dwt.internal.cocoa.NSMenuItem;
 import dwt.internal.cocoa.NSString;
@@ -51,12 +53,13 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class MenuItem : Item {
     NSMenuItem nsItem;
     Menu parent, menu;
     int accelerator;
-//  int x, y, width, height;
 
 /**
  * Constructs a new instance of this class given its parent
@@ -239,6 +242,11 @@
     return null;
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (nsItem);
+}
+
 void destroyWidget () {
     parent.destroyItem (this);
     releaseHandle ();
@@ -340,32 +348,9 @@
 public bool getSelection () {
     checkWidget ();
     if ((style & (DWT.CHECK | DWT.RADIO)) is 0) return false;
-    return (cast(NSMenuItem)nsItem).state() is OS.NSOnState;
+    return nsItem.state() is OS.NSOnState;
 }
 
-//int kEventProcessCommand (int nextHandler, int theEvent, int userData) {
-//  //TEMPORARY CODE
-//  if (!isEnabled ()) return OS.noErr;
-//
-//  if ((style & DWT.CHECK) !is 0) {
-//      setSelection (!getSelection ());
-//  } else {
-//      if ((style & DWT.RADIO) !is 0) {
-//          if ((parent.getStyle () & DWT.NO_RADIO_GROUP) !is 0) {
-//              setSelection (!getSelection ());
-//          } else {
-//              selectRadio ();
-//          }
-//      }
-//  }
-//  int [] modifiers = new int [1];
-//  OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);
-//  Event event = new Event ();
-//  setInputState (event, cast(short) 0, OS.GetCurrentEventButtonState (), modifiers [0]);
-//  postEvent (DWT.Selection, event);
-//  return OS.noErr;
-//}
-
 /**
  * Returns <code>true</code> if the receiver is enabled and all
  * of the receiver's ancestors are enabled, and <code>false</code>
@@ -385,41 +370,60 @@
     return getEnabled () && parent.isEnabled ();
 }
 
-//int keyGlyph (int key) {
-//  switch (key) {
-//      case DWT.BS: return OS.kMenuDeleteLeftGlyph;
-//      case DWT.CR: return OS.kMenuReturnGlyph;
-//      case DWT.DEL: return OS.kMenuDeleteRightGlyph;
-//      case DWT.ESC: return OS.kMenuEscapeGlyph;
-//      case DWT.LF: return OS.kMenuReturnGlyph;
-//      case DWT.TAB: return OS.kMenuTabRightGlyph;
+int keyChar (int key) {
+    //TODO - use the NS key constants
+    switch (key) {
+        case DWT.BS: return OS.NSBackspaceCharacter;
+        case DWT.CR: return OS.NSCarriageReturnCharacter;
+        case DWT.DEL: return OS.NSDeleteCharacter;
+        case DWT.ESC: return DWT.ESC;
+        case DWT.LF: return OS.NSNewlineCharacter;
+        case DWT.TAB: return OS.NSTabCharacter;
 //      case ' ': return OS.kMenuBlankGlyph;
-////        case ' ': return OS.kMenuSpaceGlyph;
-//      case DWT.ALT: return OS.kMenuOptionGlyph;
-//      case DWT.SHIFT: return OS.kMenuShiftGlyph;
-//      case DWT.CONTROL: return OS.kMenuControlISOGlyph;
-//      case DWT.COMMAND: return OS.kMenuCommandGlyph;
-//      case DWT.ARROW_UP: return OS.kMenuUpArrowGlyph;
-//      case DWT.ARROW_DOWN: return OS.kMenuDownArrowGlyph;
-//      case DWT.ARROW_LEFT: return OS.kMenuLeftArrowGlyph;
-//      case DWT.ARROW_RIGHT: return OS.kMenuRightArrowGlyph;
-//      case DWT.PAGE_UP: return OS.kMenuPageUpGlyph;
-//      case DWT.PAGE_DOWN: return OS.kMenuPageDownGlyph;
-//      case DWT.F1: return OS.kMenuF1Glyph;
-//      case DWT.F2: return OS.kMenuF2Glyph;
-//      case DWT.F3: return OS.kMenuF3Glyph;
-//      case DWT.F4: return OS.kMenuF4Glyph;
-//      case DWT.F5: return OS.kMenuF5Glyph;
-//      case DWT.F6: return OS.kMenuF6Glyph;
-//      case DWT.F7: return OS.kMenuF7Glyph;
-//      case DWT.F8: return OS.kMenuF8Glyph;
-//      case DWT.F9: return OS.kMenuF9Glyph;
-//      case DWT.F10: return OS.kMenuF10Glyph;
-//      case DWT.F11: return OS.kMenuF11Glyph;
-//      case DWT.F12: return OS.kMenuF12Glyph;
-//  }
-//  return OS.kMenuNullGlyph;
-//}
+//      case ' ': return OS.kMenuSpaceGlyph;        
+        case DWT.ALT: return 0x2325;
+        case DWT.SHIFT: return 0x21E7;
+        case DWT.CONTROL: return 0xF2303;
+        case DWT.COMMAND: return 0x2318;
+        case DWT.ARROW_UP: return 0x2191;
+        case DWT.ARROW_DOWN: return 0x2193;
+        case DWT.ARROW_LEFT: return 0x2190;
+        case DWT.ARROW_RIGHT: return 0x2192;
+        case DWT.PAGE_UP: return 0x21DE;
+        case DWT.PAGE_DOWN: return 0x21DF;
+        case DWT.KEYPAD_CR: return OS.NSEnterCharacter;
+        case DWT.HELP: return OS.NSHelpFunctionKey;
+        case DWT.HOME: return 0xF729;
+        case DWT.END: return 0xF72B;
+//      case DWT.CAPS_LOCK: return ??;
+        case DWT.F1: return 0xF704;
+        case DWT.F2: return 0xF705;
+        case DWT.F3: return 0xF706;
+        case DWT.F4: return 0xF707;
+        case DWT.F5: return 0xF708;
+        case DWT.F6: return 0xF709;
+        case DWT.F7: return 0xF70A;
+        case DWT.F8: return 0xF70B;
+        case DWT.F9: return 0xF70C;
+        case DWT.F10: return 0xF70D;
+        case DWT.F11: return 0xF70E;
+        case DWT.F12: return 0xF70F;
+        case DWT.F13: return 0xF710;
+        case DWT.F14: return 0xF711;
+        case DWT.F15: return 0xF712;
+        /*
+        * The following lines are intentionally commented.
+        */
+//      case DWT.INSERT: return ??;
+    }
+    return 0;
+}
+
+
+void register () {
+    super.register ();
+    display.addWidget (nsItem, this);
+}
 
 void releaseHandle () {
     super.releaseHandle ();
@@ -539,8 +543,8 @@
         }
     }
     Event event = new Event ();
-    //TODO state mask
-//  setInputState (event, cast(short) 0, OS.GetCurrentEventButtonState (), modifiers [0]);
+    NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
+    if (nsEvent !is null) setInputState (event, nsEvent, 0);
     postEvent (DWT.Selection, event);
 }
 
@@ -562,23 +566,24 @@
  */
 public void setAccelerator (int accelerator) {
     checkWidget ();
+    if (this.accelerator is accelerator) return;
     this.accelerator = accelerator;
     int key = accelerator & DWT.KEY_MASK;
-    int virtualKey = Display.untranslateKey (key);
+    int virtualKey = keyChar (key);
     NSString str =  null;
     if (virtualKey !is 0) {
         str = NSString.stringWith (Integer.toString(virtualKey));
     } else {
-        str = NSString.stringWith (Integer.toString(key)).lowercaseString();
+        str = NSString.stringWith (Integer.toString(key));
     }
-    nsItem.setKeyEquivalent (str);
+    nsItem.setKeyEquivalent (str.lowercaseString());
     int mask = 0;
     if ((accelerator & DWT.SHIFT) !is 0) mask |= OS.NSShiftKeyMask;
     if ((accelerator & DWT.CONTROL) !is 0) mask |= OS.NSControlKeyMask;
-//  if ((accelerator & DWT.COMMAND) !is 0) mask &= ~OS.kMenuNoCommandModifier;
     if ((accelerator & DWT.COMMAND) !is 0) mask |= OS.NSCommandKeyMask;
     if ((accelerator & DWT.ALT) !is 0) mask |= OS.NSAlternateKeyMask;
     nsItem.setKeyEquivalentModifierMask (cast(NSUInteger) mask);
+    nsItem.setHidden (false);
     if ((this.accelerator is 0 && accelerator !is 0) || (this.accelerator !is 0 && accelerator is 0)) {
         updateText ();
     }
@@ -599,7 +604,12 @@
  */
 public void setEnabled (bool enabled) {
     checkWidget ();
-    (cast(NSMenuItem)nsItem).setEnabled(enabled);
+    if (enabled) {
+        state &= ~DISABLED;
+    } else {
+        state |= DISABLED;
+    }
+    nsItem.setEnabled(enabled);
 }
 
 /**
@@ -620,7 +630,7 @@
     checkWidget ();
     if ((style & DWT.SEPARATOR) !is 0) return;
     super.setImage (image);
-    (cast(NSMenuItem)nsItem).setImage(image !is null? image.handle : null);
+    nsItem.setImage(image !is null? image.handle : null);
 }
 
 /**
@@ -709,7 +719,7 @@
 public void setSelection (bool selected) {
     checkWidget ();
     if ((style & (DWT.CHECK | DWT.RADIO)) is 0) return;
-    (cast(NSMenuItem)nsItem).setState(selected ? OS.NSOnState : OS.NSOffState);
+    nsItem.setState(selected ? OS.NSOnState : OS.NSOffState);
 }
 
 /**
@@ -778,6 +788,60 @@
     } else {
         nsItem.setTitle (label);
     }
+    if (accelerator is 0) {
+        int mask = 0, key = 0;
+        if (i < buffer.length && buffer [i] is '\t') {
+            for (j = i + 1; j < buffer.length; j++) {
+                switch (buffer [j]) {
+                    case '\u2303': mask |= OS.NSControlKeyMask; i++; break;
+                    case '\u2325': mask |= OS.NSAlternateKeyMask; i++; break;
+                    case '\u21E7': mask |= OS.NSShiftKeyMask; i++; break;
+                    case '\u2318': mask |= OS.NSCommandKeyMask; i++; break;
+                    default:
+                        j = buffer.length;
+                        break;
+                }
+            }
+            switch (buffer.length - i - 1) {
+                case 1:
+                    key = buffer [i + 1];
+                    if (key is 0x2423) key = ' ';
+                    break;
+                case 2:
+                    if (buffer [i + 1] is 'F') {
+                        switch (buffer [i + 2]) {
+                            case '1': key = 0xF704; break;
+                            case '2': key = 0xF705; break;
+                            case '3': key = 0xF706; break;
+                            case '4': key = 0xF707; break;
+                            case '5': key = 0xF708; break;
+                            case '6': key = 0xF709; break;
+                            case '7': key = 0xF70A; break;
+                            case '8': key = 0xF70B; break;
+                            case '9': key = 0xF70C; break;
+                        }
+                    }
+                    break;
+                case 3:
+                    if (buffer [i + 1] is 'F' && buffer [i + 2] is '1') {
+                        switch (buffer [i + 3]) {
+                            case '0': key = 0xF70D; break;
+                            case '1': key = 0xF70E; break;
+                            case '2': key = 0xF70F; break;
+                            case '3': key = 0xF710; break;
+                            case '4': key = 0xF711; break;
+                            case '5': key = 0xF712; break;
+                        }
+                    }
+                    break;
+            }
+        }
+        NSString string = NSString.stringWith (key is 0 ? "" : (char)key + "");
+        nsItem.setKeyEquivalentModifierMask (mask);
+        nsItem.setKeyEquivalent (string.lowercaseString ());
+        //TODO - only hide when key !is 0 (fix all places)
+        nsItem.setHidden (key !is 0 || mask !is 0);
+    }
 }
 
 }
--- a/dwt/widgets/MessageBox.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/MessageBox.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@
 import dwt.DWTException;
 import dwt.internal.cocoa.NSAlert;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
 
 /**
@@ -38,6 +39,9 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample, Dialog tab</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public  class MessageBox : Dialog {
     String message = "";
@@ -84,12 +88,11 @@
  * </ul>
  */
 public this (Shell parent, int style) {
-    super (parent, checkStyle (style));
+    super (parent, checkStyle (parent, checkStyle (style)));
     checkSubclass ();
 }
 
 static int checkStyle (int style) {
-    if ((style & (DWT.PRIMARY_MODAL | DWT.APPLICATION_MODAL | DWT.SYSTEM_MODAL)) is 0) style |= DWT.APPLICATION_MODAL;
     int mask = (DWT.YES | DWT.NO | DWT.OK | DWT.CANCEL | DWT.ABORT | DWT.RETRY | DWT.IGNORE);
     int bits = style & mask;
     if (bits is DWT.OK || bits is DWT.CANCEL || bits is (DWT.OK | DWT.CANCEL)) return style;
@@ -136,41 +139,42 @@
         case DWT.OK:
             break;
         case DWT.CANCEL:
-            defaultButton = NSString.stringWith(DWT.getMessage("SWT_Cancel"));
+            defaultButton = NSString.stringWith(DWT.getMessage("DWT_Cancel"));
             break;
         case DWT.OK | DWT.CANCEL:
-            alternateButton = NSString.stringWith(DWT.getMessage("SWT_Cancel"));
+            alternateButton = NSString.stringWith(DWT.getMessage("DWT_Cancel"));
             break;
         case DWT.YES:
-            defaultButton = NSString.stringWith(DWT.getMessage("SWT_Yes"));
+            defaultButton = NSString.stringWith(DWT.getMessage("DWT_Yes"));
             break;
         case DWT.NO:
-            defaultButton = NSString.stringWith(DWT.getMessage("SWT_No"));
+            defaultButton = NSString.stringWith(DWT.getMessage("DWT_No"));
             break;
         case DWT.YES | DWT.NO:
-            defaultButton = NSString.stringWith(DWT.getMessage("SWT_Yes"));
-            alternateButton = NSString.stringWith(DWT.getMessage("SWT_No"));
+            defaultButton = NSString.stringWith(DWT.getMessage("DWT_Yes"));
+            alternateButton = NSString.stringWith(DWT.getMessage("DWT_No"));
             break;
         case DWT.YES | DWT.NO | DWT.CANCEL:             
-            defaultButton = NSString.stringWith(DWT.getMessage("SWT_Yes"));
-            alternateButton = NSString.stringWith(DWT.getMessage("SWT_No"));
-            otherButton = NSString.stringWith(DWT.getMessage("SWT_Cancel"));
+            defaultButton = NSString.stringWith(DWT.getMessage("DWT_Yes"));
+            alternateButton = NSString.stringWith(DWT.getMessage("DWT_No"));
+            otherButton = NSString.stringWith(DWT.getMessage("DWT_Cancel"));
             break;
         case DWT.RETRY | DWT.CANCEL:
-            defaultButton = NSString.stringWith(DWT.getMessage("SWT_Retry"));
-            alternateButton = NSString.stringWith(DWT.getMessage("SWT_Cancel"));
+            defaultButton = NSString.stringWith(DWT.getMessage("DWT_Retry"));
+            alternateButton = NSString.stringWith(DWT.getMessage("DWT_Cancel"));
             break;
         case DWT.ABORT | DWT.RETRY | DWT.IGNORE:
-            defaultButton = NSString.stringWith(DWT.getMessage("SWT_Abort"));
-            alternateButton = NSString.stringWith(DWT.getMessage("SWT_Retry"));
-            otherButton = NSString.stringWith(DWT.getMessage("SWT_Ignore"));
+            defaultButton = NSString.stringWith(DWT.getMessage("DWT_Abort"));
+            alternateButton = NSString.stringWith(DWT.getMessage("DWT_Retry"));
+            otherButton = NSString.stringWith(DWT.getMessage("DWT_Ignore"));
             break;
     }
     NSString title = NSString.stringWith(this.title !is null ? this.title : "");
     NSString message = NSString.stringWith(this.message !is null ? this.message : "");
-    NSAlert alert = NSAlert.alertWithMessageText(title, defaultButton, alternateButton, otherButton, message);
+    NSAlert alert = NSAlert.alertWithMessageText(NSString.stringWith(""), defaultButton, alternateButton, otherButton, message);
+    new NSWindow(alert.window().id).setTitle(title);
     alert.setAlertStyle(alertType);
-    int response = alert.runModal();
+    int response = (int)/*64*/alert.runModal();
     switch (bits) {
         case DWT.OK:
             switch (response) {
--- a/dwt/widgets/Monitor.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Monitor.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Monitor;
 
@@ -21,6 +21,8 @@
  * Instances of this class are descriptions of monitors.
  *
  * @see Display
+ * @see <a href="http://www.eclipse.org/swt/snippets/#monitor">Monitor snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.0
  */
--- a/dwt/widgets/ProgressBar.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/ProgressBar.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#progressbar">ProgressBar snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class ProgressBar : Control {
     
@@ -100,14 +104,12 @@
 }
 
 void createHandle () {
-    SWTProgressIndicator widget = cast(SWTProgressIndicator)new SWTProgressIndicator().alloc();
+    NSProgressIndicator widget = cast(NSProgressIndicator)new SWTProgressIndicator().alloc();
     widget.initWithFrame(new NSRect());
     widget.setUsesThreadedAnimation(false);
     widget.setIndeterminate((style & DWT.INDETERMINATE) !is 0);
     if ((style & DWT.INDETERMINATE) !is 0) widget.startAnimation(null);
-    widget.setTag(jniRef);
     view = widget;
-    parent.contentView().addSubview_(widget);
 }
 
 /**
@@ -155,6 +157,23 @@
     return cast(int)(cast(NSProgressIndicator)view).doubleValue();
 }
 
+/**
+ * Returns the state of the receiver. The value will be one of:
+ * <ul>
+ *  <li>{@link DWT#NORMAL}</li>
+ *  <li>{@link DWT#ERROR}</li>
+ *  <li>{@link DWT#PAUSED}</li>
+ * </ul>
+ *
+ * @return the state 
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public int getState () {
     checkWidget ();
     return DWT.NORMAL;
@@ -175,8 +194,13 @@
  */
 public void setMaximum (int value) {
     checkWidget();
-    if (value < 0) return;
-    (cast(NSProgressIndicator)view).setMaxValue(value);
+    int minimum = (int)((NSProgressIndicator)view).minValue();
+    if (value <= minimum) return;
+    int selection = (int)((NSProgressIndicator)view).doubleValue();
+    int newSelection = Math.min (selection, value);
+    if (selection !is newSelection) {
+        ((NSProgressIndicator)view).setDoubleValue(newSelection);
+    }
 }
 
 /**
@@ -194,8 +218,13 @@
  */
 public void setMinimum (int value) {
     checkWidget();
-    if (value < 0) return;
-    (cast(NSProgressIndicator)view).setMinValue(value);
+    int maximum =  (int)((NSProgressIndicator)view).maxValue();
+    if (!(0 <= value && value < maximum)) return;
+    int selection = (int)((NSProgressIndicator)view).doubleValue();
+    int newSelection = Math.max (selection, value);
+    if (selection !is newSelection) {
+        ((NSProgressIndicator)view).setDoubleValue(newSelection);
+    }
 }
 
 /**
@@ -215,6 +244,23 @@
    (cast(NSProgressIndicator)view).setDoubleValue(value);
 }
 
+/**
+ * Sets the state of the receiver. The state must be one of these values:
+ * <ul>
+ *  <li>{@link DWT#NORMAL}</li>
+ *  <li>{@link DWT#ERROR}</li>
+ *  <li>{@link DWT#PAUSED}</li>
+ * </ul>
+ *
+ * @param state the new state
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public void setState (int state) {
     checkWidget ();
     //NOT IMPLEMENTED
--- a/dwt/widgets/Sash.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Sash.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,16 +14,24 @@
 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
 import dwt.graphics.Cursor;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSGraphicsContext;
+import dwt.internal.cocoa.NSMutableArray;
+import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTView;
+import dwt.internal.cocoa.id;
 
 /**
  * Instances of the receiver represent a selectable user interface object
@@ -41,6 +49,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#sash">Sash snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Sash : Control {
     Cursor sizeCursor;
@@ -48,7 +60,8 @@
     int lastX, lastY, startX, startY;
     private final static int INCREMENT = 1;
     private final static int PAGE_INCREMENT = 9;
-
+    NSArray accessibilityAttributes = null;
+    
 /**
  * Constructs a new instance of this class given its parent
  * and a style value describing its behavior and appearance.
@@ -84,6 +97,127 @@
     sizeCursor = new Cursor (display, cursorStyle);
 }
 
+int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+    if (accessibilityAttributes is null) {
+        NSMutableArray ourAttributes = NSMutableArray.arrayWithCapacity(10);
+        ourAttributes.addObject(OS.NSAccessibilityRoleAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityRoleDescriptionAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityParentAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityPositionAttribute);
+        ourAttributes.addObject(OS.NSAccessibilitySizeAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityWindowAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityTopLevelUIElementAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityFocusedAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityValueAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityMaxValueAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityMinValueAttribute);
+        // The accessibility documentation says that these next two are optional, but the
+        // Accessibility Verifier says they are required.
+        ourAttributes.addObject(OS.NSAccessibilityNextContentsAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityPreviousContentsAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityOrientationAttribute);
+
+        if (accessible !is null) {
+            // See if the accessible will override or augment the standard list.
+            // Help, title, and description can be overridden.
+            NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
+            extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
+            extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
+            extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
+
+            for (int i = extraAttributes.count() - 1; i >= 0; i--) {
+                NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
+                if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) !is null) {
+                    ourAttributes.addObject(extraAttributes.objectAtIndex(i));
+                }
+            }
+        }
+
+        accessibilityAttributes = ourAttributes;
+        accessibilityAttributes.retain();
+    }
+    
+    return accessibilityAttributes.id;
+}
+
+public int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    int returnValue = 0;
+    NSString attributeName = new NSString(arg0);
+    
+    if (accessible !is null) {
+        id returnObject = accessible.internal_accessibilityAttributeValue(attributeName, ACC.CHILDID_SELF);
+        
+        if (returnObject !is null) returnValue = returnObject.id;
+    }
+
+    if (returnValue !is 0) return returnValue;
+
+    if (attributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || attributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
+        NSString roleText = OS.NSAccessibilitySplitterRole;
+
+        if (attributeName.isEqualToString (OS.NSAccessibilityRoleAttribute)) {
+            return roleText.id;
+        } else { // NSAccessibilityRoleDescriptionAttribute
+            return OS.NSAccessibilityRoleDescription (roleText.id, 0);
+        }
+    } else if (attributeName.isEqualToString (OS.NSAccessibilityEnabledAttribute)) {
+        return NSNumber.numberWithBool(isEnabled()).id;
+    } else if (attributeName.isEqualToString (OS.NSAccessibilityOrientationAttribute)) {
+        NSString orientation = (style & DWT.VERTICAL) !is 0 ? OS.NSAccessibilityVerticalOrientationValue : OS.NSAccessibilityHorizontalOrientationValue;
+        return orientation.id;
+    } else if (attributeName.isEqualToString (OS.NSAccessibilityValueAttribute)) {
+        Point location = getLocation();
+        int value = (style & DWT.VERTICAL) !is 0 ? location.x : location.y;
+        return NSNumber.numberWithInt(value).id;
+    } else if (attributeName.isEqualToString (OS.NSAccessibilityMaxValueAttribute)) {
+        NSRect parentBounds = view.bounds();
+        float maxValue = (style & DWT.VERTICAL) !is 0 ?
+                parentBounds.width :
+                parentBounds.height;
+        return NSNumber.numberWithInt((int)maxValue).id;
+    } else if (attributeName.isEqualToString (OS.NSAccessibilityMinValueAttribute)) {
+        return NSNumber.numberWithInt(0).id;
+    } else if (attributeName.isEqualToString (OS.NSAccessibilityNextContentsAttribute)) {
+        Control[] children =  parent._getChildren();
+        Control nextView = null;
+        for (int i = 0; i < children.length; i++) {
+            if (children[i] is this) {
+                if (i < children.length - 1) {
+                    nextView = children[i + 1];
+                    break;
+                }
+            }
+        }
+        
+        if (nextView !is null) 
+            return NSArray.arrayWithObject(nextView.view).id;
+        else
+            return NSArray.array().id;
+    } else if (attributeName.isEqualToString (OS.NSAccessibilityPreviousContentsAttribute)) {
+        Control[] children =  parent._getChildren();
+        Control nextView = null;
+        for (int i = 0; i < children.length; i++) {
+            if (children[i] is this) {
+                if (i > 0) {
+                    nextView = children[i - 1];
+                    break;
+                }
+            }
+        }
+        
+        if (nextView !is null) 
+            return NSArray.arrayWithObject(nextView.view).id;
+        else
+            return NSArray.array().id;
+    }
+
+    return super.accessibilityAttributeValue(id, sel, arg0);
+}
+
+bool accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+    return false;   
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the control is selected by the user, by sending
@@ -125,8 +259,8 @@
     return checkBits (style, DWT.HORIZONTAL, DWT.VERTICAL, 0, 0, 0, 0);
 }
 
-bool becomeFirstResponder () {
-    bool result = super.becomeFirstResponder();
+bool becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+    bool result = super.becomeFirstResponder(id, sel);
     NSRect frame = view.frame();
     lastX = cast(int)frame.x;
     lastY = cast(int)frame.y;
@@ -147,11 +281,24 @@
 }
 
 void createHandle () {
-    SWTView widget = cast(SWTView)new SWTView().alloc();
+    NSView widget = cast(NSView)new SWTView().alloc();
     widget.initWithFrame (new NSRect());
-    widget.setTag(jniRef);
     view = widget;
-    parent.contentView().addSubview_(view);
+}
+
+void drawWidget (int /*long*/ id, NSRect rect) {
+    NSGraphicsContext context = NSGraphicsContext.currentContext();
+    fillBackground (view, context, rect);
+    super.drawWidget (id, rect);
+}
+
+Cursor findCursor () {
+    Cursor cursor = super.findCursor ();
+    if (cursor is null) {
+        int cursorType = (style & DWT.HORIZONTAL) !is 0 ? DWT.CURSOR_SIZENS : DWT.CURSOR_SIZEWE;
+        cursor = display.getSystemCursor (cursorType);
+    }
+    return cursor;
 }
 
 bool sendKeyEvent(NSEvent nsEvent, int type) {
@@ -164,7 +311,7 @@
         case 124: /* Right arrow */ {
             int xChange = 0, yChange = 0;
             int stepSize = PAGE_INCREMENT;
-            int modifiers = nsEvent.modifierFlags();
+            int /*long*/ modifiers = nsEvent.modifierFlags();
             if ((modifiers & OS.NSControlKeyMask) !is 0) stepSize = INCREMENT;
             if ((style & DWT.VERTICAL) !is 0) {
                 if (keyCode is 126 || keyCode is 125) break;
@@ -213,8 +360,9 @@
     return true;
 }
 
-void mouseDown(int theEvent) {
-    super.mouseDown(theEvent);
+void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    //TODO use sendMouseEvent
+//  super.mouseDown(id, sel, theEvent);
     NSEvent nsEvent = new NSEvent(theEvent);
     if (nsEvent.clickCount() !is 1) return;
     NSPoint location = nsEvent.locationInWindow();
@@ -237,8 +385,9 @@
     }
 }
 
-void mouseDragged(int theEvent) {
-    super.mouseDragged(theEvent);
+void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    //TODO use sendMouseEvent
+//  super.mouseDragged(id, sel, theEvent);
     if (!dragging) return;
     NSEvent nsEvent = new NSEvent(theEvent);
     NSPoint location = nsEvent.locationInWindow();
@@ -266,14 +415,9 @@
     }
 }
 
-void mouseEntered(int theEvent) {
-    //TODO need to add tracking area
-    super.mouseEntered(theEvent);
-    sizeCursor.handle.set();
-}
-
-void mouseUp(int theEvent) {
-    super.mouseUp(theEvent);
+void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    //TODO use sendMouseEvent
+//  super.mouseUp(id, sel, theEvent);
     if (!dragging) return;
     dragging = false;
     NSRect frame = view.frame();
@@ -289,6 +433,12 @@
     }
 }
 
+void releaseHandle () {
+    super.releaseHandle ();
+    if (accessibilityAttributes !is null) accessibilityAttributes.release();
+    accessibilityAttributes = null;
+}
+
 void releaseWidget () {
     super.releaseWidget ();
     if (sizeCursor !is null) sizeCursor.dispose ();
--- a/dwt/widgets/Scale.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Scale.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,9 @@
 import dwt.DWTException;
 import dwt.events.SelectionListener;
 import dwt.graphics.Point;
+import dwt.internal.cocoa.NSControl;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSSlider;
 import dwt.internal.cocoa.SWTSlider;
 
@@ -38,6 +40,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#scale">Scale snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Scale : Control {
     int increment = 1;
@@ -114,16 +120,13 @@
 public Point computeSize (int wHint, int hHint, bool changed) {
     checkWidget();
     NSSlider widget = cast(NSSlider)view;
-    NSRect oldRect = widget.frame();
-    widget.sizeToFit();
-    NSRect newRect = widget.frame();
-    widget.setFrame (oldRect);
-    int width = 0, height = 0;
-    if ((style & DWT.HORIZONTAL) !is 0) {        
-        height = cast(int)newRect.width;
+    NSSize size = widget.cell().cellSizeForBounds(widget.bounds());
+    int width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT;
+    if ((style & DWT.HORIZONTAL) !is 0) {       
+        height = cast(int)Math.ceil(size.height);
         width = height * 10;
     } else {
-        width = cast(int)newRect.width;
+        width = cast(int)Math.ceil(size.width);
         height = width * 10;
     }
     if (wHint !is DWT.DEFAULT) width = wHint;
@@ -134,18 +137,19 @@
 void createHandle () {
     NSSlider widget = cast(NSSlider)new SWTSlider().alloc();
     NSRect rect = new NSRect();
-    if ((style & DWT.HORIZONTAL) !is 0) {
         rect.width = 1;
-    } else {
         rect.height = 1;
-    }
     widget.initWithFrame(rect);
     widget.setMaxValue(100);
-    widget.setTag(jniRef);
     view = widget;
-    parent.contentView().addSubview_(widget);
 }
 
+void deregister() {
+    super.deregister();
+    display.removeWidget(((NSControl)view).cell());
+}
+
+
 /**
  * Returns the amount that the receiver's value will be
  * modified by when the up/down (or right/left) arrows
@@ -231,6 +235,11 @@
     return cast(int)(cast(NSSlider)view).doubleValue();
 }
 
+void register() {
+    super.register();
+    display.addWidget(((NSControl)view).cell(), this);
+}
+
 /**
  * Removes the listener from the collection of listeners who will
  * be notified when the user changes the receiver's value.
@@ -290,8 +299,8 @@
  */
 public void setMaximum (int value) {
     checkWidget();
-    if (value < 0) return;
-    (cast(NSSlider)view).setMaxValue(value);
+    int minimum = (int)((NSSlider)view).minValue();
+    if (value <= minimum) return;
 }
 
 /**
@@ -309,8 +318,8 @@
  */
 public void setMinimum (int value) {
     checkWidget();
-    if (value < 0) return;
-    (cast(NSSlider)view).setMinValue(value);
+    int maximum = (int)((NSSlider)view).maxValue();
+    if (!(0 <= value && value < maximum)) return;
 }
 
 /**
--- a/dwt/widgets/ScrollBar.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/ScrollBar.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.ScrollBar;
 
@@ -19,6 +19,7 @@
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
 import dwt.graphics.Point;
+import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSScroller;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.id;
@@ -92,11 +93,13 @@
  * @see Scrollable
  * @see Scrollable#getHorizontalBar
  * @see Scrollable#getVerticalBar
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class ScrollBar : Widget {
     NSScroller view;
     Scrollable parent;
-    int minimum, maximum, thumb;
+    int minimum, maximum = 100, thumb = 10;
     int increment = 1;
     int pageIncrement = 10;
     id target;
@@ -150,10 +153,9 @@
     return checkBits (style, DWT.HORIZONTAL, DWT.VERTICAL, 0, 0, 0, 0);
 }
 
-void createWidget () {
-    maximum = 100;
-    thumb = 10;
-    super.createWidget();
+void deregister () {
+    super.deregister ();
+    display.removeWidget (view);
 }
 
 /**
@@ -268,7 +270,7 @@
 public int getSelection () {
     checkWidget();
     NSScroller widget = cast(NSScroller)view;
-    float value = widget.floatValue();
+    double value = widget.doubleValue();
     return cast(int)((maximum - thumb - minimum) * value + minimum);
 }
 
@@ -287,8 +289,8 @@
  */
 public Point getSize () {
     checkWidget();
-//  return getControlSize (handle);
-    return new Point(0, 0);
+    NSRect rect = ((NSScroller)view).frame();
+    return new Point((int)rect.width, (int)rect.height);
 }
 
 /**
@@ -395,8 +397,14 @@
     eventTable.unhook(DWT.DefaultSelection,listener);
 }
 
+void register () {
+    super.register ();
+    display.addWidget (view, this);
+}
+
 void releaseHandle () {
     super.releaseHandle ();
+    if (view !is null) view.release();
     view = null;
 }
 
@@ -404,7 +412,6 @@
     super.releaseParent ();
     if (parent.horizontalBar is this) parent.horizontalBar = null;
     if (parent.verticalBar is this) parent.verticalBar = null;
-    parent.resizeClientArea ();
 }
 
 void releaseWidget () {
@@ -484,15 +491,14 @@
  */
 public void setEnabled (bool enabled) {
     checkWidget();
-//  if (enabled) {
-//      if ((state & DISABLED) is 0) return;
-//      state &= ~DISABLED;
-//      OS.EnableControl (handle);
-//  } else {
-//      if ((state & DISABLED) !is 0) return;
-//      state |= DISABLED;
-//      OS.DisableControl (handle);
-//  }
+    if (enabled) {
+        if ((state & DISABLED) is 0) return;
+        state &= ~DISABLED;
+    } else {
+        if ((state & DISABLED) !is 0) return;
+        state |= DISABLED;
+    }
+    view.setEnabled(enabled);
 }
 
 /**
@@ -631,10 +637,12 @@
     if (thumb < 1) return;
     if (increment < 1) return;
     if (pageIncrement < 1) return;
-    thumb = Math.min (thumb, maximum - minimum);
+    this.thumb = thumb = Math.min (thumb, maximum - minimum);
+    this.maximum = maximum;
+    this.minimum = minimum;
     this.increment = increment;
     this.pageIncrement = pageIncrement;
-    updateBar(selection, minimum, maximum, thumb);
+    updateBar (selection, minimum, maximum, thumb);
 }
 
 /**
@@ -655,18 +663,17 @@
  */
 public void setVisible (bool visible) {
     checkWidget();
-    //TODO visibility
     parent.setScrollBarVisible (this, visible);
 }
 
-void updateBar(int selection, int minimum, int maximum, int thumb) {
-    NSScroller widget = cast(NSScroller)view;
-    selection = Math.max(minimum, Math.min(maximum - thumb, selection));
+void updateBar (int selection, int minimum, int maximum, int thumb) {
+    NSScroller widget = cast(NSScroller) view;
+    selection = Math.max (minimum, Math.min (maximum - thumb, selection));
     int range = maximum - thumb - minimum;
-    float fraction = range < 0 ? 1 : cast(float)(selection - minimum) / range;
-    CGFloat knob = minimum is maximum ? 1 : cast(CGFloat)(thumb - minimum) / maximum - minimum;
-    widget.setFloatValue(fraction, knob);
-    widget.setEnabled(range > 0); 
+    float fraction = range <= 0 ? 1 : cast(float) (selection - minimum) / range;
+    CGFloat knob = range <= 0 ? 1 : cast(CGFloat) thumb / (maximum - minimum);
+    widget.setFloatValue (fraction, knob);
+    widget.setEnabled (range > 0); 
 }
 
 }
--- a/dwt/widgets/Scrollable.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Scrollable.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Scrollable;
 
@@ -23,7 +23,7 @@
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
-import dwt.internal.cocoa.SWTScrollView;
+import dwt.internal.cocoa.SWTScroller;
 
 import dwt.dwthelper.utils;
 import dwt.widgets.Composite;
@@ -45,9 +45,11 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public abstract class Scrollable : Control {
-    SWTScrollView scrollView;
+    NSScrollView scrollView;
     ScrollBar horizontalBar, verticalBar;
     
 this () {
@@ -87,6 +89,12 @@
     super (parent, style);
 }
 
+bool accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+    // Always ignore scrollers.
+    if (scrollView !is null && id is scrollView.id) return true;
+    return super.accessibilityIsIgnored(id, sel);   
+}
+
 /**
  * Given a desired <em>client area</em> for the receiver
  * (as described by the arguments), returns the bounding
@@ -139,16 +147,24 @@
     bar.display = display;
     NSScroller scroller;
     String actionSelector;
+    NSRect rect = new NSRect();
     if ((style & DWT.H_SCROLL) !is 0) {
-        scroller = scrollView.horizontalScroller();
+        rect.width = 1;
+    } else {
+        rect.height = 1;
+    }
+    scroller = (NSScroller)new SWTScroller().alloc();
+    scroller.initWithFrame(rect);
+    if ((style & DWT.H_SCROLL) !is 0) {
+        scrollView.setHorizontalScroller(scroller);
         actionSelector = OS.sel_sendHorizontalSelection;
     } else {
-        scroller = scrollView.verticalScroller();
+        scrollView.setVerticalScroller(scroller);
         actionSelector = OS.sel_sendVerticalSelection;
     }
     bar.view = scroller;
     //bar.createJNIRef();
-    scroller.setTag(bar.jniRef);
+    bar.register();
     if ((state & CANVAS) is 0) {
         bar.target = scroller.target();
         bar.actionSelector = scroller.action();
@@ -164,6 +180,11 @@
     if ((style & DWT.V_SCROLL) !is 0) verticalBar = createScrollBar (DWT.V_SCROLL);
 }
 
+void deregister () {
+    super.deregister ();
+    if (scrollView !is null) display.removeWidget (scrollView);
+}
+
 /**
  * Returns a rectangle which describes the area of the
  * receiver which is capable of displaying data (that is,
@@ -225,13 +246,23 @@
     return hooks (DWT.KeyDown) || hooks (DWT.KeyUp) || hooks (DWT.Traverse);
 }
 
+bool isTrim (NSView view) {
+    if (scrollView !is null) {
+        if (scrollView.id is view.id) return true;
+        if (horizontalBar !is null && horizontalBar.view.id is view.id) return true;
+        if (verticalBar !is null && verticalBar.view.id is view.id) return true;
+    }
+    return super.isTrim (view);
+}
+
+void register () {
+    super.register ();
+    if (scrollView !is null) display.addWidget (scrollView, this);
+}
 
 void releaseHandle () {
     super.releaseHandle ();
-    if (scrollView !is null)  {
-        scrollView.setTag(-1);
-        scrollView.release();
-    }
+    if (scrollView !is null) scrollView.release();
     scrollView = null;
 }
 
@@ -247,51 +278,10 @@
     super.releaseChildren (destroy);
 }
 
-void resizeClientArea () {
-//  if (scrolledHandle is 0) return;
-//  if ((state & CANVAS) is 0) return;
-//  int vWidth = 0, hHeight = 0;
-//  int [] outMetric = new int [1];
-//  OS.GetThemeMetric (OS.kThemeMetricScrollBarWidth, outMetric);
-//  bool isVisibleHBar = horizontalBar !is null && horizontalBar.getVisible ();
-//  bool isVisibleVBar = verticalBar !is null && verticalBar.getVisible ();
-//  if (isVisibleHBar) hHeight = outMetric [0];
-//  if (isVisibleVBar) vWidth = outMetric [0];
-//  int width, height;
-//  CGRect rect = new CGRect (); 
-//  OS.HIViewGetBounds (scrolledHandle, rect);
-//  width = cast(int) rect.width;
-//  height = cast(int) rect.height;
-//  Rect inset = inset ();
-//  width = Math.max (0, width - vWidth - inset.left - inset.right);
-//  height = Math.max (0, height - hHeight - inset.top - inset.bottom);
-//  setBounds (handle, inset.left, inset.top, width, height, true, true, false);
-//  if (isVisibleHBar) {
-//      setBounds (horizontalBar.handle, inset.left, inset.top + height, width, hHeight, true, true, false);
-//  }
-//  if (isVisibleVBar) {
-//      setBounds (verticalBar.handle, inset.left + width, inset.top, vWidth, height, true, true, false);
-//  }
-}
-
 void sendHorizontalSelection () {
     horizontalBar.sendSelection ();
 }
 
-bool sendMouseWheel (short wheelAxis, int wheelDelta) {
-//  if ((state & CANVAS) !is 0) {
-//      ScrollBar bar = wheelAxis is OS.kEventMouseWheelAxisX ? horizontalBar : verticalBar;
-//      if (bar !is null && bar.getEnabled ()) {
-//          bar.setSelection (Math.max (0, bar.getSelection () - bar.getIncrement () * wheelDelta));
-//          Event event = new Event ();
-//          event.detail = wheelDelta > 0 ? DWT.PAGE_UP : DWT.PAGE_DOWN;    
-//          bar.sendEvent (DWT.Selection, event);
-//          return true;
-//      }
-//  }
-    return false;
-}
-
 void sendVerticalSelection () {
     verticalBar.sendSelection ();
 }
@@ -306,13 +296,21 @@
         if ((bar.state & HIDDEN) !is 0) return false;
         bar.state |= HIDDEN;
     }
-    resizeClientArea ();
-//  setVisible (bar.handle, visible);
+    if ((bar.style & DWT.HORIZONTAL) !is 0) {
+        scrollView.setHasHorizontalScroller (visible);
+    } else {
+        scrollView.setHasVerticalScroller (visible);
+    }
     bar.sendEvent (visible ? DWT.Show : DWT.Hide);
     sendEvent (DWT.Resize);
     return true;
 }
 
+void setZOrder () {
+    super.setZOrder ();
+    if (scrollView !is null) scrollView.setDocumentView (view);
+}
+
 NSView topView () {
     if (scrollView !is null) return scrollView;
     return super.topView ();
--- a/dwt/widgets/Shell.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Shell.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Shell;
 
@@ -21,9 +21,14 @@
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
 import dwt.graphics.Region;
-import dwt.internal.cocoa.NSEvent;
+import dwt.internal.Callback;
+import dwt.internal.cocoa.NSApplication;
+import dwt.internal.cocoa.NSBezierPath;
+import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSScreen;
 import dwt.internal.cocoa.NSScrollView;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
@@ -32,6 +37,7 @@
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTWindow;
 import dwt.internal.cocoa.SWTWindowDelegate;
+import dwt.internal.cocoa.id;
 
 import dwt.dwthelper.utils;
 import dwt.internal.cocoa.NSInteger;
@@ -144,14 +150,17 @@
  *
  * @see Decorations
  * @see DWT
+ * @see <a href="http://www.eclipse.org/swt/snippets/#shell">Shell snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Shell : Decorations {
     NSWindow window;
     SWTWindowDelegate windowDelegate;
+    NSBezierPath regionPath;
     bool opened, moved, resized, fullScreen;
 //  bool resized, moved, drawing, reshape, update, deferDispose, active, disposed, opened, fullScreen;
     Control lastActive;
-    Region region;
     Rectangle normalBounds;
 
     static int DEFAULT_CLIENT_WIDTH = -1;
@@ -381,10 +390,48 @@
     this (parent !is null ? parent.display : null, parent, style, null, false);
 }
 
-public static Shell internal_new (Display display, objc.id handle) {
+/**  
+ * Invokes platform specific functionality to allocate a new shell
+ * that is not embedded.
+ * <p>
+ * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+ * API for <code>Shell</code>. It is marked public only so that it
+ * can be shared within the packages provided by DWT. It is not
+ * available on all platforms, and should never be called from
+ * application code.
+ * </p>
+ *
+ * @param display the display for the shell
+ * @param handle the handle for the shell
+ * @return a new shell object containing the specified display and handle
+ * 
+ * @since 3.3
+ */
     return new Shell (display, null, DWT.NO_TRIM, handle, false);
 }
 
+/**  
+ * Invokes platform specific functionality to allocate a new shell
+ * that is 'embedded'.  In this case, the handle represents an NSView
+ * that acts as an embedded DWT Shell in an AWT Canvas.
+ * <p>
+ * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+ * API for <code>Shell</code>. It is marked public only so that it
+ * can be shared within the packages provided by DWT. It is not
+ * available on all platforms, and should never be called from
+ * application code.
+ * </p>
+ *
+ * @param display the display for the shell
+ * @param handle the handle for the shell
+ * @return a new shell object containing the specified display and handle
+ * 
+ * @since 3.5
+ */
+public static Shell cocoa_new (Display display, int /*long*/ handle) {
+    return new Shell (display, null, DWT.NO_TRIM, handle, true);
+}
+
 static int checkStyle (int style) {
     style = Decorations.checkStyle (style);
     style &= ~DWT.TRANSPARENT;
@@ -396,6 +443,12 @@
     return bits;
 }
 
+bool accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+    // The content view of a shell is always ignored.
+    if (id is view.id) return true;
+    return super.accessibilityIsIgnored(id, sel);
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when operations are performed on the receiver,
@@ -435,10 +488,19 @@
     }
 }
 
+bool canBecomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
+    if (window.styleMask () is OS.NSBorderlessWindowMask) return true;
+    return super.canBecomeKeyWindow (id, sel);
+}
+
 void checkOpen () {
     if (!opened) resized = false;
 }
 
+void clearLevel() {
+    window.setLevel(0); 
+}
+
 /**
  * Requests that the window manager close the receiver in
  * the same way it would be closed when the user clicks on
@@ -473,51 +535,116 @@
     rect.y = trim.y;
     rect.width = trim.width;
     rect.height = trim.height;
-    rect = NSWindow.static_frameRectForContentRect_styleMask_(rect, window.styleMask());
-    return new Rectangle (cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height);
+    NSWindow myWindow = (window !is null ? window : view.window());
+    rect = myWindow.frameRectForContentRect(rect);
 }
 
 void createHandle () {
-    state |= CANVAS;// | GRAB | HIDDEN;
-    if (window !is null) {
-        view = window.contentView();
-        return;
-    } else {
-        SWTWindow swtWindow = cast(SWTWindow) (new SWTWindow ()).alloc ();
-        swtWindow.setTag(jniRef);
-        window = cast(NSWindow)swtWindow;
-        NSRect rect = NSRect();
-        dwt.widgets.Monitor.Monitor monitor = getMonitor ();
-        Rectangle clientArea = monitor.getClientArea ();
-        rect.width = clientArea.width * 5 / 8;
-        rect.height = clientArea.height * 5 / 8;
+    state |= HIDDEN;
+    if (window is null) {
+        window = (NSWindow) new SWTWindow ().alloc ();
         NSUInteger styleMask = NSBorderlessWindowMask;
         if ((style & DWT.NO_TRIM) is 0) {
-            styleMask = OS.NSTitledWindowMask;
+            if ((style & DWT.TITLE) !is 0) styleMask |= OS.NSTitledWindowMask;
             if ((style & DWT.CLOSE) !is 0) styleMask |= NSClosableWindowMask;
             if ((style & DWT.MIN) !is 0) styleMask |= NSMiniaturizableWindowMask;
             if ((style & DWT.MAX) !is 0) styleMask |= NSResizableWindowMask;
             if ((style & DWT.RESIZE) !is 0) styleMask |= NSResizableWindowMask;
         }
-        window = window.initWithContentRect_styleMask_backing_defer_(rect, styleMask, NSBackingStoreBuffered, false);
-        display.cascade = window.cascadeTopLeftFromPoint(display.cascade);
+        NSScreen screen = null;
+        NSScreen primaryScreen = new NSScreen(NSScreen.screens().objectAtIndex(0));
+        if (parent !is null) screen = parent.getShell().window.screen();
+        if (screen is null) screen = primaryScreen;
+        window = window.initWithContentRect(new NSRect(), styleMask, OS.NSBackingStoreBuffered, false, screen);
+        if ((style & (DWT.NO_TRIM | DWT.BORDER | DWT.SHELL_TRIM)) is 0) {
+            window.setHasShadow (true);
+        }
+        display.cascadeWindow(window, screen);
+        NSRect screenFrame = screen.frame();
+        float /*double*/ width = screenFrame.width * 5 / 8, height = screenFrame.height * 5 / 8;;
+        NSRect frame = window.frame();
+        NSRect primaryFrame = primaryScreen.frame();
+        frame.y = primaryFrame.height - ((primaryFrame.height - (frame.y + frame.height)) + height);
+        frame.width = width;
+        frame.height = height;
+        window.setFrame(frame, false);
         if ((style & DWT.ON_TOP) !is 0) {
-            window.setLevel(OS.NSFloatingWindowLevel);
+            window.setLevel(OS.NSStatusWindowLevel);
+        }
+        super.createHandle ();
+        topView ().setHidden (true);
+    } else {
+//      OS.object_setClass (window.id, OS.objc_getClass("SWTWindow"));
+        state &= ~HIDDEN;
+        //TODO - get the content of the foreign window instead of creating it
+        super.createHandle ();
+        style |= DWT.NO_BACKGROUND;
+    }
+    window.setAcceptsMouseMovedEvents(true);
+    windowDelegate = (SWTWindowDelegate)new SWTWindowDelegate().alloc().init();
+    window.setDelegate(windowDelegate);
+    window.disableCursorRects();
+    id id = window.fieldEditor (true, null);
+    if (id !is null) {
+        OS.object_setClass (id.id, OS.objc_getClass ("SWTEditorView"));
+    }
+}
+
+/*
+* Feature in Cocoa.  An NSWindow that is the child window of another NSWindow
+* will track the movement of its parent window. The work around is to adjust
+* the window's level.  
+*/
+void fixLevel() {
+    Shell topShell = this;
+    while (topShell.parent !is null) {
+        if (topShell.parent !is null) topShell = (Shell) topShell.parent;
+    }
+    Shell[] shells = display.getShells ();
+    for (int i = 0; i < shells.length; i++) {
+        Shell shell = shells [i];
+        if ((shell.style & DWT.ON_TOP) is 0) {
+            int level = 0;
+            Shell pShell = shell;
+            while (pShell.parent !is null) {
+                pShell = (Shell) pShell.parent;
+                level++;
+            }
+            int newLevel = pShell is topShell ? level : 0;
+            newLevel = Math.min (newLevel, OS.NSModalPanelWindowLevel - 1);
+            shell.window.setLevel (newLevel);
         }
     }
-    
-    (cast(Composite)this).createHandle (null);
-    
-    window.setContentView (topView());
-    windowDelegate = cast(SWTWindowDelegate)(new SWTWindowDelegate()).alloc().init();
-    windowDelegate.setTag(jniRef);
-    window.setDelegate(windowDelegate);
+}
+
+void deregister () {
+    super.deregister ();
+    if (window !is null) display.removeWidget (window);
+    if (windowDelegate !is null) display.removeWidget (windowDelegate);
 }
 
 void destroyWidget () {
     NSWindow window = this.window;
+    Display display = this.display;
     releaseHandle ();
-    if (window !is null) window.close();
+    if (window !is null) {
+        window.close();
+    }
+    //If another shell is not going to become active, clear the menu bar.
+    if (!display.isDisposed () && display.getShells ().length is 0) {
+        display.setMenuBar (null);
+    }
+}
+
+void drawWidget (int /*long*/ id, NSRect rect) {
+    if (regionPath !is null && background is null) {
+        NSGraphicsContext context = NSGraphicsContext.currentContext();
+        context.saveGraphicsState();
+        NSColor.windowBackgroundColor().setFill();
+        NSBezierPath.fillRect(rect);
+        context.restoreGraphicsState();
+    }
+    super.drawWidget (id, rect);
 }
 
 Control findBackgroundControl () {
@@ -534,43 +661,7 @@
 
 void fixShell (Shell newShell, Control control) {
     if (this is newShell) return;
-//  if (control is lastActive) setActiveControl (null);
-}
-
-void flagsChanged(objc.id theEvent) {
-    Display display = this.display;
-    NSEvent nsEvent = new NSEvent(theEvent);
-    NSUInteger modifiers = nsEvent.modifierFlags();
-    int lastModifiers = display.lastModifiers;
-//  int chord = OS.GetCurrentEventButtonState ();
-    int type = DWT.KeyUp;   
-    if ((modifiers & OS.NSAlphaShiftKeyMask) !is 0 && (lastModifiers & OS.NSAlphaShiftKeyMask) is 0) type = DWT.KeyDown;
-    if ((modifiers & OS.NSAlternateKeyMask) !is 0 && (lastModifiers & OS.NSAlternateKeyMask) is 0) type = DWT.KeyDown;
-    if ((modifiers & OS.NSShiftKeyMask) !is 0 && (lastModifiers & OS.NSShiftKeyMask) is 0) type = DWT.KeyDown;
-    if ((modifiers & OS.NSControlKeyMask) !is 0 && (lastModifiers & OS.NSControlKeyMask) is 0) type = DWT.KeyDown;
-    if ((modifiers & OS.NSCommandKeyMask) !is 0 && (lastModifiers & OS.NSCommandKeyMask) is 0) type = DWT.KeyDown;
-    Control target = display.getFocusControl();
-    if (type is DWT.KeyUp && (modifiers & OS.NSAlphaShiftKeyMask) is 0 && (lastModifiers & OS.NSAlphaShiftKeyMask) !is 0) {
-        if (target !is null) {
-            Event event = new Event ();
-            event.keyCode = DWT.CAPS_LOCK;
-    //      setInputState (event, DWT.KeyDown, chord, modifiers);
-            (cast(Widget)target).sendKeyEvent (DWT.KeyDown, event);
-        }
-    }
-    Event event = new Event ();
-//  setInputState (event, type, chord, modifiers);
-    if (event.keyCode is 0 && event.character is 0) return;
-    bool result = (cast(Widget)this).sendKeyEvent (type, event);
-    if (type is DWT.KeyDown && (modifiers & OS.NSAlphaShiftKeyMask) !is 0 && (lastModifiers & OS.NSAlphaShiftKeyMask) is 0) {
-        if (target !is null) {
-            event = new Event ();
-            event.keyCode = DWT.CAPS_LOCK;
-    //      setInputState (event, DWT.KeyUp, chord, modifiers);
-            (cast(Widget)target).sendKeyEvent (DWT.KeyUp, event);
-        }
-    }
-    display.lastModifiers = modifiers;
+    if (control is lastActive) setActiveControl (null);
 }
 
 /**
@@ -596,27 +687,50 @@
  */
 public void forceActive () {
     checkWidget ();
-    if (!isVisible ()) return;
-//  OS.SelectWindow (shellHandle);
-//  OS.SetFrontProcessWithOptions (new int [] {0, OS.kCurrentProcess}, OS.kSetFrontProcessFrontWindowOnly);
+    if (!isVisible()) return;
+    if (window is null) return;
+    window.makeKeyAndOrderFront (null);
+    NSApplication application = NSApplication.sharedApplication ();
+    application.activateIgnoringOtherApps (true);
 }
 
+/**
+ * Returns the receiver's alpha value. The alpha value
+ * is between 0 (transparent) and 255 (opaque).
+ *
+ * @return the alpha value
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public int getAlpha () {
     checkWidget ();
-    return cast(int)(window.alphaValue() * 255);
+    // TODO: Should we support embedded frame alpha?
+    if (window is null) return 255;
 }
 
 public Rectangle getBounds () {
     checkWidget();
-    NSRect frame = window.frame ();
-    return new Rectangle (cast(int)frame.x, cast(int) frame.y, cast(int) frame.width, cast(int) frame.height);
+    NSRect frame = (window is null ? view.frame() : window.frame());
+    GCFloat y = display.getPrimaryFrame().height - cast(int)(frame.y + frame.height);
+    return new Rectangle (cast(int)frame.x, cast(int)y, cast(int)frame.width, cast(int)frame.height);
 }
 
 public Rectangle getClientArea () {
     checkWidget();
     //TODO why super implementation fails
-    NSRect rect = window.contentRectForFrameRect_(window.frame());
-    int width = cast(int)rect.width, height = cast(int)rect.height;
+    if (window is null) {
+        // In embedded frames, the whole view is the client area.
+        NSRect rect = view.frame();
+        int width = (int)rect.width, height = (int)rect.height;
+        return new Rectangle (0, 0, width, height);
+    }
+
+    NSRect rect = window.contentRectForFrameRect(window.frame());
     if (scrollView !is null) {
         NSSize size = NSSize();
         size.width = width;
@@ -628,11 +742,24 @@
     return new Rectangle (0, 0, width, height);
 }
 
-int getDrawCount (int control) {
-    if (!isTrimHandle (control)) return drawCount;
-    return 0;
+NSBezierPath getClipping() {
+    return regionPath;
 }
 
+/**
+ * Returns <code>true</code> if the receiver is currently
+ * in fullscreen state, and false otherwise. 
+ * <p>
+ *
+ * @return the fullscreen state
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.4
+ */
 public bool getFullScreen () {
     checkWidget();
     return fullScreen;
@@ -662,8 +789,10 @@
 
 public Point getLocation () {
     checkWidget();
-    NSRect frame = window.frame ();
-    return new Point (cast(int) frame.x, cast(int) frame.y);
+    // TODO: frame is relative to superview. What does getLocation mean in the embedded case?
+    NSRect frame = (window !is null ? window.frame() : view.frame());
+    float /*double*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
+    return new Point ((int)frame.x, (int)y);
 }
 
 public bool getMaximized () {
@@ -672,6 +801,34 @@
     return !fullScreen && super.getMaximized ();
 }
 
+Shell getModalShell () {
+    Shell shell = null;
+    Shell [] modalShells = display.modalShells;
+    if (modalShells !is null) {
+        int bits = DWT.APPLICATION_MODAL | DWT.SYSTEM_MODAL;
+        int index = modalShells.length;
+        while (--index >= 0) {
+            Shell modal = modalShells [index];
+            if (modal !is null) {
+                if ((modal.style & bits) !is 0) {
+                    Control control = this;
+                    while (control !is null) {
+                        if (control is modal) break;
+                        control = control.parent;
+                    }
+                    if (control !is modal) return modal;
+                    break;
+                }
+                if ((modal.style & DWT.PRIMARY_MODAL) !is 0) {
+                    if (shell is null) shell = getShell ();
+                    if (modal.parent is shell) return modal;
+                }
+            }
+        }
+    }
+    return null;
+}
+
 public bool getMinimized () {
     checkWidget();
     if (!getVisible ()) return super.getMinimized ();
@@ -773,15 +930,19 @@
 
 public Point getSize () {
     checkWidget();
-    NSRect frame = window.frame ();
+    NSRect frame = (window !is null ? window.frame() : view.frame());
     return new Point (cast(int) frame.width, cast(int) frame.height);
 }
 
+float getThemeAlpha () {
+    return 1;
+}
+
 bool hasBorder () {
     return false;
 }
 
-void helpRequested(int theEvent) {
+void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
     Control control = display.getFocusControl();
     while (control !is null) {
         if (control.hooks (DWT.Help)) {
@@ -806,6 +967,21 @@
     return getVisible ();
 }
 
+bool makeFirstResponder (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+    if (display.focusControl is null) display.focusControl = display.getFocusControl ();
+    bool result = super.makeFirstResponder(id, sel, notification);
+    if (result) {
+        Control newFocus = display.getFocusControl ();
+        if (newFocus !is null && newFocus !is display.focusControl) {
+            Control oldFocus = display.focusControl;
+            display.focusControl = newFocus;
+            if (oldFocus !is null && !oldFocus.isDisposed ()) oldFocus.sendFocusEvent (DWT.FocusOut, false);
+            if (newFocus !is null && !newFocus.isDisposed ()) newFocus.sendFocusEvent (DWT.FocusIn, false);
+        }
+    }
+    return result;
+}
+
 /**
  * Moves the receiver to the top of the drawing order for
  * the display on which it was created (so that all other
@@ -829,6 +1005,12 @@
  */
 public void open () {
     checkWidget();
+    int mask = DWT.PRIMARY_MODAL | DWT.APPLICATION_MODAL | DWT.SYSTEM_MODAL;
+    if ((style & mask) !is 0) {
+        display.setModalShell (this);
+    } else {
+        updateModal ();
+    }
     setWindowVisible (true, true);
     if (isDisposed ()) return;
 //  if (active) {
@@ -856,6 +1038,12 @@
     return false;
 }
 
+void register () {
+    super.register ();
+    if (window !is null) display.addWidget (window, this);
+    if (windowDelegate !is null) display.addWidget (windowDelegate, this);
+}
+
 void releaseChildren (bool destroy) {
     Shell [] shells = getShells ();
     for (int i=0; i<shells.length; i++) {
@@ -868,7 +1056,7 @@
 }
 
 void releaseHandle () {
-    window.setDelegate(null);
+    if (window !is null) window.setDelegate(null);
     if (windowDelegate !is null) windowDelegate.release();
     windowDelegate = null;
     super.releaseHandle ();
@@ -881,8 +1069,11 @@
 
 void releaseWidget () {
     super.releaseWidget ();
+    display.clearModal (this);
 //  disposed = true;
     lastActive = null;
+    if (regionPath !is null) regionPath.release();
+    regionPath = null;
 }
 
 /**
@@ -935,9 +1126,10 @@
  * @see Shell#setActive
  */
 public void setActive () {
+    if (window is null) return; 
     checkWidget ();
-    if (!isVisible ()) return;
-//  OS.SelectWindow (shellHandle);
+    if (!isVisible()) return;
+    window.makeKeyAndOrderFront (null);
 }
 
 void setActiveControl (Control control) {
@@ -977,41 +1169,49 @@
     }
 }
 
+/**
+ * Sets the receiver's alpha value which must be
+ * between 0 (transparent) and 255 (opaque).
+ * <p>
+ * This operation requires the operating system's advanced
+ * widgets subsystem which may not be available on some
+ * platforms.
+ * </p>
+ * @param alpha the alpha value
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public void setAlpha (int alpha) {
+    if (window is null) return; 
     checkWidget ();
     alpha &= 0xFF;
     window.setAlphaValue (alpha / 255f);
 }
 
-int setBounds (int x, int y, int width, int height, bool move, bool resize) {
-//  if (fullScreen) setFullScreen (false);
-    if (move && resize) {
-        NSRect rect = NSRect ();
-        rect.x = x;
-        //TODO - get the screen for the point
-        int screenHeight = cast(int) window.screen().frame().height;
-        rect.y = screenHeight - y;
-        rect.width = width;
-        rect.height = height;
-        window.setFrame_display_(rect, false);
-    } else {
-        if (move) {
-            NSPoint point = NSPoint();
-            point.x = x;
-            //TODO - get the screen for the point
-            int screenHeight = cast(int) window.screen().frame().height;
-            point.y = screenHeight - y;
-            window.setFrameTopLeftPoint (point);
-        } else {
-            if (resize) {
-                NSRect rect = window.frame();
-                rect.width = width;
-                rect.height = height;
-                window.setFrame_display_(rect, false);
-            }
-        }
+void setBounds (int x, int y, int width, int height, bool move, bool resize) {
+    // Embedded Shells are not resizable.
+    if (window is null) return;
+    if (fullScreen) setFullScreen (false);
+    int screenHeight = (int) display.getPrimaryFrame().height;
+    NSRect frame = window.frame();
+    if (!move) {
+        x = (int)frame.x;
+        y = screenHeight - (int)(frame.y + frame.height);
     }
-    return 0;
+    if (!resize) {
+        width = (int)frame.width;
+        height = (int)frame.height;
+    }
+    frame.x = x;
+    frame.y = screenHeight - (int)(y + height);
+    frame.width = width;
+    frame.height = height;
+    window.setFrame(frame, false);
 }
 
 public void setEnabled (bool enabled) {
@@ -1023,6 +1223,29 @@
 //  }
 }
 
+/**
+ * Sets the full screen state of the receiver.
+ * If the argument is <code>true</code> causes the receiver
+ * to switch to the full screen state, and if the argument is
+ * <code>false</code> and the receiver was previously switched
+ * into full screen state, causes the receiver to switch back
+ * to either the maximmized or normal states.
+ * <p>
+ * Note: The result of intermixing calls to <code>setFullScreen(true)</code>, 
+ * <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will 
+ * vary by platform. Typically, the behavior will match the platform user's 
+ * expectations, but not always. This should be avoided if possible.
+ * </p>
+ * 
+ * @param fullScreen the new fullscreen state
+ *
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.4
+ */
 public void setFullScreen (bool fullScreen) {
     checkWidget ();
     this.fullScreen = fullScreen; 
@@ -1204,50 +1427,93 @@
 public void setRegion (Region region) {
     checkWidget ();
     if ((style & DWT.NO_TRIM) is 0) return;
+    if (window is null) return;
     if (region !is null && region.isDisposed()) error (DWT.ERROR_INVALID_ARGUMENT);
-//  if (region is null) {
-//      rgnRect = null;
-//  } else {
-//      if (rgnRect is null) {
-//          rgnRect = new Rect ();
-//          OS.GetWindowBounds (shellHandle, cast(short) OS.kWindowStructureRgn, rgnRect);
-//          OS.SetRect (rgnRect, cast(short) 0, cast(short) 0, cast(short) (rgnRect.right - rgnRect.left), cast(short) (rgnRect.bottom - rgnRect.top)); 
-//      }
-//  }
-//  this.region = region;
-//  /*
-//  * Bug in the Macintosh.  Calling ReshapeCustomWindow() from a
-//  * kEventWindowDrawContent handler originating from ShowWindow()
-//  * will deadlock.  The fix is to detected this case and only call
-//  * ReshapeCustomWindow() after the default handler is done.
-//  */
-//  if (drawing) {
-//      reshape = true;
-//  } else {
-//      OS.ReshapeCustomWindow (shellHandle);
-//      redrawWidget (handle, true);
-//  }
+    this.region = region;
+    if (regionPath !is null) regionPath.release();
+    regionPath = getPath(region);
+    if (region !is null) {
+        window.setBackgroundColor(NSColor.clearColor());
+        window.setOpaque(false);
+    } else {
+        window.setBackgroundColor(NSColor.windowBackgroundColor());
+        window.setOpaque(true);
+    }
+    window.contentView().setNeedsDisplay(true);
+}
+
+NSBezierPath getPath(Region region) {
+    if (region is null) return null;
+    Callback callback = new Callback(this, "regionToRects", 4);
+    if (callback.getAddress() is 0) DWT.error(DWT.ERROR_NO_MORE_CALLBACKS);
+    NSBezierPath path = NSBezierPath.bezierPath();
+    path.retain();
+    OS.QDRegionToRects(region.handle, OS.kQDParseRegionFromTopLeft, callback.getAddress(), path.id);
+    callback.dispose();
+    if (path.isEmpty()) path.appendBezierPathWithRect(new NSRect());
+    return path;
+}
+
+int /*long*/ regionToRects(int /*long*/ message, int /*long*/ rgn, int /*long*/ r, int /*long*/ path) {
+    NSPoint pt = new NSPoint();
+    short[] rect = new short[4];
+    if (message is OS.kQDRegionToRectsMsgParse) {
+        OS.memmove(rect, r, rect.length * 2);
+        pt.x = rect[1];
+        pt.y = rect[0];
+        OS.objc_msgSend(path, OS.sel_moveToPoint_, pt);
+        pt.x = rect[3];
+        OS.objc_msgSend(path, OS.sel_lineToPoint_, pt);
+        pt.x = rect[3];
+        pt.y = rect[2];
+        OS.objc_msgSend(path, OS.sel_lineToPoint_, pt);
+        pt.x = rect[1];
+        OS.objc_msgSend(path, OS.sel_lineToPoint_, pt);
+        OS.objc_msgSend(path, OS.sel_closePath);
+    }
+    return 0;
 }
 
 public void setText (String str) {
     checkWidget();
     if (str is null) error (DWT.ERROR_NULL_ARGUMENT);
-    super.setText (str);
+    if (window is null) return;
     NSString nsStr = NSString.stringWith(str);
     window.setTitle(nsStr);
-//  str.release();
 }
 
 public void setVisible (bool visible) {
     checkWidget();
-    setWindowVisible (visible, false);
+    int mask = DWT.PRIMARY_MODAL | DWT.APPLICATION_MODAL | DWT.SYSTEM_MODAL;
+    if ((style & mask) !is 0) {
+        if (visible) {
+            display.setModalShell (this);
+        } else {
+            display.clearModal (this);
+        }
+    } else {
+        updateModal ();
+    }
+    if (window is null) {
+        super.setVisible(visible);
+    } else {
+        setWindowVisible (visible, false);
+    }
 }
 
 void setWindowVisible (bool visible, bool key) {
-    if (window.isVisible() is visible) return;
+    if (visible) {
+        if ((state & HIDDEN) is 0) return;
+        state &= ~HIDDEN;
+    } else {
+        if ((state & HIDDEN) !is 0) return;
+        state |= HIDDEN;
+    }
+    if (window !is null && (window.isVisible() is visible)) return;
     if (visible) {
         sendEvent (DWT.Show);
         if (isDisposed ()) return;
+        topView ().setHidden (false);
         if (key) {
             window.makeKeyAndOrderFront (null);
         } else {
@@ -1270,12 +1536,15 @@
         }
     } else {
         window.orderOut (null);
+        topView ().setHidden (true);
         sendEvent (DWT.Hide);
     }
 }
 
 void setZOrder () {
-//  if (scrolledHandle !is 0) OS.HIViewAddSubview (scrolledHandle, handle);
+    if (scrollView !is null) scrollView.setDocumentView (view);
+    if (window is null) return;
+    window.setContentView (scrollView !is null ? scrollView : view);
 }
 
 void setZOrder (Control control, bool above) {
@@ -1295,6 +1564,10 @@
     return true;
 }
 
+void updateModal () {
+    // do nothing
+}
+
 void updateSystemUIMode () {
     if (!getMonitor ().equals (display.getPrimaryMonitor ())) return;
     bool isActive = false;
@@ -1319,22 +1592,23 @@
 //  }
 }
 
-void windowDidBecomeKey(int notification) {
-    super.windowDidBecomeKey(notification);
+void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+    super.windowDidBecomeKey(id, sel, notification);
     Display display = this.display;
     display.setMenuBar (menuBar);
     sendEvent (DWT.Activate);
+    fixLevel();
 //  if (!isDisposed ()) {
 //      if (!restoreFocus () && !traverseGroup (true)) setFocus ();
 //  }
 }
 
-void windowDidMove(int notification) {
+void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
     moved = true;
     sendEvent(DWT.Move);
 }
 
-void windowDidResize(int notification) {
+void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
     resized = true;
     sendEvent (DWT.Resize);
     if (isDisposed ()) return;
@@ -1344,9 +1618,9 @@
     }
 }
 
-void windowDidResignKey(int notification) {
-    super.windowDidResignKey(notification);
-    Display display = this.display;
+void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+    super.windowDidResignKey(id, sel, notification);
+//  Display display = this.display;
     sendEvent (DWT.Deactivate);
     if (isDisposed ()) return;
 //  saveFocus ();
@@ -1362,34 +1636,11 @@
 //      display.ignoreFocus = false;
 //      if (!savedFocus.isDisposed ()) savedFocus.sendFocusEvent (DWT.FocusOut, false);
 //  }
-    display.setMenuBar (null);
 }
 
-bool windowShouldClose(int window) {
+bool windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) {
     closeWidget ();
     return false;
 }
 
-void windowWillClose(int notification) {
 }
-
-void windowSendEvent(objc.id ID, objc.id event) {
-    NSEvent nsEvent = new NSEvent(event);
-    NSEventType type = nsEvent.type();
-    if (type is OS.NSKeyDown || type is OS.NSKeyUp) {
-        Control eventTarget = display.getFocusControl();
-        if (eventTarget !is null) {
-            if (type is OS.NSKeyDown) {
-                bool[] consume = new bool[1];
-                short key = nsEvent.keyCode();
-                if (eventTarget.translateTraversal(key, nsEvent, consume)) return;
-                if (consume[0]) return;
-                if (eventTarget.isDisposed()) return;
-            }
-            if (!eventTarget.sendKeyEvent(nsEvent, type is OS.NSKeyDown ? DWT.KeyDown : DWT.KeyUp)) return;
-        }
-    }
-    super.windowSendEvent(ID, event);
-}
-
-}
--- a/dwt/widgets/Slider.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Slider.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -70,6 +70,9 @@
  * </p>
  *
  * @see ScrollBar
+ * @see <a href="http://www.eclipse.org/swt/snippets/#slider">Slider snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Slider : Control {
     bool dragging;
@@ -181,9 +184,7 @@
     widget.setEnabled(true);
     widget.setTarget(widget);
     widget.setAction(OS.sel_sendSelection);
-    widget.setTag(jniRef);
     view = widget;
-    parent.contentView().addSubview_(widget);
     updateBar(0, minimum, maximum, thumb);
 }
 
@@ -270,7 +271,7 @@
 public int getSelection () {
     checkWidget();
     NSScroller widget = cast(NSScroller)view;
-    float value = widget.floatValue();
+    double value = widget.doubleValue();
     return cast(int)((maximum - thumb - minimum) * value + minimum);
 }
 
@@ -317,7 +318,7 @@
 
 void sendSelection () {
     Event event = new Event();
-    int hitPart = (cast(NSScroller)view).hitPart();
+    int hitPart = cast(int)/*64*/((NSScroller)view).hitPart();
     int value = getSelection ();
     switch (hitPart) {
         case OS.NSScrollerDecrementLine:
@@ -451,12 +452,13 @@
     updateBar(value, minimum, maximum, thumb);
 }
 
-void updateBar(int selection, int minimum, int maximum, int thumb) {
+void updateBar (int selection, int minimum, int maximum, int thumb) {
     NSScroller widget = cast(NSScroller)view;
-    selection = Math.max(minimum, Math.min(maximum - thumb, selection));
-    float fraction = minimum is maximum ? 1 : cast(float)(selection - minimum) / (maximum - thumb - minimum);
-    float knob = minimum is maximum ? 1 : cast(float)(thumb - minimum) / (maximum - minimum);
-    widget.setFloatValue(fraction, knob);
+    selection = Math.max (minimum, Math.min (maximum - thumb, selection));
+    int range = maximum - thumb - minimum;
+    float fraction = range <= 0 ? 1 : cast(float)(selection - minimum) / range;
+    CGFloat knob = range <= 0 ? 1 : cast(CGFloat)thumb / (maximum - minimum);
+    widget.setFloatValue (fraction, knob);
 }
 
 /**
--- a/dwt/widgets/Spinner.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Spinner.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,12 +22,18 @@
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSAttributedString;
 import dwt.internal.cocoa.NSCell;
+import dwt.internal.cocoa.NSCharacterSet;
+import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSNumber;
+import dwt.internal.cocoa.NSNumberFormatter;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSStepper;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTextField;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTStepper;
 import dwt.internal.cocoa.SWTTextField;
@@ -50,11 +56,16 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#spinner">Spinner snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.1
  */
 public class Spinner : Composite {
     NSTextField textView;
+    NSNumberFormatter textFormatter;
     NSStepper buttonView;
     int pageIncrement = 10;
     int digits = 0;
@@ -94,6 +105,11 @@
     super (parent, checkStyle (style));
 }
 
+bool acceptsFirstResponder(int /*long*/ id, int /*long*/ sel) {
+    if (id is view.id) return false;
+    return super.acceptsFirstResponder (id, sel);
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the receiver's text is modified, by sending
@@ -198,16 +214,16 @@
     float width = 0, height = 0;
     String string = Double.toString (buttonView.maxValue ());
     NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity (1);
-    dict.setObject(textView.font (), OS.NSFontAttributeName ());
+    dict.setObject(textView.font (), OS.NSFontAttributeName);
     int length = string.length ();
     char [] chars = new char [length];
     string.getChars (0, length, chars, 0);
     NSString nsString = NSString.stringWithCharacters (chars, length);
-    NSAttributedString str = (cast(NSAttributedString) new NSAttributedString ().alloc ()).initWithString_attributes_ (nsString, dict);
+    NSAttributedString str = (cast(NSAttributedString) new NSAttributedString ().alloc ()).initWithString (nsString, dict);
     NSSize size = str.size ();
     str.release ();
-    width = size.width;
-    height = size.height;
+    width = (int)/*64*/size.width;
+    height = (int)/*64*/size.height;
     NSRect frameRect = textView.frame();
     NSCell cell = new NSCell (textView.cell ());
     NSRect cellRect = cell.drawingRectForBounds(frameRect);
@@ -219,7 +235,7 @@
     NSRect newRect = buttonView.frame ();
     buttonView.setFrame (oldRect);
     width += newRect.width;
-    height = Math.max (height, newRect.height);
+    height = Math.max (height, (int)/*64*/newRect.height);
     if (wHint !is DWT.DEFAULT) width = wHint;
     if (hHint !is DWT.DEFAULT) height = hHint;
     Rectangle trim = computeTrim (0, 0, cast(int) width, cast(int) height);
@@ -255,27 +271,27 @@
 }
 
 void createHandle () {
-    SWTView widget = cast(SWTView)new SWTView().alloc();
+    NSView widget = cast(NSView)new SWTView().alloc();
     widget.initWithFrame(new NSRect());
 //  widget.setDrawsBackground(false);
-    widget.setTag(jniRef);
     NSStepper buttonWidget = cast(NSStepper)new SWTStepper().alloc();
     buttonWidget.initWithFrame(new NSRect());
     buttonWidget.setValueWraps((style & DWT.WRAP) !is 0);
     buttonWidget.setTarget(buttonWidget);
     buttonWidget.setAction(OS.sel_sendSelection);
-    buttonWidget.setTag(jniRef);
     NSTextField textWidget = cast(NSTextField)new SWTTextField().alloc();
     textWidget.initWithFrame(new NSRect());
 //  textWidget.setTarget(widget);
-    textWidget.setTag(jniRef);
     textWidget.setEditable((style & DWT.READ_ONLY) is 0);
-    widget.addSubview_(textWidget);
-    widget.addSubview_(buttonWidget);
+    textFormatter = new NSNumberFormatter();
+    textFormatter.alloc().init(); //.autorelease();
+    textFormatter.setNumberStyle(OS.NSNumberFormatterDecimalStyle);
+    //textWidget.cell().setFormatter(textFormatter);
+    widget.addSubview(textWidget);
+    widget.addSubview(buttonWidget);
     buttonView = buttonWidget;
     textView = textWidget;
-    view = widget;  
-    parent.contentView().addSubview_(widget);
+    view = widget;
     setSelection (0, false, true, false);
 }
 
@@ -303,11 +319,28 @@
 //  }
 }
 
+void deregister () {
+    super.deregister ();
+    if (textView !is null) {
+        display.removeWidget (textView);
+        display.removeWidget (textView.cell());
+    }
+    
+    if (buttonView !is null) {
+        display.removeWidget (buttonView);
+        display.removeWidget (buttonView.cell());
+    }
+}
+
 void enableWidget (bool enabled) {
     buttonView.setEnabled(enabled);
     textView.setEnabled(enabled);
 }
 
+NSView focusView () {
+    return textView;
+}
+
 /**
  * Returns the number of decimal places used by the receiver.
  *
@@ -400,10 +433,102 @@
     return cast(int)(cast(NSStepper)buttonView).doubleValue();
 }
 
-int getSelectionText () {
+int getSelectionText (bool[] parseFail) {
+    String string = textView.stringValue().getString();
+    try {
+        int value;
+        if (digits > 0) {
+            String decimalSeparator = textFormatter.decimalSeparator().getString();
+            int index = string.indexOf (decimalSeparator);
+            if (index !is -1)  {
+                int startIndex = string.startsWith ("+") || string.startsWith ("-") ? 1 : 0;
+                String wholePart = startIndex !is index ? string.substring (startIndex, index) : "0";
+                String decimalPart = string.substring (index + 1);
+                if (decimalPart.length () > digits) {
+                    decimalPart = decimalPart.substring (0, digits);
+                } else {
+                    int i = digits - decimalPart.length ();
+                    for (int j = 0; j < i; j++) {
+                        decimalPart = decimalPart + "0";
+                    }
+                }
+                int wholeValue = Integer.parseInt (wholePart);
+                int decimalValue = Integer.parseInt (decimalPart);
+                for (int i = 0; i < digits; i++) wholeValue *= 10;
+                value = wholeValue + decimalValue;
+                if (string.startsWith ("-")) value = -value;
+            } else {
+                value = Integer.parseInt (string);
+                for (int i = 0; i < digits; i++) value *= 10;
+            }
+        } else {
+            value = Integer.parseInt (string);
+        }
+        int max = getMaximum();
+        int min = getMinimum();
+        if (min <= value && value <= max) return value;
+    } catch (NumberFormatException e) {
+    }
+    parseFail [0] = true;
     return -1;
 }
 
+void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    NSEvent event = new NSEvent(theEvent);
+    NSString chars = event.charactersIgnoringModifiers();
+    
+    int delta = 0;
+    int keyChar = 0;
+
+    if (chars.length() !is 1) return;
+    
+    keyChar = chars.characterAtIndex(0);
+
+    switch (keyChar) {
+        case OS.NSEnterCharacter: /* KP Enter */
+        case OS.NSNewlineCharacter: /* Return */
+            postEvent (DWT.DefaultSelection);
+            return;
+        case OS.NSPageUpFunctionKey: delta = pageIncrement; break;
+        case OS.NSPageDownFunctionKey: delta = -pageIncrement; break;
+        case OS.NSDownArrowFunctionKey: delta = -getIncrement(); break;
+        case OS.NSUpArrowFunctionKey: delta = getIncrement(); break;
+        
+        default: {
+            NSCharacterSet numbers = new NSCharacterSet(NSCharacterSet.decimalDigitCharacterSet().id);
+            bool isANumber = numbers.characterIsMember((short) keyChar);
+            bool isSeparator = (keyChar is textFormatter.decimalSeparator().characterAtIndex(0));
+            bool isMathSymbol = (keyChar is 0x2d || keyChar is 0x2b); // Minus sign, plus sign
+            if (isANumber || (isSeparator && digits > 0) || isMathSymbol) super.keyDown(id, sel, theEvent);
+        }
+    }
+
+    if (delta !is 0) {
+        bool [] parseFail = new bool [1];
+        int value = getSelectionText (parseFail);
+        if (parseFail [0]) {
+            value = (int)buttonView.doubleValue();
+        }
+        int newValue = value + delta;
+        int max = (int)buttonView.maxValue();
+        int min = (int)buttonView.minValue();
+        if ((style & DWT.WRAP) !is 0) {
+            if (newValue > max) newValue = min;
+            if (newValue < min) newValue = max;
+        }
+        newValue = Math.min (Math.max (min, newValue), max);
+        if (value !is newValue) setSelection (newValue, true, true, true);
+        return;
+    } else {
+        bool [] parseFail = new bool [1];
+        int value = getSelectionText (parseFail);
+        if (!parseFail [0]) {
+            int pos = (int)buttonView.doubleValue();
+            if (pos !is value) setSelection (value, true, false, true);
+        }
+    }
+}
+
 /**
  * Pastes text from clipboard.
  * <p>
@@ -425,16 +550,25 @@
 //  setText (text, selection [0], selection [1], true);
 }
 
+void register () {
+    super.register ();
+    if (textView !is null) {
+        display.addWidget (textView, this);
+        display.addWidget (textView.cell(), this);
+    }
+    
+    if (buttonView !is null) {
+        display.addWidget (buttonView, this);
+        display.addWidget (buttonView.cell(), this);
+    }
+}
+
 void releaseHandle () {
     super.releaseHandle();
-    if (buttonView !is null) {
-        buttonView.setTag(-1);
-        buttonView.release();
-    }
-    if (textView !is null) {
-        textView.setTag(-1);
-        textView.release();
-    }
+    if (textFormatter !is null) textFormatter.release();
+    if (buttonView !is null) buttonView.release();
+    if (textView !is null) textView.release();
+    textFormatter = null;
     buttonView = null;
     textView = null;
 }
@@ -512,25 +646,22 @@
     eventTable.unhook (DWT.Verify, listener);   
 }
 
-void sendSelection () { 
-    setSelection (getSelection(), false, true, true);
+void resized () {
+    super.resized ();
+    buttonView.sizeToFit();
+    NSRect buttonFrame = buttonView.bounds();
+    NSRect frame = view.frame();
+    buttonFrame.x = frame.width - buttonFrame.width;
+    buttonFrame.y = 0;
+    frame.x = 0;
+    frame.y = 0;
+    frame.width -= buttonFrame.width + GAP;
+    textView.setFrame(frame);
+    buttonView.setFrame(buttonFrame);
 }
 
-int setBounds (int x, int y, int width, int height, bool move, bool resize) {
-    int result = super.setBounds(x, y, width, height, move, resize);
-    if ((result & RESIZED) !is 0) {
-        buttonView.sizeToFit();
-        NSRect buttonFrame = buttonView.bounds();
-        NSRect frame = view.frame();
-        buttonFrame.x = frame.width - buttonFrame.width;
-        buttonFrame.y = 0;
-        frame.x = 0;
-        frame.y = 0;
-        frame.width -= buttonFrame.width + GAP;
-        textView.setFrame(frame);
-        buttonView.setFrame(buttonFrame);
-    }
-    return result;
+void sendSelection () { 
+    setSelection (getSelection(), false, true, true);
 }
 
 /**
@@ -556,10 +687,15 @@
 public void setDigits (int value) {
     checkWidget ();
     if (value < 0) error (DWT.ERROR_INVALID_ARGUMENT);
-//  if (value is digits) return;
-//  digits = value;
-//  int pos = OS.GetControl32BitValue (buttonHandle);   
-//  setSelection (pos, false, true, false);
+    if (value is digits) return;
+    digits = value;
+    int pos = (int)buttonView.doubleValue();    
+    textFormatter.setMaximumFractionDigits(digits);
+    setSelection (pos, false, true, false);
+}
+
+void setFont(NSFont font) {
+    textView.setFont(font);
 }
 
 /**
@@ -600,16 +736,17 @@
     if (value <= min) return;
     int pos = getSelection();
     buttonView.setMaxValue(value);
+    textFormatter.setMaximum(NSNumber.numberWithInt(value));
     if (pos > value) setSelection (value, true, true, false);   
 }
 
 /**
  * Sets the minimum value that the receiver will allow.  This new
- * value will be ignored if it is negative or is not less than the receiver's
+ * value will be ignored if it is not less than the receiver's
  * current maximum value.  If the new minimum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new minimum, which must be nonnegative and less than the current maximum
+ * @param value the new minimum, which must be less than the current maximum
  *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -623,6 +760,7 @@
     if (value >= max) return;
     int pos = getSelection();
     buttonView.setMinValue(value);
+    textFormatter.setMinimum(NSNumber.numberWithInt(value));
     if (pos < value) setSelection (value, true, true, false);
 }
 
@@ -672,7 +810,7 @@
     if (setText) {
         String string = String.valueOf (value);
         if (digits > 0) {
-            String decimalSeparator = ".";//getDecimalSeparator ();
+            String decimalSeparator = textFormatter.decimalSeparator().getString();
             int index = string.length () - digits;
             StringBuffer buffer = new StringBuffer ();
             if (index > 0) {
@@ -689,13 +827,11 @@
         }
         NSCell cell = new NSCell(textView.cell());
         if (hooks (DWT.Verify) || filters (DWT.Verify)) {
-            int length = cell.title().length();
+            int length = (int)/*64*/cell.title().length();
             string = verifyText (string, 0, length, null);
             if (string is null) return;
         }
-        cell.setTitle(NSString.stringWith(string));
-//      short [] selection = new short [] {0, cast(short)string.length ()};
-//      OS.SetControlData (textHandle, cast(short)OS.kControlEntireControl, OS.kControlEditTextSelectionTag, 4, selection);
+        textView.setStringValue(NSString.stringWith(string));
         sendEvent (DWT.Modify);
     }
     if (notify) postEvent (DWT.Selection);
@@ -740,6 +876,19 @@
     setSelection (selection, true, true, false);
 }
 
+void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    postEvent (DWT.Modify);
+}
+
+void textDidEndEditing(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    bool [] parseFail = new bool [1];
+    int value = getSelectionText (parseFail);
+    if (parseFail [0]) {
+        value = (int)buttonView.doubleValue();
+        setSelection (value, false, true, false);
+    }
+}
+
 String verifyText (String string, int start, int end, Event keyEvent) {
     Event event = new Event ();
     event.text = string;
--- a/dwt/widgets/Synchronizer.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Synchronizer.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Synchronizer;
 
@@ -43,6 +43,7 @@
  * </p>
  *
  * @see Display#setSynchronizer
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Synchronizer {
     Display display;
--- a/dwt/widgets/TabFolder.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/TabFolder.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSTabView;
 import dwt.internal.cocoa.NSTabViewItem;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTTabView;
 
@@ -52,10 +53,15 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tabfolder">TabFolder, TabItem snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class TabFolder : Composite {
     TabItem [] items;
     int itemCount;
+    bool ignoreSelect;
     
 /**
  * Constructs a new instance of this class given its parent
@@ -140,8 +146,8 @@
 public Point computeSize (int wHint, int hHint, bool changed) {
     Point size = super.computeSize (wHint, hHint, changed);
     if (wHint is DWT.DEFAULT && items.length > 0) {
-        NSSize mimSize = (cast(NSTabView)view).minimumSize();
-        Rectangle trim = computeTrim (0, 0, cast(int)mimSize.width, 0);
+        NSSize minSize = (cast(NSTabView)view).minimumSize();
+        Rectangle trim = computeTrim (0, 0, cast(int)Math.ceil (minSize.width), 0);
         size.x = Math.max (trim.width, size.x);
     }
     return size;
@@ -149,44 +155,21 @@
 
 public Rectangle computeTrim (int x, int y, int width, int height) {
     checkWidget ();
-//  CGRect oldBounds = new CGRect (), bounds = oldBounds;
-//  OS.HIViewGetFrame (handle, oldBounds);
-//  int MIN_SIZE = 100;
-//  if (oldBounds.width < MIN_SIZE || oldBounds.height < MIN_SIZE) {
-//      OS.HIViewSetDrawingEnabled (handle, false);
-//      bounds = new CGRect ();
-//      bounds.width = bounds.height = 100;
-//      OS.HIViewSetFrame (handle, bounds);
-//  }
-//  Rect client = new Rect ();
-//  OS.GetTabContentRect (handle, client);
-//  if (oldBounds.width < MIN_SIZE || oldBounds.height < MIN_SIZE) {
-//      OS.HIViewSetFrame (handle, oldBounds);
-//      OS.HIViewSetDrawingEnabled (handle, drawCount is 0);
-//  }
-//  x -= client.left;
-//  y -= client.top;
-//  width += cast(int) bounds.width - (client.right - client.left);
-//  height += cast(int) bounds.height - (client.bottom - client.top);
-//  Rect inset = getInset ();
-//  x -= inset.left;
-//  y -= inset.top;
-//  width += inset.left + inset.right;
-//  height += inset.top + inset.bottom;
-//  return new Rectangle (-client.left, -client.top, width, height);
-    return super.computeTrim(x, y, width, height);
+    NSTabView widget = (NSTabView)view;
+    NSRect rect = widget.contentRect ();
+    x -= rect.x; y -= rect.y;
+    width += Math.ceil (rect.x); height += Math.ceil (rect.y);
+    return super.computeTrim (x, y, width, height);
 }
 
 void createHandle () {
-    SWTTabView widget = cast(SWTTabView)new SWTTabView().alloc();
+    NSTabView widget = cast(NSTabView)new SWTTabView().alloc();
     widget.initWithFrame (new NSRect());
-    widget.setTag(jniRef);
     widget.setDelegate(widget);
     if ((style & DWT.BOTTOM) !is 0) {
         widget.setTabViewType(OS.NSBottomTabsBezelBorder);
     }
     view = widget;
-    parent.contentView().addSubview_(view);
 }
 
 void createItem (TabItem item, int index) {
@@ -233,8 +216,8 @@
     NSRect rect = (cast(NSTabView)view).contentRect();
     int x = Math.max (0, cast(int)rect.x);
     int y = Math.max (0, cast(int)rect.y);
-    int width = Math.max (0, cast(int)rect.width);
-    int height = Math.max (0, cast(int)rect.height);
+    int width = Math.max (0, cast(int)Math.ceil (rect.width));
+    int height = Math.max (0, cast(int)Math.ceil (rect.height));
     return new Rectangle (x, y, width, height);
 }
 
@@ -260,6 +243,24 @@
     return items [index];
 }
 
+/**
+ * Returns the tab item at the given point in the receiver
+ * or null if no such item exists. The point is in the
+ * coordinate system of the receiver.
+ *
+ * @param point the point used to locate the item
+ * @return the tab item at the given point, or null if the point is not in a tab item
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the point is null</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.4
+ */
 public TabItem getItem (Point point) {
     checkWidget ();
     if (point is null) error (DWT.ERROR_NULL_ARGUMENT);
@@ -360,6 +361,10 @@
     return -1;
 }
 
+float getThemeAlpha () {
+    return 0.25f * parent.getThemeAlpha ();
+}
+
 /**
  * Searches the receiver's list starting at the first item
  * (index 0) until an item is found that is equal to the 
@@ -458,21 +463,6 @@
     eventTable.unhook (DWT.DefaultSelection,listener);  
 }
 
-int setBounds (int x, int y, int width, int height, bool move, bool resize) {
-    int result = super.setBounds(x, y, width, height, move, resize);
-    if ((result & RESIZED) !is 0) {
-        int index = getSelectionIndex ();
-        if (index !is -1) {
-            TabItem item = items [index];
-            Control control = item.control;
-            if (control !is null && !control.isDisposed ()) {
-                control.setBounds (getClientArea ());
-            }
-        }
-    }
-    return result;
-}
-
 void setFont (NSFont font) {
     (cast(NSTabView)view).setFont(font);
 }
@@ -549,7 +539,7 @@
 }
 
 void setSelection (int index, bool notify, bool force) {
-    if (index >= itemCount) return;
+    if (!(0 <= index && index < itemCount)) return;
     int currentIndex = getSelectionIndex ();
     if (!force && currentIndex is index) return;
     if (currentIndex !is -1) {
@@ -561,14 +551,14 @@
             }
         }
     }
-    (cast(NSTabView)view).selectTabViewItemAtIndex(index);
+    ignoreSelect = true;
+    ignoreSelect = false;
     index = getSelectionIndex();
     if (index !is -1) {
         TabItem item = items [index];
         if (item !is null) {
             Control control = item.control;
             if (control !is null && !control.isDisposed ()) {
-                control.setBounds (getClientArea ());
                 control.setVisible (true);
             }
             if (notify) {
@@ -594,7 +584,7 @@
     return index is getSelectionIndex ();
 }
 
-void willSelectTabViewItem(int tabView, int tabViewItem) {
+void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
     if (tabViewItem is 0) return;
     for (int i = 0; i < itemCount; i++) {
         TabItem item = items [i];
@@ -611,12 +601,35 @@
             }
             Control control = item.control;
             if (control !is null && !control.isDisposed ()) {
-                control.setBounds (getClientArea ());
                 control.setVisible (true);
             }
-            Event event = new Event ();
-            event.item = item;
-            sendEvent (DWT.Selection, event);
+            break;
+        }
+    }
+}
+
+void tabView_didSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
+    if (tabViewItem is 0) return;
+    for (int i = 0; i < itemCount; i++) {
+        TabItem item = items [i];
+        /*
+        * Feature in Cocoa.  For some reason the control on a tab being
+        * deselected has its parent removed natively.  The fix is to
+        * re-set the control's parent.
+        */
+        Control control = item.control;
+        if (control !is null) {
+            NSView topView = control.topView ();
+            if (topView.superview () is null) {
+                contentView ().addSubview (topView, OS.NSWindowBelow, null);
+            }
+        }
+        if (item.nsItem.id is tabViewItem) {
+            if (!ignoreSelect) {
+                Event event = new Event ();
+                event.item = item;
+                postEvent (DWT.Selection, event);
+            }
         }
     }
 }
--- a/dwt/widgets/TabItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/TabItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,10 +18,12 @@
 import dwt.graphics.Image;
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTabViewItem;
 import dwt.internal.cocoa.NSValue;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
 
@@ -37,6 +39,9 @@
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tabfolder">TabFolder, TabItem snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class TabItem : Item {
     TabFolder parent;
@@ -143,21 +148,21 @@
 public Rectangle getBounds() {
     checkWidget();
     Rectangle result = new Rectangle (0, 0, 0, 0);
-    if (nsItem.respondsToSelector (OS.sel_accessibilityAttributeValue_1)) {
-        int posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_1, OS.NSAccessibilityPositionAttribute ());
-        int sizeValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_1, OS.NSAccessibilitySizeAttribute ());      
+    if (nsItem.respondsToSelector (OS.sel_accessibilityAttributeValue_)) {
+        int /*long*/ posValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilityPositionAttribute ());
+        int /*long*/ sizeValue = OS.objc_msgSend (nsItem.id, OS.sel_accessibilityAttributeValue_, OS.NSAccessibilitySizeAttribute ());      
         NSValue val = new NSValue (posValue);
         NSPoint pt = val.pointValue ();
         NSWindow window = parent.view.window ();
-        pt.y = window.screen ().frame ().height - pt.y;
+        pt.y = display.getPrimaryFrame().height - pt.y;
         pt = parent.view.convertPoint_fromView_ (pt, null);
         pt = window.convertScreenToBase (pt);
         result.x = cast(int) pt.x;
         result.y = cast(int) pt.y;
         val = new NSValue (sizeValue);
         NSSize size = val.sizeValue ();
-        result.width = cast(int) size.width;
-        result.height = cast(int) size.height;
+        result.width = cast(int) Math.ceil (size.width);
+        result.height = cast(int) Math.ceil (size.height);
     }
     return result;
 }
@@ -259,14 +264,21 @@
     int index = parent.indexOf (this);
     if (index !is parent.getSelectionIndex ()) {
         if (newControl !is null) newControl.setVisible (false);
-        return;
+    } else {
+        if (newControl !is null) {
+            newControl.setVisible (true);
+        }
+        if (oldControl !is null) oldControl.setVisible (false);
     }
+    NSView view;
     if (newControl !is null) {
-//      nsItem.setView(control.topView ());
-        newControl.setBounds (parent.getClientArea ());
-        newControl.setVisible (true);
+        view = newControl.topView();
+    } else {
+        view = (NSView)new NSView().alloc();
+        view.initWithFrame (new NSRect());
+        view.autorelease();
     }
-    if (oldControl !is null) oldControl.setVisible (false);
+    nsItem.setView (view);
 }
 
 public void setImage (Image image) {
--- a/dwt/widgets/Table.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Table.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,33 +12,50 @@
 
 import dwt.dwthelper.utils;
 
-
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
 import dwt.graphics.Color;
 import dwt.graphics.Font;
 import dwt.graphics.GC;
+import dwt.graphics.GCData;
 import dwt.graphics.Image;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSBrowserCell;
 import dwt.internal.cocoa.NSButtonCell;
-import dwt.internal.cocoa.NSCell;
+import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSColorSpace;
+import dwt.internal.cocoa.NSDictionary;
+import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSFont;
+import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSIndexSet;
 import dwt.internal.cocoa.NSMutableIndexSet;
+import dwt.internal.cocoa.NSNotification;
 import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSScrollView;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTableColumn;
+import dwt.internal.cocoa.NSTableHeaderCell;
 import dwt.internal.cocoa.NSTableHeaderView;
 import dwt.internal.cocoa.NSTableView;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.SWTBrowserCell;
 import dwt.internal.cocoa.SWTScrollView;
+import dwt.internal.cocoa.SWTTableHeaderCell;
+import dwt.internal.cocoa.SWTTableHeaderView;
 import dwt.internal.cocoa.SWTTableView;
+import dwt.internal.cocoa.id;
 
 /** 
  * Instances of this class implement a selectable user interface
@@ -69,12 +86,13 @@
  * </pre></code>
  * </p><p>
  * Note that although this class is a subclass of <code>Composite</code>,
- * it does not make sense to add <code>Control</code> children to it,
- * or set a layout on it.
+ * it does not normally make sense to add <code>Control</code> children to
+ * it, or set a layout on it, unless implementing something like a cell
+ * editor.
  * </p><p>
  * <dl>
  * <dt><b>Styles:</b></dt>
- * <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, HIDE_SELECTION, VIRTUAL</dd>
+ * <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, HIDE_SELECTION, VIRTUAL, NO_SCROLL</dd>
  * <dt><b>Events:</b></dt>
  * <dd>Selection, DefaultSelection, SetData, MeasureItem, EraseItem, PaintItem</dd>
  * </dl>
@@ -83,6 +101,10 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#table">Table, TableItem, TableColumn snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Table : Composite {
     TableItem [] items;
@@ -91,6 +113,7 @@
     TableItem currentItem;
     NSTableHeaderView headerView;
     NSTableColumn firstColumn, checkColumn;
+    NSBrowserCell dataCell;
     int columnCount, itemCount, lastIndexOf, sortDirection;
     bool ignoreSelect;
 
@@ -124,6 +147,7 @@
  * @see DWT#FULL_SELECTION
  * @see DWT#HIDE_SELECTION
  * @see DWT#VIRTUAL
+ * @see DWT#NO_SCROLL
  * @see Widget#checkSubclass
  * @see Widget#getStyle
  */
@@ -131,6 +155,25 @@
     super (parent, checkStyle (style));
 }
 
+int accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    
+    if (accessible !is null) {
+        NSString attribute = new NSString(arg0);
+        id returnValue = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
+        if (returnValue !is null) return returnValue.id;
+    }
+    
+    NSString attributeName = new NSString(arg0);
+    
+    // Accessibility Verifier queries for a title or description.  NSTableView doesn't
+    // seem to return either, so we return a default description value here.
+    if (attributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
+        return NSString.stringWith("").id;
+    }
+    
+    return super.accessibilityAttributeValue(id, sel, arg0);
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the user changes the receiver's selection, by sending
@@ -233,19 +276,15 @@
  * @since 3.0
  */
 public void clear (int index) {
-    checkWidget();
+    checkWidget ();
     if (!(0 <= index && index < itemCount)) error (DWT.ERROR_INVALID_RANGE);
     TableItem item = items [index];
     if (item !is null) {
-        if (currentItem !is item) item.clear ();
-        if (currentItem is null && drawCount is 0) {
-            int [] id = new int [] {index + 1};
-//          OS.UpdateDataBrowserItems (handle, 0, id.length, id, OS.kDataBrowserItemNoProperty, OS.kDataBrowserNoItem);
-        }
-//      setScrollWidth (item);
+        item.clear ();
+        NSTableView widget = (NSTableView) view;
+        widget.reloadData ();
     }
 }
-
 /**
  * Removes the items from the receiver which are between the given
  * zero-relative start and end indices (inclusive).  The text, icon
@@ -270,7 +309,7 @@
  * @since 3.0
  */
 public void clear (int start, int end) {
-    checkWidget();
+    checkWidget ();
     if (start > end) return;
     if (!(0 <= start && start <= end && end < itemCount)) {
         error (DWT.ERROR_INVALID_RANGE);
@@ -279,8 +318,11 @@
         clearAll ();
     } else {
         for (int i=start; i<=end; i++) {
-            clear (i);
+            TableItem item = items [i];
+            if (item !is null) item.clear ();
         }
+        NSTableView widget = (NSTableView) view;
+        widget.reloadData ();
     }
 }
 
@@ -307,7 +349,7 @@
  * @since 3.0
  */
 public void clear (int [] indices) {
-    checkWidget();
+    checkWidget ();
     if (indices is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (indices.length is 0) return;
     for (int i=0; i<indices.length; i++) {
@@ -316,8 +358,11 @@
         }
     }
     for (int i=0; i<indices.length; i++) {
-        clear (indices [i]);
+        TableItem item = items [indices [i]];
+        if (item !is null) item.clear ();
     }
+    NSTableView widget = (NSTableView) view;
+    widget.reloadData ();
 }
 
 /**
@@ -337,19 +382,17 @@
  * @since 3.0
  */
 public void clearAll () {
-    checkWidget();
+    checkWidget ();
     for (int i=0; i<itemCount; i++) {
         TableItem item = items [i];
         if (item !is null) item.clear ();
     }
-    if (currentItem is null && drawCount is 0) {
-//      OS.UpdateDataBrowserItems (handle, 0, 0, null, OS.kDataBrowserItemNoProperty, OS.kDataBrowserNoItem);
-    }
-//  setScrollWidth (items, true);
+    NSTableView widget = (NSTableView) view;
+    widget.reloadData ();
 }
 
 public Point computeSize (int wHint, int hHint, bool changed) {
-    checkWidget();
+    checkWidget ();
     int width = 0;
     if (wHint is DWT.DEFAULT) {
         if (columnCount !is 0) {
@@ -362,7 +405,7 @@
             for (int i=0; i<itemCount; i++) {
                 TableItem item = items [i];
                 if (item !is null) {
-                    columnWidth = Math.max (columnWidth, item.calculateWidth (0, gc));
+                    columnWidth = Math.max (columnWidth, item.calculateWidth (0, gc, false));
                 }
             }
             gc.dispose ();
@@ -385,32 +428,29 @@
 }
 
 void createHandle () {
-    //TODO - DWT.CHECK  
-    SWTScrollView scrollWidget = cast(SWTScrollView)new SWTScrollView().alloc();
+    NSScrollView scrollWidget = (NSScrollView)new SWTScrollView().alloc();
     scrollWidget.initWithFrame(new NSRect ());
     scrollWidget.setHasHorizontalScroller(true);
     scrollWidget.setHasVerticalScroller(true);
     scrollWidget.setAutohidesScrollers(true);
     scrollWidget.setBorderType(hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder);
-    scrollWidget.setTag(jniRef);
     
     NSTableView widget = cast(NSTableView)new SWTTableView().alloc();
     widget.initWithFrame(new NSRect());
     widget.setAllowsMultipleSelection((style & DWT.MULTI) !is 0);
+    widget.setAllowsColumnReordering (false);
     widget.setDataSource(widget);
     widget.setDelegate(widget);
     widget.setDoubleAction(OS.sel_sendDoubleSelection);
     if (!hasBorder()) widget.setFocusRingType(OS.NSFocusRingTypeNone);
-    widget.setTag(jniRef);
-    
-    headerView = widget.headerView();
-    headerView.retain();
-    widget.setHeaderView(null);
-    
+
+    headerView = (NSTableHeaderView)new SWTTableHeaderView ().alloc ().init ();
+    widget.setHeaderView (null);
+
     NSString str = NSString.stringWith("");
     if ((style & DWT.CHECK) !is 0) {
         checkColumn = cast(NSTableColumn)new NSTableColumn().alloc();
-        checkColumn.initWithIdentifier(str);
+        checkColumn.initWithIdentifier(checkColumn);
         checkColumn.headerCell().setTitle(str);
         widget.addTableColumn (checkColumn);
         NSButtonCell cell = cast(NSButtonCell)new NSButtonCell().alloc().init();
@@ -425,17 +465,15 @@
     }
 
     firstColumn = cast(NSTableColumn)new NSTableColumn().alloc();
-    firstColumn.initWithIdentifier(str);
+    firstColumn.initWithIdentifier(firstColumn);
+    firstColumn.setMinWidth(0);
     //column.setResizingMask(OS.NSTableColumnAutoresizingMask);
-    NSCell cell = cast(NSBrowserCell)new NSBrowserCell().alloc().init();
-    firstColumn.setDataCell(cell);
-    cell.release();
+    dataCell = cast(NSBrowserCell)(new SWTBrowserCell ()).alloc ().init ();
+    firstColumn.setDataCell (dataCell);
     widget.addTableColumn (firstColumn);
 
     scrollView = scrollWidget;
     view = widget;
-    scrollView.setDocumentView(widget);
-    parent.contentView().addSubview_(scrollView);
 }
 
 void createItem (TableColumn column, int index) {
@@ -449,20 +487,22 @@
     if (columnCount is 0) {
         //TODO - clear attributes, alignment etc.
         nsColumn = firstColumn;
+        nsColumn.retain();
         firstColumn = null;
     } else {
         //TODO - set attributes, alignment etc.
         nsColumn = cast(NSTableColumn)new NSTableColumn().alloc();
-        nsColumn.initWithIdentifier(NSString.stringWith(""));
-        (cast(NSTableView)view).addTableColumn (nsColumn);
+        nsColumn.initWithIdentifier(nsColumn);
+        nsColumn.setMinWidth(0);
         int checkColumn = (style & DWT.CHECK) !is 0 ? 1 : 0;
         (cast(NSTableView)view).moveColumn (columnCount + checkColumn, index + checkColumn);
-        NSCell cell = cast(NSBrowserCell)new NSBrowserCell().alloc().init();
-        nsColumn.setDataCell(cell);
-        cell.release();
+        nsColumn.setDataCell (dataCell);
     }
+    column.createJNIRef ();
+    NSTableHeaderCell headerCell = (NSTableHeaderCell)new SWTTableHeaderCell ().alloc ().init ();
+    nsColumn.setHeaderCell (headerCell);
+    display.addWidget (headerCell, column);
     column.nsColumn = nsColumn;
-    nsColumn.headerCell().setTitle(NSString.stringWith(""));
     nsColumn.setWidth(0);
     System.arraycopy (columns, index, columns, index + 1, columnCount++ - index);
     columns [index] = column;
@@ -510,6 +550,10 @@
                 }
             }
         }
+    } else {
+        for (int i = 0; i < itemCount; i++) {
+            items [i].customWidth = -1;
+        }
     }
 }
 
@@ -542,6 +586,12 @@
     return display.getSystemColor (DWT.COLOR_LIST_FOREGROUND);
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (headerView);
+    display.removeWidget (dataCell);
+}
+
 /**
  * Deselects the item at the given zero-relative index in the receiver.
  * If the item at the index was already deselected, it remains
@@ -555,7 +605,7 @@
  * </ul>
  */
 public void deselect (int index) {
-    checkWidget();
+    checkWidget ();
     if (0 <= index && index < itemCount) {
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
@@ -581,14 +631,16 @@
  */
 public void deselect (int start, int end) {
     checkWidget();
-    //TODO - check range
+    if (start > end) return;
+    if (end < 0 || start >= itemCount) return;
+    start = Math.max (0, start);
+    end = Math.min (itemCount - 1, end);
     if (start is 0 && end is itemCount - 1) {
         deselectAll ();
     } else {
-        int length = end - start + 1;
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
-        for (int i=0; i<length; i++) {
+        for (int i=start; i<=end; i++) {
             widget.deselectRow (i);
         }
         ignoreSelect = false;
@@ -613,7 +665,7 @@
  * </ul>
  */
 public void deselect (int [] indices) {
-    checkWidget();
+    checkWidget ();
     if (indices is null) error (DWT.ERROR_NULL_ARGUMENT);
     NSTableView widget = cast(NSTableView)view;
     ignoreSelect = true;
@@ -701,6 +753,9 @@
             }
         }
     }
+
+    int oldIndex = (int)/*64*/((NSTableView)view).columnWithIdentifier (column.nsColumn);
+
     if (columnCount is 1) {
         //TODO - reset attributes
         firstColumn = column.nsColumn;
@@ -710,8 +765,17 @@
     }
     System.arraycopy (columns, index + 1, columns, index, --columnCount - index);
     columns [columnCount] = null;
-    for (int i=index; i<columnCount; i++) {
-        columns [i].sendEvent (DWT.Move);
+
+    NSArray array = ((NSTableView)view).tableColumns ();
+    int arraySize = (int)/*64*/array.count ();
+    for (int i = oldIndex; i < arraySize; i++) {
+        int /*long*/ columnId = array.objectAtIndex (i).id;
+        for (int j = 0; j < columnCount; j++) {
+            if (columns[j].nsColumn.id is columnId) {
+                columns [j].sendEvent (DWT.Move);
+                break;
+            }
+        }
     }
 }
 
@@ -732,6 +796,199 @@
     }
 }
 
+void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) {
+    NSRect rect = new NSRect ();
+    OS.memmove (rect, cellFrame, NSRect.sizeof);
+
+    NSTableView tableView = (NSTableView)this.view;
+    NSBrowserCell cell = new NSBrowserCell (id);
+    NSRange rowsRange = tableView.rowsInRect (rect);
+    int rowIndex = (int)/*64*/rowsRange.location;
+    TableItem item = items [rowIndex];
+    int columnIndex = 0;
+    int nsColumnIndex = 0;
+    if (columnCount !is 0) {
+        NSIndexSet columnsSet = tableView.columnIndexesInRect (rect);
+        nsColumnIndex = (int)/*64*/columnsSet.firstIndex ();
+        NSArray nsColumns = tableView.tableColumns ();
+        id nsColumn = nsColumns.objectAtIndex (nsColumnIndex);
+        for (int i = 0; i < columnCount; i++) {
+            if (columns[i].nsColumn.id is nsColumn.id) {
+                columnIndex = indexOf (columns[i]);
+                break;
+            }
+        }
+    }
+
+    Color background = item.cellBackground !is null ? item.cellBackground [columnIndex] : null;
+    if (background is null) background = item.background;
+    bool drawBackground = background !is null;
+    bool drawForeground = true;
+    bool isSelected = tableView.isRowSelected (rowIndex);
+    bool drawSelection = isSelected;
+
+    NSColor nsSelectionBackground = null;
+    NSColor nsSelectionForeground = null;
+    if (isSelected) {
+        if (isFocusControl ()) {
+            nsSelectionForeground = NSColor.alternateSelectedControlTextColor ();
+        } else {
+            nsSelectionForeground = NSColor.selectedControlTextColor ();
+        }
+        nsSelectionForeground = nsSelectionForeground.colorUsingColorSpace (NSColorSpace.deviceRGBColorSpace ());
+        nsSelectionBackground = cell.highlightColorInView (tableView);
+        nsSelectionBackground = nsSelectionBackground.colorUsingColorSpace (NSColorSpace.deviceRGBColorSpace ());
+    }
+
+    NSRect fullRect = new NSRect ();
+    fullRect.x = rect.x; fullRect.y = rect.y; fullRect.height = rect.height;
+    if (columnCount is 0) {
+        if (item.customWidth !is -1) {
+            fullRect.width = item.customWidth;
+        } else {
+            NSSize contentSize = cell.cellSizeForBounds (rect);
+            fullRect.width = contentSize.width;
+        }
+    } else {
+        NSSize spacing = tableView.intercellSpacing ();
+        fullRect.width = rect.width + spacing.width;
+    }
+
+    if (hooks (DWT.EraseItem)) {
+        NSRect eraseItemRect = null;
+        // TODO how to handle rearranged columns?  The third clause below ensures that
+        // there are either 0 columns or that column 0 is still the first physical column.
+        if (columnIndex is 0 && (style & DWT.CHECK) !is 0 && (columnCount is 0 || tableView.columnWithIdentifier (columns[0].nsColumn) is 1)) {
+            eraseItemRect = new NSRect ();
+            eraseItemRect.y = fullRect.y;
+            eraseItemRect.width = fullRect.x + fullRect.width;
+            eraseItemRect.height = fullRect.height;
+        } else {
+            eraseItemRect = fullRect;
+        }
+        GCData data = new GCData ();
+        data.paintRect = eraseItemRect;
+        GC gc = GC.cocoa_new (this, data);
+        gc.setFont (item.getFont (columnIndex));
+        if (isSelected) {
+            float /*double*/[] components = new float /*double*/[(int)/*64*/nsSelectionForeground.numberOfComponents ()];
+            nsSelectionForeground.getComponents (components);   
+            Color selectionForeground = Color.cocoa_new (display, components);
+            gc.setForeground (selectionForeground);
+            components = new float /*double*/[(int)/*64*/nsSelectionBackground.numberOfComponents ()];
+            nsSelectionBackground.getComponents (components);   
+            Color selectionBackground = Color.cocoa_new (display, components);
+            gc.setBackground (selectionBackground);
+        } else {
+            gc.setForeground (item.getForeground (columnIndex));
+            gc.setBackground (item.getBackground (columnIndex));
+        }
+
+        Event event = new Event ();
+        event.item = item;
+        event.gc = gc;
+        event.index = columnIndex;
+        event.detail = DWT.FOREGROUND;
+        if (drawBackground) event.detail |= DWT.BACKGROUND;
+        if (isSelected) event.detail |= DWT.SELECTED;
+        event.x = (int)eraseItemRect.x;
+        event.y = (int)eraseItemRect.y;
+        event.width = (int)eraseItemRect.width;
+        event.height = (int)eraseItemRect.height;
+        sendEvent (DWT.EraseItem, event);
+        gc.dispose ();
+        if (item.isDisposed ()) return;
+        if (!event.doit) {
+            drawForeground = drawBackground = drawSelection = false; 
+        } else {
+            drawBackground = drawBackground && (event.detail & DWT.BACKGROUND) !is 0;
+            drawForeground = (event.detail & DWT.FOREGROUND) !is 0;
+            drawSelection = drawSelection && (event.detail & DWT.SELECTED) !is 0;           
+        }
+
+        if (drawSelection) {
+            NSRect selectionRect = new NSRect ();
+            selectionRect.y = rect.y; selectionRect.height = rect.height;
+            if (columnCount > 0) {
+                NSRect columnRect = tableView.rectOfColumn (nsColumnIndex);
+                selectionRect.x = columnRect.x; selectionRect.width = columnRect.width;
+            } else {
+                NSRect rowRect = tableView.rectOfRow (rowIndex);
+                if ((style & DWT.CHECK) !is 0) {
+                    /* highlighting at this stage draws over the checkbox, so don't include its column */
+                    int checkWidth = (int)/*64*/checkColumn.width ();
+                    selectionRect.x = checkWidth;
+                    selectionRect.width = rowRect.width - checkWidth;
+                } else {
+                    selectionRect.width = rowRect.width;
+                }
+            }
+            callSuper (tableView.id, OS.sel_highlightSelectionInClipRect_, selectionRect);
+        }   
+    }
+
+    if (drawBackground && !drawSelection) {
+        NSGraphicsContext context = NSGraphicsContext.currentContext ();
+        context.saveGraphicsState ();
+        float[] colorRGB = background.handle;
+        NSColor color = NSColor.colorWithDeviceRed (colorRGB[0], colorRGB[1], colorRGB[2], 1f);
+        color.setFill ();
+        NSBezierPath.fillRect (fullRect);
+        context.restoreGraphicsState ();
+    }
+
+    if (drawForeground) {
+        cell.setHighlighted (false);
+        callSuper (id, sel, rect, view);
+    }
+
+    if (hooks (DWT.PaintItem)) {
+        NSRect contentRect = cell.titleRectForBounds (rect);
+        NSSize contentSize = cell.cellSizeForBounds (rect);
+
+        GCData data = new GCData ();
+        // TODO how to handle rearranged columns?  The third clause below ensures that
+        // there are either 0 columns or that column 0 is still the first physical column.
+        if (columnIndex is 0 && (style & DWT.CHECK) !is 0 && (columnCount is 0 || tableView.columnWithIdentifier (columns[0].nsColumn) is 1)) {
+            NSRect gcRect = new NSRect ();
+            gcRect.y = fullRect.y;
+            gcRect.width = fullRect.x + fullRect.width;
+            gcRect.height = fullRect.height;
+            data.paintRect = gcRect;
+        } else {
+            data.paintRect = fullRect;
+        }
+        GC gc = GC.cocoa_new (this, data);
+        gc.setFont (item.getFont (columnIndex));
+        if (isSelected) {
+            float /*double*/[] components = new float /*double*/[(int)/*64*/nsSelectionForeground.numberOfComponents ()];
+            nsSelectionForeground.getComponents (components);   
+            Color selectionForeground = Color.cocoa_new (display, components);
+            gc.setForeground (selectionForeground);
+            components = new float /*double*/[(int)/*64*/nsSelectionBackground.numberOfComponents ()];
+            nsSelectionBackground.getComponents (components);   
+            Color selectionBackground = Color.cocoa_new (display, components);
+            gc.setBackground (selectionBackground);
+            gc.setBackground (display.getSystemColor (DWT.COLOR_GREEN));
+        } else {
+            gc.setForeground (item.getForeground (columnIndex));
+            gc.setBackground (item.getBackground (columnIndex));
+        }
+
+        Event event = new Event ();
+        event.item = item;
+        event.gc = gc;
+        event.index = columnIndex;
+        if (isSelected) event.detail |= DWT.SELECTED;
+        event.x = (int)contentRect.x;
+        event.y = (int)contentRect.y;
+        event.width = (int)Math.ceil (contentSize.width);
+        event.height = (int)Math.ceil (fullRect.height);
+        sendEvent (DWT.PaintItem, event);
+        gc.dispose ();
+    }
+}
+
 void fixSelection (int index, bool add) {
     int [] selection = getSelectionIndices ();
     if (selection.length is 0) return;
@@ -756,6 +1013,15 @@
     return 20; //TODO - compute width
 }
 
+TableColumn getColumn (id id) {
+    for (int i = 0; i < columnCount; i++) {
+        if (columns[i].nsColumn.id is id.id) {
+            return columns[i]; 
+        }
+    }
+    return null;
+}
+
 /**
  * Returns the column at the given, zero-relative index in the
  * receiver. Throws an exception if the index is out of range.
@@ -839,12 +1105,11 @@
 public int [] getColumnOrder () {
     checkWidget ();
     int [] order = new int [columnCount];
-    int [] position = new int [1];
-    for (int i=0; i<columnCount; i++) {
+    for (int i = 0; i < columnCount; i++) {
         TableColumn column = columns [i];
-//      OS.GetDataBrowserTableViewColumnPosition (handle, column.id, position);
-//      if ((style & DWT.CHECK) !is 0) position [0] -= 1;
-        order [position [0]] = i;
+        int index = ((NSTableView)view).columnWithIdentifier (column.nsColumn);
+        if ((style & DWT.CHECK) !is 0) index -= 1;
+        order [index] = i;
     }
     return order;
 }
@@ -990,85 +1255,13 @@
  */
 public TableItem getItem (Point point) {
     checkWidget ();
-//  checkItems (true);
-//  if (point is null) error (DWT.ERROR_NULL_ARGUMENT);
-//  Rect rect = new Rect ();
-//  dwt.internal.carbon.Point pt = new dwt.internal.carbon.Point ();
-//  OS.SetPt (pt, cast(short) point.x, cast(short) point.y);
-//  if (0 < lastHittest && lastHittest <= itemCount && lastHittestColumn !is 0) {
-//      if (OS.GetDataBrowserItemPartBounds (handle, lastHittest, lastHittestColumn, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//          if (rect.top <= pt.v && pt.v <= rect.bottom) {
-//              if ((style & DWT.FULL_SELECTION) !is 0) {
-//                  return _getItem (lastHittest - 1);
-//              } else {
-//                  return OS.PtInRect (pt, rect) ? _getItem (lastHittest - 1) : null;
-//              }
-//          }
-//      }
-//          
-//  }
-//  int [] top = new int [1], left = new int [1];
-//    OS.GetDataBrowserScrollPosition(handle, top, left);
-//  short [] height = new short [1];
-//  OS.GetDataBrowserTableViewRowHeight (handle, height);
-//  short [] header = new short [1];
-//  OS.GetDataBrowserListViewHeaderBtnHeight (handle, header);
-//  int [] offsets = new int [] {0, 1, -1};
-//  for (int i = 0; i < offsets.length; i++) {
-//      int index = (top[0] - header [0] + point.y) / height [0] + offsets [i];
-//      if (0 <= index && index < itemCount) {
-//          if (columnCount is 0) {
-//              if (OS.GetDataBrowserItemPartBounds (handle, index + 1, column_id, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//                  if (rect.top <= pt.v && pt.v <= rect.bottom) {
-//                      if ((style & DWT.FULL_SELECTION) !is 0) {
-//                          return _getItem (index);
-//                      } else {
-//                          return OS.PtInRect (pt, rect) ? _getItem (index) : null;
-//                      }
-//                  }
-//              }
-//          } else {
-//              for (int j = 0; j < columnCount; j++) {
-//                  if (OS.GetDataBrowserItemPartBounds (handle, index + 1, columns [j].id, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//                      if (rect.top <= pt.v && pt.v <= rect.bottom) {
-//                          if ((style & DWT.FULL_SELECTION) !is 0) {
-//                              return _getItem (index);
-//                          } else {
-//                              return OS.PtInRect (pt, rect) ? _getItem (index) : null;
-//                          }
-//                      }
-//                  }
-//              }
-//          }
-//      }
-//  }
-//  //TODO - optimize
-//  for (int i=0; i<itemCount; i++) {
-//      if (columnCount is 0) {
-//          if (OS.GetDataBrowserItemPartBounds (handle, i + 1, column_id, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//              if (rect.top <= pt.v && pt.v <= rect.bottom) {
-//                  if ((style & DWT.FULL_SELECTION) !is 0) {
-//                      return _getItem (i);
-//                  } else {
-//                      return OS.PtInRect (pt, rect) ? _getItem (i) : null;
-//                  }
-//              }
-//          }
-//      } else {
-//          for (int j = 0; j < columnCount; j++) {
-//              if (OS.GetDataBrowserItemPartBounds (handle, i + 1, columns [j].id, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//                  if (rect.top <= pt.v && pt.v <= rect.bottom) {
-//                      if ((style & DWT.FULL_SELECTION) !is 0) {
-//                          return _getItem (i);
-//                      } else {
-//                          return OS.PtInRect (pt, rect) ? _getItem (i) : null;
-//                      }
-//                  }
-//              }
-//          }
-//      }
-//  }
-    return null;
+    NSTableView widget = (NSTableView)view;
+    NSPoint pt = new NSPoint();
+    pt.x = point.x;
+    pt.y = point.y;
+    int row = cast(int)/*64*/widget.rowAtPoint(pt);
+    if (row is -1) return null;
+    return items[row];
 }
 
 /**
@@ -1088,7 +1281,7 @@
 
 /**
  * Returns the height of the area which would be used to
- * display <em>one</em> of the items in the receiver's.
+ * display <em>one</em> of the items in the receiver.
  *
  * @return the height of one item
  *
@@ -1150,12 +1343,7 @@
  */
 public bool getLinesVisible () {
     checkWidget ();
-//  if (OS.VERSION >= 0x1040) {
-//      int [] attrib = new int [1];
-//      OS.DataBrowserGetAttributes (handle, attrib);
-//      return (attrib [0] & (OS.kDataBrowserAttributeListViewAlternatingRowColors | OS.kDataBrowserAttributeListViewDrawColumnDividers)) !is 0;
-//  }
-    return false;
+    return ((NSTableView)view).usesAlternatingRowBackgroundColors();
 }
 
 /**
@@ -1181,12 +1369,12 @@
         return new TableItem [0];
     }
     NSIndexSet selection = widget.selectedRowIndexes();
-    int count = selection.count();
-    int [] indexBuffer = new int [count];
+    int count = (int)/*64*/selection.count();
+    int /*long*/ [] indexBuffer = new int /*long*/ [count];
     selection.getIndexes(indexBuffer, count, 0);
     TableItem [] result = new TableItem  [count];
     for (int i=0; i<count; i++) {
-        result [i] = _getItem (indexBuffer [i]);
+        result [i] = _getItem ((int)/*64*/indexBuffer [i]);
     }
     return result;
 }
@@ -1203,7 +1391,7 @@
  */
 public int getSelectionCount () {
     checkWidget ();
-    return (cast(NSTableView)view).numberOfSelectedRows();
+    return cast(int)/*64*/(cast(NSTableView)view).numberOfSelectedRows();
 }
 
 /**
@@ -1218,9 +1406,16 @@
  * </ul>
  */
 public int getSelectionIndex () {
-    checkWidget();
-    //TODO - check empty selection case
-    return (cast(NSTableView)view).selectedRow();
+    checkWidget ();
+    NSTableView widget = (NSTableView)view;
+    if (widget.numberOfSelectedRows() is 0) {
+        return -1;
+    }
+    NSIndexSet selection = widget.selectedRowIndexes();
+    int count = (int)/*64*/selection.count();
+    int /*long*/ [] result = new int /*long*/ [count];
+    selection.getIndexes(result, count, 0);
+    return (int)/*64*/result [0];
 }
 
 /**
@@ -1246,9 +1441,13 @@
         return new int [0];
     }
     NSIndexSet selection = widget.selectedRowIndexes();
-    int count = selection.count();
+    int count = (int)/*64*/selection.count();
+    int /*long*/ [] indices = new int /*long*/ [count];
+    selection.getIndexes(indices, count, 0);
     int [] result = new int [count];
-    selection.getIndexes(result, count, 0);
+    for (int i = 0; i < indices.length; i++) {
+        result [i] = (int)/*64*/indices [i];
+    }
     return result;
 }
 
@@ -1307,15 +1506,22 @@
  * </ul>
  */
 public int getTopIndex () {
-    checkWidget();
+    checkWidget ();
     //TODO - partial item at the top
     NSRect rect = scrollView.documentVisibleRect();
     NSPoint point = new NSPoint();
     point.x = rect.x;
     point.y = rect.y;
-    return (cast(NSTableView)view).rowAtPoint(point);
+    return csat(int)/*64*/(cast(NSTableView)view).rowAtPoint(point);
 }
 
+void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*/ rect) {
+    if (!hooks (DWT.EraseItem)) {
+        NSRect clipRect = new NSRect ();
+        OS.memmove (clipRect, rect, NSRect.sizeof);
+        callSuper (id, sel, clipRect);
+    }
+}
 
 /**
  * Searches the receiver's list starting at the first column
@@ -1394,15 +1600,26 @@
  * </ul>
  */
 public bool isSelected (int index) {
-    checkWidget();
-    //TODO - range check
+    checkWidget ();
+    if (!(0 <= index && index < itemCount)) return false;
     return (cast(NSTableView)view).isRowSelected(index);
 }
 
-int numberOfRowsInTableView(int aTableView) {
+bool isTrim (NSView view) {
+    if (super.isTrim (view)) return true;
+    return view.id is headerView.id;
+}
+
+int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) {
     return itemCount;
 }
 
+void register () {
+    super.register ();
+    display.addWidget (headerView, this);
+    display.addWidget (dataCell, this);
+}
+
 void releaseChildren (bool destroy) {
     if (items !is null) {
         for (int i=0; i<itemCount; i++) {
@@ -1433,6 +1650,8 @@
     firstColumn = null;
     if (checkColumn !is null) checkColumn.release();
     checkColumn = null;
+    if (dataCell !is null) dataCell.release();
+    dataCell = null;
 }
 
 void releaseWidget () { 
@@ -1456,7 +1675,7 @@
  * </ul>
  */
 public void remove (int index) {
-    checkWidget();
+    checkWidget ();
     if (!(0 <= index && index < itemCount)) error (DWT.ERROR_INVALID_RANGE);
     TableItem item = items [index];
     if (item !is null) item.release (false);
@@ -1488,7 +1707,7 @@
  * </ul>
  */
 public void remove (int start, int end) {
-    checkWidget();
+    checkWidget ();
     if (start > end) return;
     if (!(0 <= start && start <= end && end < itemCount)) {
         error (DWT.ERROR_INVALID_RANGE);
@@ -1546,7 +1765,7 @@
  * </ul>
  */
 public void removeAll () {
-    checkWidget();
+    checkWidget ();
     for (int i=0; i<itemCount; i++) {
         TableItem item = items [i];
         if (item !is null && !item.isDisposed ()) item.release (false);
@@ -1593,13 +1812,13 @@
  * </ul>
  */
 public void select (int index) {
-    checkWidget();
+    checkWidget ();
     if (0 <= index && index < itemCount) {
         NSIndexSet indexes = cast(NSIndexSet)new NSIndexSet().alloc();
         indexes.initWithIndex(index);
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
-        (cast(NSTableView)view).selectRowIndexes(indexes, true);
+        widget.selectRowIndexes(indexes, (style & DWT.MULTI) !is 0);
         ignoreSelect = false;
     }
 }
@@ -1644,7 +1863,7 @@
         indexes.initWithIndexesInRange(range);
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
-        widget.selectRowIndexes(indexes, true);
+        widget.selectRowIndexes(indexes, (style & DWT.MULTI) !is 0);
         ignoreSelect = false;
     }
 }
@@ -1680,7 +1899,7 @@
     int count = 0;
     NSMutableIndexSet indexes = cast(NSMutableIndexSet)new NSMutableIndexSet().alloc().init();
     for (int i=0; i<length; i++) {
-        int index = indices [length - i - 1];
+        int index = indices [i];
         if (index >= 0 && index < itemCount) {
             indexes.addIndex (indices [i]);
             count++;
@@ -1689,7 +1908,7 @@
     if (count > 0) {
         NSTableView widget = cast(NSTableView)view;
         ignoreSelect = true;
-        widget.selectRowIndexes(indexes, true);
+        widget.selectRowIndexes(indexes, (style & DWT.MULTI) !is 0);
         ignoreSelect = false;
     }
 }
@@ -1723,6 +1942,17 @@
     ignoreSelect = false;
 }
 
+void setBackground (float [] color) {
+    super.setBackground (color);
+    NSColor nsColor;
+    if (color is null) {
+        nsColor = null;
+    } else {
+        nsColor = NSColor.colorWithDeviceRed (color [0], color [1], color [2], 1);
+    }
+    ((NSTableView) view).setBackgroundColor (nsColor);
+}
+
 /**
  * Sets the order that the items in the receiver should 
  * be displayed in to the given argument which is described
@@ -1766,27 +1996,21 @@
         if (order [i] !is oldOrder [i]) reorder = true;
     }
     if (reorder) {
-        int x = 0;
-        short [] width = new short [1];
+        NSTableView tableView = (NSTableView)view;
         int [] oldX = new int [oldOrder.length];
+        int check = (style & DWT.CHECK) !is 0 ? 1 : 0;
         for (int i=0; i<oldOrder.length; i++) {
-            int index = oldOrder [i];
-            TableColumn column = columns [index];
-            oldX [index] =  x;
-//          OS.GetDataBrowserTableViewNamedColumnWidth(handle, column.id, width);
-            x += width [0];
+            int index = oldOrder[i];
+            oldX [index] = (int)tableView.rectOfColumn (i + check).x;
         }
-        x = 0;
         int [] newX = new int [order.length];
         for (int i=0; i<order.length; i++) {
             int index = order [i];
-            TableColumn column = columns [index];
-            int position = (style & DWT.CHECK) !is 0 ? i + 1 : i;
-//          OS.SetDataBrowserTableViewColumnPosition(handle, column.id, position);
-//          column.lastPosition = position;
-            newX [index] =  x;
-//          OS.GetDataBrowserTableViewNamedColumnWidth(handle, column.id, width);
-            x += width [0];
+            TableColumn column = columns[index];
+            int oldIndex = tableView.columnWithIdentifier (column.nsColumn);
+            int newIndex = i + check;
+            tableView.moveColumn (oldIndex, newIndex);
+            newX [index] = (int)tableView.rectOfColumn (newIndex).x;
         }
         TableColumn[] newColumns = new TableColumn [columnCount];
         System.arraycopy (columns, 0, newColumns, 0, columnCount);
@@ -1801,6 +2025,17 @@
     }
 }
 
+void setFont(NSFont font) {
+    super.setFont (font);
+    if (!hooks (DWT.MeasureItem)) {
+        float ascent = font.ascender ();
+        float descent = -font.descender () + font.leading ();
+        ((NSTableView)view).setRowHeight ((int)Math.ceil (ascent + descent) + 1);
+    } else {
+        view.setNeedsDisplay (true);
+    }
+}
+
 /**
  * Marks the receiver's header as visible if the argument is <code>true</code>,
  * and marks it invisible otherwise. 
@@ -1836,49 +2071,33 @@
  */
 public void setItemCount (int count) {
     checkWidget ();
-//  checkItems (true);
-//  count = Math.max (0, count);
-//  if (count is itemCount) return;
-//  setRedraw (false);
-//    int[] top = new int [1], left = new int [1];
-//    OS.GetDataBrowserScrollPosition (handle, top, left);
-//    DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();
-//  OS.GetDataBrowserCallbacks (handle, callbacks);
-//  callbacks.v1_itemNotificationCallback = 0;
-//  callbacks.v1_itemCompareCallback = 0;
-//  OS.SetDataBrowserCallbacks (handle, callbacks);
-//  if (count < itemCount) {
-//      int index = count;
-//      int[] id = new int [itemCount - count];
-//      while (index < itemCount) {
-//          TableItem item = items [index];
-//          if (item !is null) item.release (false);
-//          id [index-count] = index + 1;
-//          index++;
-//      }
-//      OS.RemoveDataBrowserItems (handle, OS.kDataBrowserNoItem, id.length, id, 0);
-//      int [] newItemCount = new int [1];
-//      if (OS.GetDataBrowserItemCount (handle, OS.kDataBrowserNoItem, true, OS.kDataBrowserItemAnyState, newItemCount) !is OS.noErr) {
-//          error (DWT.ERROR_CANNOT_GET_COUNT);
-//      }
-//      if (count !is newItemCount[0]) error (DWT.ERROR_ITEM_NOT_REMOVED);
-//  }
-//  int length = Math.max (4, (count + 3) / 4 * 4);
-//  TableItem [] newItems = new TableItem [length];
-//  System.arraycopy (items, 0, newItems, 0, Math.min (count, itemCount));
-//  items = newItems;
-//  if ((style & DWT.VIRTUAL) is 0) {
-//      for (int i=itemCount; i<count; i++) {
-//          items [i] = new TableItem (this, DWT.NONE, i, false);
-//      }
-//  }
-//  itemCount = count;
-//  OS.AddDataBrowserItems (handle, 0, itemCount, null, OS.kDataBrowserItemNoProperty);
-//  callbacks.v1_itemNotificationCallback = display.itemNotificationProc;
-//  callbacks.v1_itemCompareCallback = itemCompareProc ();
-//  OS.SetDataBrowserCallbacks (handle, callbacks);
-//  fixScrollBar ();
-//  setRedraw (true);
+    count = Math.max (0, count);
+    if (count is itemCount) return;
+    if (count is itemCount) return;
+    TableItem [] children = items;
+    if (count < itemCount) {
+        for (int index = count; index < itemCount; index ++) {
+            TableItem item = children [index];
+            if (item !is null && !item.isDisposed()) item.release (false);
+        }
+    }
+    if (count > itemCount) {
+        if ((getStyle() & DWT.VIRTUAL) is 0) {
+            for (int i=itemCount; i<count; i++) {
+                new TableItem (this, DWT.NONE, i, true);
+            }
+            return;
+        } 
+    }
+    int length = Math.max (4, (count + 3) / 4 * 4);
+    TableItem [] newItems = new TableItem [length];
+    if (children !is null) {
+        System.arraycopy (items, 0, children, 0, Math.min (count, itemCount));
+    }
+    children = newItems;
+    this.items = newItems;
+    this.itemCount = count;
+    ((NSTableView) view).noteNumberOfRowsChanged ();
 }
 
 /*public*/ void setItemHeight (int itemHeight) {
@@ -1891,6 +2110,14 @@
     }
 }
 
+public void setRedraw (bool redraw) {
+    checkWidget ();
+    super.setRedraw (redraw);
+    if (redraw && drawCount is 0) {
+        setScrollWidth ();
+    }
+}
+
 /**
  * Marks the receiver's lines as visible if the argument is <code>true</code>,
  * and marks it invisible otherwise. 
@@ -1912,57 +2139,44 @@
     (cast(NSTableView)view).setUsesAlternatingRowBackgroundColors(show);
 }
 
-bool setScrollWidth (TableItem item) {
+bool setScrollWidth () {
+    return setScrollWidth (items, true);
+}
+
+bool setScrollWidth (TableItem item, bool callMeasureItem) {
+    return setScrollWidth (new TableItem[] {item}, callMeasureItem);
+}
+
+bool setScrollWidth (TableItem items[], bool callMeasureItem) {
     if (columnCount !is 0) return false;
     if (currentItem !is null) {
 //      if (currentItem !is item) fixScrollWidth = true;
         return false;
     }
-    if (drawCount !is 0) return false;
+    if (/*ignoreRedraw ||*/ drawCount !is 0) return false;
+    int newWidth = 0;
     GC gc = new GC (this);
-    int newWidth = item.calculateWidth (0, gc);
-    gc.dispose ();
-    newWidth += getInsetWidth ();
-//  short [] width = new short [1];
-//  OS.GetDataBrowserTableViewNamedColumnWidth (handle, column_id, width);
-//  if (width [0] < newWidth) {
-//      OS.SetDataBrowserTableViewNamedColumnWidth (handle, column_id, cast(short) newWidth);
-//      return true;
-//  }
-    if (firstColumn.width() < newWidth) {
-        firstColumn.setWidth (newWidth);
-    }
-    return false;
-}
-
-bool setScrollWidth (TableItem [] items, bool set) {
-    if (columnCount !is 0) return false;
-    if (currentItem !is null) {
-//      fixScrollWidth = true;
-        return false;
-    }
-    if (drawCount !is 0) return false;
-    GC gc = new GC (this);
-    int newWidth = 0;
     for (int i = 0; i < items.length; i++) {
-        TableItem item = items [i];
-        if (item !is null) {
-            newWidth = Math.max (newWidth, item.calculateWidth (0, gc));
+        TableItem item = items[i];
+        if (item !is null && !item.isDisposed ()) {
+            newWidth = Math.max (newWidth, item.calculateWidth (0, gc, callMeasureItem));
+            if (isDisposed ()) {
+                gc.dispose ();
+                return false;
+            }
         }
     }
     gc.dispose ();
     newWidth += getInsetWidth ();
-//  if (!set) {
-//      short [] width = new short [1];
-//      OS.GetDataBrowserTableViewNamedColumnWidth (handle, column_id, width);
-//      if (width [0] >= newWidth) return false;
-//  }
-//  OS.SetDataBrowserTableViewNamedColumnWidth (handle, column_id, cast(short) newWidth);
-    if (!set) {
-        if (firstColumn.width() > newWidth) return false;
+    if (firstColumn.width () < newWidth) {
+        NSTableView tableView = (NSTableView)view;
+        int /*long*/ oldResize = tableView.columnAutoresizingStyle ();
+        tableView.setColumnAutoresizingStyle (OS.NSTableViewNoColumnAutoresizing);
+        firstColumn.setWidth (newWidth);
+        tableView.setColumnAutoresizingStyle (oldResize);
+        return true;
     }
-    firstColumn.setWidth (newWidth);
-    return true;
+    return false;
 }
 
 /**
@@ -1980,14 +2194,14 @@
  * @see Table#select(int)
  */
 public void setSelection (int index) {
-    checkWidget();
+    checkWidget ();
     //TODO - optimize to use expand flag
     deselectAll ();
     setSelection (index, false);
 }
 
 void setSelection (int index, bool notify) {
-//  checkWidget();
+//  checkWidget ();
     if (0 <= index && index < itemCount) {
         select (index);
         showIndex (index);
@@ -2158,25 +2372,21 @@
     checkWidget ();
     if (column !is null && column.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     if (column is sortColumn) return;
-//  DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();
-//  OS.GetDataBrowserCallbacks (handle, callbacks);
-//  callbacks.v1_itemCompareCallback = display.itemCompareProc;
-//  OS.SetDataBrowserCallbacks (handle, callbacks);
-//  if (column is null) {
-//      if (sortColumn !is null  && !sortColumn.isDisposed ()  && sortDirection !is DWT.NONE) {
-//          OS.SetDataBrowserSortOrder (handle, cast(short) OS.kDataBrowserOrderIncreasing);
-//          sortColumn = null; 
-//          OS.SetDataBrowserSortProperty (handle, 0);
-//      }
-//  }
-//  sortColumn = column;
-//  if (sortColumn !is null  && !sortColumn.isDisposed () && sortDirection !is DWT.NONE) {
-//      OS.SetDataBrowserSortProperty (handle, sortColumn.id);
-//      int order = sortDirection is DWT.DOWN ? OS.kDataBrowserOrderDecreasing : OS.kDataBrowserOrderIncreasing;
-//      OS.SetDataBrowserSortOrder (handle, cast(short) order);
-//  }
-//  callbacks.v1_itemCompareCallback = itemCompareProc ();
-//  OS.SetDataBrowserCallbacks (handle, callbacks);
+    TableColumn oldSortColumn = sortColumn;
+    sortColumn = column;
+    if (sortDirection is DWT.NONE) return;
+    NSTableHeaderView headerView = ((NSTableView)view).headerView ();
+    if (headerView is null) return;
+    if (oldSortColumn !is null) {
+        NSInteger index = ((NSTableView)view).columnWithIdentifier (oldSortColumn.nsColumn);
+        NSRect rect = headerView.headerRectOfColumn (index);
+        headerView.setNeedsDisplayInRect (rect);
+    }
+    if (sortColumn !is null) {
+        int /*long*/ index = ((NSTableView)view).columnWithIdentifier (sortColumn.nsColumn);
+        NSRect rect = headerView.headerRectOfColumn (index);
+        headerView.setNeedsDisplayInRect (rect);
+    }
 }
 
 /**
@@ -2197,26 +2407,12 @@
     if (direction !is DWT.UP && direction !is DWT.DOWN && direction !is DWT.NONE) return;
     if (direction is sortDirection) return;
     sortDirection = direction;
-//  DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();
-//  OS.GetDataBrowserCallbacks (handle, callbacks);
-//  callbacks.v1_itemCompareCallback = display.itemCompareProc;
-//  OS.SetDataBrowserCallbacks (handle, callbacks);
-//  if (sortColumn !is null && !sortColumn.isDisposed ()) {
-//      if (sortDirection is DWT.NONE) {
-//          OS.SetDataBrowserSortOrder (handle, cast(short) OS.kDataBrowserOrderIncreasing);
-//          TableColumn column = sortColumn;
-//          sortColumn = null; 
-//          OS.SetDataBrowserSortProperty (handle, 0);
-//          sortColumn = column;
-//      } else {
-//          OS.SetDataBrowserSortProperty (handle, 0);
-//          OS.SetDataBrowserSortProperty (handle, sortColumn.id);
-//          int order = sortDirection is DWT.DOWN ? OS.kDataBrowserOrderDecreasing : OS.kDataBrowserOrderIncreasing;
-//          OS.SetDataBrowserSortOrder (handle, cast(short) order);
-//      }
-//  }
-//  callbacks.v1_itemCompareCallback = itemCompareProc ();
-//  OS.SetDataBrowserCallbacks (handle, callbacks);
+    if (sortColumn is null) return;
+    NSTableHeaderView headerView = ((NSTableView)view).headerView ();
+    if (headerView is null) return;
+    int /*long*/ index = ((NSTableView)view).columnWithIdentifier (sortColumn.nsColumn);
+    NSRect rect = headerView.headerRectOfColumn (index);
+    headerView.setNeedsDisplayInRect (rect);
 }
 
 void setTableEmpty () {
@@ -2237,7 +2433,7 @@
  * </ul>
  */
 public void setTopIndex (int index) {
-    checkWidget();
+    checkWidget ();
     NSRect rect = (cast(NSTableView)view).rectOfRow(index);
     (cast(NSTableView)view).scrollRectToVisible(rect);
 }
@@ -2265,9 +2461,10 @@
     if (column is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (column.isDisposed()) error(DWT.ERROR_INVALID_ARGUMENT);
     if (column.parent !is this) return;
-    int index = indexOf (column);
-    if (columnCount <= 1 || !(0 <= index && index < columnCount)) return;
-    (cast(NSTableView)view).scrollColumnToVisible(index + ((style & DWT.CHECK) !is 0 ? 1 : 0));
+    if (columnCount <= 1) return;
+    int index = (int)/*64*/((NSTableView)view).columnWithIdentifier (column.nsColumn);
+    if (!(0 <= index && index < columnCount + ((style & DWT.CHECK) !is 0 ? 1 : 0))) return;
+    ((NSTableView)view).scrollColumnToVisible (index);
 }
 
 void showIndex (int index) {
@@ -2315,7 +2512,7 @@
  * @see Table#showItem(TableItem)
  */
 public void showSelection () {
-    checkWidget();
+    checkWidget ();
     int index = getSelectionIndex ();
     if (index >= 0) showIndex (index);
 }
@@ -2324,67 +2521,175 @@
     postEvent (DWT.DefaultSelection);
 }
 
-void tableViewSelectionDidChange (int aNotification) {
-    if (ignoreSelect) return;
-    NSTableView widget = cast(NSTableView)view;
-    int row = widget.selectedRow();
-    if(row is -1)
-        postEvent(DWT.Selection);
-    else {
-        TableItem item = _getItem(row);
-        Event event = new Event();
-        event.item = item;
-        event.index = row;
-        postEvent(DWT.Selection, event);
+bool sendKeyEvent (NSEvent nsEvent, int type) {
+    bool result = super.sendKeyEvent (nsEvent, type);
+    if (!result) return result;
+    if (type !is DWT.KeyDown) return result;
+    short keyCode = nsEvent.keyCode ();
+    switch (keyCode) {
+        case 76: /* KP Enter */
+        case 36: { /* Return */
+            postEvent (DWT.DefaultSelection);
+            break;
+        }
+    }
+    return result;
+}
+
+void tableViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    NSNotification notification = new NSNotification (aNotification);
+    NSDictionary userInfo = notification.userInfo ();
+    id nsOldIndex = userInfo.valueForKey (NSString.stringWith ("NSOldColumn")); //$NON-NLS-1$
+    id nsNewIndex = userInfo.valueForKey (NSString.stringWith ("NSNewColumn")); //$NON-NLS-1$
+    int oldIndex = new NSNumber (nsOldIndex).intValue ();
+    int newIndex = new NSNumber (nsNewIndex).intValue ();
+    int startIndex = Math.min (oldIndex, newIndex);
+    int endIndex = Math.max (oldIndex, newIndex);
+    NSTableView tableView = (NSTableView)view;
+    NSArray nsColumns = tableView.tableColumns ();
+    for (int i = startIndex; i <= endIndex; i++) {
+        id columnId = nsColumns.objectAtIndex (i);
+        TableColumn column = getColumn (columnId);
+        if (column !is null) {
+            column.sendEvent (DWT.Move);
+            if (isDisposed ()) return;
+        }
     }
 }
 
-int tableView_objectValueForTableColumn_row(int aTableView, int aTableColumn, int rowIndex) {
-    TableItem item = items [rowIndex];
+void tableViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    NSNotification notification = new NSNotification (aNotification);
+    NSDictionary userInfo = notification.userInfo ();
+    id columnId = userInfo.valueForKey (NSString.stringWith ("NSTableColumn")); //$NON-NLS-1$
+    TableColumn column = getColumn (columnId);
+    if (column is null) return; /* either CHECK column or firstColumn in 0-column Table */
+
+    column.sendEvent (DWT.Resize);
+    if (isDisposed ()) return;
+
+    NSTableView tableView = (NSTableView)view;
+    int index = (int)/*64*/tableView.columnWithIdentifier (columnId);
+    if (index is -1) return; /* column was disposed in Resize callback */
+
+    NSArray nsColumns = tableView.tableColumns ();
+    int columnCount = (int)/*64*/tableView.numberOfColumns ();
+    for (int i = index + 1; i < columnCount; i++) {
+        columnId = nsColumns.objectAtIndex (i);
+        column = getColumn (columnId);
+        if (column !is null) {
+            column.sendEvent (DWT.Move);
+            if (isDisposed ()) return;
+        }
+    }
+}
+
+void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    if (ignoreSelect) return;
+    NSTableView widget = cast(NSTableView) view;
+    int row = (int)/*64*/widget.selectedRow ();
+    if(row is -1)
+        postEvent (DWT.Selection);
+    else {
+        TableItem item = _getItem (row);
+        Event event = new Event ();
+        event.item = item;
+        event.index = row;
+        postEvent (DWT.Selection, event);
+    }
+}
+
+void tableView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ tableColumn) {
+    TableColumn column = getColumn (new id (tableColumn));
+    column.postEvent (DWT.Selection);
+}
+
+int /*long*/ tableView_objectValueForTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+    TableItem item = _getItem ((int)/*64*/rowIndex);
     if (checkColumn !is null && aTableColumn is checkColumn.id) {
         NSNumber value;
         if (item.checked && item.grayed) {
-            value = NSNumber.numberWithInt(OS.NSMixedState);
+            value = NSNumber.numberWithInt (OS.NSMixedState);
         } else {
-            value = NSNumber.numberWithInt(item.checked ? OS.NSOnState : OS.NSOffState);
+            value = NSNumber.numberWithInt (item.checked ? OS.NSOnState : OS.NSOffState);
         }
         return value.id;
     }
     for (int i=0; i<columnCount; i++) {
         if (columns [i].nsColumn.id is aTableColumn) {
-            return item.createString(i).id;
+            return item.createString (i).id;
         }
     }
-    return item.createString(0).id;
+    return item.createString (0).id;
 }
 
-void tableView_setObjectValue_forTableColumn_row(int aTableView, int anObject, int aTableColumn, int rowIndex) {
-    TableItem item = items [rowIndex];
+void tableView_setObjectValue_forTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
     if (checkColumn !is null && aTableColumn is checkColumn.id)  {
+        TableItem item = items [(int)/*64*/rowIndex];
         item.checked = !item.checked;
-        Event event = new Event();
+        Event event = new Event ();
         event.detail = DWT.CHECK;
         event.item = item;
-        event.index = rowIndex;
-        postEvent(DWT.Selection, event);
+        event.index = (int)/*64*/rowIndex;
+        postEvent (DWT.Selection, event);
+        NSTableView tableView = (NSTableView)view;
+        NSRect rect = tableView.rectOfRow (rowIndex);
+        tableView.setNeedsDisplayInRect (rect);
     }
 }
 
-bool tableView_shouldEditTableColumn_row(int aTableView, int aTableColumn, int rowIndex) {
+bool tableView_shouldEditTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
     return false;
 }
 
-void tableView_willDisplayCell_forTableColumn_row(int aTableView, int aCell, int aTableColumn, int rowIndex) {
+void tableView_willDisplayCell_forTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aCell, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
     if (checkColumn !is null && aTableColumn is checkColumn.id) return;
-    TableItem item = items [rowIndex];
+    TableItem item = items [(int)/*64*/rowIndex];
     Image image = item.image;
+    int columnIndex = 0;
     for (int i=0; i<columnCount; i++) {
         if (columns [i].nsColumn.id is aTableColumn) {
-            image = item.getImage(i);
+            image = item.getImage (i);
+            columnIndex = i;
         }
     }
-    NSBrowserCell cell = new NSBrowserCell(aCell);
-    cell.setImage(image !is null ? image.handle : null);
-    cell.setLeaf(true);
+    NSBrowserCell cell = new NSBrowserCell (aCell);
+    cell.setFont (item.getFont (columnIndex).handle);
+    cell.setImage (image !is null ? image.handle : null);
+    cell.setLeaf (true);
+
+    if (hooks (DWT.MeasureItem)) {
+        NSTableView tableView = (NSTableView)this.view;
+        int nsColumnIndex = (int)/*64*/tableView.columnWithIdentifier (new id (aTableColumn));
+        NSRect rect = tableView.frameOfCellAtColumn (nsColumnIndex, rowIndex);
+        NSRect contentRect = cell.titleRectForBounds (rect);
+        NSSize contentSize = cell.cellSizeForBounds (rect);
+
+        GCData data = new GCData ();
+        data.paintRect = tableView.frame ();
+        GC gc = GC.cocoa_new (this, data);
+        gc.setFont (item.getFont (columnIndex));
+        int rowHeight = (int)tableView.rowHeight ();
+        Event event = new Event ();
+        event.item = item;
+        event.gc = gc;
+        event.index = columnIndex;
+        event.x = (int)contentRect.x;
+        event.y = (int)contentRect.y;
+        event.width = (int)Math.ceil (contentSize.width);
+        event.height = rowHeight;
+        sendEvent (DWT.MeasureItem, event);
+        gc.dispose ();
+        if (isDisposed ()) return;
+        if (rowHeight < event.height) {
+            tableView.setRowHeight(event.height);
+        }
+        if (columnCount is 0) {
+            int change = event.width - (item.customWidth !is -1 ? item.customWidth : (int)Math.ceil (contentSize.width));
+            if (item.customWidth !is -1 || event.width !is (int)Math.ceil (contentSize.width)) {
+                item.customWidth = event.width; 
+            }
+            if (change !is 0) setScrollWidth (item, false);
+        }
+    }
 }
 }
--- a/dwt/widgets/TableColumn.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/TableColumn.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,8 +20,19 @@
 import dwt.events.SelectionListener;
 import dwt.graphics.GC;
 import dwt.graphics.Image;
+import dwt.internal.cocoa.NSAffineTransform;
+import dwt.internal.cocoa.NSAttributedString;
+import dwt.internal.cocoa.NSGraphicsContext;
+import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSMutableParagraphStyle;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTableColumn;
+import dwt.internal.cocoa.NSTableHeaderCell;
+import dwt.internal.cocoa.NSTableHeaderView;
+import dwt.internal.cocoa.NSTableView;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 
 /**
@@ -37,11 +48,16 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#table">Table, TableItem, TableColumn snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class TableColumn : Item {
     Table parent;
     NSTableColumn nsColumn;
-    String toolTipText;
+    String toolTipText, displayText;
+
+    static final int MARGIN = 2;
 
 /**
  * Constructs a new instance of this class given its parent
@@ -78,7 +94,7 @@
 public this (Table parent, int style) {
     super (parent, checkStyle (style));
     this.parent = parent;
-    parent.createItem (this, parent.getColumnCount ());
+    parent.createItem (this, parent.columnCount);
 }
 
 /**
@@ -95,7 +111,10 @@
  * lists the style constants that are applicable to the class.
  * Style bits are also inherited from superclasses.
  * </p>
- *
+ * <p>
+ * Note that due to a restriction on some platforms, the first column
+ * is always left aligned.
+ * </p>
  * @param parent a composite control which will be the parent of the new instance (cannot be null)
  * @param style the style of control to construct
  * @param index the zero-relative index to store the receiver in its parent
@@ -188,11 +207,110 @@
     if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS);
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (nsColumn.headerCell());
+}
+
 void destroyWidget () {
     parent.destroyItem (this);
     releaseHandle ();
 }
 
+void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) {
+    NSRect cellRect = new NSRect ();
+    OS.memmove (cellRect, cellFrame, NSRect.sizeof);
+
+    /*
+     * Feature in Cocoa.  When the last column in a table does not reach the
+     * rightmost edge of the table view, the cell that draws the rightmost-
+     * column's header is also invoked to draw the header space between its
+     * right edge and the table's right edge.  If this case is detected then
+     * nothing should be drawn.
+     */
+    NSTableView tableView = (NSTableView)parent.view;
+    int columnIndex = (int)/*64*/tableView.columnWithIdentifier (nsColumn);
+    NSRect headerRect = parent.headerView.headerRectOfColumn (columnIndex);
+    if (headerRect.x !is cellRect.x || headerRect.width !is cellRect.width) return;
+
+    NSGraphicsContext context = NSGraphicsContext.currentContext ();
+    context.saveGraphicsState ();
+
+    int contentWidth = 0;
+    NSSize stringSize = null, imageSize = null;
+    NSAttributedString attrString = null;
+    NSTableHeaderCell headerCell = nsColumn.headerCell ();
+    if (displayText !is null) {
+        NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
+        dict.setObject (headerCell.font (), OS.NSFontAttributeName);
+        NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
+        paragraphStyle.autorelease ();
+        paragraphStyle.setLineBreakMode (OS.NSLineBreakByClipping);
+        dict.setObject (paragraphStyle, OS.NSParagraphStyleAttributeName);
+        NSString string = NSString.stringWith (displayText);
+        attrString = ((NSAttributedString)new NSAttributedString ().alloc ()).initWithString (string, dict);
+        stringSize = attrString.size ();
+        contentWidth += Math.ceil (stringSize.width);
+        if (image !is null) contentWidth += MARGIN; /* space between image and text */
+    }
+    if (image !is null) {
+        imageSize = image.handle.size ();
+        contentWidth += Math.ceil (imageSize.width);
+    }
+
+    if (parent.sortColumn is this && parent.sortDirection !is DWT.NONE) {
+        bool ascending = parent.sortDirection is DWT.UP;
+        headerCell.drawSortIndicatorWithFrame (cellRect, new NSView(view), ascending, 0);
+        /* remove the arrow's space from the available drawing width */
+        NSRect sortRect = headerCell.sortIndicatorRectForBounds (cellRect);
+        cellRect.width = Math.max (0, sortRect.x - cellRect.x);
+    }
+
+    int drawX = 0;
+    if ((style & DWT.CENTER) !is 0) {
+        drawX = (int)(cellRect.x + Math.max (MARGIN, ((cellRect.width - contentWidth) / 2)));
+    } else if ((style & DWT.RIGHT) !is 0) {
+        drawX = (int)(cellRect.x + Math.max (MARGIN, cellRect.width - contentWidth - MARGIN));
+    } else {
+        drawX = (int)cellRect.x + MARGIN;
+    }
+
+    if (image !is null) {
+        NSRect destRect = new NSRect ();
+        destRect.x = drawX;
+        destRect.y = cellRect.y;
+        destRect.width = Math.min (imageSize.width, cellRect.width - 2 * MARGIN);
+        destRect.height = Math.min (imageSize.height, cellRect.height);
+        bool isFlipped = new NSView (view).isFlipped(); 
+        if (isFlipped) {
+            context.saveGraphicsState ();
+            NSAffineTransform transform = NSAffineTransform.transform ();
+            transform.scaleXBy (1, -1);
+            transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
+            transform.concat ();
+        }
+        NSRect sourceRect = new NSRect ();
+        sourceRect.width = destRect.width;
+        sourceRect.height = destRect.height;
+        image.handle.drawInRect (destRect, sourceRect, OS.NSCompositeSourceOver, 1f);
+        if (isFlipped) context.restoreGraphicsState ();
+        drawX += destRect.width;
+    }
+
+    if (displayText !is null && displayText.length () > 0) {
+        if (image !is null) drawX += MARGIN; /* space between image and text */
+        NSRect destRect = new NSRect ();
+        destRect.x = drawX;
+        destRect.y = cellRect.y;
+        destRect.width = Math.min (stringSize.width, cellRect.x + cellRect.width - MARGIN - drawX);
+        destRect.height = Math.min (stringSize.height, cellRect.height);
+        attrString.drawInRect (destRect);
+        attrString.release ();
+    }
+
+    context.restoreGraphicsState ();
+}
+
 /**
  * Returns a value which describes the position of the
  * text or image in the receiver. The value will be one of
@@ -323,14 +441,47 @@
  */
 public void pack () {
     checkWidget ();
+
+    int width = 0;
+
+    /* compute header width */
+    if (displayText !is null) {
+        NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity (4);
+        NSTableHeaderCell headerCell = nsColumn.headerCell ();
+        dict.setObject (headerCell.font (), OS.NSFontAttributeName);
+        NSString string = NSString.stringWith (displayText);
+        NSAttributedString attrString = ((NSAttributedString)new NSAttributedString ().alloc ()).initWithString (string, dict);
+        NSSize stringSize = attrString.size ();
+        attrString.release ();
+        width += Math.ceil (stringSize.width);
+        if (image !is null) width += MARGIN; /* space between image and text */
+    }
+    if (image !is null) {
+        NSSize imageSize = image.handle.size ();
+        width += Math.ceil (imageSize.width);
+    }
+    if (parent.sortColumn is this && parent.sortDirection !is DWT.NONE) {
+        NSTableHeaderCell headerCell = nsColumn.headerCell ();
+        NSRect rect = new NSRect ();
+        rect.width = rect.height = Float.MAX_VALUE;
+        NSSize cellSize = headerCell.cellSizeForBounds (rect);
+        rect.height = cellSize.height;
+        NSRect sortRect = headerCell.sortIndicatorRectForBounds (rect);
+        width += Math.ceil (sortRect.width);
+    }
+
+    /* compute item widths down column */
     GC gc = new GC (parent);
-    int width = gc.stringExtent (text).x;
-    //TODO header extra
     int index = parent.indexOf (this);
     for (int i=0; i<parent.itemCount; i++) {
         TableItem item = parent.items [i];
-        if (item !is null && item.cached) {
-            width = Math.max (width, item.calculateWidth (index, gc));
+        if (item !is null && !item.isDisposed () && item.cached) {
+            width = Math.max (width, item.calculateWidth (index, gc, true));
+            if (isDisposed ()) {
+                gc.dispose ();
+                return;
+            }
+            if (gc.isDisposed ()) gc = new GC (parent);
         }
     }
     gc.dispose ();
@@ -339,7 +490,10 @@
 
 void releaseHandle () {
     super.releaseHandle ();
-    if (nsColumn !is null) nsColumn.release();
+    if (nsColumn !is null) {
+        nsColumn.headerCell ().release ();
+        nsColumn.release ();
+    }
     nsColumn = null;
     parent = null;
 }
@@ -405,7 +559,10 @@
  * Controls how text and images will be displayed in the receiver.
  * The argument should be one of <code>LEFT</code>, <code>RIGHT</code>
  * or <code>CENTER</code>.
- *
+ * <p>
+ * Note that due to a restriction on some platforms, the first column
+ * is always left aligned.
+ * </p>
  * @param alignment the new alignment 
  *
  * @exception DWTException <ul>
@@ -420,7 +577,14 @@
     if (index is -1 || index is 0) return;
     style &= ~(DWT.LEFT | DWT.RIGHT | DWT.CENTER);
     style |= alignment & (DWT.LEFT | DWT.RIGHT | DWT.CENTER);
-    //NOT DONE
+    NSTableView tableView = ((NSTableView) parent.view);
+    NSTableHeaderView headerView = tableView.headerView ();
+    if (headerView is null) return;
+    index = (int)/*64*/tableView.columnWithIdentifier (nsColumn);
+    NSRect rect = headerView.headerRectOfColumn (index);
+    headerView.setNeedsDisplayInRect (rect);
+    rect = tableView.rectOfColumn (index);
+    parent.view.setNeedsDisplayInRect (rect);
 }
 
 public void setImage (Image image) {
@@ -428,19 +592,12 @@
     if (image !is null && image.isDisposed ()) {
         error (DWT.ERROR_INVALID_ARGUMENT);
     }
-//  int index = parent.indexOf (this);
-//  if (index is -1) return;
-//  if (iconRef !is 0) {
-//      OS.ReleaseIconRef (iconRef);
-//      iconRef = 0;
-//  }
-//  super.setImage (image);
-//  if (image !is null) {
-//      if (OS.VERSION < 0x1040) {
-//          iconRef = createIconRef (image);
-//      }
-//  }
-//  updateHeader ();
+    super.setImage (image);
+    NSTableHeaderView headerView = ((NSTableView) parent.view).headerView ();
+    if (headerView is null) return;
+    int /*long*/ index = ((NSTableView)parent.view).columnWithIdentifier (nsColumn);
+    NSRect rect = headerView.headerRectOfColumn (index);
+    headerView.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -466,6 +623,10 @@
  */
 public void setMoveable (bool moveable) {
     checkWidget ();
+    // TODO how to make only some columns movable?  And handle moveable is false.
+    if (moveable) {
+        ((NSTableView)parent.view).setAllowsColumnReordering (true);
+    }
 //  int [] flags = new int [1];
 //  OS.GetDataBrowserPropertyFlags (parent.handle, id, flags);
 //  if (moveable) {
@@ -502,7 +663,14 @@
     char [] buffer = new char [text.length ()];
     text.getChars (0, buffer.length, buffer, 0);
     int length = fixMnemonic (buffer);
-    nsColumn.headerCell ().setTitle (NSString.stringWithCharacters (buffer, length));
+    displayText = new String (buffer, 0, length);
+    NSString title = NSString.stringWith (displayText);
+    nsColumn.headerCell ().setTitle (title);
+    NSTableHeaderView headerView = ((NSTableView) parent.view).headerView ();
+    if (headerView is null) return;
+    int /*long*/ index = ((NSTableView)parent.view).columnWithIdentifier (nsColumn);
+    NSRect rect = headerView.headerRectOfColumn (index);
+    headerView.setNeedsDisplayInRect (rect);
 }
 
 /**
--- a/dwt/widgets/TableItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/TableItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,9 +21,12 @@
 import dwt.graphics.Image;
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSAttributedString;
+import dwt.internal.cocoa.NSBrowserCell;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSMutableParagraphStyle;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTableView;
 import dwt.internal.cocoa.OS;
@@ -40,6 +43,9 @@
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#table">Table, TableItem, TableColumn snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class TableItem : Item {
     Table parent;
@@ -50,7 +56,7 @@
     Color[] cellForeground, cellBackground;
     Font font;
     Font[] cellFont;
-    int width = -1;
+    int customWidth = -1;
     
 /**
  * Constructs a new instance of this class given its parent
@@ -133,31 +139,50 @@
     return control;
 }
 
-int calculateWidth (int index, GC gc) {
-    if (index is 0 && width !is -1) return width;
-    int width = 0;
-    Image image = getImage (index);
-    String text = getText (index);
-    gc.setFont (getFont (index));
-//  if (image !is null) width += image.getBounds ().width + parent.getGap ();
-    if (text !is null && text.length () > 0) width += gc.stringExtent (text).x;
-//  if (parent.hooks (DWT.MeasureItem)) {
-//      Event event = new Event ();
-//      event.item = this;
-//      event.index = index;
-//      event.gc = gc;
-//      short [] height = new short [1];
-//      OS.GetDataBrowserTableViewRowHeight (parent.handle, height);
-//      event.width = width;
-//      event.height = height[0];
-//      parent.sendEvent (DWT.MeasureItem, event);
-//      if (parent.itemHeight < event.height) {
-//          parent.itemHeight = event.height;
-//          OS.SetDataBrowserTableViewRowHeight (parent.handle, cast(short) event.height);
-//      }
-//      width = event.width;
-//  }
-    if (index is 0) this.width = width;
+int calculateWidth (int columnIndex, GC gc, bool callMeasureItem) {
+    if (!callMeasureItem && customWidth !is -1) return customWidth;
+
+    NSBrowserCell cell = parent.dataCell;
+    cell.setFont (getFont (columnIndex).handle);
+    cell.setTitle (NSString.stringWith (getText (columnIndex)));
+    Image image = getImage (columnIndex);
+    cell.setImage (image !is null ? image.handle : null);
+    NSRect rect = new NSRect ();
+    rect.width = rect.height = Float.MAX_VALUE;
+    NSSize size = cell.cellSizeForBounds (rect);
+    int width = (int)Math.ceil (size.width);
+
+    if (callMeasureItem && parent.hooks (DWT.MeasureItem)) {
+        NSTableView tableView = (NSTableView)parent.view;
+        int nsColumnIndex = 0;
+        if (parent.columnCount > 0) {
+            nsColumnIndex = tableView.columnWithIdentifier (parent.columns[columnIndex].nsColumn);
+        }
+        int rowIndex = parent.indexOf (this);
+        rect = tableView.frameOfCellAtColumn (nsColumnIndex, rowIndex);
+        NSRect contentRect = cell.titleRectForBounds (rect);
+        int rowHeight = (int)tableView.rowHeight ();
+        Event event = new Event ();
+        event.item = this;
+        event.index = columnIndex;
+        event.gc = gc;
+        event.x = (int)contentRect.x;
+        event.y = (int)contentRect.y;
+        event.width = width;
+        event.height = rowHeight;
+        parent.sendEvent (DWT.MeasureItem, event);
+        if (rowHeight < event.height) {
+            tableView.setRowHeight (event.height);
+        }
+        if (parent.columnCount is 0) {
+            int change = event.width - (customWidth !is -1 ? customWidth : width);
+            if (customWidth !is -1 || event.width !is width) {
+                customWidth = event.width;  
+            }
+            if (change !is 0) parent.setScrollWidth (this, false);
+        }
+        width = event.width;
+    }
     return width;
 }
 
@@ -175,37 +200,45 @@
     cellForeground = cellBackground = null;
     font = null;
     cellFont = null;
-    width = -1;
+    customWidth = -1;
 }
 
-NSAttributedString createString(int index) {
-    NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
+NSAttributedString createString (int index) {
+    NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity (4);
     Color foreground = cellForeground !is null ? cellForeground [index] : null;
     if (foreground is null) foreground = this.foreground;
     if (foreground is null) foreground = parent.foreground;
     if (foreground !is null) {
-        NSColor color = NSColor.colorWithDeviceRed(foreground.handle[0], foreground.handle[1], foreground.handle[2], 1);
-        dict.setObject(color, OS.NSForegroundColorAttributeName());
+        NSColor color = NSColor.colorWithDeviceRed (foreground.handle [0], foreground.handle [1], foreground.handle [2], 1);
+        dict.setObject(color, OS.NSForegroundColorAttributeName);
     }
     Font font = cellFont !is null ? cellFont [index] : null;
     if (font is null) font = this.font;
-//  if (font is null) font = parent.font;
+    if (font is null) font = parent.font;
     if (font !is null) {
-        dict.setObject(font.handle, OS.NSFontAttributeName());
+        dict.setObject (font.handle, OS.NSFontAttributeName);
     }
-    Color background = cellBackground !is null ? cellBackground [index] : null;
-    if (background is null) background = this.background;
-    if (background !is null) {
-        NSColor color = NSColor.colorWithDeviceRed(background.handle[0], background.handle[1], background.handle[2], 1);
-        dict.setObject(color, OS.NSBackgroundColorAttributeName());
+    NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
+    paragraphStyle.autorelease ();
+    paragraphStyle.setLineBreakMode (OS.NSLineBreakByClipping);
+    dict.setObject (paragraphStyle, OS.NSParagraphStyleAttributeName);
+    if (parent.columnCount > 0) {
+        TableColumn column = parent.getColumn (index);
+        int style = column.getStyle ();
+        if ((style & DWT.CENTER) !is 0) {
+            paragraphStyle.setAlignment (OS.NSCenterTextAlignment);
+        } else if ((style & DWT.RIGHT) !is 0) {
+            paragraphStyle.setAlignment (OS.NSRightTextAlignment);
+        }
     }
+
     String text = getText (index);
-    int length = text.length();
-    char[] chars = new char[length];
+    int length = text.length ();
+    char[] chars = new char [length];
     text.getChars(0, length, chars, 0);
-    NSString str = NSString.stringWithCharacters(chars, length);
-    NSAttributedString attribStr = (cast(NSAttributedString)new NSAttributedString().alloc()).initWithString_attributes_(str, dict);
-    attribStr.autorelease();
+    NSString str = NSString.stringWithCharacters (chars, length);
+    NSAttributedString attribStr = (cast(NSAttributedString) (new NSAttributedString ()).alloc ()).initWithString (str, dict);
+    attribStr.autorelease ();
     return attribStr;
 }
 
@@ -272,9 +305,7 @@
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     NSTableView tableView = cast(NSTableView) parent.view;
     NSRect rect = tableView.rectOfRow (parent.indexOf (this));
-    rect = tableView.convertRect_toView_ (rect, parent.scrollView);
-    Rectangle result = new Rectangle(cast(int) rect.x, cast(int) rect.y, cast(int) rect.width, cast(int) rect.height);
-    return result;
+    return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
 }
 
 /**
@@ -292,12 +323,16 @@
 public Rectangle getBounds (int index) {
     checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
-    NSTableView tableView = cast(NSTableView) parent.view;
-    if ((parent.style & DWT.CHECK) !is 0) index ++;
+    if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
+
+    if (parent.columnCount is 0) {
+        index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+    } else {
+        TableColumn column = parent.getColumn (index);
+        index = (int)/*64*/tableView.columnWithIdentifier (column.nsColumn);
+    }
     NSRect rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
-    rect = tableView.convertRect_toView_ (rect, parent.scrollView);
-    Rectangle result = new Rectangle(cast(int) rect.x, cast(int) rect.y, cast(int) rect.width, cast(int) rect.height);
-    return result;
+    return new Rectangle ((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
 }
 
 /**
@@ -421,7 +456,7 @@
 }
 
 public Image getImage () {
-    checkWidget();
+    checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     return super.getImage ();
 }
@@ -439,7 +474,7 @@
  * </ul>
  */
 public Image getImage (int index) {
-    checkWidget();
+    checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     if (index is 0) return getImage ();
     if (images !is null) {
@@ -463,30 +498,22 @@
  * </ul>
  */
 public Rectangle getImageBounds (int index) {
-    checkWidget();
+    checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
-//  parent.checkItems (true);
-//  if (index !is 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0);
-//  Rect rect = new Rect();
-//  int itemIndex = parent.indexOf (this);
-//  int id = itemIndex + 1;
-//  int columnId = parent.columnCount is 0 ? parent.column_id : parent.columns [index].id;
-//  if (OS.GetDataBrowserItemPartBounds (parent.handle, id, columnId, OS.kDataBrowserPropertyContentPart, rect) !is OS.noErr) {
-//      return new Rectangle (0, 0, 0, 0);
-//  }
-//  int x = rect.left, y = rect.top;
-//  int width = 0;
-//  if (index is 0 && image !is null) {
-//      Rectangle bounds = image.getBounds ();
-//      width += bounds.width;
-//  }
-//  if (index !is 0 && images !is null && images[index] !is null) {
-//      Rectangle bounds = images [index].getBounds ();
-//      width += bounds.width;
-//  }
-//  int height = rect.bottom - rect.top + 1;
-//  return new Rectangle (x, y, width, height);
-    return null;
+    if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
+
+    NSTableView tableView = (NSTableView) parent.view;
+    Image image = index is 0 ? this.image : (images !is null) ? images [index] : null;
+    if (parent.columnCount is 0) {
+        index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+    } else {
+        TableColumn column = parent.getColumn (index);
+        index = (int)/*64*/tableView.columnWithIdentifier (column.nsColumn);
+    }
+    NSRect rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
+    //TODO is this right?
+    rect.width = image !is null ? image.getBounds().width : 0; 
+    return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
 }
 
 /**
@@ -500,7 +527,7 @@
  * </ul>
  */
 public int getImageIndent () {
-    checkWidget();
+    checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     return 0;
 }
@@ -577,50 +604,30 @@
 public Rectangle getTextBounds (int index) {
     checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
-//  parent.checkItems (true);
-//  if (index !is 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0);
-//  Rect rect = new Rect();
-//  int itemIndex = parent.indexOf (this);
-//  int id = itemIndex + 1;
-//  int columnId = parent.columnCount is 0 ? parent.column_id : parent.columns [index].id;
-//  if (OS.GetDataBrowserItemPartBounds (parent.handle, id, columnId, OS.kDataBrowserPropertyEnclosingPart, rect) !is OS.noErr) {
-//      return new Rectangle (0, 0, 0, 0);
-//  }
-//  int imageWidth = 0;
-//  int margin = parent.getInsetWidth () / 2;
-//  Image image = getImage (index);
-//  if (image !is null) {
-//      Rectangle bounds = image.getBounds ();
-//      imageWidth = bounds.width + parent.getGap ();
-//  }
-//  int x, y, width, height;
-//  if (OS.VERSION >= 0x1040) {
-//      if (parent.getLinesVisible ()) {
-//          rect.left += Table.GRID_WIDTH;
-//          rect.top += Table.GRID_WIDTH;
-//      }
-//      x = rect.left + imageWidth + margin;
-//      y = rect.top;
-//      width = Math.max (0, rect.right - rect.left - imageWidth - margin * 2);
-//      height = rect.bottom - rect.top;
-//  } else {
-//      Rect rect2 = new Rect();
-//      if (OS.GetDataBrowserItemPartBounds (parent.handle, id, columnId, OS.kDataBrowserPropertyContentPart, rect2) !is OS.noErr) {
-//          return new Rectangle (0, 0, 0, 0);
-//      }
-//      x = rect2.left + imageWidth + margin;
-//      y = rect2.top;
-//      width = Math.max (0, rect.right - rect2.left + 1 - imageWidth - margin * 2);
-//      height = rect2.bottom - rect2.top + 1;
-//  }
-//  return new Rectangle (x, y, width, height);
-    return null;
+    if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
+
+    NSTableView tableView = (NSTableView) parent.view;
+    Image image = index is 0 ? this.image : (images !is null) ? images [index] : null;
+    if (parent.columnCount is 0) {
+        index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+    } else {
+        TableColumn column = parent.getColumn (index);
+        index = (int)/*64*/tableView.columnWithIdentifier (column.nsColumn);
+    }
+    NSRect rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
+    //TODO is this right?
+    if (image !is null) {
+        int imageWidth = image.getBounds().width;
+        rect.x += imageWidth;
+        rect.width -= imageWidth;
+    }
+    return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
 }
 
 void redraw () {
 //  0[aTableView setNeedsDisplayInRect:[aTableView rectOfRow:row]];
-    (cast(NSTableView)parent.view).reloadData();
-    (cast(NSTableView)parent.view).tile();
+    (cast(NSTableView) parent.view).reloadData ();
+    (cast(NSTableView) parent.view).tile ();
 }
 
 void releaseHandle () {
@@ -670,9 +677,9 @@
     background = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.rectOfRow(parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+    NSTableView view = cast(NSTableView) parent.view;
+    NSRect rect = view.rectOfRow (parent.indexOf (this));
+    view.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -709,9 +716,21 @@
     cellBackground [index] = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.frameOfCellAtColumn(index + ((parent.style & DWT.CHECK) !is 0 ? 1 : 0), parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+
+    NSTableView tableView = (NSTableView) parent.view;
+    NSRect rect = null;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        rect = tableView.rectOfRow (parent.indexOf (this));
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TableColumn column = parent.getColumn (index);
+            index = (int)/*64*/tableView.columnWithIdentifier (column.nsColumn);
+        }
+        rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
+    }
+    tableView.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -731,9 +750,9 @@
     if (this.checked is checked) return;
     this.checked = checked;
     cached = true;
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.rectOfRow(parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+    NSTableView view = cast(NSTableView) parent.view;
+    NSRect rect = view.rectOfRow (parent.indexOf (this));
+    view.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -763,9 +782,9 @@
     this.font = font;
     if (oldFont !is null && oldFont.equals (font)) return;
     cached = true;
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.rectOfRow(parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+    NSTableView view = cast(NSTableView) parent.view;
+    NSRect rect = view.rectOfRow (parent.indexOf (this));
+    view.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -803,9 +822,21 @@
     cellFont [index] = font;
     if (oldFont !is null && oldFont.equals (font)) return;
     cached = true;
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.frameOfCellAtColumn(index + ((parent.style & DWT.CHECK) !is 0 ? 1 : 0), parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+
+    NSTableView tableView = (NSTableView) parent.view;
+    NSRect rect = null;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        rect = tableView.rectOfRow (parent.indexOf (this));
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TableColumn column = parent.getColumn (index);
+            index = (int)/*64*/tableView.columnWithIdentifier (column.nsColumn);
+        }
+        rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
+    }
+    tableView.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -835,9 +866,9 @@
     foreground = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.rectOfRow(parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+    NSTableView view = cast(NSTableView) parent.view;
+    NSRect rect = view.rectOfRow (parent.indexOf (this));
+    view.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -858,7 +889,7 @@
  * 
  * @since 3.0
  */
-public void setForeground (int index, Color color){
+public void setForeground (int index, Color color) {
     checkWidget ();
     if (color !is null && color.isDisposed ()) {
         DWT.error (DWT.ERROR_INVALID_ARGUMENT);
@@ -874,9 +905,21 @@
     cellForeground [index] = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.frameOfCellAtColumn(index + ((parent.style & DWT.CHECK) !is 0 ? 1 : 0), parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+
+    NSTableView tableView = (NSTableView) parent.view;
+    NSRect rect = null;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        rect = tableView.rectOfRow (parent.indexOf (this));
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TableColumn column = parent.getColumn (index);
+            index = (int)/*64*/tableView.columnWithIdentifier (column.nsColumn);
+        }
+        rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
+    }
+    tableView.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -896,9 +939,9 @@
     if (this.grayed is grayed) return;
     this.grayed = grayed;
     cached = true;
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.rectOfRow(parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+    NSTableView view = cast(NSTableView) parent.view;
+    NSRect rect = view.rectOfRow (parent.indexOf (this));
+    view.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -916,7 +959,7 @@
  * </ul>
  */
 public void setImage (Image [] images) {
-    checkWidget();
+    checkWidget ();
     if (images is null) error (DWT.ERROR_NULL_ARGUMENT);
     for (int i=0; i<images.length; i++) {
         setImage (i, images [i]);
@@ -938,7 +981,7 @@
  * </ul>
  */
 public void setImage (int index, Image image) {
-    checkWidget();
+    checkWidget ();
     if (image !is null && image.isDisposed ()) {
         error(DWT.ERROR_INVALID_ARGUMENT);
     }
@@ -951,7 +994,7 @@
         if (image !is null && image.type is DWT.ICON) {
             if (image.equals (this.image)) return;
         }
-        width = -1;
+        customWidth = -1;
         super.setImage (image);
     }
     int count = Math.max (1, parent.columnCount);
@@ -964,9 +1007,21 @@
     }
 //  cached = true;
 //  if (index is 0) parent.setScrollWidth (this);
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.frameOfCellAtColumn(index + ((parent.style & DWT.CHECK) !is 0 ? 1 : 0), parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+    
+    NSTableView tableView = (NSTableView) parent.view;
+    NSRect rect = null;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        rect = tableView.rectOfRow (parent.indexOf (this));
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TableColumn column = parent.getColumn (index);
+            index = (int)/*64*/tableView.columnWithIdentifier (column.nsColumn);
+        }
+        rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
+    }
+    tableView.setNeedsDisplayInRect (rect);
 }
 
 public void setImage (Image image) {
@@ -988,7 +1043,7 @@
  * @deprecated this functionality is not supported on most platforms
  */
 public void setImageIndent (int indent) {
-    checkWidget();
+    checkWidget ();
     if (indent < 0) return;
     cached = true;
     /* Image indent is not supported on the Macintosh */
@@ -1008,7 +1063,7 @@
  * </ul>
  */
 public void setText (String [] strings) {
-    checkWidget();
+    checkWidget ();
     if (strings is null) error (DWT.ERROR_NULL_ARGUMENT);
     for (int i=0; i<strings.length; i++) {
         String string = strings [i];
@@ -1031,11 +1086,11 @@
  * </ul>
  */
 public void setText (int index, String string) {
-    checkWidget();
+    checkWidget ();
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (index is 0) {
         if (string.equals (text)) return;
-        width = -1;
+        customWidth = -1;
         super.setText (string);
     }
     int count = Math.max (1, parent.columnCount);
@@ -1045,14 +1100,26 @@
         strings [index] = string;
     }
     cached = true;
-    if (index is 0) parent.setScrollWidth (this);
-    NSTableView view = cast(NSTableView)parent.view;
-    NSRect rect = view.frameOfCellAtColumn(index + ((parent.style & DWT.CHECK) !is 0 ? 1 : 0), parent.indexOf(this));
-    view.setNeedsDisplayInRect(rect);
+    if (index is 0) parent.setScrollWidth (this, true);
+
+    NSTableView tableView = (NSTableView) parent.view;
+    NSRect rect = null;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        rect = tableView.rectOfRow (parent.indexOf (this));
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TableColumn column = parent.getColumn (index);
+            index = (int)/*64*/tableView.columnWithIdentifier (column.nsColumn);
+        }
+        rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
+    }
+    tableView.setNeedsDisplayInRect (rect);
 }
 
 public void setText (String string) {
-    checkWidget();
+    checkWidget ();
     setText (0, string);
 }
 
--- a/dwt/widgets/Text.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Text.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,28 +21,42 @@
 import dwt.graphics.Color;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSAttributedString;
 import dwt.internal.cocoa.NSCell;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSControl;
 import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSFont;
 import dwt.internal.cocoa.NSMutableString;
+import dwt.internal.cocoa.NSNotification;
 import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
-import dwt.internal.cocoa.NSSearchField;
-import dwt.internal.cocoa.NSSecureTextField;
+import dwt.internal.cocoa.NSScrollView;
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSText;
+import dwt.internal.cocoa.NSTextContainer;
 import dwt.internal.cocoa.NSTextField;
 import dwt.internal.cocoa.NSTextFieldCell;
+import dwt.internal.cocoa.NSTextStorage;
 import dwt.internal.cocoa.NSTextView;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTScrollView;
+import dwt.internal.cocoa.SWTSearchField;
+import dwt.internal.cocoa.SWTSecureTextField;
 import dwt.internal.cocoa.SWTTextField;
 import dwt.internal.cocoa.SWTTextView;
 
 /**
  * Instances of this class are selectable user interface
  * objects that allow the user to enter and modify text.
+ * Text controls can be either single or multi-line.
+ * When a text control is created with a border, the
+ * operating system includes a platform specific inset
+ * around the contents of the control.  When created
+ * without a border, an effort is made to remove the
+ * inset such that the preferred size of the control
+ * is the same size as the contents.
  * <p>
  * <dl>
  * <dt><b>Styles:</b></dt>
@@ -56,12 +70,17 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#text">Text snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Text : Scrollable {
     int textLimit = LIMIT, tabs = 8;
     char echoCharacter;
-    bool doubleClick;
+    bool doubleClick, receivingFocus;
     String hiddenText, message;
+    NSRange selectionRange;
     
     /**
     * The maximum number of characters that can be entered
@@ -158,7 +177,7 @@
  * @see #removeModifyListener
  */
 public void addModifyListener (ModifyListener listener) {
-    checkWidget();
+    checkWidget ();
     if (listener is null) error (DWT.ERROR_NULL_ARGUMENT);
     TypedListener typedListener = new TypedListener (listener);
     addListener (DWT.Modify, typedListener);
@@ -191,11 +210,11 @@
  * @see SelectionEvent
  */
 public void addSelectionListener(SelectionListener listener) {
-    checkWidget();
+    checkWidget ();
     if (listener is null) error (DWT.ERROR_NULL_ARGUMENT);
-    TypedListener typedListener = new TypedListener(listener);
-    addListener(DWT.Selection,typedListener);
-    addListener(DWT.DefaultSelection,typedListener);
+    TypedListener typedListener = new TypedListener (listener);
+    addListener (DWT.Selection,typedListener);
+    addListener (DWT.DefaultSelection,typedListener);
 }
 
 /**
@@ -218,7 +237,7 @@
  * @see #removeVerifyListener
  */
 public void addVerifyListener (VerifyListener listener) {
-    checkWidget();
+    checkWidget ();
     if (listener is null) error (DWT.ERROR_NULL_ARGUMENT);
     TypedListener typedListener = new TypedListener (listener);
     addListener (DWT.Verify, typedListener);
@@ -242,27 +261,35 @@
  * </ul>
  */
 public void append (String string) {
-    checkWidget();
+    checkWidget ();
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (hooks (DWT.Verify) || filters (DWT.Verify)) {
         int charCount = getCharCount ();
         string = verifyText (string, charCount, charCount, null);
         if (string is null) return;
     }
-    NSString str = NSString.stringWith(string);
+    NSString str = NSString.stringWith (string);
     if ((style & DWT.SINGLE) !is 0) {
-//      new NSTextFieldCell((cast(NSTextField)view).cell()).title().
+        setSelection (getCharCount ());
+        insertEditText (string);
     } else {
-        NSTextView widget = cast(NSTextView)view;
-        NSMutableString mutableString = widget.textStorage().mutableString();
-        mutableString.appendString(str);
-        NSRange range = new NSRange();
-        range.location = mutableString.length();
-        widget.scrollRangeToVisible(range);
+        NSTextView widget = cast(NSTextView) view;
+        NSMutableString mutableString = widget.textStorage ().mutableString ();
+        mutableString.appendString (str);
+        NSRange range = new NSRange ();
+        range.location = mutableString.length ();
+        widget.scrollRangeToVisible (range);
     }
     if (string.length () !is 0) sendEvent (DWT.Modify);
 }
 
+bool becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+    receivingFocus = true;
+    bool result = super.becomeFirstResponder (id, sel);
+    receivingFocus = false;
+    return result;
+}
+
 static int checkStyle (int style) {
     if ((style & DWT.SEARCH) !is 0) {
         style |= DWT.SINGLE | DWT.BORDER;
@@ -292,30 +319,45 @@
  * </ul>
  */
 public void clearSelection () {
-    checkWidget();
+    checkWidget ();
     Point selection = getSelection ();
     setSelection (selection.x); 
 }
 
 public Point computeSize (int wHint, int hHint, bool changed) {
-    checkWidget();
+    checkWidget ();
     int width = 0, height = 0;
     if ((style & DWT.SINGLE) !is 0) {
-        NSTextField widget = cast(NSTextField)view;
-        NSRect oldRect = widget.frame();
-        widget.sizeToFit();
-        NSRect newRect = widget.frame();
-        widget.setFrame (oldRect);
-        width = cast(int)newRect.width;
-        height = cast(int)newRect.height;
+        NSTextField widget = cast(NSTextField) view;
+        NSRect rect = new NSRect ();
+        rect.width = rect.height = Float.MAX_VALUE;
+        NSSize size = widget.cell ().cellSizeForBounds (rect);
+        width = (int)Math.ceil (size.width);
+        height = cast(int)Math.ceil (size.height);
     } else {
-        NSTextView widget = cast(NSTextView)view;
-        NSRect oldRect = widget.frame();
-        widget.sizeToFit();
-        NSRect newRect = widget.frame();
+        NSTextView widget = cast(NSTextView) view;
+        NSSize oldSize = null;
+        NSTextContainer textContainer = widget.textContainer ();
+        if ((style & DWT.WRAP) !is 0) {
+            widget.setHorizontallyResizable (true);
+            textContainer.setWidthTracksTextView (false);
+            oldSize = textContainer.containerSize ();
+            NSSize csize = new NSSize ();
+            csize.width = wHint !is DWT.DEFAULT ? wHint : Float.MAX_VALUE;
+            csize.height = hHint !is DWT.DEFAULT ? hHint : Float.MAX_VALUE;
+            textContainer.setContainerSize (csize);
+        }
+        NSRect oldRect = widget.frame ();
+        widget.sizeToFit ();
+        NSRect newRect = widget.frame ();
         widget.setFrame (oldRect);
-        width = cast(int)newRect.width;
-        height = cast(int)newRect.height;
+        if ((style & DWT.WRAP) !is 0) {
+            widget.setHorizontallyResizable (false);
+            textContainer.setWidthTracksTextView (true);
+            textContainer.setContainerSize (oldSize);
+        }
+        width = (int)(newRect.width + 1);
+        height = (int)(newRect.height + 1);
     }
     if (width <= 0) width = DEFAULT_WIDTH;
     if (height <= 0) height = DEFAULT_HEIGHT;
@@ -341,9 +383,13 @@
 public void copy () {
     checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
-        
+        Point selection = getSelection ();
+        if (selection.x is selection.y) return;
+        copyToClipboard (getEditText (selection.x, selection.y - 1));
     } else {
-        (cast(NSTextView)view).copy();
+        NSText text = cast(NSText) view;
+        if (text.selectedRange ().length is 0) return;
+        text.copy (null);
     }
 }
 
@@ -351,65 +397,64 @@
     if ((style & DWT.SINGLE) !is 0) {
         NSTextField widget;
         if ((style & DWT.PASSWORD) !is 0) {
-            widget = cast(NSTextField)new NSSecureTextField().alloc();
+            widget = cast(NSTextField) new SWTSecureTextField ().alloc ();
         } else if ((style & DWT.SEARCH) !is 0) {
-            widget = cast(NSTextField)new NSSearchField().alloc();
+            widget = cast(NSTextField) (new SWTSearchField ()).alloc ();
         } else {
-            widget = cast(NSTextField)new SWTTextField().alloc();
+            widget = cast(NSTextField) (new SWTTextField ()).alloc ();
         }
-        widget.initWithFrame(new NSRect());
-        widget.setSelectable(true);
+        widget.initWithFrame (new NSRect ());
+        widget.setSelectable (true);
         widget.setEditable((style & DWT.READ_ONLY) is 0);
-        if ((style & DWT.BORDER) is 0) widget.setBordered(false);
+        if ((style & DWT.BORDER) is 0) {
+            widget.setFocusRingType (OS.NSFocusRingTypeNone);
+            widget.setBordered (false);
+        }
         int align = OS.NSLeftTextAlignment;
         if ((style & DWT.CENTER) !is 0) align = OS.NSCenterTextAlignment;
         if ((style & DWT.RIGHT) !is 0) align = OS.NSRightTextAlignment;
-        widget.setAlignment(align);
+        widget.setAlignment (align);
 //      widget.setTarget(widget);
 //      widget.setAction(OS.sel_sendSelection);
-        widget.setTag(jniRef);
         view = widget;
-        parent.contentView().addSubview_(widget);
     } else {
-        SWTScrollView scrollWidget = cast(SWTScrollView)new SWTScrollView().alloc();
-        scrollWidget.initWithFrame(new NSRect());
-        scrollWidget.setHasVerticalScroller((style & DWT.VERTICAL) !is 0);
-        scrollWidget.setHasHorizontalScroller((style & DWT.HORIZONTAL) !is 0);
-        scrollWidget.setAutoresizesSubviews(true);
-        scrollWidget.setTag(jniRef);
+        NSScrollView scrollWidget = cast(NSScrollView) new SWTScrollView ().alloc ();
+        scrollWidget.initWithFrame (new NSRect ());
+        scrollWidget.setHasVerticalScroller ((style & DWT.VERTICAL) !is 0);
+        scrollWidget.setHasHorizontalScroller ((style & DWT.HORIZONTAL) !is 0);
+        scrollWidget.setAutoresizesSubviews (true);
+        if ((style & DWT.BORDER) !is 0) scrollWidget.setBorderType (OS.NSBezelBorder);
         
-        SWTTextView widget = cast(SWTTextView)new SWTTextView().alloc();
-        widget.initWithFrame(new NSRect());
-        widget.setEditable((style & DWT.READ_ONLY) is 0);
-        if ((style & DWT.BORDER) is 0) widget.setFocusRingType(OS.NSFocusRingTypeNone);
+        NSTextView widget = cast(NSTextView) new SWTTextView ().alloc ();
+        widget.initWithFrame (new NSRect ());
+        widget.setEditable ((style & DWT.READ_ONLY) is 0);
         
-        NSSize size = new NSSize();
+        NSSize size = new NSSize ();
         size.width = size.height = Float.MAX_VALUE;
-        widget.setMaxSize(size);
-        widget.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewHeightSizable);
+        widget.setMaxSize (size);
+        widget.setAutoresizingMask (OS.NSViewWidthSizable | OS.NSViewHeightSizable);
 
         if ((style & DWT.WRAP) is 0) {
-            widget.setHorizontallyResizable(true);
-            NSSize csize = new NSSize();
+            NSTextContainer textContainer = widget.textContainer ();
+            widget.setHorizontallyResizable (true);
+            textContainer.setWidthTracksTextView (false);
+            NSSize csize = new NSSize ();
             csize.width = csize.height = Float.MAX_VALUE;
-            widget.textContainer().setWidthTracksTextView(false);
-            widget.textContainer().setContainerSize(csize);
+            textContainer.setContainerSize (csize);
         }
 
         int align = OS.NSLeftTextAlignment;
         if ((style & DWT.CENTER) !is 0) align = OS.NSCenterTextAlignment;
         if ((style & DWT.RIGHT) !is 0) align = OS.NSRightTextAlignment;
-        widget.setAlignment(align);
+        widget.setAlignment (align);
 
 //      widget.setTarget(widget);
 //      widget.setAction(OS.sel_sendSelection);
-        widget.setTag(jniRef);
-        widget.setRichText(false);
+        widget.setRichText (false);
+        widget.setDelegate(widget);
         
         view = widget;
         scrollView = scrollWidget;
-        scrollView.setDocumentView(widget);
-        parent.contentView().addSubview_(scrollView);
     }
 }
 
@@ -432,50 +477,39 @@
  * </ul>
  */
 public void cut () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.READ_ONLY) !is 0) return;
-    if ((style & DWT.SINGLE) !is 0) {
-        
-    } else {
-        (cast(NSTextView)view).cut(null);
+    bool cut = true;
+    char [] oldText = null;
+    Point oldSelection = getSelection ();
+    if (hooks (DWT.Verify) || filters (DWT.Verify)) {
+        if (oldSelection.x !is oldSelection.y) {
+            oldText = getEditText (oldSelection.x, oldSelection.y - 1);
+            String newText = verifyText ("", oldSelection.x, oldSelection.y, null);
+            if (newText is null) return;
+            if (newText.length () !is 0) {
+                copyToClipboard (oldText);
+                if ((style & DWT.SINGLE) !is 0) {
+                    insertEditText (newText);
+                } else {
+                    NSTextView widget = (NSTextView) view;
+                    widget.replaceCharactersInRange (widget.selectedRange (), NSString.stringWith (newText));
+                }
+                cut = false;
+            }
+        }
     }
-//  bool cut = true;
-//  char [] oldText = null;
-//  Point oldSelection = getSelection ();
-//  if (hooks (DWT.Verify) || filters (DWT.Verify)) {
-//      if (oldSelection.x !is oldSelection.y) {
-//          oldText = getEditText (oldSelection.x, oldSelection.y - 1);
-//          String newText = verifyText ("", oldSelection.x, oldSelection.y, null);
-//          if (newText is null) return;
-//          if (newText.length () !is 0) {
-//              copyToClipboard (oldText);
-//              if (txnObject is 0) {
-//                  insertEditText (newText);
-//              } else {
-//                  setTXNText (OS.kTXNUseCurrentSelection, OS.kTXNUseCurrentSelection, newText);
-//                  OS.TXNShowSelection (txnObject, false);
-//              }
-//              cut = false;
-//          }
-//      }
-//  }
-//  if (cut) {
-//      if (txnObject is 0) {
-//          if (oldText is null) oldText = getEditText (oldSelection.x, oldSelection.y - 1);
-//          copyToClipboard (oldText);
-//          insertEditText ("");
-//      } else {
-//          OS.TXNCut (txnObject);
-//  
-//          /*
-//          * Feature in the Macintosh.  When an empty string is set in the TXNObject,
-//          * the font attributes are cleared.  The fix is to reset them.
-//          */
-//          if (OS.TXNDataSize (txnObject) / 2 is 0) setFontStyle (font);
-//      }
-//  }
-//  Point newSelection = getSelection ();
-//  if (!cut || !oldSelection.equals (newSelection)) sendEvent (DWT.Modify);
+    if (cut) {
+        if ((style & DWT.SINGLE) !is 0) {
+            if (oldText is null) oldText = getEditText (oldSelection.x, oldSelection.y - 1);
+            copyToClipboard (oldText);
+            insertEditText ("");
+        } else {
+            (cast(NSTextView) view).cut (null);
+        }
+    }
+    Point newSelection = getSelection ();
+    if (!cut || !oldSelection.equals (newSelection)) sendEvent (DWT.Modify);
 }
 
 Color defaultBackground () {
@@ -486,6 +520,14 @@
     return display.getSystemColor (DWT.COLOR_LIST_FOREGROUND);
 }
 
+void deregister() {
+    super.deregister();
+    
+    if ((style & DWT.SINGLE) !is 0) {
+        display.removeWidget(((NSControl)view).cell());
+    }
+}
+
 bool dragDetect (int x, int y, bool filter, bool [] consume) {
     if (filter) {
         Point selection = getSelection ();
@@ -517,7 +559,7 @@
  * </ul>
  */
 public int getCaretLineNumber () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) return 0;
     return (getTopPixel () + getCaretLocation ().y) / getLineHeight ();
 }
@@ -537,14 +579,13 @@
  * </ul>
  */
 public Point getCaretLocation () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
         //TODO - caret location for unicode text
         return new Point (0, 0);
     }
 //  NSText
-    NSRange range = (cast(NSTextView)view).selectedRange();
-    System.out.println(range.location + " " + range.length);
+//  NSRange range = (cast(NSTextView)view).selectedRange();
     return null;
 }
 
@@ -562,13 +603,13 @@
  * </ul>
  */
 public int getCaretPosition () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
         //TODO
         return 0;
     } else {
         NSRange range = (cast(NSTextView)view).selectedRange();
-        return range.location;
+        return (int)/*64*/range.location;
     }
 }
 
@@ -585,10 +626,9 @@
 public int getCharCount () {
     checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
-        return new NSCell((cast(NSControl)view).cell()).title().length();
+        return cast(int)/*64*/new NSCell ((cast(NSControl) view).cell ()).title ().length ();
     } else {
-        //TODO
-        return 0;
+        return (int)/*64*/((NSTextView) view).textStorage ().length ();
     }
 }
 
@@ -608,7 +648,7 @@
  * </ul>
  */
 public bool getDoubleClickEnabled () {
-    checkWidget();
+    checkWidget ();
     return doubleClick;
 }
 
@@ -630,7 +670,7 @@
  * @see #setEchoChar
  */
 public char getEchoChar () {
-    checkWidget();
+    checkWidget ();
     return echoCharacter;
 }
 
@@ -645,10 +685,54 @@
  * </ul>
  */
 public bool getEditable () {
-    checkWidget();
+    checkWidget ();
     return (style & DWT.READ_ONLY) is 0;
 }
 
+char [] getEditText () {
+    NSString str = null;
+    if ((style & DWT.SINGLE) !is 0) {
+        str = new NSTextFieldCell (((NSTextField) view).cell ()).title ();
+    } else {
+        str = ((NSTextView)view).textStorage().string();
+    }
+
+    int length = (int)/*64*/str.length ();
+    char [] buffer = new char [length];
+    if (hiddenText !is null) {
+        hiddenText.getChars (0, length, buffer, 0);
+    } else {
+        NSRange range = new NSRange ();
+        range.length = length;
+        str.getCharacters (buffer, range);
+    }
+    return buffer;
+}
+
+char [] getEditText (int start, int end) {
+    NSString str = null;
+    if ((style & DWT.SINGLE) !is 0) {
+        str = new NSTextFieldCell (((NSTextField) view).cell ()).title ();
+    } else {
+        str = ((NSTextView)view).textStorage().string();
+    }
+
+    int length = (int)/*64*/str.length ();
+    end = Math.min (end, length - 1);
+    if (start > end) return new char [0];
+    start = Math.max (0, start);
+    NSRange range = new NSRange ();
+    range.location = start;
+    range.length = Math.max (0, end - start + 1);
+    char [] buffer = new char [(int)/*64*/range.length];
+    if (hiddenText !is null) {
+        hiddenText.getChars ((int)/*64*/range.location, (int)/*64*/(range.location + range.length), buffer, 0);
+    } else {
+        str.getCharacters (buffer, range);
+    }
+    return buffer;
+}
+
 /**
  * Returns the number of lines.
  *
@@ -660,9 +744,9 @@
  * </ul>
  */
 public int getLineCount () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) return 1;
-    return (cast(NSTextView)view).textStorage().paragraphs().count();
+    return cast(int)/*64*/(cast(NSTextView) view).textStorage ().paragraphs ().count ();
 }
 
 /**
@@ -678,7 +762,7 @@
  * @see #DELIMITER
  */
 public String getLineDelimiter () {
-    checkWidget();
+    checkWidget ();
     return DELIMITER;
 }
 
@@ -693,7 +777,7 @@
  * </ul>
  */
 public int getLineHeight () {
-    checkWidget();
+    checkWidget ();
     //TODO
     return 16;
 }
@@ -712,7 +796,7 @@
  * @since 2.1.2
  */
 public int getOrientation () {
-    checkWidget();
+    checkWidget ();
     return style & (DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT);
 }
 
@@ -746,7 +830,7 @@
     return 0;
 }
 
-public int getPosition (Point point) {
+/*public*/ int getPosition (Point point) {
     checkWidget ();
     if (point is null) error (DWT.ERROR_NULL_ARGUMENT);
     return getPosition (point.x, point.y);
@@ -771,14 +855,17 @@
  * </ul>
  */
 public Point getSelection () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
-//      new NSTextFieldCell((cast(NSTextField)view).cell()).title().
-        return new Point(0, 0);
+        if (selectionRange is null) {
+            NSString str = new NSTextFieldCell (((NSTextField) view).cell ()).title ();
+            return new Point((int)/*64*/str.length (), (int)/*64*/str.length ());
+        }
+        return new Point ((int)/*64*/selectionRange.location, (int)/*64*/(selectionRange.location + selectionRange.length));
     } else {
-        NSTextView widget = cast(NSTextView)view;
-        NSRange range = widget.selectedRange();
-        return new Point(range.location, range.location + range.length);
+        NSTextView widget = cast(NSTextView) view;
+        NSRange range = widget.selectedRange ();
+        return new Point ((int)/*64*/range.location, (int)/*64*/(range.location + range.length));
     }
 }
 
@@ -793,14 +880,13 @@
  * </ul>
  */
 public int getSelectionCount () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
-//      new NSTextFieldCell((cast(NSTextField)view).cell()).title().
-        return -1;
+        return selectionRange !is null ? cast(int)/*64*/selectionRange.length : 0;
     } else {
-        NSTextView widget = cast(NSTextView)view;
-        NSRange range = widget.selectedRange();
-        return range.length;
+        NSTextView widget = cast(NSTextView) view;
+        NSRange range = widget.selectedRange ();
+        return (int)/*64*/range.length;
     }
 }
 
@@ -815,17 +901,18 @@
  * </ul>
  */
 public String getSelectionText () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
-        //TODO
-        return "";
+        Point selection = getSelection ();
+        if (selection.x is selection.y) return "";
+        return new String (getEditText (selection.x, selection.y - 1));
     } else {
-        NSTextView widget = cast(NSTextView)view;
-        NSRange range = widget.selectedRange();
-        NSString str = widget.textStorage().string();
-        char[] buffer = new char[range.length];
-        str.getCharacters_range_(buffer, range);
-        return new String(buffer);
+        NSTextView widget = cast(NSTextView) view;
+        NSRange range = widget.selectedRange ();
+        NSString str = widget.textStorage ().string ();
+        char[] buffer = new char [(int)/*64*/range.length];
+        str.getCharacters (buffer, range);
+        return new String (buffer);
     }
 }
 
@@ -845,7 +932,7 @@
  * </ul>
  */
 public int getTabs () {
-    checkWidget();
+    checkWidget ();
     return tabs;
 }
 
@@ -864,17 +951,14 @@
  * </ul>
  */
 public String getText () {
-    checkWidget();
+    checkWidget ();
     NSString str;
     if ((style & DWT.SINGLE) !is 0) {
-        str = new NSTextFieldCell((cast(NSTextField)view).cell()).title();
+        return new_String (getEditText ());
     } else {
-        str = (cast(NSTextView)view).textStorage().string();
+        str = (cast(NSTextView)view).textStorage ().string ();
     }
-    if (str is null) return "";
-    char[] buffer = new char[str.length()];
-    str.getCharacters_(buffer);
-    return new String(buffer);
+    return str.getString();
 }
 
 /**
@@ -897,18 +981,20 @@
  */
 public String getText (int start, int end) {
     checkWidget ();
-    NSString str;
+    if (!(start <= end && 0 <= end)) return ""; //$NON-NLS-1$
     if ((style & DWT.SINGLE) !is 0) {
-        str = new NSTextFieldCell((cast(NSTextField)view).cell()).title();
-         
-    } else {
-        str = null;
-//      return getTXNText (OS.kTXNStartOffset, OS.kTXNEndOffset);
+        return new_String (getEditText (start, end));
     }
-    if (str is null) return "";
-    char[] buffer = new char[str.length()];
-    str.getCharacters_(buffer);
-    return new String(buffer, start, end - start);
+    NSTextStorage storage = ((NSTextView) view).textStorage ();
+    end = Math.min (end, (int)/*64*/storage.length () - 1);
+    if (start > end) return ""; //$NON-NLS-1$
+    start = Math.max (0, start);
+    NSRange range = new NSRange ();
+    range.location = start;
+    range.length = end - start + 1;
+    NSAttributedString substring = storage.attributedSubstringFromRange (range);
+    NSString string = substring.string ();
+    return string.getString();
 }
 
 /**
@@ -928,7 +1014,7 @@
  * @see #LIMIT
  */
 public int getTextLimit () {
-    checkWidget();
+    checkWidget ();
     return textLimit;
 }
 
@@ -947,7 +1033,7 @@
  * </ul>
  */
 public int getTopIndex () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) return 0;
     return getTopPixel () / getLineHeight ();
 }
@@ -973,7 +1059,7 @@
  * </ul>
  */
 public int getTopPixel () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) return 0;
     //TODO
     return 0;
@@ -996,7 +1082,7 @@
  * </ul>
  */
 public void insert (String string) {
-    checkWidget();
+    checkWidget ();
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (hooks (DWT.Verify) || filters (DWT.Verify)) {
         Point selection = getSelection ();
@@ -1004,17 +1090,46 @@
         if (string is null) return;
     }
     if ((style & DWT.SINGLE) !is 0) {
-//      new NSTextFieldCell((cast(NSTextField)view).cell()).title().
+        insertEditText (string);
     } else {
-        //
-        NSString str = NSString.stringWith(string);
-        NSTextView widget = cast(NSTextView)view;
-        NSRange range = widget.selectedRange();
-        widget.textStorage().replaceCharactersInRange_withString_(range, str);
+        NSString str = NSString.stringWith (string);
+        NSTextView widget = cast(NSTextView) view;
+        NSRange range = widget.selectedRange ();
+        widget.textStorage ().replaceCharactersInRange (range, str);
     }
     if (string.length () !is 0) sendEvent (DWT.Modify);
 }
 
+void insertEditText (String string) {
+    int length = string.length ();
+    Point selection = getSelection ();
+    if (hasFocus () && hiddenText is null) {
+        if (textLimit !is LIMIT) {
+            int charCount = getCharCount();
+            if (charCount - (selection.y - selection.x) + length > textLimit) {
+                length = textLimit - charCount + (selection.y - selection.x);
+            }
+        }
+        char [] buffer = new char [length];
+        string.getChars (0, buffer.length, buffer, 0);
+        NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
+        NSText editor = ((NSTextField) view).currentEditor ();
+        editor.replaceCharactersInRange (editor.selectedRange (), nsstring);
+        selectionRange = null;
+    } else {
+        String oldText = getText ();
+        if (textLimit !is LIMIT) {
+            int charCount = oldText.length ();
+            if (charCount - (selection.y - selection.x) + length > textLimit) {
+                string = string.substring(0, textLimit - charCount + (selection.y - selection.x));
+            }
+        }
+        String newText = oldText.substring (0, selection.x) + string + oldText.substring (selection.y);
+        setEditText (newText);
+        setSelection (selection.x + string.length ());
+    }
+}
+
 /**
  * Pastes text from clipboard.
  * <p>
@@ -1028,47 +1143,51 @@
  * </ul>
  */
 public void paste () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.READ_ONLY) !is 0) return;
-//  bool paste = true;
-//  String oldText = null;
-//  if (hooks (DWT.Verify) || filters (DWT.Verify)) {
-//      oldText = getClipboardText ();
-//      if (oldText !is null) {
-//          Point selection = getSelection ();
-//          String newText = verifyText (oldText, selection.x, selection.y, null);
-//          if (newText is null) return;
-//          if (!newText.equals (oldText)) {
-//              if (txnObject is 0) {
-//                  insertEditText (newText);
-//              } else {
-//                  setTXNText (OS.kTXNUseCurrentSelection, OS.kTXNUseCurrentSelection, newText);
-//                  OS.TXNShowSelection (txnObject, false);
-//              }
-//              paste = false;
-//          }
-//      }
-//  }
-//  if (paste) {
-//      if (txnObject is 0) {
-//          if (oldText is null) oldText = getClipboardText ();
-//          insertEditText (oldText);
-//      } else {
-//          if (textLimit !is LIMIT) {
-//              if (oldText is null) oldText = getClipboardText ();
-//              setTXNText (OS.kTXNUseCurrentSelection, OS.kTXNUseCurrentSelection, oldText);
-//              OS.TXNShowSelection (txnObject, false);
-//          } else {
-//              OS.TXNPaste (txnObject);
-//          }
-//      }
-//  }
-//  sendEvent (DWT.Modify);
+    bool paste = true;
+    String oldText = null;
+    if (hooks (DWT.Verify) || filters (DWT.Verify)) {
+        oldText = getClipboardText ();
+        if (oldText !is null) {
+            Point selection = getSelection ();
+            String newText = verifyText (oldText, selection.x, selection.y, null);
+            if (newText is null) return;
+            if (!newText.equals (oldText)) {
+                if ((style & DWT.SINGLE) !is 0) {
+                    insertEditText (newText);
+                } else {
+                    NSTextView textView = (NSTextView) view;
+                    textView.replaceCharactersInRange (textView.selectedRange (), NSString.stringWith (newText));
+                }
+                paste = false;
+            }
+        }
+    }
+    if (paste) {
+        if ((style & DWT.SINGLE) !is 0) {
+            if (oldText is null) oldText = getClipboardText ();
+            insertEditText (oldText);
+        } else {
+            //TODO check text limit
+            ((NSTextView) view).paste (null);
+        }
+    }
+    sendEvent (DWT.Modify);
+}
+
+void register() {
+    super.register();
+    
+    if ((style & DWT.SINGLE) !is 0) {
+        display.addWidget(((NSControl)view).cell(), this);
+    }
 }
 
 void releaseWidget () {
     super.releaseWidget ();
     hiddenText = message = null;
+    selectionRange = null;
 }
 
 /**
@@ -1089,7 +1208,7 @@
  * @see #addModifyListener
  */
 public void removeModifyListener (ModifyListener listener) {
-    checkWidget();
+    checkWidget ();
     if (listener is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (eventTable is null) return;
     eventTable.unhook (DWT.Modify, listener);
@@ -1113,11 +1232,11 @@
  * @see #addSelectionListener
  */
 public void removeSelectionListener(SelectionListener listener) {
-    checkWidget();
+    checkWidget ();
     if (listener is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (eventTable is null) return;
-    eventTable.unhook(DWT.Selection, listener);
-    eventTable.unhook(DWT.DefaultSelection,listener);
+    eventTable.unhook (DWT.Selection, listener);
+    eventTable.unhook (DWT.DefaultSelection,listener);
 }
 
 /**
@@ -1138,7 +1257,7 @@
  * @see #addVerifyListener
  */
 public void removeVerifyListener (VerifyListener listener) {
-    checkWidget();
+    checkWidget ();
     if (listener is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (eventTable is null) return;
     eventTable.unhook (DWT.Verify, listener);
@@ -1153,73 +1272,92 @@
  * </ul>
  */
 public void selectAll () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
         setSelection (0, getCharCount ());
     } else {
-        (cast(NSTextView)view).selectAll(null);
+        (cast(NSTextView) view).selectAll (null);
     }
 }
 
-bool sendKeyEvent (int type, Event event) {
-    if (!super.sendKeyEvent (type, event)) {
-        return false;
+bool sendKeyEvent (NSEvent nsEvent, int type) {
+    bool result = super.sendKeyEvent (nsEvent, type);
+    if (!result) return result;
+    if (type !is DWT.KeyDown) return result;
+    int stateMask = 0;
+    int /*long*/ modifierFlags = nsEvent.modifierFlags();
+    if ((modifierFlags & OS.NSAlternateKeyMask) !is 0) stateMask |= DWT.ALT;
+    if ((modifierFlags & OS.NSShiftKeyMask) !is 0) stateMask |= DWT.SHIFT;
+    if ((modifierFlags & OS.NSControlKeyMask) !is 0) stateMask |= DWT.CONTROL;
+    if ((modifierFlags & OS.NSCommandKeyMask) !is 0) stateMask |= DWT.COMMAND;
+    if (stateMask is DWT.COMMAND) {
+        short keyCode = nsEvent.keyCode ();
+        switch (keyCode) {
+            case 7: /* X */
+                cut ();
+                return false;
+            case 8: /* C */
+                copy ();
+                return false;
+            case 9: /* V */
+                paste ();
+                return false;
+        }
     }
-    if (type !is DWT.KeyDown) return true;
-    if ((style & DWT.READ_ONLY) !is 0) return true;
-    if (event.character is 0) return true;
-    if ((event.stateMask & DWT.COMMAND) !is 0) return true;
+    if ((style & DWT.SINGLE) !is 0) {
+        short keyCode = nsEvent.keyCode ();
+        switch (keyCode) {
+            case 76: /* KP Enter */
+            case 36: /* Return */
+                postEvent (DWT.DefaultSelection);
+        }
+    }
+    if ((stateMask & DWT.COMMAND) !is 0) return result;
     String oldText = "";
     int charCount = getCharCount ();
     Point selection = getSelection ();
     int start = selection.x, end = selection.y;
-    switch (event.character) {
-        case DWT.BS:
+    short keyCode = nsEvent.keyCode ();
+    NSString characters = nsEvent.charactersIgnoringModifiers();
+    char character = (char) characters.characterAtIndex(0);
+    switch (keyCode) {
+        case 51: /* Backspace */
             if (start is end) {
                 if (start is 0) return true;
                 start = Math.max (0, start - 1);
             }
             break;
-        case DWT.DEL:
+        case 117: /* Delete */
             if (start is end) {
                 if (start is charCount) return true;
                 end = Math.min (end + 1, charCount);
             }
             break;
-        case DWT.CR:
+        case 36: /* Return */
             if ((style & DWT.SINGLE) !is 0) return true;
             oldText = DELIMITER;
             break;
         default:
-            if (event.character !is '\t' && event.character < 0x20) return true;
-            oldText = new String (new char [] {event.character});
+            if (character !is '\t' && character < 0x20) return true;
+            oldText = new String (new char [] {character});
     }
-    String newText = verifyText (oldText, start, end, event);
+    String newText = verifyText (oldText, start, end, nsEvent);
     if (newText is null) return false;
     if (charCount - (end - start) + newText.length () > textLimit) {
         return false;
     }
-    bool result = newText is oldText;
+    result = newText is oldText;
     if (newText !is oldText || hiddenText !is null) {
-//      if (txnObject is 0) {
-//          String text = new String (getEditText (0, -1));
-//          String leftText = text.substring (0, start);
-//          String rightText = text.substring (end, text.length ());
-//          setEditText (leftText + newText + rightText);
-//          start += newText.length ();
-//          setSelection (new Point (start, start));
-//          result = false;
-//      } else {
-//          setTXNText (start, end, newText);
-//      }
+        if ((style & DWT.SINGLE) !is 0) {
+            insertEditText (newText);
+        } else {
+            NSString str = NSString.stringWith (newText);
+            NSTextView widget = (NSTextView) view;
+            NSRange range = widget.selectedRange ();
+            widget.textStorage ().replaceCharactersInRange (range, str);
+        }
+        if (newText.length () !is 0) sendEvent (DWT.Modify);
     }
-    /*
-    * Post the modify event so that the character will be inserted
-    * into the widget when the modify event is delivered.  Normally,
-    * modify events are sent but it is safe to post the event here
-    * because this method is called from the event loop.
-    */
-    postEvent (DWT.Modify);
     return result;
 }
 
@@ -1228,12 +1366,12 @@
     if (color is null) {
         return; // TODO reset to OS default
     } else {
-        nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], 1);
+        nsColor = NSColor.colorWithDeviceRed (color [0], color [1], color [2], 1);
     }
     if ((style & DWT.SINGLE) !is 0) {
-        (cast(NSTextField)view).setBackgroundColor(nsColor);
+        (cast(NSTextField) view).setBackgroundColor (nsColor);
     } else {
-        (cast(NSTextView)view).setBackgroundColor(nsColor);
+        (cast(NSTextView) view).setBackgroundColor (nsColor);
     }
 }
 
@@ -1256,7 +1394,7 @@
  * </ul>
  */
 public void setDoubleClickEnabled (bool doubleClick) {
-    checkWidget();
+    checkWidget ();
     this.doubleClick = doubleClick;
 }
 
@@ -1282,7 +1420,7 @@
  * </ul>
  */
 public void setEchoChar (char echo) {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.MULTI) !is 0) return;
 //  if (txnObject is 0) {
 //      if ((style & DWT.PASSWORD) is 0) {
@@ -1309,17 +1447,41 @@
  * </ul>
  */
 public void setEditable (bool editable) {
-    checkWidget();
+    checkWidget ();
     if (editable) {
         style &= ~DWT.READ_ONLY;
     } else {
         style |= DWT.READ_ONLY;
     }
     if ((style & DWT.SINGLE) !is 0) {
-        (cast(NSTextField)view).setEditable(editable);
+        (cast(NSTextField) view).setEditable (editable);
+    } else {
+        (cast(NSTextView) view).setEditable (editable);
+    }
+}
+
+void setEditText (String string) {
+    char [] buffer;
+    if ((style & DWT.PASSWORD) is 0 && echoCharacter !is '\0') {
+        hiddenText = string;
+        buffer = new char [Math.min(hiddenText.length (), textLimit)];
+        for (int i = 0; i < buffer.length; i++) buffer [i] = echoCharacter;
     } else {
-        (cast(NSTextView)view).setEditable(editable);
+        hiddenText = null;
+        buffer = new char [Math.min(string.length (), textLimit)];
+        string.getChars (0, buffer.length, buffer, 0);
     }
+    NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
+    new NSCell (((NSTextField) view).cell ()).setTitle (nsstring);
+    selectionRange = null;
+}
+
+void setFont(NSFont font) {
+    if ((style & DWT.MULTI) !is  0) {
+        ((NSTextView) view).setFont (font);
+        return;
+    }
+    super.setFont (font);
 }
 
 void setForeground (float [] color) {
@@ -1327,12 +1489,12 @@
     if (color is null) {
         return; // TODO reset to OS default
     } else {
-        nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], 1);
+        nsColor = NSColor.colorWithDeviceRed (color [0], color [1], color [2], 1);
     }
     if ((style & DWT.SINGLE) !is 0) {
-        (cast(NSTextField)view).setTextColor(nsColor);
+        (cast(NSTextField) view).setTextColor (nsColor);
     } else {
-        (cast(NSTextView)view).setTextColor_(nsColor);
+        (cast(NSTextView) view).setTextColor (nsColor);
     }
 }
 
@@ -1354,7 +1516,7 @@
  * @since 2.1.2
  */
 public void setOrientation (int orientation) {
-    checkWidget();
+    checkWidget ();
 }
 
 /**
@@ -1417,7 +1579,7 @@
  * </ul>
  */
 public void setSelection (int start) {
-    checkWidget();
+    checkWidget ();
     setSelection (start, start);
 }
 
@@ -1447,23 +1609,27 @@
  * </ul>
  */
 public void setSelection (int start, int end) {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) {
-//      int length = getCharCount ();
-//      ControlEditTextSelectionRec selection = new ControlEditTextSelectionRec ();
-//      selection.selStart = cast(short) Math.min (Math.max (Math.min (start, end), 0), length);
-//      selection.selEnd = cast(short) Math.min (Math.max (Math.max (start, end), 0), length);
-//      if (hasFocus ()) {
-//          OS.SetControlData (handle, OS.kControlEntireControl, OS.kControlEditTextSelectionTag, 4, selection);
-//      } else {
-//          this.selection = selection;
-//      }
+        NSString str = new NSCell (((NSTextField) view).cell ()).title ();
+        int length = (int)/*64*/str.length ();
+        int selStart = Math.min (Math.max (Math.min (start, end), 0), length);
+        int selEnd = Math.min (Math.max (Math.max (start, end), 0), length);
+        selectionRange = new NSRange ();
+        selectionRange.location = selStart;
+        selectionRange.length = selEnd - selStart;
+        if (this is display.getFocusControl ()) {
+            NSText editor = view.window ().fieldEditor (false, view);
+            editor.setSelectedRange (selectionRange);
+        }
     } else {
-        //TODO - range test
+        int length = (int)/*64*/((NSTextView) view).textStorage ().length ();
+        int selStart = Math.min (Math.max (Math.min (start, end), 0), length);
+        int selEnd = Math.min (Math.max (Math.max (start, end), 0), length);
         NSRange range = new NSRange ();
-        range.location = start;
-        range.length = end - start + 1;
-        (cast(NSTextView)view).setSelectedRange (range);
+        range.location = selStart;
+        range.length = selEnd - selStart;
+        (cast(NSTextView) view).setSelectedRange (range);
     }
 }
 
@@ -1497,7 +1663,7 @@
  * </ul>
  */
 public void setSelection (Point selection) {
-    checkWidget();
+    checkWidget ();
     if (selection is null) error (DWT.ERROR_NULL_ARGUMENT);
     setSelection (selection.x, selection.y);
 }
@@ -1519,7 +1685,7 @@
  * </ul>
  */
 public void setTabs (int tabs) {
-    checkWidget();
+    checkWidget ();
     if (this.tabs is tabs) return;
 //  if (txnObject is 0) return;
 //  this.tabs = tabs;
@@ -1547,17 +1713,17 @@
  * </ul>
  */
 public void setText (String string) {
-    checkWidget();
+    checkWidget ();
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (hooks (DWT.Verify) || filters (DWT.Verify)) {
         string = verifyText (string, 0, getCharCount (), null);
         if (string is null) return;
     }
-    NSString str = NSString.stringWith(string);
     if ((style & DWT.SINGLE) !is 0) {
-        new NSCell((cast(NSTextField)view).cell()).setTitle(str);
+        setEditText (string);
     } else {
-        (cast(NSTextView)view).setString(str);
+        NSString str = NSString.stringWith (string);
+        (cast(NSTextView) view).setString (str);
     }
     sendEvent (DWT.Modify);
 }
@@ -1587,7 +1753,7 @@
  * @see #LIMIT
  */
 public void setTextLimit (int limit) {
-    checkWidget();
+    checkWidget ();
     if (limit is 0) error (DWT.ERROR_CANNOT_BE_ZERO);
     textLimit = limit;
 }
@@ -1605,13 +1771,13 @@
  * </ul>
  */
 public void setTopIndex (int index) {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0) return;
     //TODO no working
-    NSTextView widget = cast(NSTextView)view;
-    NSRange range = new NSRange();
-    NSRect rect = widget.firstRectForCharacterRange(range);
-    view.scrollRectToVisible(rect);
+//  NSTextView widget = cast(NSTextView) view;
+//  NSRange range = new NSRange ();
+//  NSRect rect = widget.firstRectForCharacterRange (range);
+//  view.scrollRectToVisible (rect);
 }
 
 /**
@@ -1628,42 +1794,61 @@
  * </ul>
  */
 public void showSelection () {
-    checkWidget();
+    checkWidget ();
     if ((style & DWT.SINGLE) !is 0)  {
-        setSelection (getSelection());
+        setSelection (getSelection ());
     } else {
-        NSTextView widget = cast(NSTextView)view;
-        widget.scrollRangeToVisible(widget.selectedRange());
+        NSTextView widget = cast(NSTextView) view;
+        widget.scrollRangeToVisible (widget.selectedRange ());
     }
 }
 
+void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    NSNotification notification = new NSNotification (aNotification);
+    NSText editor = new NSText (notification.object ().id);
+    selectionRange = editor.selectedRange ();
+}
+
+void textDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    postEvent (DWT.Modify);
+}
+
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange (int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) {
+    /*
+    * If the selection is changing as a result of the receiver getting focus
+    * then return the receiver's last selection range, otherwise the full
+    * text will be automatically selected.
+    */
+    if (receivingFocus && selectionRange !is null) return selectionRange;
+
+    /* allow the selection change to proceed */
+    NSRange result = new NSRange ();
+    OS.memmove(result, newSelectedCharRange, NSRange.sizeof);
+    return result;
+}
+
 int traversalCode (int key, NSEvent theEvent) {
     int bits = super.traversalCode (key, theEvent);
     if ((style & DWT.READ_ONLY) !is 0) return bits;
     if ((style & DWT.MULTI) !is 0) {
         bits &= ~DWT.TRAVERSE_RETURN;
-//      if (key is 48 /* Tab */ && theEvent !is 0) {
-//          int [] modifiers = new int [1];
-//          OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);
-//          bool next = (modifiers [0] & OS.shiftKey) is 0;
-//          if (next && (modifiers [0] & OS.controlKey) is 0) {
-//              bits &= ~(DWT.TRAVERSE_TAB_NEXT | DWT.TRAVERSE_TAB_PREVIOUS);
-//          }
-//      }
+        if (key is 48 /* Tab */ && theEvent !is null) {
+            int /*long*/ modifiers = theEvent.modifierFlags ();
+            bool next = (modifiers & OS.NSShiftKeyMask) is 0;
+            if (next && (modifiers & OS.NSControlKeyMask) is 0) {
+                bits &= ~(DWT.TRAVERSE_TAB_NEXT | DWT.TRAVERSE_TAB_PREVIOUS);
+            }
+        }
     }
     return bits;
 }
 
-String verifyText (String string, int start, int end, Event keyEvent) {
+String verifyText (String string, int start, int end, NSEvent keyEvent) {
     Event event = new Event ();
+    if (keyEvent !is null) setKeyState(event, DWT.MouseDown, keyEvent);
     event.text = string;
     event.start = start;
     event.end = end;
-    if (keyEvent !is null) {
-        event.character = keyEvent.character;
-        event.keyCode = keyEvent.keyCode;
-        event.stateMask = keyEvent.stateMask;
-    }
     /*
      * It is possible (but unlikely), that application
      * code could have disposed the widget in the verify
--- a/dwt/widgets/ToolBar.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/ToolBar.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,11 +15,20 @@
  
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSButton;
+import dwt.internal.cocoa.NSFont;
+import dwt.internal.cocoa.NSMutableArray;
+import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
+import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTView;
+import dwt.internal.cocoa.id;
 
 /**
  * Instances of this class support the layout of selectable
@@ -43,11 +52,16 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#toolbar">ToolBar, ToolItem snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class ToolBar : Composite {
     int itemCount;
     ToolItem [] items;
-
+    NSArray accessibilityAttributes = null;
+    
 /**
  * Constructs a new instance of this class given its parent
  * and a style value describing its behavior and appearance.
@@ -99,6 +113,77 @@
     }
 }
 
+int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+    
+    if (accessibilityAttributes is null) {
+        NSMutableArray ourAttributes = NSMutableArray.arrayWithCapacity(10);
+        ourAttributes.addObject(OS.NSAccessibilityRoleAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityRoleDescriptionAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityParentAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityPositionAttribute);
+        ourAttributes.addObject(OS.NSAccessibilitySizeAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityWindowAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityTopLevelUIElementAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityHelpAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityEnabledAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityFocusedAttribute);
+        ourAttributes.addObject(OS.NSAccessibilityChildrenAttribute);
+
+        if (accessible !is null) {
+            // See if the accessible will override or augment the standard list.
+            // Help, title, and description can be overridden.
+            NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
+            extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
+            extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
+            extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
+
+            for (int i = extraAttributes.count() - 1; i >= 0; i--) {
+                NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
+                if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) !is null) {
+                    ourAttributes.addObject(extraAttributes.objectAtIndex(i));
+                }
+            }
+        }
+        
+        accessibilityAttributes = ourAttributes;
+        accessibilityAttributes.retain();
+    }
+    
+    return accessibilityAttributes.id;
+}
+
+int accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    NSString nsAttributeName = new NSString(arg0);
+    
+    if (accessible !is null) {
+        id returnObject = accessible.internal_accessibilityAttributeValue(nsAttributeName, ACC.CHILDID_SELF);
+        if (returnObject !is null) return returnObject.id;
+    }
+    
+    if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
+        NSString role = OS.NSAccessibilityToolbarRole;
+
+        if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute))
+            return role.id;
+        else {
+            int roleDescription = OS.NSAccessibilityRoleDescription(role.id, 0);
+            return roleDescription;
+        }
+    } else if (nsAttributeName.isEqualToString(OS.NSAccessibilityEnabledAttribute)) {
+        return NSNumber.numberWithBool(isEnabled()).id;
+    } else if (nsAttributeName.isEqualToString(OS.NSAccessibilityFocusedAttribute)) {
+        bool focused = (view.id is view.window().firstResponder().id);
+        return NSNumber.numberWithBool(focused).id;
+    }
+    
+    return super.accessibilityAttributeValue(id, sel, arg0);
+}
+
+bool accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+    // Toolbars aren't ignored.
+    return false;   
+}
+
 static int checkStyle (int style) {
     /*
     * Even though it is legal to create this widget
@@ -127,12 +212,10 @@
 }
 
 void createHandle () {
-    SWTView widget = cast(SWTView)new SWTView().alloc();
+    NSView widget = cast(NSView)new SWTView().alloc();
     widget.initWithFrame(new NSRect());
 //  widget.setDrawsBackground(false);
-    widget.setTag(jniRef);
     view = widget;
-    parent.contentView().addSubview_(widget);
 }
 
 void createItem (ToolItem item, int index) {
@@ -143,7 +226,7 @@
         items = newItems;
     }
     item.createWidget();
-    view.addSubview_(item.view);
+    view.addSubview(item.view);
     System.arraycopy (items, index, items, index + 1, itemCount++ - index);
     items [index] = item;
     relayout ();
@@ -421,6 +504,12 @@
     super.releaseChildren (destroy);
 }
 
+void releaseHandle () {
+    super.releaseHandle ();
+    if (accessibilityAttributes !is null) accessibilityAttributes.release();
+    accessibilityAttributes = null;
+}
+
 void removeControl (Control control) {
     super.removeControl (control);
     for (int i=0; i<itemCount; i++) {
@@ -429,10 +518,16 @@
     }
 }
 
-int setBounds (int x, int y, int width, int height, bool move, bool resize) {
-    int result = super.setBounds (x, y, width, height, move, resize);
-    if ((result & RESIZED) !is 0) relayout ();
-    return result;
+void resized () {
+    super.resized ();
+    relayout ();
+}
+
+void setFont(NSFont font) {
+    for (int i = 0; i < itemCount; i++) {
+        ToolItem item = items[i];
+        if (item.button !is null) ((NSButton)item.button).setAttributedTitle(item.createString());
+    }
 }
 
 public void setRedraw (bool redraw) {
--- a/dwt/widgets/ToolItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/ToolItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,13 +17,21 @@
 import dwt.DWTException;
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
+import dwt.graphics.Color;
+import dwt.graphics.Font;
 import dwt.graphics.Image;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSAffineTransform;
+import dwt.internal.cocoa.NSAttributedString;
 import dwt.internal.cocoa.NSBezierPath;
+import dwt.internal.cocoa.NSBox;
 import dwt.internal.cocoa.NSButton;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSGraphicsContext;
+import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSMutableParagraphStyle;
+import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSRect;
 import dwt.internal.cocoa.NSString;
@@ -48,10 +56,13 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#toolbar">ToolBar, ToolItem snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class ToolItem : Item {
     NSView view;
-    NSButton button, arrow;
+    NSButton button;
     int width = DEFAULT_SEPARATOR_WIDTH;
     ToolBar parent;
     Image hotImage, disabledImage;
@@ -62,9 +73,8 @@
     static final int DEFAULT_WIDTH = 24;
     static final int DEFAULT_HEIGHT = 22;
     static final int DEFAULT_SEPARATOR_WIDTH = 6;
-    static final int INSET = 5;
+    static final int INSET = 3;
     static final int ARROW_WIDTH = 5;
-    static final int ARROW_INSET = 2;
 
 /**
  * Constructs a new instance of this class given its parent
@@ -148,6 +158,44 @@
     parent.createItem (this, index);
 }
 
+int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    NSString nsAttributeName = new NSString(arg0);
+
+    if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
+        NSString roleText = ((style & DWT.PUSH) !is 0) ? OS.NSAccessibilityButtonRole
+                : ((style & DWT.RADIO) !is 0) ? OS.NSAccessibilityRadioButtonRole
+                : ((style & DWT.CHECK) !is 0) ? OS.NSAccessibilityCheckBoxRole
+                : ((style & DWT.DROP_DOWN) !is 0) ? OS.NSAccessibilityMenuButtonRole
+                : null; // SEPARATOR
+        if (roleText !is null) {
+            if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute)) {
+                return roleText.id;
+            } else { // NSAccessibilityRoleDescriptionAttribute
+                int /*long*/ description = OS.NSAccessibilityRoleDescription (roleText.id, 0);
+                return description;
+            }
+        }
+    } else if (nsAttributeName.isEqualToString (OS.NSAccessibilityTitleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
+        return (getText() !is null ? NSString.stringWith(getText()).id : NSString.stringWith("").id);
+    } else if (nsAttributeName.isEqualToString (OS.NSAccessibilityHelpAttribute)) {
+        String accessibleText = toolTipText;
+        if (accessibleText is null || accessibleText.equals("")) accessibleText = text;
+        if (!(accessibleText is null || accessibleText.equals(""))) {
+            return NSString.stringWith(accessibleText).id;
+        } else {
+            return NSString.stringWith("").id;
+        }
+    } else if (nsAttributeName.isEqualToString (OS.NSAccessibilityValueAttribute) && (style & (DWT.CHECK | DWT.RADIO)) !is 0) {
+        NSNumber value = NSNumber.numberWithInt(selection ? 1 : 0);
+        return value.id;
+    } else if (nsAttributeName.isEqualToString(OS.NSAccessibilityEnabledAttribute)) {
+        NSNumber value = NSNumber.numberWithInt(getEnabled() ? 1 : 0);
+        return value.id;
+    }
+
+    return super.accessibilityAttributeValue(id, sel, arg0);
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the control is selected by the user, by sending
@@ -204,105 +252,137 @@
             height = Math.max (height, control.getMininumHeight ());
         }
     } else {
-        (cast(NSButton)button).sizeToFit ();
-        NSRect frame = button.frame();
-        width = cast(int)frame.width + INSET;
-        height = cast(int)frame.height;
-        if (arrow !is null) {
-            width += ARROW_INSET + ARROW_WIDTH;
+        if (text.length () !is 0 || image !is null) {
+            NSButton widget = (NSButton)button;
+            NSRect oldFrame = widget.frame();
+            widget.sizeToFit ();
+            NSRect frame = button.frame();
+            width = cast(int)frame.width;
+            height = cast(int)frame.height;
+            widget.setFrame(oldFrame);
+        } else {
+            width = DEFAULT_WIDTH;
+            height = DEFAULT_HEIGHT;
         }
-        view.setNeedsDisplay(true);
+        if ((style & DWT.DROP_DOWN) !is 0) {
+            width += ARROW_WIDTH + INSET;
+        }
+        width += INSET * 2;
+        height += INSET * 2;
     }
     return new Point (width, height);
 }
 
-void createWidget() {
-    createJNIRef ();
+void createHandle () {
     if ((style & DWT.SEPARATOR) !is 0) {
-        SWTBox widget = cast(SWTBox)new SWTBox().alloc();
+        NSBox widget = cast(NSBox)new SWTBox().alloc();
         widget.initWithFrame(new NSRect());
         widget.setBoxType(OS.NSBoxSeparator);
-        widget.setTag(jniRef);
         view = widget;
     } else {
-        SWTView widget = cast(SWTView)new SWTView().alloc();
+        NSView widget = cast(NSView)new SWTView().alloc();
         widget.initWithFrame(new NSRect());
-        widget.setTag(parent.jniRef);
-        parent.contentView().addSubview_(widget);
+        parent.contentView().addSubview(widget);
         button = cast(NSButton)new SWTButton().alloc();
         button.initWithFrame(new NSRect());
         button.setBordered(false);
         button.setAction(OS.sel_sendSelection);
         button.setTarget(button);
-        button.setTag(jniRef);
+        Font font = parent.font !is null ? parent.font : parent.defaultFont ();
+        button.setFont(font.handle);
         button.setImagePosition(OS.NSImageOverlaps);
-        button.setTitle(NSString.stringWith(""));
+        NSString emptyStr = NSString.stringWith("");
+        button.setTitle(emptyStr);
         button.setEnabled(parent.getEnabled());
-        widget.addSubview_(button);
-        if ((style & DWT.DROP_DOWN) !is 0) {
-            arrow = cast(NSButton)new SWTButton().alloc();
-            arrow.initWithFrame(new NSRect());
-            arrow.setBordered(false);
-            arrow.setAction(OS.sel_sendArrowSelection);
-            arrow.setTarget(arrow);
-            arrow.setTag(jniRef);
-            arrow.setEnabled(parent.getEnabled());
-            widget.addSubview_(arrow);
-        }
+        widget.addSubview(button);
         view = widget;
     }
 }
+
+NSAttributedString createString() {
+    NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
+    Color foreground = parent.foreground;
+    if (foreground !is null) {
+        NSColor color = NSColor.colorWithDeviceRed(foreground.handle[0], foreground.handle[1], foreground.handle[2], 1);
+        dict.setObject(color, OS.NSForegroundColorAttributeName);
+    }
+    Font font = parent.getFont();
+    if (font !is null) {
+        dict.setObject(font.handle, OS.NSFontAttributeName);
+    }
+    char [] chars = new char [text.length ()];
+    text.getChars (0, chars.length, chars, 0);
+    int length = fixMnemonic (chars);
+
+    NSMutableParagraphStyle pStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle().alloc().init();
+    pStyle.autorelease();
+    pStyle.setAlignment(OS.NSCenterTextAlignment);
+    dict.setObject(pStyle, OS.NSParagraphStyleAttributeName);
+    
+    NSString str = NSString.stringWithCharacters(chars, length);
+    NSAttributedString attribStr = ((NSAttributedString)new NSAttributedString().alloc()).initWithString(str, dict);
+    attribStr.autorelease();
+    return attribStr;
+}
+
+void deregister () {
+    super.deregister ();
+    display.removeWidget(view);
+    
+    if (button !is null) {
+        display.removeWidget (button);
+        display.removeWidget (button.cell());
+    }
+}
+
 void destroyWidget() {
     parent.destroyItem(this);
     super.destroyWidget();
 }
 
-void drawRect(int id, NSRect rect) {
-    super.drawRect(id, rect);
-    if (getSelection ()) {
-        NSRect bounds = view.bounds();
-        NSGraphicsContext context = NSGraphicsContext.currentContext();
-        context.saveGraphicsState();
-        NSColor.colorWithDeviceRed(0.1f, 0.1f, 0.1f, 0.1f).setFill();
-        NSColor.colorWithDeviceRed(0.2f, 0.2f, 0.2f, 0.2f).setStroke();
-        NSBezierPath.fillRect(bounds);
-        bounds.x += 0.5f;
-        bounds.y += 0.5f;
-        bounds.width -= 1;
-        bounds.height -= 1;
-        NSBezierPath.strokeRect(bounds);
-        context.restoreGraphicsState();
-    }
-    if (arrow !is null && id is arrow.id) {
-        NSRect frame = arrow.frame();
-        NSGraphicsContext context = NSGraphicsContext.currentContext();
-        context.saveGraphicsState();
-        NSPoint p1 = new NSPoint();
-        p1.y = cast(float)Math.ceil(frame.height / 2 - frame.width / 2);
-        NSPoint p2 = new NSPoint();
-        p2.x = frame.width;
-        p2.y = p1.y;
-        NSPoint p3 = new NSPoint();
-        p3.x = frame.width / 2;
-        p3.y = cast(float)(p2.y + Math.sqrt(Math.pow(frame.width, 2) - Math.pow(frame.width / 2, 2)));
-        NSBezierPath path = NSBezierPath.bezierPath();
-        path.moveToPoint(p1);
-        path.lineToPoint(p2);
-        path.lineToPoint(p3);
-        path.closePath();
-        NSColor color = isEnabled() ? NSColor.blackColor() : NSColor.disabledControlTextColor();
-        color.set();
-        path.fill();
-        context.restoreGraphicsState();
+void drawWidget (int /*long*/ id, NSRect rect) {
+    if (id is view.id) {
+        if (getSelection ()) {
+            NSRect bounds = view.bounds();
+            NSGraphicsContext context = NSGraphicsContext.currentContext();
+            context.saveGraphicsState();
+            NSColor.colorWithDeviceRed(0.1f, 0.1f, 0.1f, 0.1f).setFill();
+            NSColor.colorWithDeviceRed(0.2f, 0.2f, 0.2f, 0.2f).setStroke();
+            NSBezierPath.fillRect(bounds);
+            bounds.x += 0.5f;
+            bounds.y += 0.5f;
+            bounds.width -= 1;
+            bounds.height -= 1;
+            NSBezierPath.strokeRect(bounds);
+            context.restoreGraphicsState();
+        }
+        if ((style & DWT.DROP_DOWN) !is 0) {
+            NSRect bounds = view.bounds();
+            NSGraphicsContext context = NSGraphicsContext.currentContext();
+            context.saveGraphicsState();
+            NSBezierPath path = NSBezierPath.bezierPath();
+            NSPoint pt = new NSPoint();
+            path.moveToPoint(pt);
+            pt.x += ARROW_WIDTH;
+            path.lineToPoint(pt);
+            pt.y += ARROW_WIDTH - 1;
+            pt.x -= ARROW_WIDTH / 2f;
+            path.lineToPoint(pt);
+            path.closePath();
+            NSAffineTransform transform = NSAffineTransform.transform();
+            transform.translateXBy((int)bounds.width - ARROW_WIDTH - INSET, (int)(bounds.height - ARROW_WIDTH / 2) / 2);
+            transform.concat();
+            NSColor color = isEnabled() ? NSColor.blackColor() : NSColor.disabledControlTextColor();
+            color.set();
+            path.fill();
+            context.restoreGraphicsState();
+        }
     }
 }
 
 void enableWidget(bool enabled) {
     if ((style & DWT.SEPARATOR) is 0) {
         (cast(NSButton)button).setEnabled(enabled);
-        if (arrow !is null) {
-            (cast(NSButton)arrow).setEnabled(enabled);
-        }
     }
 }
 
@@ -323,6 +403,10 @@
     return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height);
 }
 
+NSBezierPath getClipping() {
+    return parent.getClipping ();
+}
+
 /**
  * Returns the control that is used to fill the bounds of
  * the item when the item is a <code>SEPARATOR</code>.
@@ -485,34 +569,33 @@
     return getEnabled () && parent.isEnabled ();
 }
 
-void releaseParent () {
-    super.releaseParent ();
-    setVisible (false);
+int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    return parent.menuForEvent (id, sel, theEvent);
 }
 
-void releaseHandle () {
-    super.releaseHandle ();
-    if (view !is null) {
-        OS.objc_msgSend(view.id, OS.sel_setTag_1, -1);
-        view.release();
+void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    Display display = this.display;
+    display.trackingControl = parent;
+    super.mouseDown(id, sel, theEvent);
+    display.trackingControl = null;
+    if ((style & DWT.DROP_DOWN) !is 0 && id is view.id) {
+        NSRect frame = view.frame();
+        Event event = new Event ();
+        event.detail = DWT.ARROW;
+        event.x = (int)frame.x;
+        event.y = (int)(frame.y + frame.height);
+        postEvent (DWT.Selection, event);
     }
-    if (button !is null) {
-        OS.objc_msgSend(button.id, OS.sel_setTag_1, -1);
-        button.release();
-    }
-    if (arrow !is null) {
-        OS.objc_msgSend(arrow.id, OS.sel_setTag_1, -1);
-        arrow.release();
-    }
-    view = button = arrow = null;
-    parent = null;
 }
 
-void releaseWidget () {
-    super.releaseWidget ();
-    control = null;
-    toolTipText = null;
-    image = disabledImage = hotImage = null; 
+void register () {
+    super.register ();
+    display.addWidget (view, this);
+    
+    if (button !is null) {
+        display.addWidget (button, this);
+        display.addWidget (button.cell(), this);
+    }
 }
 
 /**
@@ -540,6 +623,26 @@
     eventTable.unhook(DWT.DefaultSelection,listener);   
 }
 
+void releaseParent () {
+    super.releaseParent ();
+    setVisible (false);
+}
+
+void releaseHandle () {
+    super.releaseHandle ();
+    if (view !is null) view.release();
+    if (button !is null) button.release();
+    view = button = null;
+    parent = null;
+}
+
+void releaseWidget () {
+    super.releaseWidget ();
+    control = null;
+    toolTipText = null;
+    image = disabledImage = hotImage = null; 
+}
+
 void selectRadio () {
     int index = 0;
     ToolItem [] items = parent.getItems ();
@@ -551,15 +654,6 @@
     setSelection (true);
 }
 
-void sendArrowSelection () {
-    NSRect frame = view.frame();
-    Event event = new Event ();
-    event.detail = DWT.ARROW;
-    event.x = cast(int)frame.x;
-    event.y = cast(int)(frame.y + arrow.frame().height);
-    postEvent (DWT.Selection, event);
-}
-
 void sendSelection () {
     if ((style & DWT.RADIO) !is 0) {
         if ((parent.getStyle () & DWT.NO_RADIO_GROUP) is 0) {
@@ -577,13 +671,13 @@
     rect.width = width;
     rect.height = height;
     view.setFrame(rect);
-    if (arrow !is null) {
-        rect = button.frame();
-        NSRect arrowRect = new NSRect();
-        arrowRect.x = rect.width + ARROW_INSET;
-        arrowRect.width = ARROW_WIDTH;
-        arrowRect.height = rect.height;
-        arrow.setFrame(arrowRect);
+    if (button !is null) {
+        rect.x = 0;
+        rect.y = 0;
+        rect.width = width;
+        rect.height = height;
+        if ((style & DWT.DROP_DOWN) !is 0) rect.width -= ARROW_WIDTH + INSET;
+        button.setFrame(rect);
     }
 }
 
@@ -764,18 +858,18 @@
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if ((style & DWT.SEPARATOR) !is 0) return;
     super.setText (string);
-    NSString str = NSString.stringWith(string);
-    (cast(NSButton)button).setTitle(str);
-    parent.relayout ();
+    NSButton widget = (NSButton)button;
+    widget.setAttributedTitle(createString());
     if (text.length() !is 0 && image !is null) {
         if ((parent.style & DWT.RIGHT) !is 0) {
-            (cast(NSButton)button).setImagePosition(OS.NSImageLeft);
+            widget.setImagePosition(OS.NSImageLeft);
         } else {
-            (cast(NSButton)button).setImagePosition(OS.NSImageAbove);       
+            widget.setImagePosition(OS.NSImageAbove);       
         }
     } else {
-        (cast(NSButton)button).setImagePosition(OS.NSImageOverlaps);            
+        widget.setImagePosition(text.length() !is 0 ? OS.NSNoImage : OS.NSImageOnly);
     }
+    parent.relayout ();
 }
 
 /**
@@ -792,7 +886,7 @@
 public void setToolTipText (String string) {
     checkWidget();
     toolTipText = string;
-    view.setToolTip(NSString.stringWith(string));
+    view.setToolTip(string !is null ? NSString.stringWith(string) : null);
 }
 
 void setVisible (bool visible) {
@@ -836,15 +930,16 @@
             image = disabledImage;
         }
     }
-    (cast(NSButton)button).setImage(image !is null ? image.handle : null);
+    NSButton widget = cast(NSButton)button;
+    widget.setImage(image !is null ? image.handle : null);
     if (text.length() !is 0 && image !is null) {
         if ((parent.style & DWT.RIGHT) !is 0) {
-            (cast(NSButton)button).setImagePosition(OS.NSImageLeft);
+            widget.setImagePosition(OS.NSImageLeft);
         } else {
             (cast(NSButton)button).setImagePosition(OS.NSImageAbove);       
         }
-    } else {
-        (cast(NSButton)button).setImagePosition(OS.NSImageOverlaps);            
+    } else {    
+        widget.setImagePosition(text.length() !is 0 ? OS.NSNoImage : OS.NSImageOnly);       
     }
     parent.relayout();
 }
--- a/dwt/widgets/ToolTip.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/ToolTip.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.ToolTip;
 
@@ -56,6 +56,10 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tooltips">Tool Tips snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.2
  */
@@ -174,7 +178,12 @@
         int x = this.x;
         int y = this.y;
         if (x is -1 || y is -1) {
-            Point point = display.getCursorLocation ();
+        Point point;
+        if (item !is null) {
+            point = item.getLocation ();
+        } else {
+            point = display.getCursorLocation ();
+        }
             x = point.x;
             y = point.y;
         }
@@ -293,7 +302,7 @@
             messageWidth = layoutMessage.getBounds ().width;
         }
         int messageTrim = 2 * INSET + 2 * BORDER + 2 * PADDING;
-        bool hasImage =  layoutText !is null && (style & DWT.BALLOON) !is 0 && (style & (DWT.ICON_ERROR | DWT.ICON_INFORMATION | DWT.ICON_WARNING)) !is 0;
+    bool hasImage =     layoutText !is null && (style & DWT.BALLOON) !is 0 && (style & (DWT.ICON_ERROR | DWT.ICON_INFORMATION | DWT.ICON_WARNING)) !is 0;
         int textTrim = messageTrim + (hasImage ? IMAGE_SIZE : 0);
         int width = Math.min (maxWidth, Math.max (textWidth + textTrim, messageWidth + messageTrim));
         int textHeight = 0, messageHeight = 0;
--- a/dwt/widgets/Tracker.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Tracker.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSAffineTransform;
 import dwt.internal.cocoa.NSApplication;
+import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSAutoreleasePool;
 import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSDate;
@@ -51,6 +52,9 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tracker">Tracker snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Tracker : Widget {
     Control parent;
@@ -440,7 +444,7 @@
     } else {
         NSWindow eventWindow = nsEvent.window();
         location = eventWindow.convertBaseToScreen(location);
-        location.y = eventWindow.screen().frame().height - location.y;
+        location.y = display.getPrimaryFrame().height - location.y;
     }
     int newX = cast(int)location.x, newY = cast(int)location.y;
     if (newX !is oldX || newY !is oldY) {
@@ -544,7 +548,7 @@
         }
         oldX = newX;  oldY = newY;
     }
-    switch (nsEvent.type()) {
+    switch ((int)/*64*/nsEvent.type()) {
         case OS.NSLeftMouseUp:
         case OS.NSRightMouseUp:
         case OS.NSOtherMouseUp:
@@ -555,7 +559,7 @@
 void key (NSEvent nsEvent) {
     //TODO send event
 //  if (!sendKeyEvent (DWT.KeyDown, theEvent)) return OS.noErr;
-    int modifierFlags = nsEvent.modifierFlags();
+    int /*long*/ modifierFlags = nsEvent.modifierFlags();
     int stepSize = (modifierFlags & OS.NSControlKeyMask) !is 0 ? STEPSIZE_SMALL : STEPSIZE_LARGE;
     int xChange = 0, yChange = 0;
     switch (nsEvent.keyCode()) {
@@ -716,13 +720,36 @@
     cancelled = false;
     tracking = true;
     window = cast(NSWindow)new NSWindow().alloc();
-    NSRect frame = NSScreen.mainScreen().frame();
-    window = window.initWithContentRect_styleMask_backing_defer_(frame, OS.NSBorderlessWindowMask, OS.NSBackingStoreBuffered, false);
+    NSArray screens = NSScreen.screens();
+    float /*double*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
+    float /*double*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;    
+    int count = (int)/*64*/screens.count();
+    for (int i = 0; i < count; i++) {
+        NSScreen screen = new NSScreen(screens.objectAtIndex(i));
+        NSRect frame = screen.frame();
+        float /*double*/ x1 = frame.x, x2 = frame.x + frame.width;
+        float /*double*/ y1 = frame.y, y2 = frame.y + frame.height;
+        if (x1 < minX) minX = x1;
+        if (x2 < minX) minX = x2;
+        if (x1 > maxX) maxX = x1;
+        if (x2 > maxX) maxX = x2;
+        if (y1 < minY) minY = y1;
+        if (y2 < minY) minY = y2;
+        if (y1 > maxY) maxY = y1;
+        if (y2 > maxY) maxY = y2;
+    }   
+    NSRect frame = new NSRect();
+    frame.x = minX;
+    frame.y = minY;
+    frame.width = maxX - minX;
+    frame.height = maxY - minY;
+    window = window.initWithContentRect(frame, OS.NSBorderlessWindowMask, OS.NSBackingStoreBuffered, false);
     window.setOpaque(false);
     window.setContentView(null);
     NSGraphicsContext context = window.graphicsContext();
     NSGraphicsContext.setCurrentContext(context);
     context.setCompositingOperation(OS.NSCompositeClear);
+    frame.x = frame.y = 0;
     NSBezierPath.fillRect(frame);
     window.orderFrontRegardless();
 
@@ -745,7 +772,7 @@
     bool down = false;
     NSApplication application = NSApplication.sharedApplication();
     NSEvent currentEvent = application.currentEvent();
-    switch (currentEvent.type()) {
+    switch ((int)/*64*/currentEvent.type()) {
         case OS.NSLeftMouseDown:
         case OS.NSRightMouseDown:
         case OS.NSOtherMouseDown:
@@ -770,7 +797,7 @@
         NSAutoreleasePool pool = cast(NSAutoreleasePool)new NSAutoreleasePool().alloc().init();
         NSEvent event = application.nextEventMatchingMask(0, NSDate.distantFuture(), OS.NSDefaultRunLoopMode, true);
         if (event is null) continue;
-        int type = event.type();
+        int type = (int)/*64*/event.type();
         switch (type) {
             case OS.NSLeftMouseUp:
             case OS.NSRightMouseUp:
--- a/dwt/widgets/Tray.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Tray.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Tray;
 
@@ -37,6 +37,8 @@
  * </p>
  * 
  * @see Display#getSystemTray
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tray">Tray, TrayItem snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.0
  */
--- a/dwt/widgets/TrayItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/TrayItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.TrayItem;
 
@@ -21,6 +21,7 @@
 import dwt.events.SelectionListener;
 import dwt.graphics.Image;
 import dwt.graphics.Point;
+import dwt.internal.cocoa.NSControl;
 import dwt.internal.cocoa.NSEvent;
 import dwt.internal.cocoa.NSImageView;
 import dwt.internal.cocoa.NSPoint;
@@ -51,6 +52,9 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tray">Tray, TrayItem snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.0
  */
@@ -165,7 +169,7 @@
     if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS);
 }
 
-void createWidget () {
+void createHandle () {
     NSStatusBar statusBar = NSStatusBar.systemStatusBar();
     item = statusBar.statusItemWithLength(0);
     if (item is null) error (DWT.ERROR_NO_HANDLES);
@@ -176,8 +180,12 @@
     if (view is null) error (DWT.ERROR_NO_HANDLES);
     view.initWithFrame(rect);
     item.setView(view);
-    createJNIRef();
-    view.setTag(jniRef);
+}
+
+void deregister () {
+    super.deregister ();
+    display.removeWidget (view);
+    display.removeWidget(view.cell());
 }
 
 void destroyWidget () {
@@ -263,14 +271,17 @@
     return visible;
 }
 
+void register () {
+    super.register ();
+    display.addWidget (view, this);
+    display.addWidget (((NSControl)view).cell(), this);
+}
+
 void releaseHandle () {
     super.releaseHandle ();
     parent = null;
     if (item !is null) item.release();
-    if (view !is null) {
-        view.setTag(-1);
-        view.release();
-    }
+    if (view !is null) view.release();
     item = null;
     view = null;
 }
@@ -351,7 +362,7 @@
     if (image !is null && image.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     super.setImage (image);
     view.setImage(image !is null ? image.handle : null);
-    float width = image !is null && visible ? image.handle.size().width + BORDER : 0;
+    float /*double*/ width = image !is null && visible ? image.handle.size().width + BORDER : 0;
     item.setLength(width);
 }
 
@@ -418,7 +429,7 @@
         if (isDisposed ()) return;
     }
     this.visible = visible;
-    float width = image !is null && visible ? image.handle.size().width + BORDER : 0;
+    float /*double*/ width = image !is null && visible ? image.handle.size().width + BORDER : 0;
     item.setLength(width);
     if (!visible) sendEvent (DWT.Hide);
 }
@@ -432,30 +443,28 @@
     _setToolTipText (toolTipText);
 }
 
-void mouseDown(objc.id event) {
+void mouseDown(objc.id id, objc.SEL sel, objc.id event) {
     NSEvent nsEvent = new NSEvent(event);
-    int mask = nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask;
-    if (mask is OS.NSControlKeyMask) {
+    if ((nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) is OS.NSControlKeyMask) {
         showMenu();
     } else {
         highlight = true;
         (cast(NSView)view).setNeedsDisplay(true);
-        int clickCount = nsEvent.clickCount();
-        postEvent(clickCount is 2 ? DWT.DefaultSelection : DWT.Selection);
+        postEvent(nsEvent.clickCount() is 2 ? DWT.DefaultSelection : DWT.Selection);
     }
 }
 
-void mouseUp(int event) {
+void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
     highlight = false;
     (cast(NSView)view).setNeedsDisplay(true);
 }
 
-void rightMouseDown(int event) {
+void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
     showMenu();
 }
 
-void drawRect(objc.id id, NSRect rect) {
+void drawRect(objc.id id, objc.SEL sel, NSRect rect) {
     item.drawStatusBarBackgroundInRect(rect, highlight);
-    super.drawRect(id, rect);
+    super.drawRect(id, sel, rect);
 }
 }
--- a/dwt/widgets/Tree.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Tree.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,30 +12,51 @@
 
 import dwt.dwthelper.utils;
 
- 
 import dwt.DWT;
 import dwt.DWTException;
+import dwt.accessibility.ACC;
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
 import dwt.events.TreeListener;
 import dwt.graphics.Color;
 import dwt.graphics.Font;
+import dwt.graphics.GC;
+import dwt.graphics.GCData;
 import dwt.graphics.Image;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSBrowserCell;
 import dwt.internal.cocoa.NSButtonCell;
+import dwt.internal.cocoa.NSColor;
+import dwt.internal.cocoa.NSColorSpace;
+import dwt.internal.cocoa.NSDictionary;
+import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSFont;
+import dwt.internal.cocoa.NSGraphicsContext;
 import dwt.internal.cocoa.NSIndexSet;
+import dwt.internal.cocoa.NSMutableIndexSet;
+import dwt.internal.cocoa.NSNotification;
 import dwt.internal.cocoa.NSNumber;
 import dwt.internal.cocoa.NSOutlineView;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSScrollView;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTableColumn;
+import dwt.internal.cocoa.NSTableHeaderCell;
 import dwt.internal.cocoa.NSTableHeaderView;
 import dwt.internal.cocoa.NSTableView;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
+import dwt.internal.cocoa.SWTBrowserCell;
 import dwt.internal.cocoa.SWTOutlineView;
 import dwt.internal.cocoa.SWTScrollView;
+import dwt.internal.cocoa.SWTTableHeaderCell;
+import dwt.internal.cocoa.SWTTableHeaderView;
 import dwt.internal.cocoa.SWTTreeItem;
 import dwt.internal.cocoa.id;
 
@@ -75,12 +96,13 @@
  * </pre></code>
  * </p><p>
  * Note that although this class is a subclass of <code>Composite</code>,
- * it does not make sense to add <code>Control</code> children to it,
- * or set a layout on it.
+ * it does not normally make sense to add <code>Control</code> children to
+ * it, or set a layout on it, unless implementing something like a cell
+ * editor.
  * </p><p>
  * <dl>
  * <dt><b>Styles:</b></dt>
- * <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL</dd>
+ * <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, VIRTUAL, NO_SCROLL</dd>
  * <dt><b>Events:</b></dt>
  * <dd>Selection, DefaultSelection, Collapse, Expand, SetData, MeasureItem, EraseItem, PaintItem</dd>
  * </dl>
@@ -89,9 +111,14 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tree">Tree, TreeItem, TreeColumn snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Tree : Composite {
     NSTableColumn firstColumn, checkColumn;
+    NSBrowserCell dataCell;
     NSTableHeaderView headerView;
     TreeItem [] items;
     int itemCount;
@@ -99,6 +126,7 @@
     TreeColumn sortColumn;
     int columnCount;
     int sortDirection;
+    float /*double*/ levelIndent;
     bool ignoreExpand, ignoreSelect;
 
 /**
@@ -128,6 +156,9 @@
  * @see DWT#SINGLE
  * @see DWT#MULTI
  * @see DWT#CHECK
+ * @see DWT#FULL_SELECTION
+ * @see DWT#VIRTUAL
+ * @see DWT#NO_SCROLL
  * @see Widget#checkSubclass
  * @see Widget#getStyle
  */
@@ -135,14 +166,7 @@
     super (parent, checkStyle (style));
 }
 
-void _addListener (int eventType, Listener listener) {
-    super._addListener (eventType, listener);
-    for (int i = 0; i < items.length; i++) {
-        if (items [i] !is null) items [i].width = -1;        
-    }
-}
-
-TreeItem _getItem (TreeItem parentItem, int index) {
+TreeItem _getItem (TreeItem parentItem, int index, bool create) {
     int count;
     TreeItem[] items;
     if (parentItem !is null) {
@@ -154,12 +178,32 @@
     }
     if (index < 0 || index >= count) return null;
     TreeItem item = items [index]; 
-    if (item !is null || (style & DWT.VIRTUAL) is 0) return item;
+    if (item !is null || (style & DWT.VIRTUAL) is 0 || !create) return item;
     item = new TreeItem (this, parentItem, DWT.NONE, index, false);
     items [index] = item;
     return item;
 }
 
+int accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    
+    if (accessible !is null) {
+        NSString attribute = new NSString(arg0);
+        id returnValue = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
+        if (returnValue !is null) return returnValue.id;
+    }
+    
+    NSString attributeName = new NSString(arg0);
+    
+    // Accessibility Verifier queries for a title or description.  NSOutlineView doesn't
+    // seem to return either, so we return a default description value here.
+    if (attributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
+        return NSString.stringWith("").id;
+    }
+    
+    return super.accessibilityAttributeValue(id, sel, arg0);
+}
+
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the user changes the receiver's selection, by sending
@@ -263,36 +307,28 @@
 }
 
 void clear (TreeItem parentItem, int index, bool all) {
-//  int [] ids = parentItem is null ? childIds : parentItem.childIds;
-//  TreeItem item = _getItem (ids [index], false);
-//  if (item !is null) {
-//      item.clear();
-//      if (all) {
-//          clearAll (item, true);
-//      } else {
-//          int container = parentItem is null ? OS.kDataBrowserNoItem : parentItem.id;
-//          OS.UpdateDataBrowserItems (handle, container, 1, new int[] {item.id}, OS.kDataBrowserItemNoProperty, OS.kDataBrowserNoItem);
-//      }
-//  }
+    TreeItem item = _getItem (parentItem, index, false);
+    if (item !is null) {
+        item.clear();
+        ((NSOutlineView) view).reloadItem (item.handle);
+        if (all) {
+            clearAll (item, true);
+        }
+    }
 }
 
 void clearAll (TreeItem parentItem, bool all) {
-//  bool update = !inClearAll;
-//  int count = getItemCount (parentItem);
-//  if (count is 0) return;
-//  inClearAll = true;
-//  int [] ids = parentItem is null ? childIds : parentItem.childIds;
-//  for (int i=0; i<count; i++) {
-//      TreeItem item = _getItem (ids [i], false);
-//      if (item !is null) {
-//          item.clear ();
-//          if (all) clearAll (item, true);
-//      }
-//  }
-//  if (update) {
-//      OS.UpdateDataBrowserItems (handle, 0, 0, null, OS.kDataBrowserItemNoProperty, OS.kDataBrowserNoItem);
-//      inClearAll = false;
-//  }
+    int count = getItemCount (parentItem);
+    if (count is 0) return;
+    TreeItem [] children = parentItem is null ? items : parentItem.items; 
+    for (int i=0; i<count; i++) {
+        TreeItem item = children [i];
+        if (item !is null) {
+            item.clear ();
+            ((NSOutlineView) view).reloadItem (item.handle);
+            if (all) clearAll (item, true);
+        }
+    }
 }
 
 /**
@@ -349,6 +385,13 @@
     clearAll (null, all);
 }
 
+void clearCustomWidths (TreeItem item) {
+    item.customWidth = -1;
+    for (int i = 0; i < item.itemCount; i++) {
+        clearCustomWidths (items[i]);
+    }
+}
+
 public Point computeSize (int wHint, int hHint, bool changed) {
     checkWidget ();
     int width = 0, height = 0;
@@ -374,7 +417,7 @@
         width = wHint;
     }
     if (hHint is DWT.DEFAULT) {
-        height = (cast(NSTableView)view).numberOfRows() * getItemHeight () + getHeaderHeight();
+        height = (int)/*64*/(cast(NSOutlineView) view).numberOfRows () * getItemHeight () + getHeaderHeight ();
     } else {
         height = hHint;
     }
@@ -384,62 +427,105 @@
     return new Point (rect.width, rect.height);
 }
 
+void createColumn (TreeItem item, int index) {
+    if (item.items !is null) {
+        for (int i = 0; i < item.items.length; i++) {
+            if (item.items[i] !is null) createColumn (item.items[i], index);
+        }
+    }
+    String [] strings = item.strings;
+    if (strings !is null) {
+        String [] temp = new String [columnCount];
+        System.arraycopy (strings, 0, temp, 0, index);
+        System.arraycopy (strings, index, temp, index+1, columnCount-index-1);
+        temp [index] = "";
+        item.strings = temp;
+    }
+    if (index is 0) item.text = "";
+    Image [] images = item.images;
+    if (images !is null) {
+        Image [] temp = new Image [columnCount];
+        System.arraycopy (images, 0, temp, 0, index);
+        System.arraycopy (images, index, temp, index+1, columnCount-index-1);
+        item.images = temp;
+    }
+    if (index is 0) item.image = null;
+    Color [] cellBackground = item.cellBackground;
+    if (cellBackground !is null) {
+        Color [] temp = new Color [columnCount];
+        System.arraycopy (cellBackground, 0, temp, 0, index);
+        System.arraycopy (cellBackground, index, temp, index+1, columnCount-index-1);
+        item.cellBackground = temp;
+    }
+    Color [] cellForeground = item.cellForeground;
+    if (cellForeground !is null) {
+        Color [] temp = new Color [columnCount];
+        System.arraycopy (cellForeground, 0, temp, 0, index);
+        System.arraycopy (cellForeground, index, temp, index+1, columnCount-index-1);
+        item.cellForeground = temp;
+    }
+    Font [] cellFont = item.cellFont;
+    if (cellFont !is null) {
+        Font [] temp = new Font [columnCount];
+        System.arraycopy (cellFont, 0, temp, 0, index);
+        System.arraycopy (cellFont, index, temp, index+1, columnCount-index-1);
+        item.cellFont = temp;
+    }
+}
+
 void createHandle () {
-    SWTScrollView scrollWidget = cast(SWTScrollView)new SWTScrollView().alloc();
-    scrollWidget.initWithFrame(new NSRect ());
-    scrollWidget.setHasHorizontalScroller(true);
-    scrollWidget.setHasVerticalScroller(true);
-    scrollWidget.setAutohidesScrollers(true);
-    scrollWidget.setBorderType(hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder);
-    scrollWidget.setTag(jniRef);
-    
-    NSOutlineView widget = cast(NSOutlineView)new SWTOutlineView().alloc();
-    widget.initWithFrame(new NSRect());
-    widget.setAllowsMultipleSelection((style & DWT.MULTI) !is 0);
-    widget.setAutoresizesOutlineColumn(false);
-    widget.setAutosaveExpandedItems(true);
-    widget.setDataSource(widget);
-    widget.setDelegate(widget);
-    widget.setDoubleAction(OS.sel_sendDoubleSelection);
-    if (!hasBorder()) widget.setFocusRingType(OS.NSFocusRingTypeNone);
-    widget.setTag(jniRef);
+    NSScrollView scrollWidget = cast(NSScrollView) new SWTScrollView ().alloc ();
+    scrollWidget.initWithFrame (new NSRect ());
+    scrollWidget.setHasHorizontalScroller (true);
+    scrollWidget.setHasVerticalScroller (true);
+    scrollWidget.setAutohidesScrollers (true);
+    scrollWidget.setBorderType(hasBorder () ? OS.NSBezelBorder : OS.NSNoBorder);
     
-    headerView = widget.headerView();
-    headerView.retain();
-    widget.setHeaderView(null);
+    NSOutlineView widget = cast(NSOutlineView) new SWTOutlineView ().alloc ();
+    widget.initWithFrame (new NSRect ());
+    widget.setAllowsMultipleSelection ((style & DWT.MULTI) !is 0);
+    widget.setAllowsColumnReordering (false);
+    widget.setAutoresizesOutlineColumn (false);
+    widget.setAutosaveExpandedItems (true);
+    widget.setDataSource (widget);
+    widget.setDelegate (widget);
+    widget.setDoubleAction (OS.sel_sendDoubleSelection);
+    if (!hasBorder ()) widget.setFocusRingType (OS.NSFocusRingTypeNone);
     
-    NSString str = NSString.stringWith("");
+    headerView = (NSTableHeaderView)new SWTTableHeaderView ().alloc ().init ();
+    widget.setHeaderView (null);
+    
+    NSString str = NSString.stringWith ("");
     if ((style & DWT.CHECK) !is 0) {
-        checkColumn = cast(NSTableColumn)new NSTableColumn().alloc();
-        checkColumn.initWithIdentifier(str);
-        checkColumn.headerCell().setTitle(str);
+        checkColumn = cast(NSTableColumn) new NSTableColumn ().alloc ();
+        checkColumn.initWithIdentifier (checkColumn);
+        checkColumn.headerCell ().setTitle (str);
         widget.addTableColumn (checkColumn);
-        widget.setOutlineTableColumn(checkColumn);
-        NSButtonCell cell = cast(NSButtonCell)new NSButtonCell().alloc().init();
-        checkColumn.setDataCell(cell);
-        cell.setButtonType(OS.NSSwitchButton);
-        cell.setImagePosition(OS.NSImageOnly);
-        cell.setAllowsMixedState(true);
-        checkColumn.setWidth(getCheckColumnWidth());
-        checkColumn.setResizingMask(OS.NSTableColumnNoResizing);
-        checkColumn.setEditable(false);
-        cell.release();
+        widget.setOutlineTableColumn (checkColumn);
+        NSButtonCell cell = cast(NSButtonCell) new NSButtonCell ().alloc ().init ();
+        checkColumn.setDataCell (cell);
+        cell.setButtonType (OS.NSSwitchButton);
+        cell.setImagePosition (OS.NSImageOnly);
+        cell.setAllowsMixedState (true);
+        checkColumn.setWidth (getCheckColumnWidth ());
+        checkColumn.setResizingMask (OS.NSTableColumnNoResizing);
+        checkColumn.setEditable (false);
+        cell.release ();
     }
     
-    firstColumn = cast(NSTableColumn)new NSTableColumn().alloc();
-    firstColumn.initWithIdentifier(str);
-    firstColumn.headerCell().setTitle(str);
+    firstColumn = cast(NSTableColumn) new NSTableColumn ().alloc ();
+    firstColumn.initWithIdentifier (firstColumn);
+    firstColumn.setMinWidth(0);
+    firstColumn.headerCell ().setTitle (str);
     widget.addTableColumn (firstColumn);
-    widget.setOutlineTableColumn(firstColumn);
-    NSBrowserCell cell = cast(NSBrowserCell)new NSBrowserCell().alloc().init();
-    cell.setLeaf(true);
-    firstColumn.setDataCell(cell);
-    cell.release();
+    widget.setOutlineTableColumn (firstColumn);
+    dataCell = cast(NSBrowserCell)new SWTBrowserCell ().alloc ().init ();
+    dataCell.setLeaf (true);
+    firstColumn.setDataCell (dataCell);
+    levelIndent = widget.indentationPerLevel ();
     
     scrollView = scrollWidget;
     view = widget;
-    scrollView.setDocumentView(widget);
-    parent.contentView().addSubview_(scrollView);
 }
 
 void createItem (TreeColumn column, int index) {
@@ -458,76 +544,47 @@
     if (columnCount is 0) {
         //TODO - clear attributes, alignment etc.
         nsColumn = firstColumn;
+        nsColumn.retain();
         firstColumn = null;
     } else {
         //TODO - set attributes, alignment etc.
-        NSString str = NSString.stringWith("");
-        nsColumn = cast(NSTableColumn)new NSTableColumn().alloc();
-        nsColumn.initWithIdentifier(str);
-        nsColumn.headerCell().setTitle(str);
-        (cast(NSTableView)view).addTableColumn (nsColumn);
+        NSOutlineView outlineView = (NSOutlineView)view;
+        NSString str = NSString.stringWith ("");
+        nsColumn = cast(NSTableColumn) new NSTableColumn ().alloc ();
+        nsColumn.initWithIdentifier (nsColumn);
+        nsColumn.setMinWidth(0);
+        nsColumn.headerCell ().setTitle (str);
+        outlineView.addTableColumn (nsColumn);
         int checkColumn = (style & DWT.CHECK) !is 0 ? 1 : 0;
-        (cast(NSTableView)view).moveColumn (columnCount + checkColumn, index + checkColumn);
-        NSBrowserCell cell = cast(NSBrowserCell)new NSBrowserCell().alloc().init();
-        cell.setLeaf(true);
-        nsColumn.setDataCell(cell);
-        cell.release();
+        outlineView.moveColumn (columnCount + checkColumn, index + checkColumn);
+        nsColumn.setDataCell (dataCell);
+        if (index is 0) {
+            outlineView.setOutlineTableColumn (nsColumn);
+        }
     }
+    column.createJNIRef ();
+    NSTableHeaderCell headerCell = (NSTableHeaderCell)new SWTTableHeaderCell ().alloc ().init ();
+    nsColumn.setHeaderCell (headerCell);
+    display.addWidget (headerCell, column);
     column.nsColumn = nsColumn;
-    nsColumn.headerCell().setTitle(NSString.stringWith(""));
-    nsColumn.setWidth(0);
+    nsColumn.setWidth (0);
     System.arraycopy (columns, index, columns, index + 1, columnCount++ - index);
     columns [index] = column;
     if (columnCount > 1) {
         for (int i=0; i<items.length; i++) {
             TreeItem item = items [i];
-            if (item !is null) {
-                String [] strings = item.strings;
-                if (strings !is null) {
-                    String [] temp = new String [columnCount];
-                    System.arraycopy (strings, 0, temp, 0, index);
-                    System.arraycopy (strings, index, temp, index+1, columnCount-index-1);
-                    temp [index] = "";
-                    item.strings = temp;
-                }
-                if (index is 0) item.text = "";
-                Image [] images = item.images;
-                if (images !is null) {
-                    Image [] temp = new Image [columnCount];
-                    System.arraycopy (images, 0, temp, 0, index);
-                    System.arraycopy (images, index, temp, index+1, columnCount-index-1);
-                    item.images = temp;
-                }
-                if (index is 0) item.image = null;
-                Color [] cellBackground = item.cellBackground;
-                if (cellBackground !is null) {
-                    Color [] temp = new Color [columnCount];
-                    System.arraycopy (cellBackground, 0, temp, 0, index);
-                    System.arraycopy (cellBackground, index, temp, index+1, columnCount-index-1);
-                    item.cellBackground = temp;
-                }
-                Color [] cellForeground = item.cellForeground;
-                if (cellForeground !is null) {
-                    Color [] temp = new Color [columnCount];
-                    System.arraycopy (cellForeground, 0, temp, 0, index);
-                    System.arraycopy (cellForeground, index, temp, index+1, columnCount-index-1);
-                    item.cellForeground = temp;
-                }
-                Font [] cellFont = item.cellFont;
-                if (cellFont !is null) {
-                    Font [] temp = new Font [columnCount];
-                    System.arraycopy (cellFont, 0, temp, 0, index);
-                    System.arraycopy (cellFont, index, temp, index+1, columnCount-index-1);
-                    item.cellFont = temp;
-                }
-            }
+            if (item !is null) createColumn (item, index);
+        }
+    } else {
+        for (int i = 0; i < itemCount; i++) {
+            clearCustomWidths (items[i]);
         }
     }
 }
 
 void createItem (TreeItem item, TreeItem parentItem, int index) {
     int count;
-    TreeItem[] items;
+    TreeItem [] items;
     if (parentItem !is null) {
         count = parentItem.itemCount;
         items = parentItem.items;
@@ -549,18 +606,20 @@
     }
     System.arraycopy (items, index, items, index + 1, count++ - index);
     items [index] = item;
-    item.items = new TreeItem[4];
-    item.createJNIRef();
-    SWTTreeItem handle = cast(SWTTreeItem)new SWTTreeItem().alloc().init();
-    handle.setTag(item.jniRef);
+    item.items = new TreeItem [4];
+    SWTTreeItem handle = (SWTTreeItem) new SWTTreeItem ().alloc ().init ();
     item.handle = handle;
+    item.createJNIRef ();
+    item.register ();
     if (parentItem !is null) {
         parentItem.itemCount = count;
     } else {
         this.itemCount = count;
     }
-    //TODO ?
-    (cast(NSTableView)view).reloadData();
+    ignoreExpand = true;
+    NSOutlineView widget = cast(NSOutlineView)view;
+    widget.reloadItem(parentItem !is null ? parentItem.handle : null, true);
+    ignoreExpand = false;
 }
 
 void createWidget () {
@@ -587,12 +646,35 @@
  */
 public void deselectAll () {
     checkWidget ();
-    NSTableView widget = cast(NSTableView)view;
+    NSTableView widget = cast(NSOutlineView) view;
     ignoreSelect = true;
-    widget.deselectAll(null);
+    widget.deselectAll (null);
     ignoreSelect = false;
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (headerView);
+    display.removeWidget (dataCell);
+}
+
+/**
+ * Deselects an item in the receiver.  If the item was already
+ * deselected, it remains deselected.
+ *
+ * @param item the item to be deselected
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the item is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.4
+ */
 public void deselect (TreeItem item) {
     checkWidget ();
     if (item is null) error (DWT.ERROR_NULL_ARGUMENT);
@@ -683,36 +765,32 @@
             }
         }
     }
-//  if (columnCount is 1) {
-//      column_id = column.id; idCount = 0;
-//      DataBrowserListViewHeaderDesc desc = new DataBrowserListViewHeaderDesc ();
-//      desc.version = OS.kDataBrowserListViewLatestHeaderDesc;
-//      short [] width = new short [1];
-//      OS.GetDataBrowserTableViewNamedColumnWidth (handle, column_id, width);
-//      desc.minimumWidth = desc.maximumWidth = width [0];
-//      int str = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, null, 0);
-//      desc.titleString = str;
-//      OS.SetDataBrowserListViewHeaderDesc (handle, column_id, desc);
-//      OS.CFRelease (str);
-//  } else {
-//      int [] disclosure = new int [1];
-//      bool [] expandableRows = new bool [1];
-//      OS.GetDataBrowserListViewDisclosureColumn (handle, disclosure, expandableRows);
-//      if (disclosure [0] is column.id) {
-//          TreeColumn firstColumn = columns [1];
-//          firstColumn.style &= ~(DWT.LEFT | DWT.RIGHT | DWT.CENTER);
-//          firstColumn.style |= DWT.LEFT;
-//          firstColumn.updateHeader();
-//          OS.SetDataBrowserListViewDisclosureColumn (handle, firstColumn.id, expandableRows [0]);
-//      }
-//      if (OS.RemoveDataBrowserTableViewColumn (handle, column.id) !is OS.noErr) {
-//          error (DWT.ERROR_ITEM_NOT_REMOVED);
-//      }
-//  }
+
+    int oldIndex = (int)/*64*/((NSOutlineView)view).columnWithIdentifier (column.nsColumn);
+
+    if (columnCount is 1) {
+        //TODO - reset attributes
+        firstColumn = column.nsColumn;
+        firstColumn.setWidth (0);
+    } else {
+        if (index is 0) {
+            ((NSOutlineView)view).setOutlineTableColumn(columns[1].nsColumn);
+        }
+        ((NSOutlineView)view).removeTableColumn(column.nsColumn);
+    }
     System.arraycopy (columns, index + 1, columns, index, --columnCount - index);
     columns [columnCount] = null;
-    for (int i=index; i<columnCount; i++) {
-        columns [i].sendEvent (DWT.Move);
+
+    NSArray array = ((NSOutlineView)view).tableColumns ();
+    int arraySize = (int)/*64*/array.count ();
+    for (int i = oldIndex; i < arraySize; i++) {
+        int /*long*/ columnId = array.objectAtIndex (i).id;
+        for (int j = 0; j < columnCount; j++) {
+            if (columns[j].nsColumn.id is columnId) {
+                columns [j].sendEvent (DWT.Move);
+                break;
+            }
+        }
     }
 }
 
@@ -737,10 +815,10 @@
     items [count] = null;
     if (parentItem !is null) {
         parentItem.itemCount = count;
-        (cast(NSOutlineView)view).reloadItem_reloadChildren_(parentItem.handle, true);
+        (cast(NSOutlineView) view).reloadItem (parentItem.handle, true);
     } else {
         this.itemCount = count;
-        (cast(NSOutlineView)view).reloadItem_(null);
+        (cast(NSOutlineView) view).reloadItem (null);
     }
     
     //noteNumberOfRowsChanged was causing crashes whenever
@@ -755,6 +833,205 @@
 //  fixScrollBar ();
 }
 
+void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) {
+    NSRect rect = new NSRect ();
+    OS.memmove (rect, cellFrame, NSRect.sizeof);
+
+    NSOutlineView outlineView = (NSOutlineView)this.view;
+    NSBrowserCell cell = new NSBrowserCell (id);
+    NSRange rowsRange = outlineView.rowsInRect (rect);
+    int rowIndex = (int)/*64*/rowsRange.location;
+    TreeItem item = (TreeItem) display.getWidget (outlineView.itemAtRow (rowIndex).id);
+    int columnIndex = 0;
+    id nsColumn = null;
+    int nsColumnIndex = 0;
+    if (columnCount !is 0) {
+        NSIndexSet columnsSet = outlineView.columnIndexesInRect (rect);
+        nsColumnIndex = (int)/*64*/columnsSet.firstIndex ();
+        NSArray nsColumns = outlineView.tableColumns ();
+        nsColumn = nsColumns.objectAtIndex (nsColumnIndex);
+        for (int i = 0; i < columnCount; i++) {
+            if (columns[i].nsColumn.id is nsColumn.id) {
+                columnIndex = indexOf (columns[i]);
+                break;
+            }
+        }
+    }
+
+    Color background = item.cellBackground !is null ? item.cellBackground [columnIndex] : null;
+    if (background is null) background = item.background;
+    bool drawBackground = background !is null;
+    bool drawForeground = true;
+    bool isSelected = outlineView.isRowSelected (rowIndex);
+    bool drawSelection = isSelected;
+
+    NSColor nsSelectionBackground = null;
+    NSColor nsSelectionForeground = null;
+    if (isSelected) {
+        if (isFocusControl ()) {
+            nsSelectionForeground = NSColor.alternateSelectedControlTextColor ();
+        } else {
+            nsSelectionForeground = NSColor.selectedControlTextColor ();
+        }
+        nsSelectionForeground = nsSelectionForeground.colorUsingColorSpace (NSColorSpace.deviceRGBColorSpace ());
+        nsSelectionBackground = cell.highlightColorInView (outlineView);
+        nsSelectionBackground = nsSelectionBackground.colorUsingColorSpace (NSColorSpace.deviceRGBColorSpace ());
+    }
+
+    NSRect fullRect = new NSRect ();
+    fullRect.y = rect.y; fullRect.height = rect.height;
+    if (columnCount is 0) {
+        fullRect.x = rect.x;
+        if (item.customWidth !is -1) {
+            fullRect.width = item.customWidth;
+        } else {
+            NSSize contentSize = cell.cellSizeForBounds (rect);
+            fullRect.width = contentSize.width;
+        }
+    } else {
+        NSSize spacing = outlineView.intercellSpacing ();
+        if (nsColumn.id is outlineView.outlineTableColumn ().id) {
+            NSRect columnRect = outlineView.rectOfColumn (nsColumnIndex);
+            fullRect.x = columnRect.x; fullRect.width = columnRect.width + spacing.width;
+        } else {
+            fullRect.x = rect.x;
+            fullRect.width = rect.width + spacing.width;
+        }
+    }
+
+    if (hooks (DWT.EraseItem)) {
+        NSRect eraseItemRect = null;
+        // TODO how to handle rearranged columns?  The third clause below ensures that
+        // there are either 0 columns or that column 0 is still the first physical column.
+        if (columnIndex is 0 && (style & DWT.CHECK) !is 0 && (columnCount is 0 || outlineView.columnWithIdentifier (columns[0].nsColumn) is 1)) {
+            eraseItemRect = new NSRect ();
+            eraseItemRect.y = fullRect.y;
+            eraseItemRect.width = fullRect.x + fullRect.width;
+            eraseItemRect.height = fullRect.height;
+        } else {
+            eraseItemRect = fullRect;
+        }
+        GCData data = new GCData ();
+        data.paintRect = eraseItemRect;
+        GC gc = GC.cocoa_new (this, data);
+        gc.setFont (item.getFont (columnIndex));
+        if (isSelected) {
+            float /*double*/[] components = new float /*double*/[(int)/*64*/nsSelectionForeground.numberOfComponents ()];
+            nsSelectionForeground.getComponents (components);   
+            Color selectionForeground = Color.cocoa_new (display, components);
+            gc.setForeground (selectionForeground);
+            components = new float /*double*/[(int)/*64*/nsSelectionBackground.numberOfComponents ()];
+            nsSelectionBackground.getComponents (components);   
+            Color selectionBackground = Color.cocoa_new (display, components);
+            gc.setBackground (selectionBackground);
+        } else {
+            gc.setForeground (item.getForeground (columnIndex));
+            gc.setBackground (item.getBackground (columnIndex));
+        }
+
+        Event event = new Event ();
+        event.item = item;
+        event.gc = gc;
+        event.index = columnIndex;
+        event.detail = DWT.FOREGROUND;
+        if (drawBackground) event.detail |= DWT.BACKGROUND;
+        if (isSelected) event.detail |= DWT.SELECTED;
+        event.x = (int)eraseItemRect.x;
+        event.y = (int)eraseItemRect.y;
+        event.width = (int)eraseItemRect.width;
+        event.height = (int)eraseItemRect.height;
+        sendEvent (DWT.EraseItem, event);
+        gc.dispose ();
+        if (item.isDisposed ()) return;
+        if (!event.doit) {
+            drawForeground = drawBackground = drawSelection = false; 
+        } else {
+            drawBackground = drawBackground && (event.detail & DWT.BACKGROUND) !is 0;
+            drawForeground = (event.detail & DWT.FOREGROUND) !is 0;
+            drawSelection = drawSelection && (event.detail & DWT.SELECTED) !is 0;           
+        }
+        if (drawSelection) {
+            NSRect selectionRect = new NSRect ();
+            selectionRect.y = rect.y; selectionRect.height = rect.height;
+            if (columnCount > 0) {
+                NSRect columnRect = outlineView.rectOfColumn (nsColumnIndex);
+                selectionRect.x = columnRect.x; selectionRect.width = columnRect.width;
+            } else {
+                NSRect rowRect = outlineView.rectOfRow (rowIndex);
+                if ((style & DWT.CHECK) !is 0) {
+                    /* highlighting at this stage draws over the checkbox, so don't include its column */
+                    int checkWidth = (int)/*64*/checkColumn.width ();
+                    selectionRect.x = checkWidth;
+                    selectionRect.width = rowRect.width - checkWidth;
+                } else {
+                    selectionRect.width = rowRect.width;
+                }
+            }
+            callSuper (outlineView.id, OS.sel_highlightSelectionInClipRect_, selectionRect);
+        }
+    }
+
+    if (drawBackground && !drawSelection) {
+        NSGraphicsContext context = NSGraphicsContext.currentContext ();
+        context.saveGraphicsState ();
+        float[] colorRGB = background.handle;
+        NSColor color = NSColor.colorWithDeviceRed (colorRGB[0], colorRGB[1], colorRGB[2], 1f);
+        color.setFill ();
+        NSBezierPath.fillRect (fullRect);
+        context.restoreGraphicsState ();
+    }
+
+    if (drawForeground) {
+        cell.setHighlighted (false);
+        callSuper (id, sel, rect, view);
+    }
+
+    if (hooks (DWT.PaintItem)) {
+        NSRect contentRect = cell.titleRectForBounds (rect);
+        NSSize contentSize = cell.cellSizeForBounds (rect);
+
+        GCData data = new GCData ();
+        // TODO how to handle rearranged columns?  The third clause below ensures that
+        // there are either 0 columns or that column 0 is still the first physical column.
+        if (columnIndex is 0 && (style & DWT.CHECK) !is 0 && (columnCount is 0 || outlineView.columnWithIdentifier (columns[0].nsColumn) is 1)) {
+            NSRect gcRect = new NSRect ();
+            gcRect.y = fullRect.y;
+            gcRect.width = fullRect.x + fullRect.width;
+            gcRect.height = fullRect.height;
+            data.paintRect = gcRect;
+        } else {
+            data.paintRect = fullRect;
+        }
+        GC gc = GC.cocoa_new (this, data);
+        gc.setFont (item.getFont (columnIndex));
+        if (isSelected) {
+            float /*double*/[] components = new float /*double*/[(int)/*64*/nsSelectionForeground.numberOfComponents ()];
+            nsSelectionForeground.getComponents (components);   
+            Color selectionForeground = Color.cocoa_new (display, components);
+            gc.setForeground (selectionForeground);
+            components = new float /*double*/[(int)/*64*/nsSelectionBackground.numberOfComponents ()];
+            nsSelectionBackground.getComponents (components);   
+            Color selectionBackground = Color.cocoa_new (display, components);
+            gc.setBackground (selectionBackground);
+            gc.setBackground (display.getSystemColor (DWT.COLOR_GREEN));
+        } else {
+            gc.setForeground (item.getForeground (columnIndex));
+            gc.setBackground (item.getBackground (columnIndex));
+        }
+
+        Event event = new Event ();
+        event.item = item;
+        event.gc = gc;
+        event.index = columnIndex;
+        if (isSelected) event.detail |= DWT.SELECTED;
+        event.x = (int)contentRect.x;
+        event.y = (int)contentRect.y;
+        event.width = (int)Math.ceil (contentSize.width);
+        event.height = (int)Math.ceil (fullRect.height);
+        sendEvent (DWT.PaintItem, event);
+        gc.dispose ();
+    }
+}
 
 void fixScrollBar () {
     /*
@@ -775,6 +1052,15 @@
     return 20; //TODO - compute width
 }
 
+TreeColumn getColumn (id id) {
+    for (int i = 0; i < columnCount; i++) {
+        if (columns[i].nsColumn.id is id.id) {
+            return columns[i]; 
+        }
+    }
+    return null;
+}
+
 /**
  * Returns the column at the given, zero-relative index in the
  * receiver. Throws an exception if the index is out of range.
@@ -862,12 +1148,11 @@
 public int [] getColumnOrder () {
     checkWidget ();
     int [] order = new int [columnCount];
-    int [] position = new int [1];
-    for (int i=0; i<columnCount; i++) {
+    for (int i = 0; i < columnCount; i++) {
         TreeColumn column = columns [i];
-//      OS.GetDataBrowserTableViewColumnPosition (handle, column.id, position);
-//      if ((style & DWT.CHECK) !is 0) position [0] -= 1;
-        order [position [0]] = i;
+        int index = ((NSOutlineView)view).columnWithIdentifier (column.nsColumn);
+        if ((style & DWT.CHECK) !is 0) index -= 1;
+        order [index] = i;
     }
     return order;
 }
@@ -939,9 +1224,9 @@
  */
 public int getHeaderHeight () {
     checkWidget ();
-    NSTableHeaderView headerView = (cast(NSTableView)view).headerView();
+    NSTableHeaderView headerView = (cast(NSOutlineView) view).headerView ();
     if (headerView is null) return 0;
-    return cast(int)headerView.bounds().height;
+    return cast(int) headerView.bounds ().height;
 }
 
 /**
@@ -965,7 +1250,12 @@
  */
 public bool getHeaderVisible () {
     checkWidget ();
-    return (cast(NSTableView)view).headerView() !is null;
+    return (cast(NSOutlineView) view).headerView () !is null;
+}
+
+int getInsetWidth () {
+    //TODO - wrong
+    return 20;
 }
 
 /**
@@ -989,7 +1279,7 @@
     checkWidget ();
     int count = getItemCount ();
     if (index < 0 || index >= count) error (DWT.ERROR_INVALID_RANGE);
-    return _getItem (null, index);
+    return _getItem (null, index, true);
 }
 
 /**
@@ -1018,58 +1308,17 @@
 public TreeItem getItem (Point point) {
     checkWidget ();
     if (point is null) error (DWT.ERROR_NULL_ARGUMENT);
-//  Rect rect = new Rect ();
-//  dwt.internal.carbon.Point pt = new dwt.internal.carbon.Point ();
-//  OS.SetPt (pt, cast(short) point.x, cast(short) point.y);
-//  if (0 < lastHittest && lastHittest <= items.length && lastHittestColumn !is 0) {
-//      TreeItem item = _getItem (lastHittest, false);
-//      if (item !is null) {
-//          if (OS.GetDataBrowserItemPartBounds (handle, item.id, lastHittestColumn, OS.kDataBrowserPropertyDisclosurePart, rect) is OS.noErr) {
-//              if (OS.PtInRect (pt, rect)) return null;
-//          }
-//          if (OS.GetDataBrowserItemPartBounds (handle, item.id, lastHittestColumn, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//              if (rect.top <= pt.v && pt.v <= rect.bottom) {
-//                  if ((style & DWT.FULL_SELECTION) !is 0) {
-//                      return item;
-//                  } else {
-//                      return OS.PtInRect (pt, rect) ? item : null;
-//                  }
-//              }
-//          }
-//      }
-//  }
-//  //TODO - optimize
-//  for (int i=0; i<items.length; i++) {
-//      TreeItem item = items [i];
-//      if (item !is null) {
-//          if (OS.GetDataBrowserItemPartBounds (handle, item.id, column_id, OS.kDataBrowserPropertyDisclosurePart, rect) is OS.noErr) {
-//              if (OS.PtInRect (pt, rect)) return null;
-//          }
-//          if (columnCount is 0) {
-//              if (OS.GetDataBrowserItemPartBounds (handle, item.id, column_id, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//                  if (rect.top <= pt.v && pt.v <= rect.bottom) {
-//                      if ((style & DWT.FULL_SELECTION) !is 0) {
-//                          return item;
-//                      } else {
-//                          return OS.PtInRect (pt, rect) ? item : null;
-//                      }
-//                  }
-//              }
-//          } else {
-//              for (int j = 0; j < columnCount; j++) {
-//                  if (OS.GetDataBrowserItemPartBounds (handle, item.id, columns [j].id, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//                      if (rect.top <= pt.v && pt.v <= rect.bottom) {
-//                          if ((style & DWT.FULL_SELECTION) !is 0) {
-//                              return item;
-//                          } else {
-//                              return OS.PtInRect (pt, rect) ? item : null;
-//                          }
-//                      }
-//                  }
-//              }
-//          }
-//      }
-//  }
+    NSOutlineView widget = (NSOutlineView)view;
+    NSPoint pt = new NSPoint();
+    pt.x = point.x;
+    pt.y = point.y;
+    int row = (int)/*64*/widget.rowAtPoint(pt);
+    if (row is -1) return null;
+    id id = widget.itemAtRow(row);
+    Widget item = display.getWidget (id.id);
+    if (item !is null && item instanceof TreeItem) {
+        return (TreeItem)item;
+    }
     return null;
 }
 
@@ -1091,6 +1340,10 @@
     return itemCount;
 }
 
+int getItemCount (TreeItem item) {
+    return item is null ? itemCount : item.itemCount;
+}
+
 /**
  * Returns the height of the area which would be used to
  * display <em>one</em> of the items in the tree.
@@ -1104,7 +1357,7 @@
  */
 public int getItemHeight () {
     checkWidget ();
-    return cast(int)(cast(NSTableView)view).rowHeight();
+    return cast(int)(cast(NSOutlineView) view).rowHeight ();
 }
 
 /**
@@ -1128,7 +1381,7 @@
     checkWidget ();
     TreeItem [] result = new TreeItem [itemCount];
     for (int i=0; i<itemCount; i++) {
-        result [i] = _getItem (null, i);
+        result [i] = _getItem (null, i, true);
     }
     return result;
 }
@@ -1154,12 +1407,7 @@
  */
 public bool getLinesVisible () {
     checkWidget ();
-//  if (OS.VERSION >= 0x1040) {
-//      int [] attrib = new int [1];
-//      OS.DataBrowserGetAttributes (handle, attrib);
-//      return (attrib [0] & (OS.kDataBrowserAttributeListViewAlternatingRowColors | OS.kDataBrowserAttributeListViewDrawColumnDividers)) !is 0;
-//  }
-    return false;
+    return ((NSOutlineView) view).usesAlternatingRowBackgroundColors ();
 }
 
 /**
@@ -1197,21 +1445,21 @@
  */
 public TreeItem [] getSelection () {
     checkWidget ();
-    NSOutlineView widget = cast(NSOutlineView)view;
-    if (widget.numberOfSelectedRows() is 0) {
+    NSOutlineView widget = cast(NSOutlineView) view;
+    if (widget.numberOfSelectedRows () is 0) {
         return new TreeItem [0];
     }
-    NSIndexSet selection = widget.selectedRowIndexes();
-    int count = selection.count();
-    int [] indexBuffer = new int [count];
-    selection.getIndexes(indexBuffer, count, 0);
-    TreeItem [] result = new TreeItem  [count];
+    NSIndexSet selection = widget.selectedRowIndexes ();
+    int count = (int)/*64*/selection.count ();
+    int /*long*/ [] indexBuffer = new int /*long*/ [count];
+    selection.getIndexes (indexBuffer, count, 0);
+    TreeItem [] result = new TreeItem [count];
     for (int i=0; i<count; i++) {
-        id item = widget.itemAtRow(indexBuffer [i]);
-        int jniRef = OS.objc_msgSend(item.id, OS.sel_tag);
-        if (jniRef !is -1 && jniRef !is 0) {
+        id id = widget.itemAtRow (indexBuffer [i]);
+        Widget item = display.getWidget (id.id);
+        if (item !is null && item instanceof TreeItem) {
             //TODO virtual
-            result[i] = cast(TreeItem)OS.JNIGetObject(jniRef);
+            result[i] = cast(TreeItem) item;
         }
     }
     return result;
@@ -1229,7 +1477,7 @@
  */
 public int getSelectionCount () {
     checkWidget ();
-    return (cast(NSTableView)view).numberOfSelectedRows();
+    return cast(int)/*64*/(cast(NSOutlineView) view).numberOfSelectedRows ();
 }
 
 /**
@@ -1289,7 +1537,7 @@
  * @since 2.1
  */
 public TreeItem getTopItem () {
-    checkWidget();
+    checkWidget ();
 //  //TODO - optimize
 //  Rect rect = new Rect ();
 //  int y = getBorder () + getHeaderHeight ();
@@ -1305,6 +1553,14 @@
     return null;
 }
 
+void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*/ rect) {
+    if (!hooks (DWT.EraseItem)) {
+        NSRect clipRect = new NSRect ();
+        OS.memmove (clipRect, rect, NSRect.sizeof);
+        callSuper (id, sel, clipRect);
+    }
+}
+
 /**
  * Searches the receiver's list starting at the first column
  * (index 0) until a column is found that is equal to the 
@@ -1365,104 +1621,227 @@
     return -1;
 }
 
-int outlineView_child_ofItem(int outlineView, int index, int ref) {
-    TreeItem parent = null;
-    if (ref !is 0) parent = cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(ref, OS.sel_tag));
-    TreeItem item = _getItem(parent, index);
+bool isTrim (NSView view) {
+    if (super.isTrim (view)) return true;
+    return view.id_ is headerView.id_;
+}
+
+int /*long*/ outlineView_child_ofItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ index, int /*long*/ itemID) {
+    TreeItem parent = (TreeItem) display.getWidget (itemID);
+    TreeItem item = _getItem (parent, (int)/*64*/index, true);
+    checkData (item, false);
     return item.handle.id;
 }
 
-int outlineView_objectValueForTableColumn_byItem(int outlineView, int tableColumn, int ref) {
-    TreeItem item = cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(ref, OS.sel_tag));
+void outlineView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn) {
+    TreeColumn column = getColumn (new id (tableColumn));
+    column.postEvent (DWT.Selection);
+}
+
+int /*long*/ outlineView_objectValueForTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ itemID) {
+    TreeItem item = (TreeItem) display.getWidget (itemID);
     if (checkColumn !is null && tableColumn is checkColumn.id) {
         NSNumber value;
         if (item.checked && item.grayed) {
-            value = NSNumber.numberWithInt(OS.NSMixedState);
+            value = NSNumber.numberWithInt (OS.NSMixedState);
         } else {
-            value = NSNumber.numberWithInt(item.checked ? OS.NSOnState : OS.NSOffState);
+            value = NSNumber.numberWithInt (item.checked ? OS.NSOnState : OS.NSOffState);
         }
         return value.id;
     }
     for (int i=0; i<columnCount; i++) {
         if (columns [i].nsColumn.id is tableColumn) {
-            return item.createString(i).id;
+            return item.createString (i).id;
         }
     }
-    return item.createString(0).id;
+    return item.createString (0).id;
 }
 
-bool outlineView_isItemExpandable(int outlineView, int ref) {
-    if (ref is 0) return true;
-    return (cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(ref, OS.sel_tag))).itemCount !is 0;
+bool outlineView_isItemExpandable (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+    if (item is 0) return true;
+    return (cast(TreeItem) display.getWidget (item)).itemCount !is 0;
 }
 
-int outlineView_numberOfChildrenOfItem(int outlineView, int ref) {
-    if (ref is 0) return itemCount;
-    return (cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(ref, OS.sel_tag))).itemCount;
+int /*long*/ outlineView_numberOfChildrenOfItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+    if (item is 0) return itemCount;
+    return (cast(TreeItem) display.getWidget (item)).itemCount;
 }
 
-void outlineView_willDisplayCell_forTableColumn_item(int outlineView, int cell, int tableColumn, int ref) {
+void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ itemID) {
     if (checkColumn !is null && tableColumn is checkColumn.id) return;
-    TreeItem item = cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(ref, OS.sel_tag));
+    TreeItem item = cast(TreeItem) display.getWidget(itemID);
     Image image = item.image;
+    int columnIndex = 0;
     for (int i=0; i<columnCount; i++) {
         if (columns [i].nsColumn.id is tableColumn) {
-            image = item.getImage(i);
+            image = item.getImage (i);
+            columnIndex = i;
         }
     }
-    NSBrowserCell browserCell = new NSBrowserCell(cell);
-    browserCell.setImage(image !is null ? image.handle : null);
+    NSBrowserCell browserCell = new NSBrowserCell (cell);
+    browserCell.setImage (image !is null ? image.handle : null);
+    browserCell.setFont (item.getFont (columnIndex).handle);
+
+    if (hooks (DWT.MeasureItem)) {
+        NSOutlineView view = (NSOutlineView)this.view;
+        int nsColumnIndex = (int)/*64*/view.columnWithIdentifier (new id (tableColumn));
+        int rowIndex = (int)/*64*/view.rowForItem (new id (itemID));
+        NSRect rect = view.frameOfCellAtColumn (nsColumnIndex, rowIndex);
+        NSRect contentRect = browserCell.titleRectForBounds (rect);
+        NSSize contentSize = browserCell.cellSizeForBounds (rect);
+
+        GCData data = new GCData ();
+        data.paintRect = view.frame ();
+        GC gc = GC.cocoa_new (this, data);
+        gc.setFont (item.getFont (columnIndex));
+        int rowHeight = (int)view.rowHeight ();
+        Event event = new Event ();
+        event.item = item;
+        event.gc = gc;
+        event.index = columnIndex;
+        event.x = (int)contentRect.x;
+        event.y = (int)contentRect.y;
+        event.width = (int)Math.ceil (contentSize.width);
+        event.height = rowHeight;
+        sendEvent (DWT.MeasureItem, event);
+        gc.dispose ();
+        if (isDisposed ()) return;
+        if (rowHeight < event.height) {
+            view.setRowHeight (event.height);
+        }
+        if (columnCount is 0) {
+            int change = event.width - (item.customWidth !is -1 ? item.customWidth : (int)Math.ceil (contentSize.width));
+            if (item.customWidth !is -1 || event.width !is (int)Math.ceil (contentSize.width)) {
+                item.customWidth = event.width; 
+            }
+            if (change !is 0) setScrollWidth (item, false, false);
+        }
+    }
 }
 
-void outlineViewSelectionDidChange(int notification) {
-    if (ignoreSelect) return;
-    NSOutlineView widget = cast(NSOutlineView)view;
-    int row = widget.selectedRow();
-    if(row is -1)
-        postEvent(DWT.Selection);
-    else {
-        id _id = widget.itemAtRow(row);
-        TreeItem item = cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(_id.id, OS.sel_tag));
-        Event event = new Event();
-        event.item = item;
-        event.index = row;
-        postEvent(DWT.Selection, event);
+void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    NSNotification notification = new NSNotification (aNotification);
+    NSDictionary userInfo = notification.userInfo ();
+    id nsOldIndex = userInfo.valueForKey (NSString.stringWith ("NSOldColumn")); //$NON-NLS-1$
+    id nsNewIndex = userInfo.valueForKey (NSString.stringWith ("NSNewColumn")); //$NON-NLS-1$
+    int oldIndex = new NSNumber (nsOldIndex).intValue ();
+    int newIndex = new NSNumber (nsNewIndex).intValue ();
+    int startIndex = Math.min (oldIndex, newIndex);
+    int endIndex = Math.max (oldIndex, newIndex);
+    NSOutlineView outlineView = (NSOutlineView)view;
+    NSArray nsColumns = outlineView.tableColumns ();
+    for (int i = startIndex; i <= endIndex; i++) {
+        id columnId = nsColumns.objectAtIndex (i);
+        TreeColumn column = getColumn (columnId);
+        if (column !is null) {
+            column.sendEvent (DWT.Move);
+            if (isDisposed ()) return;
+        }
     }
 }
 
-bool outlineView_shouldCollapseItem(int outlineView, int ref) {
-    if (!ignoreExpand) {
-        TreeItem item = cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(ref, OS.sel_tag));
-        Event event = new Event();
-        event.item = item;
-        sendEvent(DWT.Collapse, event);
-        item.expanded = false;
+void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+    NSNotification notification = new NSNotification (aNotification);
+    NSDictionary userInfo = notification.userInfo ();
+    id columnId = userInfo.valueForKey (NSString.stringWith ("NSTableColumn")); //$NON-NLS-1$
+    TreeColumn column = getColumn (columnId);
+    if (column is null) return; /* either CHECK column or firstColumn in 0-column Tree */
+
+    column.sendEvent (DWT.Resize);
+    if (isDisposed ()) return;
+
+    NSOutlineView outlineView = (NSOutlineView)view;
+    int index = (int)/*64*/outlineView.columnWithIdentifier (columnId);
+    if (index is -1) return; /* column was disposed in Resize callback */
+
+    NSArray nsColumns = outlineView.tableColumns ();
+    int columnCount = (int)/*64*/outlineView.numberOfColumns ();
+    for (int i = index + 1; i < columnCount; i++) {
+        columnId = nsColumns.objectAtIndex (i);
+        column = getColumn (columnId);
+        if (column !is null) {
+            column.sendEvent (DWT.Move);
+            if (isDisposed ()) return;
+        }
     }
-    return true;
+}
+
+void outlineViewItemDidExpand (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+    NSNotification nsNotification = new NSNotification (notification);
+    NSDictionary info = nsNotification.userInfo ();
+    NSString key = NSString.stringWith ("NSObject"); //$NON-NLS-1$
+    int /*long*/ itemHandle = info.objectForKey (key).id;
+    TreeItem item = (TreeItem)display.getWidget (itemHandle);
+    setScrollWidth (item.getItems (), true, true);
 }
 
-bool outlineView_shouldExpandItem(int outlineView, int ref) {
-    if (!ignoreExpand) {
-        TreeItem item = cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(ref, OS.sel_tag));
-        Event event = new Event();
+void outlineViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+    if (ignoreSelect) return;
+    NSOutlineView widget = cast(NSOutlineView) view;
+    int row = (int)/*64*/widget.selectedRow ();
+    if (row is -1)
+        postEvent (DWT.Selection);
+    else {
+        id _id = widget.itemAtRow (row);
+        TreeItem item = cast(TreeItem) display.getWidget (_id.id);
+        Event event = new Event ();
         event.item = item;
-        sendEvent(DWT.Expand, event);
-        item.expanded = true;
+        event.index = row;
+        postEvent (DWT.Selection, event);
     }
-    return true;
+}
+
+bool outlineView_shouldCollapseItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ itemID) {
+    TreeItem item = (TreeItem) display.getWidget (itemID);
+    if (!ignoreExpand) {
+        Event event = new Event ();
+        event.item = item;
+        sendEvent (DWT.Collapse, event);
+        item.expanded = false;
+        ignoreExpand = true;
+        ((NSOutlineView) view).collapseItem (item.handle);
+        ignoreExpand = false;
+        return false;
+    }
+    return !item.expanded;
 }
 
-void outlineView_setObjectValue_forTableColumn_byItem(int outlineView, int object, int tableColumn, int ref) {
-    TreeItem item = cast(TreeItem)OS.JNIGetObject(OS.objc_msgSend(ref, OS.sel_tag));
+bool outlineView_shouldExpandItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ itemID) {
+    final TreeItem item = (TreeItem) display.getWidget (itemID);
+    if (!ignoreExpand) {
+        Event event = new Event ();
+        event.item = item;
+        sendEvent (DWT.Expand, event);
+        item.expanded = true;
+        ignoreExpand = true;
+        ((NSOutlineView) view).expandItem (item.handle);
+        ignoreExpand = false;
+        return false;
+    }
+    return item.expanded;
+}
+
+void outlineView_setObjectValue_forTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ itemID) {
     if (checkColumn !is null && tableColumn is checkColumn.id)  {
+        TreeItem item = (TreeItem) display.getWidget (itemID);
         item.checked = !item.checked;
-        Event event = new Event();
+        Event event = new Event ();
         event.detail = DWT.CHECK;
         event.item = item;
-        postEvent(DWT.Selection, event);
+        postEvent (DWT.Selection, event);
+        NSOutlineView view = (NSOutlineView)this.view;
+        int rowIndex = (int)/*64*/view.rowForItem (new id (itemID));
+        NSRect rect = view.rectOfRow (rowIndex);
+        view.setNeedsDisplayInRect (rect);
     }
 }
 
+void register () {
+    super.register ();
+    display.addWidget (headerView, this);
+    display.addWidget (dataCell, this);
+}
+
 void releaseChildren (bool destroy) {
     for (int i=0; i<items.length; i++) {
         TreeItem item = items [i];
@@ -1485,12 +1864,14 @@
 
 void releaseHandle () {
     super.releaseHandle ();
-    if (headerView !is null) headerView.release();
+    if (headerView !is null) headerView.release ();
     headerView = null;
-    if (firstColumn !is null) firstColumn.release();
+    if (firstColumn !is null) firstColumn.release ();
     firstColumn = null;
-    if (checkColumn !is null) checkColumn.release();
+    if (checkColumn !is null) checkColumn.release ();
     checkColumn = null;
+    if (dataCell !is null) dataCell.release ();
+    dataCell = null;
 }
 
 void releaseWidget () {
@@ -1515,9 +1896,7 @@
     }
     items = new TreeItem [4];
     itemCount = 0;
-    (cast(NSOutlineView)view).reloadItem_(null);
-    //(cast(NSTableView)view).noteNumberOfRowsChanged();
-//  setScrollWidth (true);
+    (cast(NSOutlineView) view).reloadItem (null);
 }
 
 /**
@@ -1561,7 +1940,7 @@
  * @see TreeListener
  * @see #addTreeListener
  */
-public void removeTreeListener(TreeListener listener) {
+public void removeTreeListener (TreeListener listener) {
     checkWidget ();
     if (listener is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (eventTable is null) return;
@@ -1589,7 +1968,7 @@
 public void setInsertMark (TreeItem item, bool before) {
     checkWidget ();
     if (item !is null) {
-        if (item.isDisposed()) error(DWT.ERROR_INVALID_ARGUMENT);
+        if (item.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     }
 }
 
@@ -1607,44 +1986,68 @@
 public void selectAll () {
     checkWidget ();
     if ((style & DWT.SINGLE) !is 0) return;
-    NSTableView widget = cast(NSTableView)view;
+    NSOutlineView widget = cast(NSOutlineView) view;
     ignoreSelect = true;
-    widget.selectAll(null);
+    widget.selectAll (null);
     ignoreSelect = false;
 }
 
+/**
+ * Selects an item in the receiver.  If the item was already
+ * selected, it remains selected.
+ *
+ * @param item the item to be selected
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the item is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the item has been disposed</li>
+ * </ul>
+ * @exception DWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.4
+ */
 public void select (TreeItem item) {
     checkWidget ();
     if (item is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (item.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
-//  showItem (item, false);
-//  ignoreSelect = true;
-//  /*
-//  * Bug in the Macintosh.  When the DataBroswer selection flags includes
-//  * both kDataBrowserNeverEmptySelectionSet and kDataBrowserSelectOnlyOne,
-//    * two items are selected when SetDataBrowserSelectedItems() is called
-//    * with kDataBrowserItemsAssign to assign a new seletion despite the fact
-//  * that kDataBrowserSelectOnlyOne was specified.  The fix is to save and
-//  * restore kDataBrowserNeverEmptySelectionSet around each call to
-//  * SetDataBrowserSelectedItems().
-//  */
-//  int [] selectionFlags = null;
-//  if ((style & DWT.SINGLE) !is 0) {
-//      selectionFlags = new int [1];
-//      OS.GetDataBrowserSelectionFlags (handle, selectionFlags);
-//      OS.SetDataBrowserSelectionFlags (handle, selectionFlags [0] & ~OS.kDataBrowserNeverEmptySelectionSet);
-//  }
-//  OS.SetDataBrowserSelectedItems (handle, 1, new int [] {item.id}, OS.kDataBrowserItemsAssign);
-//  if ((style & DWT.SINGLE) !is 0) {
-//      OS.SetDataBrowserSelectionFlags (handle, selectionFlags [0]);
-//  }
-//  ignoreSelect = false;
+    showItem (item);
+    NSOutlineView outlineView = (NSOutlineView) view;
+    outlineView.selectRow (outlineView.rowForItem (item.handle), false);
 }
 
 void sendDoubleSelection() {
     postEvent (DWT.DefaultSelection);
 }
 
+bool sendKeyEvent (NSEvent nsEvent, int type) {
+    bool result = super.sendKeyEvent (nsEvent, type);
+    if (!result) return result;
+    if (type !is DWT.KeyDown) return result;
+    short keyCode = nsEvent.keyCode ();
+    switch (keyCode) {
+        case 76: /* KP Enter */
+        case 36: { /* Return */
+            postEvent (DWT.DefaultSelection);
+            break;
+        }
+    }
+    return result;
+}
+
+void setBackground (float [] color) {
+    super.setBackground (color);
+    NSColor nsColor;
+    if (color is null) {
+        nsColor = null;
+    } else {
+        nsColor = NSColor.colorWithDeviceRed (color [0], color [1], color [2], 1);
+    }
+    ((NSOutlineView) view).setBackgroundColor (nsColor);
+}
+
 /**
  * Sets the order that the items in the receiver should 
  * be displayed in to the given argument which is described
@@ -1688,35 +2091,23 @@
         if (order [i] !is oldOrder [i]) reorder = true;
     }
     if (reorder) {
-        int [] disclosure = new int [1];
-        bool [] expandableRows = new bool [1];
-//      OS.GetDataBrowserListViewDisclosureColumn (handle, disclosure, expandableRows);
-        TreeColumn firstColumn = columns [order [0]];
-//      if (disclosure [0] !is firstColumn.id) {
-//          OS.SetDataBrowserListViewDisclosureColumn (handle, firstColumn.id, expandableRows [0]);
-//      }
-        int x = 0;
-        short [] width = new short [1];
+        NSOutlineView outlineView = (NSOutlineView)view;
         int [] oldX = new int [oldOrder.length];
+        int check = (style & DWT.CHECK) !is 0 ? 1 : 0;
         for (int i=0; i<oldOrder.length; i++) {
-            int index = oldOrder [i];
-            TreeColumn column = columns [index];
-            oldX [index] =  x;
-//          OS.GetDataBrowserTableViewNamedColumnWidth(handle, column.id, width);
-            x += width [0];
+            int index = oldOrder[i];
+            oldX [index] = (int)outlineView.rectOfColumn (i + check).x;
         }
-        x = 0;
         int [] newX = new int [order.length];
         for (int i=0; i<order.length; i++) {
             int index = order [i];
-            TreeColumn column = columns [index];
-            int position = (style & DWT.CHECK) !is 0 ? i + 1 : i;
-//          OS.SetDataBrowserTableViewColumnPosition(handle, column.id, position);
-//          column.lastPosition = position;
-            newX [index] =  x;
-//          OS.GetDataBrowserTableViewNamedColumnWidth(handle, column.id, width);
-            x += width [0];
+            TreeColumn column = columns[index];
+            int oldIndex = outlineView.columnWithIdentifier (column.nsColumn);
+            int newIndex = i + check;
+            outlineView.moveColumn (oldIndex, newIndex);
+            newX [index] = (int)outlineView.rectOfColumn (newIndex).x;
         }
+
         TreeColumn[] newColumns = new TreeColumn [columnCount];
         System.arraycopy (columns, 0, newColumns, 0, columnCount);
         for (int i=0; i<columnCount; i++) {
@@ -1730,6 +2121,17 @@
     }
 }
 
+void setFont(NSFont font) {
+    super.setFont (font);
+    if (!hooks (DWT.MeasureItem)) {
+        float ascent = font.ascender ();
+        float descent = -font.descender () + font.leading ();
+        ((NSOutlineView)view).setRowHeight ((int)Math.ceil (ascent + descent) + 1);
+    } else {
+        view.setNeedsDisplay (true);
+    }
+}
+
 /**
  * Marks the receiver's header as visible if the argument is <code>true</code>,
  * and marks it invisible otherwise. 
@@ -1750,7 +2152,7 @@
  */
 public void setHeaderVisible (bool show) {
     checkWidget ();
-    (cast(NSTableView)view).setHeaderView (show ? headerView : null);
+    (cast(NSOutlineView) view).setHeaderView (show ? headerView : null);
 }
 
 /**
@@ -1772,91 +2174,39 @@
 }
 
 void setItemCount (TreeItem parentItem, int count) {
-//  int itemCount = getItemCount (parentItem);
-//  if (count is itemCount) return;
-//  setRedraw (false);
-//  int [] top = new int [1], left = new int [1];
-//    OS.GetDataBrowserScrollPosition (handle, top, left);
-//    DataBrowserCallbacks callbacks = new DataBrowserCallbacks ();
-//  OS.GetDataBrowserCallbacks (handle, callbacks);
-//  callbacks.v1_itemNotificationCallback = 0;
-//  callbacks.v1_itemCompareCallback = 0;
-//  OS.SetDataBrowserCallbacks (handle, callbacks);
-//  int[] ids = parentItem is null ? childIds : parentItem.childIds;
-//  if (count < itemCount) {
-//      for (int index = ids.length - 1; index >= count; index--) {
-//          int id = ids [index];
-//          if (id !is 0) {
-//              TreeItem item = _getItem (id, false);
-//              if (item !is null && !item.isDisposed ()) {
-//                  item.dispose ();
-//              } else {
-//                  if (parentItem is null || parentItem.getExpanded ()) {
-//                      if (OS.RemoveDataBrowserItems (handle, OS.kDataBrowserNoItem, 1, new int [] {id}, 0) !is OS.noErr) {
-//                          error (DWT.ERROR_ITEM_NOT_REMOVED);
-//                          break;
-//                      }
-//                      visibleCount--;
-//                  }
-//              }
-//          }
-//      }
-//      //TODO - move shrink to paint event
-//      // shrink items array
-//      int lastIndex = items.length;
-//      for (int i=items.length; i>0; i--) {
-//          if (items [i-1] !is null) {
-//              lastIndex = i;
-//              break;
-//          }
-//      }
-//      if (lastIndex < items.length - 4) {
-//          int length = Math.max (4, (lastIndex + 3) / 4 * 4);
-//          TreeItem [] newItems = new TreeItem [length];
-//          System.arraycopy(items, 0, newItems, 0, Math.min(items.length, lastIndex));
-//      }
-//  }
-//  
-//  if (parentItem !is null) parentItem.itemCount = count;
-//  int length = Math.max (4, (count + 3) / 4 * 4);
-//  int [] newIds = new int [length];
-//  if (ids !is null) {
-//      System.arraycopy (ids, 0, newIds, 0, Math.min (count, itemCount));
-//  }
-//  ids = newIds;
-//  if (parentItem is null) {
-//      childIds = newIds;
-//  } else {
-//      parentItem.childIds = newIds;
-//  }
-//  
-//  if (count > itemCount) {
-//      if ((getStyle() & DWT.VIRTUAL) is 0) {
-//          int delta = Math.max (4, (count - itemCount + 3) / 4 * 4);
-//          TreeItem [] newItems = new TreeItem [items.length + delta];
-//          System.arraycopy (items, 0, newItems, 0, items.length);
-//          items = newItems;
-//          for (int i=itemCount; i<count; i++) {
-//              items [i] = new TreeItem (this, parentItem, DWT.NONE, i, true);
-//          }
-//      } else {
-//          if (parentItem is null || parentItem.getExpanded ()) {
-//              int parentID = parentItem is null ? OS.kDataBrowserNoItem : parentItem.id;
-//              int [] addIds = _getIds (count - itemCount);
-//              if (OS.AddDataBrowserItems (handle, parentID, addIds.length, addIds, OS.kDataBrowserItemNoProperty) !is OS.noErr) {
-//                  error (DWT.ERROR_ITEM_NOT_ADDED);
-//              }
-//              visibleCount += (count - itemCount);
-//              System.arraycopy (addIds, 0, ids, itemCount, addIds.length);
-//          }
-//      }
-//  }
-//  
-//  callbacks.v1_itemNotificationCallback = display.itemNotificationProc;
-//  callbacks.v1_itemCompareCallback = display.itemCompareProc;
-//  OS.SetDataBrowserCallbacks (handle, callbacks);
-//  setRedraw (true);
-//  if (itemCount is 0 && parentItem !is null) parentItem.redraw (OS.kDataBrowserNoItem);
+    int itemCount = getItemCount (parentItem);
+    if (count is itemCount) return;
+    TreeItem [] children = parentItem is null ? items : parentItem.items;
+    if (count < itemCount) {
+        for (int index = count; index < itemCount; index ++) {
+            TreeItem item = children [index];
+            if (item !is null && !item.isDisposed()) item.release (false);
+        }
+    }
+    if (count > itemCount) {
+        if ((getStyle() & DWT.VIRTUAL) is 0) {
+            for (int i=itemCount; i<count; i++) {
+                new TreeItem (this, parentItem, DWT.NONE, i, true);
+            }
+            return;
+        } 
+    }
+    int length = Math.max (4, (count + 3) / 4 * 4);
+    TreeItem [] newItems = new TreeItem [length];
+    if (children !is null) {
+        System.arraycopy (children, 0, newItems, 0, Math.min (count, itemCount));
+    }
+    children = newItems;
+    if (parentItem is null) {
+        this.items = newItems;
+        this.itemCount = count;
+    } else {
+        parentItem.items = newItems;
+        parentItem.itemCount = count;
+    }
+    NSOutlineView widget = (NSOutlineView) view;
+    widget.reloadItem (parentItem !is null ? parentItem.handle : null, true);
+    widget.noteNumberOfRowsChanged();
 }
 
 /*public*/ void setItemHeight (int itemHeight) {
@@ -1901,57 +2251,56 @@
  */
 public void setLinesVisible (bool show) {
     checkWidget ();
-    (cast(NSTableView)view).setUsesAlternatingRowBackgroundColors(show);
+    (cast(NSOutlineView) view).setUsesAlternatingRowBackgroundColors (show);
 }
 
 public void setRedraw (bool redraw) {
-    checkWidget();
+    checkWidget ();
     super.setRedraw (redraw);
     if (redraw && drawCount is 0) {
-        setScrollWidth (true);
+        setScrollWidth ();
     }
 }
 
-bool setScrollWidth (TreeItem item) {
-//  if (ignoreRedraw || drawCount !is 0) return false;
-    if (columnCount !is 0) return false;
-//  TreeItem parentItem = item.parentItem;
-//  if (parentItem !is null && !parentItem._getExpanded ()) return false;
-//  GC gc = new GC (this);
-//  int newWidth = item.calculateWidth (0, gc);
-//  gc.dispose ();
-//  newWidth += getInsetWidth (column_id, false);
-//  short [] width = new short [1];
-//  OS.GetDataBrowserTableViewNamedColumnWidth (handle, column_id, width);
-//  if (width [0] < newWidth) {
-//      OS.SetDataBrowserTableViewNamedColumnWidth (handle, column_id, cast(short) newWidth);
-//      return true;
-//  }
-//  firstColumn.setWidth(400);
-    return false;
+bool setScrollWidth () {
+    return setScrollWidth (items, true, true);
+}
+
+bool setScrollWidth (TreeItem item, bool recurse, bool callMeasureItem) {
+    return setScrollWidth (new TreeItem[] {item}, recurse, callMeasureItem);
 }
 
-bool setScrollWidth (bool set) {
-//  return setScrollWidth(set, childIds, true);
+bool setScrollWidth (TreeItem[] items, bool recurse, bool callMeasureItem) {
+    if (columnCount !is 0) return false;
+//  if (currentItem !is null) {
+//      if (currentItem !is item) fixScrollWidth = true;
+//      return false;
+//  }
+    if (/*ignoreRedraw ||*/ drawCount !is 0) return false;
+    int newWidth = 0;
+    GC gc = new GC (this);
+    for (int i = 0; i < items.length; i++) {
+        TreeItem item = items[i];
+        if (item !is null && !item.isDisposed ()) {
+            newWidth = Math.max (newWidth, item.calculateWidth (0, gc, recurse, callMeasureItem));
+            if (isDisposed ()) {
+                gc.dispose ();
+                return false;
+            }
+        }
+    }
+    gc.dispose ();
+    if (firstColumn.width () < newWidth) {
+        NSOutlineView outlineView = (NSOutlineView)view;
+        int /*long*/ oldResize = outlineView.columnAutoresizingStyle ();
+        outlineView.setColumnAutoresizingStyle (OS.NSTableViewNoColumnAutoresizing);
+        firstColumn.setWidth (newWidth);
+        outlineView.setColumnAutoresizingStyle (oldResize);
+        return true;
+    }
     return false;
 }
 
-bool setScrollWidth (bool set, int[] childIds, bool recurse) {
-//  if (ignoreRedraw || drawCount !is 0) return false;
-//  if (columnCount !is 0 || childIds is null) return false;
-//  GC gc = new GC (this);
-//  int newWidth = calculateWidth (childIds, gc, recurse, 0, 0);
-//  gc.dispose ();
-//  newWidth += getInsetWidth (column_id, false);
-//  if (!set) {
-//      short [] width = new short [1];
-//      OS.GetDataBrowserTableViewNamedColumnWidth (handle, column_id, width);
-//      if (width [0] >= newWidth) return false;
-//  }
-//  OS.SetDataBrowserTableViewNamedColumnWidth (handle, column_id, cast(short) newWidth);
-    return true;
-}
-
 /**
  * Sets the receiver's selection to the given item.
  * The current selection is cleared before the new item is selected.
@@ -2004,48 +2353,23 @@
     checkWidget ();
     if (items is null) error (DWT.ERROR_NULL_ARGUMENT);
     deselectAll ();
-//  int length = items.length;
-//  if (length is 0 || ((style & DWT.SINGLE) !is 0 && length > 1)) return;
-//  int count = 0;
-//  int[] ids = new int [length];
-//  for (int i=0; i<length; i++) {
-//      if (items [i] !is null) {
-//          if (items [i].isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
-//          ids [count++] = items [i].id;
-//          showItem (items [i], false);
-//      }
-//  }
-//  ignoreSelect = true;
-//  /*
-//  * Bug in the Macintosh.  When the DataBroswer selection flags includes
-//  * both kDataBrowserNeverEmptySelectionSet and kDataBrowserSelectOnlyOne,
-//    * two items are selected when SetDataBrowserSelectedItems() is called
-//    * with kDataBrowserItemsAssign to assign a new seletion despite the fact
-//  * that kDataBrowserSelectOnlyOne was specified.  The fix is to save and
-//  * restore kDataBrowserNeverEmptySelectionSet around each call to
-//  * SetDataBrowserSelectedItems().
-//  */
-//  int [] selectionFlags = null;
-//  if ((style & DWT.SINGLE) !is 0) {
-//      selectionFlags = new int [1];
-//      OS.GetDataBrowserSelectionFlags (handle, selectionFlags);
-//      OS.SetDataBrowserSelectionFlags (handle, selectionFlags [0] & ~OS.kDataBrowserNeverEmptySelectionSet);
-//  }
-//  OS.SetDataBrowserSelectedItems (handle, count, ids, OS.kDataBrowserItemsAssign);
-//  if ((style & DWT.SINGLE) !is 0) {
-//      OS.SetDataBrowserSelectionFlags (handle, selectionFlags [0]);
-//  }
-//  ignoreSelect = false;
-//  if (length > 0) {
-//      int index = -1;
-//      for (int i=0; i<items.length; i++) {
-//          if (items [i] !is null) {
-//              index = i;
-//              break;
-//          }
-//      }
-//      if (index !is -1) showItem (items [index], true);
-//  }
+    int length = items.length;
+    if (length is 0 || ((style & DWT.SINGLE) !is 0 && length > 1)) return;
+    NSOutlineView outlineView = (NSOutlineView) view;
+    NSMutableIndexSet rows = (NSMutableIndexSet) new NSMutableIndexSet ().alloc ().init ();
+    rows.autorelease ();
+    for (int i=0; i<length; i++) {
+        if (items [i] !is null) {
+            if (items [i].isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
+            TreeItem item = items [i];
+            showItem (items [i], false);
+            rows.addIndex (outlineView.rowForItem (item.handle));
+        }
+    }
+    ignoreSelect = true;
+    outlineView.selectRowIndexes (rows, false);
+    ignoreSelect = false;
+    if (items.length > 0) showItem(items[0], true);
 }
 
 /**
@@ -2069,19 +2393,21 @@
     checkWidget ();
     if (column !is null && column.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     if (column is sortColumn) return;
-//  if (column is null) {
-//      if (sortColumn !is null  && !sortColumn.isDisposed ()  && sortDirection !is DWT.NONE) {
-//          OS.SetDataBrowserSortOrder (handle, cast(short) OS.kDataBrowserOrderIncreasing);
-//          sortColumn = null; 
-//          OS.SetDataBrowserSortProperty (handle, 0);
-//      }
-//  }
-//  sortColumn = column;
-//  if (sortColumn !is null  && !sortColumn.isDisposed () && sortDirection !is DWT.NONE) {
-//      OS.SetDataBrowserSortProperty (handle, sortColumn.id);
-//      int order = sortDirection is DWT.DOWN ? OS.kDataBrowserOrderDecreasing : OS.kDataBrowserOrderIncreasing;
-//      OS.SetDataBrowserSortOrder (handle, cast(short) order);
-//  }
+    TreeColumn oldSortColumn = sortColumn;
+    sortColumn = column;
+    if (sortDirection is DWT.NONE) return;
+    NSTableHeaderView headerView = ((NSOutlineView)view).headerView ();
+    if (headerView is null) return;
+    if (oldSortColumn !is null) {
+        int /*long*/ index = ((NSOutlineView)view).columnWithIdentifier (oldSortColumn.nsColumn);
+        NSRect rect = headerView.headerRectOfColumn (index);
+        headerView.setNeedsDisplayInRect (rect);
+    }
+    if (sortColumn !is null) {
+        NSInteger index = (cast(NSOutlineView)view).columnWithIdentifier (sortColumn.nsColumn);
+        NSRect rect = headerView.headerRectOfColumn (index);
+        headerView.setNeedsDisplayInRect (rect);
+    }
 }
 
 /**
@@ -2100,22 +2426,14 @@
 public void setSortDirection  (int direction) {
     checkWidget ();
     if (direction !is DWT.UP && direction !is DWT.DOWN && direction !is DWT.NONE) return;
-//  if (direction is sortDirection) return;
-//  sortDirection = direction;
-//  if (sortColumn !is null && !sortColumn.isDisposed ()) {
-//      if (sortDirection is DWT.NONE) {
-//          OS.SetDataBrowserSortOrder (handle, cast(short) OS.kDataBrowserOrderIncreasing);
-//          TreeColumn column = sortColumn;
-//          sortColumn = null; 
-//          OS.SetDataBrowserSortProperty (handle, 0);
-//          sortColumn = column;
-//      } else {
-//          OS.SetDataBrowserSortProperty (handle, 0);
-//          OS.SetDataBrowserSortProperty (handle, sortColumn.id);
-//          int order = sortDirection is DWT.DOWN ? OS.kDataBrowserOrderDecreasing : OS.kDataBrowserOrderIncreasing;
-//          OS.SetDataBrowserSortOrder (handle, cast(short) order);
-//      }
-//  }
+    if (direction is sortDirection) return;
+    sortDirection = direction;
+    if (sortColumn is null) return;
+    NSTableHeaderView headerView = ((NSOutlineView)view).headerView ();
+    if (headerView is null) return;
+    int /*long*/ index = ((NSOutlineView)view).columnWithIdentifier (sortColumn.nsColumn);
+    NSRect rect = headerView.headerRectOfColumn (index);
+    headerView.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -2142,16 +2460,10 @@
     checkWidget();
     if (item is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (item.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
-//  showItem (item, false);
-//  int columnId = (columnCount is 0) ? column_id : columns [0].id;
-//  OS.RevealDataBrowserItem (handle, item.id, columnId, cast(byte) OS.kDataBrowserRevealWithoutSelecting);
-//  Rect rect = new Rect ();
-//  if (OS.GetDataBrowserItemPartBounds (handle, item.id, column_id, OS.kDataBrowserPropertyEnclosingPart, rect) is OS.noErr) {
-//      int border = getBorder ();
-//      int [] top = new int [1], left = new int [1];
-//      OS.GetDataBrowserScrollPosition (handle, top, left);
-//      OS.SetDataBrowserScrollPosition (handle, Math.max (0, top [0] + rect.top - border - getHeaderHeight ()), left [0]);
-//  }
+    showItem (item, false);
+    NSOutlineView outlineView = (NSOutlineView) view;
+    //FIXME
+    ((NSOutlineView) view).scrollRowToVisible (outlineView.rowForItem (item.handle));
 }
 
 /**
@@ -2175,11 +2487,12 @@
 public void showColumn (TreeColumn column) {
     checkWidget ();
     if (column is null) error (DWT.ERROR_NULL_ARGUMENT);
-    if (column.isDisposed()) error(DWT.ERROR_INVALID_ARGUMENT);
+    if (column.isDisposed()) error (DWT.ERROR_INVALID_ARGUMENT);
     if (column.parent !is this) return;
-    int index = indexOf (column);
-    if (columnCount <= 1 || !(0 <= index && index < columnCount)) return;
-    (cast(NSTableView)view).scrollColumnToVisible(index + ((style & DWT.CHECK) !is 0 ? 1 : 0));
+    if (columnCount <= 1) return;
+    int index = (int)/*64*/((NSOutlineView)view).columnWithIdentifier (column.nsColumn);
+    if (!(0 <= index && index < columnCount + ((style & DWT.CHECK) !is 0 ? 1 : 0))) return;
+    ((NSOutlineView)view).scrollColumnToVisible (index);
 }
 
 /**
@@ -2208,99 +2521,15 @@
 }
 
 void showItem (TreeItem item, bool scroll) {
-    int count = 0;
-//  TreeItem parentItem = item.parentItem;
-//  while (parentItem !is null && !parentItem._getExpanded ()) {
-//      count++;
-//      parentItem = parentItem.parentItem;
-//  }
-//  int index = 0;
-//  parentItem = item.parentItem;
-//  TreeItem [] path = new TreeItem [count];
-//  while (parentItem !is null && !parentItem._getExpanded ()) {
-//      path [index++] = parentItem;
-//      parentItem = parentItem.parentItem;
-//  }
-//  for (int i=path.length-1; i>=0; --i) {
-//      path [i].setExpanded (true);
-//  }
-//  if (scroll) {
-//      /*
-//      * Bug in the Macintosh.  When there is not room to show a
-//      * single item in the data browser, RevealDataBrowserItem()
-//      * scrolls the item such that it is above the top of the data
-//      * browser.  The fix is to remember the index and scroll when
-//      * the data browser is resized.
-//      * 
-//      * Bug in the Macintosh.  When items are added to the data
-//      * browser after is has been hidden, RevealDataBrowserItem()
-//      * when called before the controls behind the data browser
-//      * are repainted causes a redraw.  This redraw happens right
-//      * away causing pixel corruption.  The fix is to remember the
-//      * index and scroll when the data browser is shown.
-//      */
-//      Rectangle rect = getClientArea ();
-//      if (rect.height < getItemHeight () || !OS.IsControlVisible (handle)) {
-//          showItem = item;
-//          return;
-//      }
-//      showItem = null;
-//      Rectangle itemRect = item.getBounds ();
-//      if (!itemRect.isEmpty()) {
-//          if (rect.contains (itemRect.x, itemRect.y)
-//              && rect.contains (itemRect.x, itemRect.y + itemRect.height)) return;
-//      }
-//      int [] top = new int [1], left = new int [1];
-//      OS.GetDataBrowserScrollPosition (handle, top, left);
-//      int columnId = (columnCount is 0) ? column_id : columns [0].id;
-//      int options = OS.kDataBrowserRevealWithoutSelecting;
-//      /*
-//      * This code is intentionally commented, since kDataBrowserRevealAndCenterInView
-//      * does not scroll the item to the center always (it seems to scroll to the
-//      * end in some cases).
-//      */
-//      //options |= OS.kDataBrowserRevealAndCenterInView;
-//      OS.RevealDataBrowserItem (handle, item.id, columnId, cast(byte) options);
-//      int [] newTop = new int [1], newLeft = new int [1];
-//      if (columnCount is 0) {
-//          bool fixScroll = false;
-//          Rect content = new Rect ();
-//          if (OS.GetDataBrowserItemPartBounds (handle, item.id, columnId, OS.kDataBrowserPropertyContentPart, content) is OS.noErr) {
-//              fixScroll = content.left < rect.x || content.left >= rect.x + rect.width;
-//              if (!fixScroll) {
-//                  GC gc = new GC (this);
-//                  int contentWidth = calculateWidth (new int[]{item.id}, gc, false, 0, 0);
-//                  gc.dispose ();
-//                  fixScroll =  content.left + contentWidth > rect.x + rect.width;
-//              }
-//          }
-//          if (fixScroll) {
-//              int leftScroll = getLeftDisclosureInset (columnId);
-//              int levelIndent = DISCLOSURE_COLUMN_LEVEL_INDENT;
-//              if (OS.VERSION >= 0x1040) {
-//                  float [] metric = new float [1];
-//                  OS.DataBrowserGetMetric (handle, OS.kDataBrowserMetricDisclosureColumnPerDepthGap, null, metric);
-//                  levelIndent = cast(int) metric [0];
-//              }
-//              TreeItem temp = item;
-//              while (temp.parentItem !is null) {
-//                  leftScroll += levelIndent;
-//                  temp = temp.parentItem;
-//              }
-//              OS.GetDataBrowserScrollPosition (handle, newTop, newLeft);
-//              OS.SetDataBrowserScrollPosition (handle, newTop [0], leftScroll);
-//          }
-//      }
-//
-//      /*
-//      * Bug in the Macintosh.  For some reason, when the DataBrowser is scrolled
-//      * by RevealDataBrowserItem(), the scrollbars are not redrawn.  The fix is to
-//      * force a redraw.
-//      */
-//      OS.GetDataBrowserScrollPosition (handle, newTop, newLeft);
-//      if (horizontalBar !is null && newLeft [0] !is left [0]) horizontalBar.redraw ();
-//      if (verticalBar !is null && newTop [0] !is top [0]) verticalBar.redraw ();
-//  }
+    TreeItem parentItem = item.parentItem;
+    if (parentItem !is null && !parentItem.expanded) {
+        showItem (parentItem, false);
+        parentItem.setExpanded (true);
+    }
+    if (scroll) {
+        NSOutlineView outlineView = (NSOutlineView) view;
+        outlineView.scrollRowToVisible (outlineView.rowForItem (item.handle));
+    }
 }
 
 /**
@@ -2324,3 +2553,4 @@
 }
 
 }
+
--- a/dwt/widgets/TreeColumn.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/TreeColumn.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,9 +18,21 @@
 import dwt.events.ControlListener;
 import dwt.events.SelectionEvent;
 import dwt.events.SelectionListener;
+import dwt.graphics.GC;
 import dwt.graphics.Image;
+import dwt.internal.cocoa.NSAffineTransform;
+import dwt.internal.cocoa.NSAttributedString;
+import dwt.internal.cocoa.NSGraphicsContext;
+import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSMutableParagraphStyle;
+import dwt.internal.cocoa.NSOutlineView;
+import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSTableColumn;
+import dwt.internal.cocoa.NSTableHeaderCell;
+import dwt.internal.cocoa.NSTableHeaderView;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
 
 /**
@@ -36,13 +48,18 @@
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tree">Tree, TreeItem, TreeColumn snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  * 
  * @since 3.1
  */
 public class TreeColumn : Item {
     NSTableColumn nsColumn;
     Tree parent;
-    String toolTipText;
+    String toolTipText, displayText;
+
+    static final int MARGIN = 2;
 
 /**
  * Constructs a new instance of this class given its parent
@@ -79,7 +96,7 @@
 public this (Tree parent, int style) {
     super (parent, checkStyle (style));
     this.parent = parent;
-    parent.createItem (this, parent.getColumnCount ());
+    parent.createItem (this, parent.columnCount);
 }
 
 /**
@@ -96,7 +113,10 @@
  * lists the style constants that are applicable to the class.
  * Style bits are also inherited from superclasses.
  * </p>
- *
+ * <p>
+ * Note that due to a restriction on some platforms, the first column
+ * is always left aligned.
+ * </p>
  * @param parent a composite control which will be the parent of the new instance (cannot be null)
  * @param style the style of control to construct
  * @param index the zero-relative index to store the receiver in its parent
@@ -189,11 +209,110 @@
     if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS);
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (nsColumn.headerCell());
+}
+
 void destroyWidget () {
     parent.destroyItem (this);
     releaseHandle ();
 }
 
+void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) {
+    NSRect cellRect = new NSRect ();
+    OS.memmove (cellRect, cellFrame, NSRect.sizeof);
+
+    /*
+     * Feature in Cocoa.  When the last column in a tree does not reach the
+     * rightmost edge of the tree view, the cell that draws the rightmost-
+     * column's header is also invoked to draw the header space between its
+     * right edge and the tree's right edge.  If this case is detected then
+     * nothing should be drawn.
+     */
+    NSOutlineView outlineView = (NSOutlineView)parent.view;
+    int columnIndex = (int)/*64*/outlineView.columnWithIdentifier (nsColumn);
+    NSRect headerRect = parent.headerView.headerRectOfColumn (columnIndex);
+    if (headerRect.x !is cellRect.x || headerRect.width !is cellRect.width) return;
+
+    NSGraphicsContext context = NSGraphicsContext.currentContext ();
+    context.saveGraphicsState ();
+
+    int contentWidth = 0;
+    NSSize stringSize = null, imageSize = null;
+    NSAttributedString attrString = null;
+    NSTableHeaderCell headerCell = nsColumn.headerCell ();
+    if (displayText !is null) {
+        NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
+        dict.setObject (headerCell.font (), OS.NSFontAttributeName);
+        NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
+        paragraphStyle.autorelease ();
+        paragraphStyle.setLineBreakMode (OS.NSLineBreakByClipping);
+        dict.setObject (paragraphStyle, OS.NSParagraphStyleAttributeName);
+        NSString string = NSString.stringWith (displayText);
+        attrString = ((NSAttributedString)new NSAttributedString ().alloc ()).initWithString (string, dict);
+        stringSize = attrString.size ();
+        contentWidth += Math.ceil (stringSize.width);
+        if (image !is null) contentWidth += MARGIN; /* space between image and text */
+    }
+    if (image !is null) {
+        imageSize = image.handle.size ();
+        contentWidth += Math.ceil (imageSize.width);
+    }
+
+    if (parent.sortColumn is this && parent.sortDirection !is DWT.NONE) {
+        bool ascending = parent.sortDirection is DWT.UP;
+        headerCell.drawSortIndicatorWithFrame (cellRect, new NSView(view), ascending, 0);
+        /* remove the arrow's space from the available drawing width */
+        NSRect sortRect = headerCell.sortIndicatorRectForBounds (cellRect);
+        cellRect.width = Math.max (0, sortRect.x - cellRect.x);
+    }
+
+    int drawX = 0;
+    if ((style & DWT.CENTER) !is 0) {
+        drawX = (int)(cellRect.x + Math.max (MARGIN, ((cellRect.width - contentWidth) / 2)));
+    } else if ((style & DWT.RIGHT) !is 0) {
+        drawX = (int)(cellRect.x + Math.max (MARGIN, cellRect.width - contentWidth - MARGIN));
+    } else {
+        drawX = (int)cellRect.x + MARGIN;
+    }
+
+    if (image !is null) {
+        NSRect destRect = new NSRect ();
+        destRect.x = drawX;
+        destRect.y = cellRect.y;
+        destRect.width = Math.min (imageSize.width, cellRect.width - 2 * MARGIN);
+        destRect.height = Math.min (imageSize.height, cellRect.height);
+        bool isFlipped = new NSView (view).isFlipped(); 
+        if (isFlipped) {
+            context.saveGraphicsState ();
+            NSAffineTransform transform = NSAffineTransform.transform ();
+            transform.scaleXBy (1, -1);
+            transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
+            transform.concat ();
+        }
+        NSRect sourceRect = new NSRect ();
+        sourceRect.width = destRect.width;
+        sourceRect.height = destRect.height;
+        image.handle.drawInRect (destRect, sourceRect, OS.NSCompositeSourceOver, 1f);
+        if (isFlipped) context.restoreGraphicsState ();
+        drawX += destRect.width;
+    }
+
+    if (displayText !is null && displayText.length () > 0) {
+        if (image !is null) drawX += MARGIN; /* space between image and text */
+        NSRect destRect = new NSRect ();
+        destRect.x = drawX;
+        destRect.y = cellRect.y;
+        destRect.width = Math.min (stringSize.width, cellRect.x + cellRect.width - MARGIN - drawX);
+        destRect.height = Math.min (stringSize.height, cellRect.height);
+        attrString.drawInRect (destRect);
+        attrString.release ();
+    }
+
+    context.restoreGraphicsState ();
+}
+
 /**
  * Returns a value which describes the position of the
  * text or image in the receiver. The value will be one of
@@ -324,21 +443,59 @@
  */
 public void pack () {
     checkWidget ();
-//  GC gc = new GC (parent);
-//  int width = gc.stringExtent (text).x;
-    //TODO extra header
-//  int index = parent.indexOf (this);
-//  width = Math.max (width, calculateWidth (parent.childIds, index, gc, width));
-//
-//  gc.dispose ();
-//  setWidth (width + parent.getInsetWidth (id, true));
-    //TODO this only takes care of the header
-    nsColumn.sizeToFit();
+
+    int width = 0;
+
+    /* compute header width */
+    if (displayText !is null) {
+        NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity (4);
+        NSTableHeaderCell headerCell = nsColumn.headerCell ();
+        dict.setObject (headerCell.font (), OS.NSFontAttributeName);
+        NSString string = NSString.stringWith (displayText);
+        NSAttributedString attrString = ((NSAttributedString)new NSAttributedString ().alloc ()).initWithString (string, dict);
+        NSSize stringSize = attrString.size ();
+        attrString.release ();
+        width += Math.ceil (stringSize.width);
+        if (image !is null) width += MARGIN; /* space between image and text */
+    }
+    if (image !is null) {
+        NSSize imageSize = image.handle.size ();
+        width += Math.ceil (imageSize.width);
+    }
+    if (parent.sortColumn is this && parent.sortDirection !is DWT.NONE) {
+        NSTableHeaderCell headerCell = nsColumn.headerCell ();
+        NSRect rect = new NSRect ();
+        rect.width = rect.height = Float.MAX_VALUE;
+        NSSize cellSize = headerCell.cellSizeForBounds (rect);
+        rect.height = cellSize.height;
+        NSRect sortRect = headerCell.sortIndicatorRectForBounds (rect);
+        width += Math.ceil (sortRect.width);
+    }
+
+    /* compute item widths down column */
+    GC gc = new GC (parent);
+    int index = parent.indexOf (this);
+    for (int i=0; i<parent.itemCount; i++) {
+        TreeItem item = parent.items [i];
+        if (item !is null && !item.isDisposed () && item.cached) {
+            width = Math.max (width, item.calculateWidth (index, gc, true, true));
+            if (isDisposed ()) {
+                gc.dispose ();
+                return;
+            }
+            if (gc.isDisposed ()) gc = new GC (parent);
+        }
+    }
+    gc.dispose ();
+    setWidth (width + parent.getInsetWidth ());
 }
 
 void releaseHandle () {
     super.releaseHandle ();
-    if (nsColumn !is null) nsColumn.release();
+    if (nsColumn !is null) {
+        nsColumn.headerCell ().release ();
+        nsColumn.release ();
+    }
     nsColumn = null;
     parent = null;
 }
@@ -404,7 +561,10 @@
  * Controls how text and images will be displayed in the receiver.
  * The argument should be one of <code>LEFT</code>, <code>RIGHT</code>
  * or <code>CENTER</code>.
- *
+ * <p>
+ * Note that due to a restriction on some platforms, the first column
+ * is always left aligned.
+ * </p>
  * @param alignment the new alignment 
  *
  * @exception DWTException <ul>
@@ -419,7 +579,14 @@
     if (index is -1 || index is 0) return;
     style &= ~(DWT.LEFT | DWT.RIGHT | DWT.CENTER);
     style |= alignment & (DWT.LEFT | DWT.RIGHT | DWT.CENTER);
-    //TODO
+    NSOutlineView outlineView = ((NSOutlineView) parent.view);
+    NSTableHeaderView headerView = outlineView.headerView ();
+    if (headerView is null) return;
+    index = (int)/*64*/outlineView.columnWithIdentifier (nsColumn);
+    NSRect rect = headerView.headerRectOfColumn (index);
+    headerView.setNeedsDisplayInRect (rect);
+    rect = outlineView.rectOfColumn (index);
+    parent.view.setNeedsDisplayInRect (rect);
 }
 
 public void setImage (Image image) {
@@ -427,19 +594,12 @@
     if (image !is null && image.isDisposed ()) {
         error (DWT.ERROR_INVALID_ARGUMENT);
     }
-//  int index = parent.indexOf (this);
-//  if (index is -1) return;
-//  if (iconRef !is 0) {
-//      OS.ReleaseIconRef (iconRef);
-//      iconRef = 0;
-//  }
-//  super.setImage (image);
-//  if (image !is null) {
-//      if (OS.VERSION < 0x1040) {
-//          iconRef = createIconRef (image);
-//      }
-//  }
-//  updateHeader ();
+    super.setImage (image);
+    NSTableHeaderView headerView = ((NSOutlineView) parent.view).headerView ();
+    if (headerView is null) return;
+    int /*long*/ index = ((NSOutlineView)parent.view).columnWithIdentifier (nsColumn);
+    NSRect rect = headerView.headerRectOfColumn (index);
+    headerView.setNeedsDisplayInRect (rect);
 }
 
 /**
@@ -465,6 +625,10 @@
  */
 public void setMoveable (bool moveable) {
     checkWidget ();
+    // TODO how to make only some columns movable?  And handle moveable is false.
+    if (moveable) {
+        ((NSOutlineView)parent.view).setAllowsColumnReordering (true);
+    }
 //  int [] flags = new int [1];
 //  OS.GetDataBrowserPropertyFlags (parent.handle, id, flags);
 //  if (moveable) {
@@ -499,7 +663,14 @@
     char [] buffer = new char [text.length ()];
     text.getChars (0, buffer.length, buffer, 0);
     int length = fixMnemonic (buffer);
-    nsColumn.headerCell().setTitle(NSString.stringWithCharacters(buffer, length));
+    displayText = new String (buffer, 0, length);
+    NSString title = NSString.stringWith (displayText);
+    nsColumn.headerCell ().setTitle (title);
+    NSTableHeaderView headerView = ((NSOutlineView) parent.view).headerView ();
+    if (headerView is null) return;
+    int /*long*/ index = ((NSOutlineView)parent.view).columnWithIdentifier (nsColumn);
+    NSRect rect = headerView.headerRectOfColumn (index);
+    headerView.setNeedsDisplayInRect (rect);
 }
 
 /**
--- a/dwt/widgets/TreeItem.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/TreeItem.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,11 +21,15 @@
 import dwt.graphics.Image;
 import dwt.graphics.Rectangle;
 import dwt.internal.cocoa.NSAttributedString;
+import dwt.internal.cocoa.NSBrowserCell;
 import dwt.internal.cocoa.NSColor;
 import dwt.internal.cocoa.NSMutableDictionary;
+import dwt.internal.cocoa.NSMutableParagraphStyle;
 import dwt.internal.cocoa.NSOutlineView;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.NSTableColumn;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTTreeItem;
 
@@ -42,6 +46,9 @@
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
  * </p>
+ *
+ * @see <a href="http://www.eclipse.org/swt/snippets/#tree">Tree, TreeItem, TreeColumn snippets</a>
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class TreeItem : Item {
     Tree parent;
@@ -52,10 +59,20 @@
     Image [] images;
     bool checked, grayed, cached, expanded;
     Color foreground, background;
-    Color[] cellForeground, cellBackground;
+    Color [] cellForeground, cellBackground;
     Font font;
-    Font[] cellFont;
-    int width = -1;
+    Font [] cellFont;
+    int customWidth = -1;
+    /**
+     * the handle to the OS resource 
+     * (Warning: This field is platform dependent)
+     * <p>
+     * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT
+     * public API. It is marked public only so that it can be shared
+     * within the packages provided by DWT. It is not available on all
+     * platforms and should never be accessed from application code.
+     * </p>
+     */
     //
     SWTTreeItem handle;
     
@@ -203,7 +220,14 @@
     super (parent, style);
     this.parent = parent;
     this.parentItem = parentItem;
-    if (create) parent.createItem (this, parentItem, index);
+    if (create) {
+        parent.createItem (this, parentItem, index);
+    } else {
+        handle = (SWTTreeItem) new SWTTreeItem ().alloc ().init ();
+        createJNIRef ();
+        register ();
+        items = new TreeItem[4];
+    }
 }
 
 static TreeItem checkNull (TreeItem item) {
@@ -221,31 +245,72 @@
     return index;
 }
 
-int calculateWidth (int index, GC gc) {
-    if (index is 0 && width !is -1) return width;
+/* note that the result includes tree hierarchy indentation for column 0 */
+int calculateWidth (int columnIndex, GC gc, bool recurse, bool callMeasureItem) {
     int width = 0;
-    Image image = getImage (index);
-    String text = getText (index);
-    gc.setFont (getFont (index));
-//  if (image !is null) width += image.getBounds ().width + parent.getGap ();
-    if (text !is null && text.length () > 0) width += gc.stringExtent (text).x;
-//  if (parent.hooks (DWT.MeasureItem)) {
-//      Event event = new Event ();
-//      event.item = this;
-//      event.index = index;
-//      event.gc = gc;
-//      short [] height = new short [1];
-//      OS.GetDataBrowserTableViewRowHeight (parent.handle, height);
-//      event.width = width;
-//      event.height = height [0];
-//      parent.sendEvent (DWT.MeasureItem, event);
-//      if (parent.itemHeight < event.height) {
-//          parent.itemHeight = event.height;
-//          OS.SetDataBrowserTableViewRowHeight (parent.handle, cast(short) event.height);
-//      }
-//      width = event.width;
-//  }
-    if (index is 0) this.width = width;
+    if (!callMeasureItem && customWidth !is -1) {
+        width = customWidth;
+    } else {
+        NSBrowserCell cell = parent.dataCell;
+        cell.setFont (getFont (columnIndex).handle);
+        cell.setTitle (NSString.stringWith (getText (columnIndex)));
+        Image image = getImage (columnIndex);
+        cell.setImage (image !is null ? image.handle : null);
+        NSRect rect = new NSRect ();
+        rect.width = rect.height = Float.MAX_VALUE;
+        NSSize size = cell.cellSizeForBounds (rect);
+        width = (int)Math.ceil (size.width);
+
+        if (callMeasureItem && parent.hooks (DWT.MeasureItem)) {
+            NSOutlineView outlineView = (NSOutlineView)parent.view;
+            int nsColumnIndex = 0;
+            if (parent.columnCount > 0) {
+                nsColumnIndex = outlineView.columnWithIdentifier (parent.columns[columnIndex].nsColumn);
+            }
+            int rowIndex = (int)/*64*/outlineView.rowForItem (handle);
+            rect = outlineView.frameOfCellAtColumn (nsColumnIndex, rowIndex);
+            NSRect contentRect = cell.titleRectForBounds (rect);
+            int rowHeight = (int)outlineView.rowHeight ();
+            Event event = new Event ();
+            event.item = this;
+            event.index = columnIndex;
+            event.gc = gc;
+            event.x = (int)contentRect.x;
+            event.y = (int)contentRect.y;
+            event.width = width;
+            event.height = rowHeight;
+            parent.sendEvent (DWT.MeasureItem, event);
+            if (rowHeight < event.height) {
+                outlineView.setRowHeight (event.height);
+            }
+            if (parent.columnCount is 0) {
+                int change = event.width - (customWidth !is -1 ? customWidth : width);
+                if (customWidth !is -1 || event.width !is width) {
+                    customWidth = event.width;  
+                }
+                if (change !is 0) parent.setScrollWidth (this, false, false);
+            }
+            width = event.width;
+        }
+    }
+
+    if (columnIndex is 0) {
+        NSTableColumn column = parent.columnCount is 0 ? parent.firstColumn : parent.columns[0].nsColumn;
+        NSOutlineView outlineView = (NSOutlineView)parent.view;
+        int rowIndex = (int)/*64*/outlineView.rowForItem (handle);
+        int nsColumnIndex = (int)/*64*/outlineView.columnWithIdentifier (column);
+        NSRect columnRect = outlineView.rectOfColumn (nsColumnIndex);
+        NSRect cellRect = outlineView.frameOfCellAtColumn (nsColumnIndex, rowIndex);
+        width += (cellRect.x - columnRect.x);
+    }
+    if (recurse && expanded) {
+        for (int i = 0; i < items.length; i++) {
+            TreeItem item = items [i];
+            if (item !is null && !item.isDisposed () && item.cached) {
+                width = Math.max (width, item.calculateWidth (columnIndex, gc, recurse, callMeasureItem));
+            }
+        }
+    }
     return width;
 }
 
@@ -292,7 +357,8 @@
 public void clear (int index, bool all) {
     checkWidget ();
     int count = getItemCount ();
-    if (index < 0 || index >= count) DWT.error (DWT.ERROR_INVALID_RANGE);
+    if (index < 0 || index >= count) 
+        DWT.error (DWT.ERROR_INVALID_RANGE);
     parent.clear (this, index, all);
 }
 
@@ -327,31 +393,42 @@
     if (foreground is null) foreground = this.foreground;
     if (foreground is null) foreground = parent.foreground;
     if (foreground !is null) {
-        NSColor color = NSColor.colorWithDeviceRed(foreground.handle[0], foreground.handle[1], foreground.handle[2], 1);
-        dict.setObject(color, OS.NSForegroundColorAttributeName());
+        NSColor color = NSColor.colorWithDeviceRed (foreground.handle [0], foreground.handle [1], foreground.handle [2], 1);
+        dict.setObject (color, OS.NSForegroundColorAttributeName);
     }
     Font font = cellFont !is null ? cellFont [index] : null;
     if (font is null) font = this.font;
-//  if (font is null) font = parent.font;
+    if (font is null) font = parent.font;
     if (font !is null) {
-        dict.setObject(font.handle, OS.NSFontAttributeName());
+        dict.setObject(font.handle, OS.NSFontAttributeName);
     }
-    Color background = cellBackground !is null ? cellBackground [index] : null;
-    if (background is null) background = this.background;
-    if (background !is null) {
-        NSColor color = NSColor.colorWithDeviceRed(background.handle[0], background.handle[1], background.handle[2], 1);
-        dict.setObject(color, OS.NSBackgroundColorAttributeName());
+
+    NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
+    paragraphStyle.autorelease ();
+    paragraphStyle.setLineBreakMode (OS.NSLineBreakByClipping);
+    dict.setObject (paragraphStyle, OS.NSParagraphStyleAttributeName);
+    if (parent.columnCount > 0) {
+        TreeColumn column = parent.getColumn (index);
+        int style = column.getStyle ();
+        if ((style & DWT.CENTER) !is 0) {
+            paragraphStyle.setAlignment (OS.NSCenterTextAlignment);
+        } else if ((style & DWT.RIGHT) !is 0) {
+            paragraphStyle.setAlignment (OS.NSRightTextAlignment);
+        }
     }
+
     String text = getText (index);
-    int length = text.length();
-    char[] chars = new char[length];
-    text.getChars(0, length, chars, 0);
-    NSString str = NSString.stringWithCharacters(chars, length);
-    NSAttributedString attribStr = (cast(NSAttributedString)new NSAttributedString().alloc()).initWithString_attributes_(str, dict);
-    attribStr.autorelease();
+    NSString str = NSString.stringWith(text);
+    NSAttributedString attribStr = ((NSAttributedString) new NSAttributedString ().alloc ()).initWithString (str, dict);
+    attribStr.autorelease ();
     return attribStr;
 }
 
+void deregister () {
+    super.deregister ();
+    display.removeWidget (handle);
+}
+
 void destroyWidget () {
     parent.destroyItem (this);
     releaseHandle ();
@@ -413,11 +490,8 @@
     checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     NSOutlineView outlineView = cast(NSOutlineView) parent.view;
-    int row = outlineView.rowForItem(handle);
-    NSRect rect = outlineView.rectOfRow (row);
-    rect = outlineView.convertRect_toView_ (rect, parent.scrollView);
-    Rectangle result = new Rectangle(cast(int) rect.x, cast(int) rect.y, cast(int) rect.width, cast(int) rect.height);
-    return result;
+    NSRect rect = outlineView.rectOfRow (outlineView.rowForItem (handle));
+    return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
 }
 
 /**
@@ -437,13 +511,16 @@
 public Rectangle getBounds (int index) {
     checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
-    if (index !is 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0);
-    NSOutlineView outlineView = cast(NSOutlineView) parent.view;
-    int row = outlineView.rowForItem(handle);
-    if ((parent.style & DWT.CHECK) !is 0) index ++;
-    NSRect rect = outlineView.frameOfCellAtColumn(index, row);
-    rect = outlineView.convertRect_toView_ (rect, parent.scrollView);
-    return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height);
+    if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
+
+    if (parent.columnCount is 0) {
+        index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+    } else {
+        TreeColumn column = parent.getColumn (index);
+        index = cast(int)/*64*/outlineView.columnWithIdentifier (column.nsColumn);
+    }
+    NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle));
+    return new Rectangle (cast(int) rect.x, cast(int) rect.y, cast(int) rect.width, cast(int) rect.height);
 }
 
 /**
@@ -634,25 +711,20 @@
 public Rectangle getImageBounds (int index) {
     checkWidget ();
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
-//  if (index !is 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0);
-//  Rect rect = new Rect();
-//  int columnId = parent.columnCount is 0 ? parent.column_id : parent.columns [index].id;
-//  if (OS.GetDataBrowserItemPartBounds (parent.handle, id, columnId, OS.kDataBrowserPropertyContentPart, rect) !is OS.noErr) {
-//      return new Rectangle (0, 0, 0, 0);
-//  }
-//  int x = rect.left, y = rect.top;
-//  int width = 0;
-//  if (index is 0 && image !is null) {
-//      Rectangle bounds = image.getBounds ();
-//      width += bounds.width;
-//  }
-//  if (index !is 0 && images !is null && images[index] !is null) {
-//      Rectangle bounds = images [index].getBounds ();
-//      width += bounds.width;
-//  }
-//  int height = rect.bottom - rect.top + 1;
-//  return new Rectangle (x, y, width, height);
-    return null;
+    if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
+
+    NSOutlineView outlineView = (NSOutlineView) parent.view;
+    Image image = index is 0 ? this.image : (images !is null) ? images [index] : null;
+    if (parent.columnCount is 0) {
+        index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+    } else {
+        TreeColumn column = parent.getColumn (index);
+        index = (int)/*64*/outlineView.columnWithIdentifier (column.nsColumn);
+    }
+    NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle));
+    //TODO is this right?
+    rect.width = image !is null ? image.getBounds().width : 0; 
+    return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
 }
 
 /**
@@ -677,7 +749,7 @@
     if (index < 0) error (DWT.ERROR_INVALID_RANGE);
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     if (index >= itemCount) error (DWT.ERROR_INVALID_RANGE);
-    return parent._getItem (this, index);
+    return parent._getItem (this, index, true);
 }
 
 /**
@@ -718,7 +790,7 @@
     if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
     TreeItem [] result = new TreeItem [itemCount];
     for (int i=0; i<itemCount; i++) {
-        result [i] = parent._getItem (this, i);
+        result [i] = parent._getItem (this, i, true);
     }
     return result;
 }
@@ -812,44 +884,25 @@
  */
 public Rectangle getTextBounds (int index) {
     checkWidget ();
-//  if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
-//  if (index !is 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0);
-//  Rect rect = new Rect();
-//  int columnId = parent.columnCount is 0 ? parent.column_id : parent.columns [index].id;
-//  if (OS.GetDataBrowserItemPartBounds (parent.handle, id, columnId, OS.kDataBrowserPropertyEnclosingPart, rect) !is OS.noErr) {
-//      return new Rectangle (0, 0, 0, 0);
-//  }
-//  int[] disclosure = new int [1];
-//  OS.GetDataBrowserListViewDisclosureColumn (parent.handle, disclosure, new bool [1]);
-//  int imageWidth = 0;
-//  int margin = index is 0 ? 0 : parent.getInsetWidth (columnId, false) / 2;
-//  Image image = getImage (index);
-//  if (image !is null) {
-//      Rectangle bounds = image.getBounds ();
-//      imageWidth = bounds.width + parent.getGap ();
-//  }
-//  int x, y, width, height;
-//  if (OS.VERSION >= 0x1040 && disclosure [0] !is columnId) {
-//      if (parent.getLinesVisible ()) {
-//          rect.left += Tree.GRID_WIDTH;
-//          rect.top += Tree.GRID_WIDTH;
-//      }
-//      x = rect.left + imageWidth + margin;
-//      y = rect.top;
-//      width = Math.max (0, rect.right - rect.left - imageWidth - margin * 2);;
-//      height = rect.bottom - rect.top;
-//  } else {
-//      Rect rect2 = new Rect();
-//      if (OS.GetDataBrowserItemPartBounds (parent.handle, id, columnId, OS.kDataBrowserPropertyContentPart, rect2) !is OS.noErr) {
-//          return new Rectangle (0, 0, 0, 0);
-//      }
-//      x = rect2.left + imageWidth + margin;
-//      y = rect2.top;
-//      width = Math.max (0, rect.right - rect2.left + 1 - imageWidth - margin * 2);
-//      height = rect2.bottom - rect2.top + 1;
-//  }
-//  return new Rectangle (x, y, width, height);
-    return null;
+    if (!parent.checkData (this, true)) error (DWT.ERROR_WIDGET_DISPOSED);
+    if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
+
+    NSOutlineView outlineView = (NSOutlineView) parent.view;
+    Image image = index is 0 ? this.image : (images !is null) ? images [index] : null;
+    if (parent.columnCount is 0) {
+        index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+    } else {
+        TreeColumn column = parent.getColumn (index);
+        index = (int)/*64*/outlineView.columnWithIdentifier (column.nsColumn);
+    }
+    NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle));
+    //TODO is this right?
+    if (image !is null) {
+        int imageWidth = image.getBounds().width;
+        rect.x += imageWidth;
+        rect.width -= imageWidth;
+    }
+    return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
 }
 
 /**
@@ -878,11 +931,16 @@
     if (item.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     if (item.parentItem !is this) return -1;
     for (int i = 0; i < itemCount; i++) {
-        if (item is items[i]) return i;
+        if (item is items [i]) return i;
     }
     return -1;
 }
 
+void register () {
+    super.register ();
+    display.addWidget (handle, this);
+}
+
 void releaseChildren (bool destroy) {
     for (int i=0; i<items.length; i++) {
         TreeItem item = items [i];
@@ -897,7 +955,7 @@
 
 void releaseHandle () {
     super.releaseHandle ();
-    if (handle !is null) handle.release();
+    if (handle !is null) handle.release ();
     handle = null;
     parentItem = null;
     parent = null;
@@ -961,7 +1019,7 @@
     background = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+    (cast(NSOutlineView) parent.view).reloadItem (handle);
 }
 
 /**
@@ -999,7 +1057,20 @@
     cellBackground [index] = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true; 
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+
+    NSOutlineView outlineView = (NSOutlineView) parent.view;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        outlineView.reloadItem (handle);
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TreeColumn column = parent.getColumn (index);
+            index = (int)/*64*/outlineView.columnWithIdentifier (column.nsColumn);
+        }
+        NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle));
+        outlineView.setNeedsDisplayInRect (rect);
+    }
 }
 
 /**
@@ -1019,7 +1090,7 @@
     if (this.checked is checked) return;
     this.checked = checked;
     cached = true;
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+    (cast(NSOutlineView) parent.view).reloadItem (handle);
 }
 
 /**
@@ -1037,10 +1108,11 @@
     checkWidget ();
     if (expanded is getExpanded ()) return;
     parent.ignoreExpand = true;
+    this.expanded = expanded;
     if (expanded) {
-        (cast(NSOutlineView)parent.view).expandItem_(handle);
+        (cast(NSOutlineView) parent.view).expandItem (handle);
     } else {
-        (cast(NSOutlineView)parent.view).collapseItem_(handle);
+        (cast(NSOutlineView) parent.view).collapseItem (handle);
     }
     parent.ignoreExpand = false;
     cached = true;
@@ -1079,7 +1151,7 @@
     this.font = font;
     if (oldFont !is null && oldFont.equals (font)) return;
     cached = true;
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+    (cast(NSOutlineView) parent.view).reloadItem (handle);
 }
 
 /**
@@ -1117,7 +1189,20 @@
     cellFont [index] = font;
     if (oldFont !is null && oldFont.equals (font)) return;
     cached = true;
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+
+    NSOutlineView outlineView = (NSOutlineView) parent.view;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        outlineView.reloadItem (handle);
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TreeColumn column = parent.getColumn (index);
+            index = (int)/*64*/outlineView.columnWithIdentifier (column.nsColumn);
+        }
+        NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle));
+        outlineView.setNeedsDisplayInRect (rect);
+    }
 }
 
 /**
@@ -1150,7 +1235,7 @@
     foreground = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+    (cast(NSOutlineView) parent.view).reloadItem (handle);
 }
 
 /**
@@ -1188,7 +1273,20 @@
     cellForeground [index] = color;
     if (oldColor !is null && oldColor.equals (color)) return;
     cached = true;
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+
+    NSOutlineView outlineView = (NSOutlineView) parent.view;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        outlineView.reloadItem (handle);
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TreeColumn column = parent.getColumn (index);
+            index = (int)/*64*/outlineView.columnWithIdentifier (column.nsColumn);
+        }
+        NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle));
+        outlineView.setNeedsDisplayInRect (rect);
+    }
 }
 
 /**
@@ -1208,7 +1306,7 @@
     if (this.grayed is grayed) return;
     this.grayed = grayed;
     cached = true;
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+    (cast(NSOutlineView) parent.view).reloadItem (handle);
 }
 
 /**
@@ -1254,7 +1352,7 @@
 public void setImage (int index, Image image) {
     checkWidget ();
     if (image !is null && image.isDisposed ()) {
-        error(DWT.ERROR_INVALID_ARGUMENT);
+        error (DWT.ERROR_INVALID_ARGUMENT);
     }
 //  if (parent.imageBounds is null && image !is null) {
 //      parent.setItemHeight (image);
@@ -1263,7 +1361,7 @@
         if (image !is null && image.type is DWT.ICON) {
             if (image.equals (this.image)) return;
         }
-        width = -1;
+        customWidth = -1;
         super.setImage (image);
     }
     int count = Math.max (1, parent.columnCount);
@@ -1275,8 +1373,21 @@
         images [index] = image; 
     }
 //  cached = true;
-//  if (index is 0) parent.setScrollWidth (this);
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+    if (index is 0) parent.setScrollWidth (this, false, true);
+
+    NSOutlineView outlineView = (NSOutlineView) parent.view;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        outlineView.reloadItem (handle);
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TreeColumn column = parent.getColumn (index);
+            index = (int)/*64*/outlineView.columnWithIdentifier (column.nsColumn);
+        }
+        NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle));
+        outlineView.setNeedsDisplayInRect (rect);
+    }
 }
 
 public void setImage (Image image) {
@@ -1347,7 +1458,7 @@
     if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     if (index is 0) {
         if (string.equals (text)) return;
-        width = -1;
+        customWidth = -1;
         super.setText (string);
     }
     int count = Math.max (1, parent.columnCount);
@@ -1357,8 +1468,21 @@
         strings [index] = string;
     }
     cached = true;
-    if (index is 0) parent.setScrollWidth (this);
-    (cast(NSOutlineView)parent.view).reloadItem_(handle);
+    if (index is 0) parent.setScrollWidth (this, false, true);
+
+    NSOutlineView outlineView = (NSOutlineView) parent.view;
+    if (parent.hooks (DWT.MeasureItem) || parent.hooks (DWT.EraseItem) || parent.hooks (DWT.PaintItem)) {
+        outlineView.reloadItem (handle);
+    } else {
+        if (parent.columnCount is 0) {
+            index = (parent.style & DWT.CHECK) !is 0 ? 1 : 0;
+        } else {
+            TreeColumn column = parent.getColumn (index);
+            index = (int)/*64*/outlineView.columnWithIdentifier (column.nsColumn);
+        }
+        NSRect rect = outlineView.frameOfCellAtColumn (index, outlineView.rowForItem (handle));
+        outlineView.setNeedsDisplayInRect (rect);
+    }
 }
 
 public void setText (String string) {
--- a/dwt/widgets/TypedListener.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/TypedListener.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.TypedListener;
 
@@ -73,6 +73,7 @@
  * </p>
  *
  * @see Listener
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class TypedListener : Listener {
     
--- a/dwt/widgets/Widget.d	Tue Oct 21 15:20:04 2008 +0200
+++ b/dwt/widgets/Widget.d	Mon Dec 01 17:07:00 2008 +0100
@@ -1,5 +1,5 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     
  * Port to the D programming language:
- *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
 module dwt.widgets.Widget;
 
@@ -20,8 +20,16 @@
 import dwt.DWTException;
 import dwt.events.DisposeListener;
 import dwt.internal.DWTEventListener;
+import dwt.internal.cocoa.NSArray;
+import dwt.internal.cocoa.NSBezierPath;
 import dwt.internal.cocoa.NSEvent;
+import dwt.internal.cocoa.NSGraphicsContext;
+import dwt.internal.cocoa.NSPasteboard;
+import dwt.internal.cocoa.NSPoint;
+import dwt.internal.cocoa.NSRange;
 import dwt.internal.cocoa.NSRect;
+import dwt.internal.cocoa.NSSize;
+import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.objc_super;
 
@@ -34,7 +42,6 @@
 import dwt.widgets.EventTable;
 import dwt.widgets.Listener;
 import dwt.widgets.TypedListener;
-
 /**
  * This class is the abstract superclass of all user interface objects.  
  * Widgets are created, disposed and issue notification to listeners
@@ -60,6 +67,7 @@
  * </p>
  *
  * @see #checkSubclass
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public abstract class Widget {
     int style, state;
@@ -67,7 +75,7 @@
     EventTable eventTable;
     Object data;
 
-    NSInteger jniRef;
+    char* jniRef;
 
     /* Global state flags */
     static const int DISPOSED         = 1 << 0;
@@ -146,23 +154,136 @@
     display = parent.display;
 }
 
-void callSuper(objc.id id, String selector, objc.id arg0) {
-    objc_super super_struct;
+int accessibilityActionDescription(objc.id id, objc.SEL sel, objc.id arg0) {
+    return callSuperObject(id, sel, arg0);
+}
+
+int accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
+    return callSuperObject(id, sel);
+}
+
+int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+    return callSuperObject(id, sel);
+}
+
+int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    return callSuperObject(id, sel, arg0);
+}
+
+int accessibilityAttributeValue_forParameter(int id, int sel, int /*long*/ arg0, int /*long*/ arg1) {
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    return OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
+}
+
+int accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
+    return callSuperObject(id, sel);
+}
+
+int accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint point) {
+    objc_super super_struct = new objc_super();
     super_struct.receiver = id;
-    super_struct.cls = cast(objc.Class) OS.objc_msgSend(id, OS.sel_superclass);
-    OS.objc_msgSendSuper(&super_struct, selector, arg0);
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    return OS.objc_msgSendSuper(super_struct, sel, point);
+}
+
+bool accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    return callSuperBoolean(id, sel, arg0);
+}
+
+bool accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+    return callSuperBoolean(id, sel);
+}
+
+int accessibilityParameterizedAttributeNames(int /*long*/ id, int /*long*/ sel) {
+    return callSuperObject(id, sel);
+}
+
+void accessibilityPerformAction(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    callSuper(id, sel, arg0);
+}
+
+String getClipboardText () {
+    NSPasteboard pasteboard = NSPasteboard.generalPasteboard ();
+    NSString string = pasteboard.stringForType (OS.NSStringPboardType);
+    return string !is null ? string.getString () : null;
+}
+
+NSBezierPath getClipping () {
+    return null;
+}
+
+int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+    return 0;
 }
 
-bool acceptsFirstResponder () {
-    return false;
+void callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    OS.objc_msgSendSuper(super_struct, sel, arg0);
+}
+
+void callSuper(int /*long*/ id, int /*long*/ sel, NSRect arg0) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    OS.objc_msgSendSuper(super_struct, sel, arg0);
+}
+
+void callSuper(int /*long*/ id, int /*long*/ sel, NSRect arg0, int /*long*/ arg1) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
+}
+
+bool callSuperBoolean(int /*long*/ id, int /*long*/ sel) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    return OS.objc_msgSendSuper(super_struct, sel) !is 0;
+}
+
+bool canBecomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
+    return callSuperBoolean (id, sel);
 }
 
-bool becomeFirstResponder () {
-    return true;
+bool callSuperBoolean(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    return OS.objc_msgSendSuper(super_struct, sel, arg0) !is 0;
+}
+
+int callSuperObject(int /*long*/ id, int /*long*/ sel) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    return OS.objc_msgSendSuper(super_struct, sel);
 }
 
-bool resignFirstResponder () {
-    return true;
+int callSuperObject(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    return OS.objc_msgSendSuper(super_struct, sel, arg0);
+}
+
+int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) {
+    return OS.NSNotFound;
+}
+
+bool acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
+    return callSuperBoolean(id, sel);
+}
+
+bool becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+    return callSuperBoolean(id, sel);
+}
+
+bool resignFirstResponder (int /*long*/ id, int /*long*/ sel) {
+    return callSuperBoolean(id, sel);
 }
 
 /**
@@ -185,6 +306,7 @@
  *
  * @see Listener
  * @see DWT
+ * @see #getListeners(int)
  * @see #removeListener(int, Listener)
  * @see #notifyListeners
  */
@@ -317,15 +439,22 @@
 public void checkWidget () {
     Display display = this.display;
     if (display is null) error (DWT.ERROR_WIDGET_DISPOSED);
-    if (display.thread !is Thread.getThis ()) error (DWT.ERROR_THREAD_INVALID_ACCESS);
+    if (display.thread !is Thread.getThis () && !display.isEmbedded) error (DWT.ERROR_THREAD_INVALID_ACCESS);
     if ((state & DISPOSED) !is 0) error (DWT.ERROR_WIDGET_DISPOSED);
 }
 
-bool clickOnLink(int textView, int link, int charIndex) {
+bool textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*long*/ textView, int /*long*/ link, int /*long*/ charIndex) {
     return true;
 }
 
-void comboBoxSelectionDidChange(int notification) {
+void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+}
+
+void copyToClipboard (char [] buffer) {
+    if (buffer.length is 0) return;
+    NSPasteboard pasteboard = NSPasteboard.generalPasteboard ();
+    pasteboard.declareTypes (NSArray.arrayWithObject (OS.NSStringPboardType), null);
+    pasteboard.setString (NSString.stringWithCharacters (buffer, buffer.length), OS.NSStringPboardType);
 }
 
 void createHandle () {
@@ -339,6 +468,15 @@
 void createWidget () {
     createJNIRef ();
     createHandle ();
+    register ();
+}
+    
+void deregister () {
+}
+
+void destroyJNIRef () {
+    if (jniRef !is 0) OS.DeleteGlobalRef (jniRef);
+    jniRef = 0;
 }
 
 void destroyWidget () {
@@ -378,18 +516,36 @@
     release (true);
 }
 
+void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ aSelector) {
+    callSuper (id, sel, aSelector);
+}
+
 void drawBackground (int control, int context) {
     /* Do nothing */
 }
 
-void drawRect(objc.id id, NSRect rect) {
-    objc_super super_struct;
-    super_struct.receiver = id;
-    super_struct.cls = cast(objc.Class) OS.objc_msgSend(id, OS.sel_superclass);
-    OS.objc_msgSendSuper(&super_struct, OS.sel_drawRect_1, rect);
+void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) {
 }
 
-void drawWidget (int control, int context, int damageRgn, int visibleRgn, int theEvent) {
+void drawRect (int /*long*/ id, int /*long*/ sel, NSRect rect) {
+    //TODO offset region to view coordinates
+    //TODO use region from control as well shell region
+    NSGraphicsContext current = NSGraphicsContext.currentContext();
+    NSBezierPath path = getClipping ();
+    if (path !is null) {
+        current.saveGraphicsState();
+        path.addClip ();
+    }
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    OS.objc_msgSendSuper(super_struct, sel, rect);
+    drawWidget (id, rect);
+    if (path !is null) {
+        current.restoreGraphicsState();
+    }
+}
+
+void drawWidget (int /*long*/ id, NSRect rect) {
 }
 
 void error (int code) {
@@ -400,8 +556,10 @@
     return display.filters (eventType);
 }
 
-NSUInteger fixMnemonic (char [] buffer) {
-    NSUInteger i=0, j=0;
+NSRect firstRectForCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+    return new NSRect ();
+}
+
     while (i < buffer.length) {
         if ((buffer [j++] = buffer [i++]) is '&') {
             if (i is buffer.length) {continue;}
@@ -560,7 +718,21 @@
     return style;
 }
 
-void helpRequested(int theEvent) {
+bool hasMarkedText (int /*long*/ id, int /*long*/ sel) {
+    return false;
+}
+
+void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+}
+
+void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*/ rect) {   
+}
+
+int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    return OS.objc_msgSendSuper(super_struct, sel, point);
 }
 
 bool hooks (int eventType) {
@@ -568,6 +740,11 @@
     return eventTable.hooks (eventType);
 }
 
+bool insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+    callSuper (id, sel, string);
+    return true;
+}
+
 /**
  * Returns <code>true</code> if the widget has been disposed,
  * and <code>false</code> otherwise.
@@ -583,7 +760,7 @@
     return (state & DISPOSED) !is 0;
 }
 
-bool isFlipped () {
+bool isFlipped (int /*long*/ id, int /*long*/ sel) {
     return true;
 }
 
@@ -608,7 +785,7 @@
     return hooks (eventType);
 }
 
-bool isTrimHandle (int trimHandle) {
+bool isOpaque(int /*long*/ id, int /*long*/ sel) {
     return false;
 }
 
@@ -620,75 +797,136 @@
     return getDisplay ().isValidThread ();
 }
 
-void flagsChanged(int event) {
+void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper (id, sel, theEvent);
+}
+
+void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
 }
 
-void mouseDragged(int event) {
+void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
 }
 
-void mouseDown(int event) {
+void rightMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+void otherMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+void otherMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+void mouseMoved(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
 }
 
-void rightMouseDown(int event) {
+void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+void mouseEntered(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+void mouseExited(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+bool menuHasKeyEquivalent_forEvent_target_action(int /*long*/ id, int /*long*/ sel, int /*long*/ menu, int /*long*/ event, int /*long*/ target, int /*long*/ action) {
+    return true;
 }
 
-void mouseEntered(int event) {
+int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    return OS.objc_msgSendSuper(super_struct, sel, theEvent);
+}
+
+void menuNeedsUpdate(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+}
+
+bool makeFirstResponder(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+    return callSuperBoolean(id, sel, notification);
 }
 
-void mouseUp(int event) {
+NSRange markedRange (int /*long*/ id, int /*long*/ sel) {
+    return new NSRange ();
+}
+
+void menu_willHighlightItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menu, int /*long*/ item) {
 }
 
-int menuForEvent (int event) {
+void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+}
+
+void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+}
+
+int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) {
     return 0;
 }
 
-void menuNeedsUpdate(int menu) {
-}
-
-void menu_willHighlightItem(int menu, int item) {
-}
-
-void menuWillClose(int menu) {
-}
-
-void menuWillOpen(int menu) {
-}
-
-int numberOfRowsInTableView(int aTableView) {
+int /*long*/ outlineView_child_ofItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ index, int /*long*/ item) {
     return 0;
 }
 
-int outlineView_child_ofItem(int outlineView, int index, int item) {
+void outlineView_didClickTableColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn) {
+}
+
+int /*long*/ outlineView_objectValueForTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ item) {
     return 0;
 }
 
-int outlineView_objectValueForTableColumn_byItem(int outlineView, int tableColumn, int item) {
+bool outlineView_isItemExpandable(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+    return false;
+}
+
+int /*long*/ outlineView_numberOfChildrenOfItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
     return 0;
 }
 
-bool outlineView_isItemExpandable(int outlineView, int item) {
+void outlineView_willDisplayCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ item) {
+}
+
+bool outlineView_shouldCollapseItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+    return false;
+}
+
+bool outlineView_shouldExpandItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
     return false;
 }
 
-int outlineView_numberOfChildrenOfItem(int outlineView, int item) {
-    return 0;
+void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
 }
 
-void outlineView_willDisplayCell_forTableColumn_item(int outlineView, int cell, int tableColumn, int item) {
+void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
 }
 
-bool outlineView_shouldCollapseItem(int outlineView, int item) {
-    return false;
+void outlineViewItemDidExpand(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
-bool outlineView_shouldExpandItem(int outlineView, int item) {
-    return false;
+void outlineViewSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
-void outlineViewSelectionDidChange(int notification) {
-}
-
-void outlineView_setObjectValue_forTableColumn_byItem(int outlineView, int object, int tableColumn, int item) {
+void outlineView_setObjectValue_forTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ item) {
 }
 
 /**
@@ -708,6 +946,7 @@
  * 
  * @see DWT
  * @see #addListener
+ * @see #getListeners(int)
  * @see #removeListener(int, Listener)
  */
 public void notifyListeners (int eventType, Event event) {
@@ -716,6 +955,14 @@
     sendEvent (eventType, event);
 }
 
+void pageDown (int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+    callSuper(id, sel, sender);
+}
+
+void pageUp (int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+    callSuper(id, sel, sender);
+}
+
 void postEvent (int eventType) {
     sendEvent (eventType, null, false);
 }
@@ -724,6 +971,13 @@
     sendEvent (eventType, event, false);
 }
 
+void reflectScrolledClipView (int /*long*/ id, int /*long*/ sel, int /*long*/ aClipView) {
+    callSuper (id, sel, aClipView);
+}
+
+void register () {
+}
+
 void release (bool destroy) {
     if ((state & DISPOSE_SENT) is 0) {
         state |= DISPOSE_SENT;
@@ -751,8 +1005,7 @@
 void releaseHandle () {
     state |= DISPOSED;
     display = null;
-    if (jniRef !is 0) OS.DeleteGlobalRef(jniRef);
-    jniRef = 0;
+    destroyJNIRef ();
 }
 
 void releaseParent () {
@@ -760,6 +1013,7 @@
 }
 
 void releaseWidget () {
+    deregister ();
     eventTable = null;
     data = null;
 }
@@ -770,7 +1024,7 @@
  * type is one of the event constants defined in class <code>DWT</code>.
  *
  * @param eventType the type of event to listen for
- * @param listener the listener which should no longer be notified when the event occurs
+ * @param listener the listener which should no longer be notified
  *
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -783,6 +1037,7 @@
  * @see Listener
  * @see DWT
  * @see #addListener
+ * @see #getListeners(int)
  * @see #notifyListeners
  */
 public void removeListener (int eventType, Listener handler) {
@@ -803,7 +1058,7 @@
  * </p>
  *
  * @param eventType the type of event to listen for
- * @param listener the listener which should no longer be notified when the event occurs
+ * @param listener the listener which should no longer be notified
  *
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -827,7 +1082,7 @@
  * Removes the listener from the collection of listeners who will
  * be notified when the widget is disposed.
  *
- * @param listener the listener which should no longer be notified when the receiver is disposed
+ * @param listener the listener which should no longer be notified
  *
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -847,7 +1102,15 @@
     eventTable.unhook (DWT.Dispose, listener);
 }
 
-void sendArrowSelection () {
+void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+    callSuper(id, sel, theEvent);
+}
+
+NSRange selectedRange (int /*long*/ id, int /*long*/ sel) {
+    return new NSRange ();
+}
+
+void sendDoubleSelection() {
 }
 
 void sendEvent (Event event) {
@@ -883,34 +1146,11 @@
     }
 }
 
-bool sendKeyEvent (int type, int theEvent) {
-//  int [] length = new int [1];
-//  int status = OS.GetEventParameter (theEvent, OS.kEventParamKeyUnicodes, OS.typeUnicodeText, null, 4, length, (char[])null);
-//  if (status is OS.noErr && length [0] > 2) {
-//      int count = 0;
-//      int [] chord = new int [1];
-//      OS.GetEventParameter (theEvent, OS.kEventParamMouseChord, OS.typeUInt32, null, 4, null, chord);
-//      int [] modifiers = new int [1];
-//      OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);
-//      char [] chars = new char [length [0] / 2];
-//      OS.GetEventParameter (theEvent, OS.kEventParamKeyUnicodes, OS.typeUnicodeText, null, chars.length * 2, null, chars);
-//      for (int i=0; i<chars.length; i++) {
-//          Event event = new Event ();
-//          event.character = chars [i];
-//          setInputState (event, type, chord [0], modifiers [0]);
-//          if (sendKeyEvent (type, event)) chars [count++] = chars [i];
-//      }
-//      if (count is 0) return false;
-//      if (count !is chars.length - 1) {
-//          OS.SetEventParameter (theEvent, OS.kEventParamKeyUnicodes, OS.typeUnicodeText, count * 2, chars);
-//      }
-//      return true;
-//  } else {
-//      Event event = new Event ();
-//      if (!setKeyState (event, type, theEvent)) return true;
-//      return sendKeyEvent (type, event);
-//  }
-    return false;
+bool sendKeyEvent (NSEvent nsEvent, int type) {
+    if ((state & SAFARI_EVENTS_FIX) !is 0) return true;
+    Event event = new Event ();
+    if (!setKeyState (event, type, nsEvent)) return true;
+    return sendKeyEvent (type, event);
 }
 
 bool sendKeyEvent (int type, Event event) {
@@ -927,9 +1167,6 @@
     return event.doit;
 }
 
-void sendDoubleSelection() {
-}
-
 void sendHorizontalSelection () {
 }
 
@@ -1045,200 +1282,161 @@
     }
 }
 
-bool setInputState (Event event, int type, int chord, int modifiers) {
-//  if ((chord & 0x01) !is 0) event.stateMask |= DWT.BUTTON1;
-//  if ((chord & 0x02) !is 0) event.stateMask |= DWT.BUTTON3;
-//  if ((chord & 0x04) !is 0) event.stateMask |= DWT.BUTTON2;
-//  if ((chord & 0x08) !is 0) event.stateMask |= DWT.BUTTON4;
-//  if ((chord & 0x10) !is 0) event.stateMask |= DWT.BUTTON5;
-//  
-//  if ((modifiers & OS.optionKey) !is 0) event.stateMask |= DWT.ALT;
-//  if ((modifiers & OS.shiftKey) !is 0) event.stateMask |= DWT.SHIFT;
-//  if ((modifiers & OS.controlKey) !is 0) event.stateMask |= DWT.CONTROL;
-//  if ((modifiers & OS.cmdKey) !is 0) event.stateMask |= DWT.COMMAND;
-//  switch (type) {
-//      case DWT.MouseDown:
-//      case DWT.MouseDoubleClick:
-//          if (event.button is 1) event.stateMask &= ~DWT.BUTTON1;
-//          if (event.button is 2) event.stateMask &= ~DWT.BUTTON2;
-//          if (event.button is 3)  event.stateMask &= ~DWT.BUTTON3;
-//          if (event.button is 4)  event.stateMask &= ~DWT.BUTTON4;
-//          if (event.button is 5)  event.stateMask &= ~DWT.BUTTON5;
-//          break;
-//      case DWT.MouseUp:
-//          if (event.button is 1) event.stateMask |= DWT.BUTTON1;
-//          if (event.button is 2) event.stateMask |= DWT.BUTTON2;
-//          if (event.button is 3) event.stateMask |= DWT.BUTTON3;
-//          if (event.button is 4) event.stateMask |= DWT.BUTTON4;
-//          if (event.button is 5) event.stateMask |= DWT.BUTTON5;
-//          break;
-//      case DWT.KeyDown:
-//      case DWT.Traverse: {
-//          if (event.keyCode !is 0 || event.character !is 0) return true;
-//          int lastModifiers = display.lastModifiers;
-//          if ((modifiers & OS.alphaLock) !is 0 && (lastModifiers & OS.alphaLock) is 0) {
-//              event.keyCode = DWT.CAPS_LOCK;
-//              return true;
-//          }
-//          if ((modifiers & OS.shiftKey) !is 0 && (lastModifiers & OS.shiftKey) is 0) {
-//              event.stateMask &= ~DWT.SHIFT;
-//              event.keyCode = DWT.SHIFT;
-//              return true;
-//          }
-//          if ((modifiers & OS.controlKey) !is 0 && (lastModifiers & OS.controlKey) is 0) {
-//              event.stateMask &= ~DWT.CONTROL;
-//              event.keyCode = DWT.CONTROL;
-//              return true;
-//          }
-//          if ((modifiers & OS.cmdKey) !is 0 && (lastModifiers & OS.cmdKey) is 0) {
-//              event.stateMask &= ~DWT.COMMAND;
-//              event.keyCode = DWT.COMMAND;
-//              return true;
-//          }   
-//          if ((modifiers & OS.optionKey) !is 0 && (lastModifiers & OS.optionKey) is 0) {
-//              event.stateMask &= ~DWT.ALT;
-//              event.keyCode = DWT.ALT;
-//              return true;
-//          }
-//          break;
-//      }
-//      case DWT.KeyUp: {
-//          if (event.keyCode !is 0 || event.character !is 0) return true;
-//          int lastModifiers = display.lastModifiers;
-//          if ((modifiers & OS.alphaLock) is 0 && (lastModifiers & OS.alphaLock) !is 0) {
-//              event.keyCode = DWT.CAPS_LOCK;
-//              return true;
-//          }
-//          if ((modifiers & OS.shiftKey) is 0 && (lastModifiers & OS.shiftKey) !is 0) {
-//              event.stateMask |= DWT.SHIFT;
-//              event.keyCode = DWT.SHIFT;
-//              return true;
-//          }
-//          if ((modifiers & OS.controlKey) is 0 && (lastModifiers & OS.controlKey) !is 0) {
-//              event.stateMask |= DWT.CONTROL;
-//              event.keyCode = DWT.CONTROL;
-//              return true;
-//          }
-//          if ((modifiers & OS.cmdKey) is 0 && (lastModifiers & OS.cmdKey) !is 0) {
-//              event.stateMask |= DWT.COMMAND;
-//              event.keyCode = DWT.COMMAND;
-//              return true;
-//          }
-//          if ((modifiers & OS.optionKey) is 0 && (lastModifiers & OS.optionKey) !is 0) {
-//              event.stateMask |= DWT.ALT;
-//              event.keyCode = DWT.ALT;
-//              return true;
-//          }
-//          break;
-//      }
-//  }
-    return true; 
+void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    OS.objc_msgSendSuper(super_struct, sel, point);
+}
+
+void setFrameSize (int /*long*/ id, int /*long*/ sel, NSSize size) {
+    objc_super super_struct = new objc_super();
+    super_struct.receiver = id;
+    super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+    OS.objc_msgSendSuper(super_struct, sel, size);
+}
+
+bool setInputState (Event event, NSEvent nsEvent, int type) {
+    if (nsEvent is null) return true;
+    int /*long*/ modifierFlags = nsEvent.modifierFlags();
+    if ((modifierFlags & OS.NSAlternateKeyMask) !is 0) event.stateMask |= DWT.ALT;
+    if ((modifierFlags & OS.NSShiftKeyMask) !is 0) event.stateMask |= DWT.SHIFT;
+    if ((modifierFlags & OS.NSControlKeyMask) !is 0) event.stateMask |= DWT.CONTROL;
+    if ((modifierFlags & OS.NSCommandKeyMask) !is 0) event.stateMask |= DWT.COMMAND;
+    //TODO multiple mouse buttons pressed
+    switch ((int)/*64*/nsEvent.type()) {
+        case OS.NSLeftMouseDragged:
+        case OS.NSRightMouseDragged:
+        case OS.NSOtherMouseDragged:
+            switch ((int)/*64*/nsEvent.buttonNumber()) {
+                case 0: event.stateMask |= DWT.BUTTON1; break;
+                case 1: event.stateMask |= DWT.BUTTON3; break;
+                case 2: event.stateMask |= DWT.BUTTON2; break;
+                case 3: event.stateMask |= DWT.BUTTON4; break;
+                case 4: event.stateMask |= DWT.BUTTON5; break;
+            }
+            break;
+        case OS.NSScrollWheel:
+        case OS.NSKeyDown:
+        case OS.NSKeyUp:
+            int state = OS.GetCurrentButtonState ();
+            if ((state & 0x1) !is 0) event.stateMask |= DWT.BUTTON1;
+            if ((state & 0x2) !is 0) event.stateMask |= DWT.BUTTON3;
+            if ((state & 0x4) !is 0) event.stateMask |= DWT.BUTTON2;
+            if ((state & 0x8) !is 0) event.stateMask |= DWT.BUTTON4;
+            if ((state & 0x10) !is 0) event.stateMask |= DWT.BUTTON5;
+            break;
+    }
+    switch (type) {
+        case DWT.MouseDown:
+        case DWT.MouseDoubleClick:
+            if (event.button is 1) event.stateMask &= ~DWT.BUTTON1;
+            if (event.button is 2) event.stateMask &= ~DWT.BUTTON2;
+            if (event.button is 3) event.stateMask &= ~DWT.BUTTON3;
+            if (event.button is 4) event.stateMask &= ~DWT.BUTTON4;
+            if (event.button is 5) event.stateMask &= ~DWT.BUTTON5;
+            break;
+        case DWT.MouseUp:
+            if (event.button is 1) event.stateMask |= DWT.BUTTON1;
+            if (event.button is 2) event.stateMask |= DWT.BUTTON2;
+            if (event.button is 3) event.stateMask |= DWT.BUTTON3;
+            if (event.button is 4) event.stateMask |= DWT.BUTTON4;
+            if (event.button is 5) event.stateMask |= DWT.BUTTON5;
+            break;
+        case DWT.KeyDown:
+        case DWT.Traverse:
+            if (event.keyCode is DWT.ALT) event.stateMask &= ~DWT.ALT;
+            if (event.keyCode is DWT.SHIFT) event.stateMask &= ~DWT.SHIFT;
+            if (event.keyCode is DWT.CONTROL) event.stateMask &= ~DWT.CONTROL;
+            if (event.keyCode is DWT.COMMAND) event.stateMask &= ~DWT.COMMAND;
+            break;
+        case DWT.KeyUp:
+            if (event.keyCode is DWT.ALT) event.stateMask |= DWT.ALT;
+            if (event.keyCode is DWT.SHIFT) event.stateMask |= DWT.SHIFT;
+            if (event.keyCode is DWT.CONTROL) event.stateMask |= DWT.CONTROL;
+            if (event.keyCode is DWT.COMMAND) event.stateMask |= DWT.COMMAND;
+            break;
+    }       
+    return true;
 }
 
 bool setKeyState (Event event, int type, NSEvent nsEvent) {
-//  bool isNull = false;
-//  int [] keyCode = new int [1];
-//  OS.GetEventParameter (theEvent, OS.kEventParamKeyCode, OS.typeUInt32, null, keyCode.length * 4, null, keyCode);
-//  event.keyCode = Display.translateKey (keyCode [0]);
+    bool isNull = false;
+    int keyCode = nsEvent.keyCode ();
+    event.keyCode = Display.translateKey (keyCode);
     switch (event.keyCode) {
-//      case DWT.LF: {
-//          /*
-//          * Feature in the Macintosh.  When the numeric key pad
-//          * Enter key is pressed, it generates '\n'.  This is the
-//          * correct platform behavior but is not portable.  The
-//          * fix is to convert the '\n' into '\r'.
-//          */
-//          event.keyCode = DWT.KEYPAD_CR;
-//          event.character = '\r';
-//          break;
-//      }
+        case DWT.LF: {
+            /*
+            * Feature in the Macintosh.  When the numeric key pad
+            * Enter key is pressed, it generates '\n'.  This is the
+            * correct platform behavior but is not portable.  The
+            * fix is to convert the '\n' into '\r'.
+            */
+            event.keyCode = DWT.KEYPAD_CR;
+            event.character = '\r';
+            break;
+        }
         case DWT.BS: event.character = '\b'; break;
-//      case DWT.CR: event.character = '\r'; break;
+        case DWT.CR: event.character = '\r'; break;
         case DWT.DEL: event.character = 0x7F; break;
-//      case DWT.ESC: event.character = 0x1B; break;
-//      case DWT.TAB: event.character = '\t'; break;
-//      default: {
-//          if (event.keyCode is 0 || (DWT.KEYPAD_MULTIPLY <= event.keyCode && event.keyCode <= DWT.KEYPAD_CR)) {
-//              int [] length = new int [1];
-//              int status = OS.GetEventParameter (theEvent, OS.kEventParamKeyUnicodes, OS.typeUnicodeText, null, 4, length, (char[])null);
-//              if (status is OS.noErr && length [0] !is 0) {
-//                  char [] chars = new char [1];
-//                  OS.GetEventParameter (theEvent, OS.kEventParamKeyUnicodes, OS.typeUnicodeText, null, 2, null, chars);
-//                  event.character = chars [0];
-//              }
-//              /*
-//              * Bug in the Mactonish.  For some reason, Ctrl+Shift+'2' and Ctrl+Shift+'6'
-//              * fail to give 0x0 (^@ or ASCII NUL) and 0x1e (^^).  Other control character
-//              * key sequences such as ^A or even Ctrl+Shift+'-' (^_ or 0x1f) are correctly
-//              * translated to control characters.  Since it is not possible to know which
-//              * key combination gives '@' on an international keyboard, there is no way to
-//              * test for either character and convert it to a control character (Shift+'2'
-//              * gives '@' only on an English keyboard) to work around the problem.
-//              *
-//              * There is no fix at this time.
-//              */
-//          }
-//          if (event.keyCode is 0) {
-//              int kchrPtr = OS.GetScriptManagerVariable (cast(short) OS.smKCHRCache);
-//              if (display.kchrPtr !is kchrPtr) {
-//                  display.kchrPtr = kchrPtr;
-//                  display.kchrState [0] = 0;
-//              }
-//              int result = OS.KeyTranslate (display.kchrPtr, cast(short)keyCode [0], display.kchrState);
-//              if (result <= 0x7f) {
-//                  event.keyCode = result & 0x7f;
-//              } else {
-//                  int [] encoding = new int [1];
-//                  short keyScript = cast(short) OS.GetScriptManagerVariable (cast(short) OS.smKeyScript);
-//                  short regionCode = cast(short) OS.GetScriptManagerVariable (cast(short) OS.smRegionCode);
-//                  if (OS.UpgradeScriptInfoToTextEncoding (keyScript, cast(short) OS.kTextLanguageDontCare, regionCode, null, encoding) is OS.paramErr) {
-//                      if (OS.UpgradeScriptInfoToTextEncoding (keyScript, cast(short) OS.kTextLanguageDontCare, cast(short) OS.kTextRegionDontCare, null, encoding) is OS.paramErr) {
-//                          encoding [0] = OS.kTextEncodingMacRoman;
-//                      }
-//                  }
-//                  int [] encodingInfo = new int [1];
-//                  OS.CreateTextToUnicodeInfoByEncoding (encoding [0], encodingInfo);
-//                  if (encodingInfo [0] !is 0) {
-//                      char [] chars = new char [1];
-//                      int [] nchars = new int [1];
-//                      byte [] buffer = new byte [2];
-//                      buffer [0] = 1;
-//                      buffer [1] = cast(byte) (result & 0xFF);
-//                      OS.ConvertFromPStringToUnicode (encodingInfo [0], buffer, chars.length * 2, nchars, chars);
-//                      OS.DisposeTextToUnicodeInfo (encodingInfo);
-//                      event.keyCode = chars [0];
-//                  }
-//              }
-//          }
-//          break;
-//      }
+        case DWT.ESC: event.character = 0x1B; break;
+        case DWT.TAB: event.character = '\t'; break;
+        default:
+            if (event.keyCode is 0 || (DWT.KEYPAD_MULTIPLY <= event.keyCode && event.keyCode <= DWT.KEYPAD_CR)) {
+                NSString chars = nsEvent.characters ();
+                if (chars.length() > 0) event.character = (char)chars.characterAtIndex (0);
+            }
+            if (event.keyCode is 0) {
+                //TODO this is wrong for shifted keys like ';', '1' and non-english keyboards
+                NSString unmodifiedChars = nsEvent.charactersIgnoringModifiers ().lowercaseString();
+                if (unmodifiedChars.length() > 0) event.keyCode = (char)unmodifiedChars.characterAtIndex(0);
+            }
     }
-//  if (event.keyCode is 0 && event.character is 0) {
-//      if (!isNull) return false;
-//  }
-//  int [] chord = new int [1];
-//  OS.GetEventParameter (theEvent, OS.kEventParamMouseChord, OS.typeUInt32, null, 4, null, chord);
-//  int [] modifiers = new int [1];
-//  OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);
-//  return setInputState (event, type, chord [0], modifiers [0]);
+    if (event.keyCode is 0 && event.character is 0) {
+        if (!isNull) return false;
+    }
+    setInputState (event, nsEvent, type);
     return true;
 }
 
-void tableViewSelectionDidChange (int aNotification) {
+bool setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) {
+    return true;
+}
+
+void tableViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
 }
 
-int tableView_objectValueForTableColumn_row(int aTableView, int aTableColumn, int rowIndex) {
+void tableViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+}
+
+void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+}
+
+void tableView_didClickTableColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ tableColumn) {
+}
+
+int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
     return 0;
 }
 
-void tableView_setObjectValue_forTableColumn_row(int aTableView, int anObject, int aTableColumn, int rowIndex) {    
+void tableView_setObjectValue_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) { 
 }
 
-bool tableView_shouldEditTableColumn_row(int aTableView, int aTableColumn, int rowIndex) {
+bool tableView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
     return true;
 }
 
-void tableView_willDisplayCell_forTableColumn_row(int aTableView, int aCell, int aTableColumn, int rowIndex) {
+void tableView_willDisplayCell_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aCell, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+}
+
+void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+}
+
+void textDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+}
+
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) {
+    return new NSRange();
 }
 
 /**
@@ -1256,30 +1454,37 @@
     return getName () ~ " {" ~ string ~ "}";
 }
 
-void willSelectTabViewItem(int tabView, int tabViewItem) {
+int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) {
+    return 0;
 }
 
-void windowDidMove(int notification) {
+void tabView_didSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
 }
 
-void windowDidResize(int notification) {
+void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
+}
+
+void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
-void windowDidResignKey(int notification) {
+void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
-void windowDidBecomeKey(int notification) {
+void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
-void windowSendEvent(objc.id id, objc.id event) {
-    callSuper(id, OS.sel_sendEvent_1, event);
+void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
-bool windowShouldClose(int window) {
+void windowSendEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+    callSuper(id, sel, event);
+}
+
+bool windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) {
     return false;
 }
 
-void windowWillClose(int notification) {
+void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
 }
Binary file libdwt-cocoa-bindings.a has changed