changeset 46:cfa563df4fdd

Updated Widget and Display to 3.514
author Jacob Carlborg <doob@me.com>
date Fri, 05 Dec 2008 16:00:41 +0100
parents d8635bb48c7c
children 8615c76f10e4
files dwt/accessibility/Accessible.d dwt/accessibility/SWTAccessibleDelegate.d dwt/browser/Safari.d dwt/dnd/DragSource.d dwt/graphics/Color.d dwt/graphics/Cursor.d dwt/graphics/Device.d dwt/graphics/Drawable.d dwt/graphics/Font.d dwt/graphics/GC.d dwt/graphics/GCData.d dwt/graphics/Image.d dwt/graphics/Path.d dwt/graphics/Pattern.d dwt/graphics/Region.d dwt/graphics/TextLayout.d dwt/graphics/Transform.d dwt/internal/Library.d dwt/internal/cocoa/NSEvent.d dwt/internal/cocoa/NSRect.d dwt/internal/cocoa/NSScreen.d dwt/internal/cocoa/NSString.d dwt/internal/cocoa/OS.d dwt/internal/objc/bindings.d dwt/internal/objc/runtime.d dwt/printing/Printer.d dwt/program/Program.d dwt/widgets/Button.d dwt/widgets/Canvas.d dwt/widgets/Combo.d dwt/widgets/Control.d dwt/widgets/DateTime.d dwt/widgets/Display.d dwt/widgets/Group.d dwt/widgets/Label.d dwt/widgets/Link.d dwt/widgets/List.d dwt/widgets/ProgressBar.d dwt/widgets/Sash.d dwt/widgets/Scale.d dwt/widgets/Scrollable.d dwt/widgets/Shell.d dwt/widgets/Slider.d dwt/widgets/Spinner.d dwt/widgets/TabFolder.d dwt/widgets/TabItem.d dwt/widgets/Table.d dwt/widgets/ToolBar.d dwt/widgets/ToolItem.d dwt/widgets/Tracker.d dwt/widgets/Tree.d dwt/widgets/Widget.d
diffstat 52 files changed, 2621 insertions(+), 2588 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/accessibility/Accessible.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/accessibility/Accessible.d	Fri Dec 05 16:00:41 2008 +0100
@@ -1091,7 +1091,7 @@
             listener.getSelectionRange(event);
         }
         if (event.offset !is -1) {
-            NSRange range = new NSRange();
+            NSRange range = NSRange();
             range.location = event.offset;
             range.length = event.length;
             returnValue = NSValue.valueWithRange(range);
@@ -1135,7 +1135,7 @@
         
         if (event.offset !is -1) {
             returnValue = NSMutableArray.arrayWithCapacity(1);
-            NSRange range = new NSRange();
+            NSRange range = NSRange();
             range.location = event.offset;
             range.length = event.length;
             returnValue.addObject(NSValue.valueWithRange(range));
@@ -1153,7 +1153,7 @@
             listener.getValue(event);
         }
         
-        NSRange range = new NSRange();
+        NSRange range = NSRange();
 
         if (event.result !is null) {
             range.location = 0;
@@ -1184,7 +1184,7 @@
     }
 
     NSRange rangeForLineNumber (int lineNumber, String text) {
-        NSRange range = new NSRange();
+        NSRange range = NSRange();
         range.location = -1;
         int line = 1;
         int count = 0;
--- a/dwt/accessibility/SWTAccessibleDelegate.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/accessibility/SWTAccessibleDelegate.d	Fri Dec 05 16:00:41 2008 +0100
@@ -215,7 +215,7 @@
             id retObject = swtAcc.accessibilityAttributeValue(attribute);
             return (retObject is null ? 0 : retObject.id);
         } else if (sel is OS.sel_accessibilityHitTest_) {
-            NSPoint point= new NSPoint();
+            NSPoint point= NSPoint();
             OS.memmove(point, arg0, NSPoint.sizeof);
             id retObject = swtAcc.accessibilityHitTest(point);
             return (retObject is null ? 0 : retObject.id);
--- a/dwt/browser/Safari.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/browser/Safari.d	Fri Dec 05 16:00:41 2008 +0100
@@ -891,7 +891,7 @@
 }
 
 void webView_setFrame(int /*long*/ sender, int /*long*/ frame) {
-    NSRect rect = new NSRect();
+    NSRect rect = NSRect();
     OS.memmove(rect, frame, NSRect.sizeof);
     /* convert to DWT system coordinates */
     Rectangle bounds = browser.getDisplay().getBounds();
--- a/dwt/dnd/DragSource.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/dnd/DragSource.d	Fri Dec 05 16:00:41 2008 +0100
@@ -364,7 +364,7 @@
         viewPt.y -= (imageSize.height / 2);
         
         // The third argument to dragImage is ignored as of 10.4.
-        NSSize ignored = new NSSize();
+        NSSize ignored = NSSize();
         ignored.width = 0;
         ignored.height = 0;
         
@@ -481,7 +481,7 @@
     
     if (sel is OS.sel_draggedImage_endedAt_operation_) {
         NSImage image = new NSImage(arg0);
-        NSPoint point = new NSPoint();
+        NSPoint point = NSPoint();
         OS.memmove(point, arg1, NSPoint.sizeof);
         ds.draggedImage_endedAt_operation(image, point, arg2);
     }
--- a/dwt/graphics/Color.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Color.d	Fri Dec 05 16:00:41 2008 +0100
@@ -23,7 +23,7 @@
 import dwt.graphics.Device;
 import dwt.graphics.Resource;
 import dwt.graphics.RGB;
-import dwt.internal.cocoa.CGFloat;
+import dwt.internal.c.Carbon;
 
 /**
  * Instances of this class manage the operating system resources that
@@ -139,7 +139,7 @@
     if (object is this) return true;
     if (!( null !is cast(Color)object )) return false;
     Color color = cast(Color)object;
-    float[] rgbColor = color.handle;
+    CGFloat[] rgbColor = color.handle;
     if (handle is rgbColor) return true;
     return device is color.device &&
         cast(int)(handle[0] * 255) is cast(int)(rgbColor[0] * 255) &&
@@ -237,7 +237,7 @@
  * 
  * @private
  */
-public static Color cocoa_new(Device device, float[] rgbColor) {
+public static Color cocoa_new(Device device, CGFloat[] rgbColor) {
     Color color = new Color(device);
     color.handle = rgbColor;
     return color;
@@ -249,7 +249,7 @@
         (blue > 255) || (blue < 0)) {
             DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
-    float[] rgbColor = new float[4];
+    CGFloat[] rgbColor = new CGFloat[4];
     rgbColor[0] = red / 255f;
     rgbColor[1] = green / 255f;
     rgbColor[2] = blue / 255f;
--- a/dwt/graphics/Cursor.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Cursor.d	Fri Dec 05 16:00:41 2008 +0100
@@ -67,24 +67,29 @@
 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, 
-    };
+    static const byte[] WAIT_SOURCE;
+    
+    static this ()
+    {
+        WAIT_SOURCE = [
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0xFF, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, 
+                       cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00, cast(byte)0x00
+                   ];
+    }
     
     /**
      * the handle to the OS cursor resource
@@ -149,7 +154,7 @@
 public this(Device device, int style) {
     super(device);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         switch (style) {
             case DWT.CURSOR_HAND:           handle = NSCursor.pointingHandCursor(); break;
@@ -178,19 +183,19 @@
                 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();
+            NSImage nsImage = cast(NSImage)(new NSImage()).alloc();
+            NSBitmapImageRep nsImageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
+            handle = cast(NSCursor)(new NSCursor()).alloc();
             int width = 16, height = 16;
-            NSSize size = new NSSize();
+            NSSize size = NSSize();
             size.width = width;
             size.height =  height;
             nsImage = nsImage.initWithSize(size);
-            nsImageRep = nsImageRep.initWithBitmapDataPlanes(0, width, height, 8, 4, true, false, OS.NSDeviceRGBColorSpace, 
+            nsImageRep = nsImageRep.initWithBitmapDataPlanes(null, width, height, 8, 4, true, false, OS.NSDeviceRGBColorSpace, 
                     OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, width*4, 32);
-            OS.memmove(nsImageRep.bitmapData(), WAIT_SOURCE, WAIT_SOURCE.length);
+            OS.memmove(nsImageRep.bitmapData(), WAIT_SOURCE.ptr, WAIT_SOURCE.length);
             nsImage.addRepresentation(nsImageRep);
-            NSPoint point = new NSPoint();
+            NSPoint point = NSPoint();
             point.x = 0;
             point.y = 0;
             handle = handle.initWithImage(nsImage, point);
@@ -281,7 +286,7 @@
         }
     }
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         createNSCursor(hotspotX, hotspotY, data, source.width, source.height);
     init_();
@@ -299,9 +304,9 @@
     size.width = width;
     size.height =  height;
     nsImage = nsImage.initWithSize(size);
-    nsImageRep = nsImageRep.initWithBitmapDataPlanes(0, width, height,
+    nsImageRep = nsImageRep.initWithBitmapDataPlanes(null, width, height,
             8, 4, true, false, OS.NSDeviceRGBColorSpace,
-            NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, cast(NSInteger) (width * 4), 32);
+            OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, width * 4, 32);
     OS.memmove(cast(void*) nsImageRep.bitmapData(), buffer.ptr, buffer.length);
     nsImage.addRepresentation(nsImageRep);
     NSPoint point = NSPoint();
@@ -397,7 +402,7 @@
         }
     }
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         createNSCursor(hotspotX, hotspotY, data, source.width, source.height);
     init_();
@@ -441,7 +446,7 @@
  * @see #equals
  */
 public hash_t toHash () {
-    return handle !is null ? cast(hash_t) handle.id_ : 0;
+    return handle !is null ? cast(hash_t) handle.id : 0;
 }
 
 alias toHash hashCode;
--- a/dwt/graphics/Device.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Device.d	Fri Dec 05 16:00:41 2008 +0100
@@ -30,9 +30,10 @@
 import dwt.internal.cocoa.NSThread;
 import dwt.internal.cocoa.NSValue;
 import dwt.internal.cocoa.OS;
-import dwt.internal.cocoa.id;
+import cocoa = dwt.internal.cocoa.id;
 
 import dwt.dwthelper.Runnable;
+import dwt.dwthelper.System;
 import dwt.dwthelper.utils;
 import dwt.graphics.Drawable;
 import dwt.graphics.Color;
@@ -42,7 +43,7 @@
 import dwt.graphics.GCData;
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
-import dwt.internal.cocoa.NSInteger;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 
@@ -145,13 +146,13 @@
             objects = new Object [128];
             trackingLock = new Object ();
         }
-        NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+        NSAutoreleasePool pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
         NSThread nsthread = NSThread.currentThread();
         NSMutableDictionary dictionary = nsthread.threadDictionary();
         NSString key = NSString.stringWith("DWT_NSAutoreleasePool");
-        id obj = dictionary.objectForKey(key);
+        cocoa.id obj = dictionary.objectForKey(key);
         if (obj is null) {
-            NSNumber nsnumber = NSNumber.numberWithInteger(pool.id);
+            NSNumber nsnumber = NSNumber.numberWithInteger(cast(NSInteger) pool.id);
             dictionary.setObject(nsnumber, key);
         } else {
             pool.release();
@@ -347,7 +348,7 @@
  */
 public int getDepth () {
     checkDevice (); 
-    return (int)/*64*/OS.NSBitsPerPixelFromDepth(getPrimaryScreen().depth());
+    return cast(int)/*64*/OS.NSBitsPerPixelFromDepth(getPrimaryScreen().depth());
 }
 
 /**
@@ -426,9 +427,9 @@
 
 Point getScreenDPI () {
     NSDictionary dictionary = getPrimaryScreen().deviceDescription();
-    NSValue value = new NSValue(dictionary.objectForKey(new id(OS.NSDeviceResolution())).id);
+    NSValue value = new NSValue(dictionary.objectForKey(new cocoa.id(OS.NSDeviceResolution)).id);
     NSSize size = value.sizeValue();
-    return new Point((int)size.width, (int)size.height);
+    return new Point(cast(int)size.width, cast(int)size.height);
 }
 
 /**
--- a/dwt/graphics/Drawable.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Drawable.d	Fri Dec 05 16:00:41 2008 +0100
@@ -50,7 +50,7 @@
  * @return the platform specific GC handle
  */
  
-public objc.id /*long*/ internal_new_GC (GCData data);
+public objc.id internal_new_GC (GCData data);
 
 /**  
  * Invokes platform specific functionality to dispose a GC handle.
@@ -65,6 +65,6 @@
  * @param handle the platform specific GC handle
  * @param data the platform specific GC data 
  */
-public void internal_dispose_GC (objc.id /*long*/ handle, GCData data);
+public void internal_dispose_GC (objc.id handle, GCData data);
 
 }
--- a/dwt/graphics/Font.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Font.d	Fri Dec 05 16:00:41 2008 +0100
@@ -29,6 +29,7 @@
 import dwt.dwthelper.utils;
 import dwt.graphics.Device;
 import dwt.graphics.FontData;
+import dwt.graphics.Point;
 import dwt.graphics.Resource;
 import dwt.internal.cocoa.CGFloat;
 
@@ -90,10 +91,10 @@
     super(device);
     if (fd is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        init(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
-        init();
+        init_(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
+        init_();
     } finally {
         if (pool !is null) pool.release();
     }
@@ -130,7 +131,7 @@
         if (fds[i] is null) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         FontData fd = fds[0];
     init_(fd.getName(), fd.getHeightF(), fd.getStyle(), fd.nsName);
@@ -165,7 +166,7 @@
 public this(Device device, String name, int height, int style) {
     super(device);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         init_(name, height, style, null);
         init_();
@@ -174,11 +175,11 @@
     }
 }
 
-/+/*public*/ this(Device device, String name, float height, int style) {
+/*public*/ this(Device device, String name, float height, int style) {
     super(device);
     init_(name, height, style, null);
     init_();
-}+/
+}
 
 void destroy() {
     handle.release();
@@ -219,7 +220,7 @@
 public FontData[] getFontData() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSString family = handle.familyName();
         String name = family.getString();
@@ -229,7 +230,7 @@
         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);
+        FontData data = new FontData(name, cast(float)/*64*/handle.pointSize() * screenDPI.y / dpi.y, style);
         data.nsName = nsName;
     return [data];
     } finally {
@@ -272,7 +273,7 @@
  * @see #equals
  */
 public hash_t toHash() {
-    return handle !is null ? cast(hash_t) handle.id_ : 0;
+    return handle !is null ? cast(hash_t) handle.id : 0;
 }
 
 alias toHash hashCode;
--- a/dwt/graphics/GC.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/GC.d	Fri Dec 05 16:00:41 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
@@ -28,7 +28,6 @@
 import dwt.internal.cocoa.NSGradient;
 import dwt.internal.cocoa.NSGraphicsContext;
 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;
@@ -59,7 +58,8 @@
 import dwt.graphics.Resource;
 import dwt.graphics.RGB;
 import dwt.graphics.Transform;
-import dwt.internal.cocoa.CGFloat;
+import dwt.internal.c.Carbon;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 /**
@@ -240,7 +240,7 @@
 
 NSAutoreleasePool checkGC (int mask) {
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     if ((mask & (CLIPPING | TRANSFORM)) !is 0) {
         NSGraphicsContext.setCurrentContext(handle);
         NSView view = data.view;
@@ -253,8 +253,10 @@
                 visibleRect.width !is data.visibleRect.width || visibleRect.height !is data.visibleRect.height)
             {
                 data.state &= ~CLIPPING;
-                data.windowRect = rect;
-                data.visibleRect = visibleRect;
+                data.windowRectStruct = rect;
+                data.windowRect = &data.windowRectStruct;
+                data.visibleRectStruct = visibleRect;
+                data.visibleRect = &data.visibleRectStruct;
             }
         }
         if ((data.state & CLIPPING) is 0 || (data.state & TRANSFORM) is 0) {
@@ -262,11 +264,11 @@
             handle.saveGraphicsState();
             if (view !is null && data.paintRect is null) {
                 NSAffineTransform transform = NSAffineTransform.transform();
-                NSRect rect = data.windowRect;
+                NSRect rect = data.windowRectStruct;
                 transform.translateXBy(rect.x, rect.y + rect.height);
                 transform.scaleXBy(1, -1);
                 transform.concat();
-                NSBezierPath.bezierPathWithRect(data.visibleRect).addClip();
+                NSBezierPath.bezierPathWithRect(data.visibleRectStruct).addClip();
             }
             if (data.clipPath !is null) data.clipPath.addClip();
             if (data.transform !is null) data.transform.concat();
@@ -319,6 +321,7 @@
             case DWT.LINE_DASHDOT:
             case DWT.LINE_DASHDOTDOT:
                 state |= LINE_STYLE;
+            default: assert(false);
         }
     }
     if ((state & LINE_STYLE) !is 0) {
@@ -331,6 +334,7 @@
             case DWT.LINE_DASHDOT: dashes = width !is 0 ? LINE_DASHDOT : LINE_DASHDOT_ZERO; break;
             case DWT.LINE_DASHDOTDOT: dashes = width !is 0 ? LINE_DASHDOTDOT : LINE_DASHDOTDOT_ZERO; break;
             case DWT.LINE_CUSTOM: dashes = data.lineDashes; break;
+            default: assert(false);
         }
         if (dashes !is null) {
             CGFloat[] lengths = new CGFloat[dashes.length];
@@ -348,18 +352,20 @@
     if ((state & LINE_JOIN) !is 0) {
         NSLineJoinStyle joinStyle;
         switch (data.lineJoin) {
-            case DWT.JOIN_MITER: joinStyle = NSMiterLineJoinStyle; break;
-            case DWT.JOIN_ROUND: joinStyle = NSRoundLineJoinStyle; break;
-            case DWT.JOIN_BEVEL: joinStyle = NSBevelLineJoinStyle; break;
+            case DWT.JOIN_MITER: joinStyle = OS.NSMiterLineJoinStyle; break;
+            case DWT.JOIN_ROUND: joinStyle = OS.NSRoundLineJoinStyle; break;
+            case DWT.JOIN_BEVEL: joinStyle = OS.NSBevelLineJoinStyle; break;
+            default: assert(false);
         }
         path.setLineJoinStyle(joinStyle);
     }
     if ((state & LINE_CAP) !is 0) {
         NSLineCapStyle capStyle;
         switch (data.lineCap) {
-            case DWT.CAP_ROUND: capStyle = NSRoundLineCapStyle; break;
-            case DWT.CAP_FLAT: capStyle = NSButtLineCapStyle; break;
-            case DWT.CAP_SQUARE: capStyle = NSSquareLineCapStyle; break;
+            case DWT.CAP_ROUND: capStyle = OS.NSRoundLineCapStyle; break;
+            case DWT.CAP_FLAT: capStyle = OS.NSButtLineCapStyle; break;
+            case DWT.CAP_SQUARE: capStyle = OS.NSSquareLineCapStyle; break;
+            default: assert(false);
         }
         path.setLineCapStyle(capStyle);
     }
@@ -665,10 +671,10 @@
     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());
+        dict.setObject(color, OS.NSBackgroundColorAttributeName);
     }
     if ((flags & DWT.DRAW_TAB) is 0) {
-        NSMutableParagraphStyle paragraph = (NSMutableParagraphStyle)new NSMutableParagraphStyle().alloc().init();
+        NSMutableParagraphStyle paragraph = cast(NSMutableParagraphStyle)(new NSMutableParagraphStyle()).alloc().init();
         paragraph.setAlignment(OS.NSLeftTextAlignment);
         paragraph.setLineBreakMode(OS.NSLineBreakByClipping);
         paragraph.setTabStops(NSArray.array());
@@ -2098,7 +2104,7 @@
     }
     if (data.clipPath !is null) {
         NSBezierPath clip = data.clipPath.bezierPathByFlatteningPath();
-        int count = (int)/*64*/clip.elementCount();
+        int count = cast(int)/*64*/clip.elementCount();
         int pointCount = 0;
         Region clipRgn = new Region(device);
         int[] pointArray = new int[count * 2];
@@ -2267,7 +2273,7 @@
  */
 public int getInterpolation() {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    int interpolation = (int)/*64*/handle.imageInterpolation();
+    int interpolation = cast(int)/*64*/handle.imageInterpolation();
     switch (interpolation) {
         case OS.NSImageInterpolationDefault: return DWT.DEFAULT;
         case OS.NSImageInterpolationNone: return DWT.NONE;
--- a/dwt/graphics/GCData.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/GCData.d	Fri Dec 05 16:00:41 2008 +0100
@@ -21,12 +21,14 @@
 import dwt.internal.cocoa.NSSize;
 import dwt.internal.cocoa.NSView;
 
+import tango.core.Thread;
+
 import dwt.dwthelper.utils;
 import dwt.graphics.Device;
 import dwt.graphics.Pattern;
 import dwt.graphics.Image;
 import dwt.graphics.Font;
-import dwt.internal.cocoa.CGFloat;
+import dwt.internal.c.Carbon;
 
 /**
  * Instances of this class are descriptions of GCs in terms
--- a/dwt/graphics/Image.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Image.d	Fri Dec 05 16:00:41 2008 +0100
@@ -43,7 +43,7 @@
 import dwt.graphics.RGB;
 import dwt.graphics.Rectangle;
 import dwt.graphics.Resource;
-import dwt.internal.cocoa.NSInteger;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
  
 /**
@@ -251,7 +251,7 @@
     }
 
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         device = this.device;
         this.type = srcImage.type;
@@ -274,7 +274,7 @@
     handle = cast(NSImage)(new NSImage()).alloc();
         handle = handle.initWithSize(size);
     NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
-    rep = rep.initWithBitmapDataPlanes(null, width, height, srcRep.bitsPerSample(), srcRep.samplesPerPixel(), srcRep.samplesPerPixel() is 4, srcRep.isPlanar(), OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, srcRep.bytesPerRow(), srcRep.bitsPerPixel());
+    rep = rep.initWithBitmapDataPlanes(null, width, height, srcRep.bitsPerSample(), srcRep.samplesPerPixel(), srcRep.samplesPerPixel() is 4, srcRep.isPlanar(), OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, srcRep.bytesPerRow(), srcRep.bitsPerPixel());
         handle.addRepresentation(rep);
 
     objc.id data = rep.bitmapData();
@@ -294,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[(int)/*64*/bpr];
+                byte[] line = new byte[bpr];
                 for (int y=0; y<height; y++) {
                     OS.memmove(line.ptr, data + (y * bpr), bpr);
                     int offset = 0;
@@ -319,7 +319,7 @@
                 break;
             }
             case DWT.IMAGE_GRAY: {          
-                byte[] line = new byte[(int)/*64*/bpr];
+                byte[] line = new byte[bpr];
                 for (int y=0; y<height; y++) {
                     OS.memmove(line.ptr, data + (y * bpr), bpr);
                     int offset = 0;
@@ -377,7 +377,7 @@
     super(device);
     if (bounds is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         init_(bounds.width, bounds.height);
         init_();
@@ -407,7 +407,7 @@
 public this(Device device, ImageData data) {
     super(device);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         init_(data);
         init_();
@@ -449,7 +449,7 @@
         DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(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);
@@ -563,7 +563,7 @@
 void createAlpha () {
     if (transparentPixel is -1 && alpha is -1 && alphaData is null) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSSize size = handle.size();
     int height = cast(int)size.height;
@@ -669,7 +669,7 @@
 public Rectangle getBounds() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         if (width !is -1 && height !is -1) {
             return new Rectangle(0, 0, width, height);
@@ -698,7 +698,7 @@
 public ImageData getImageData() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSSize size = handle.size();
     int width = cast(int)size.width;
@@ -711,8 +711,8 @@
     OS.memmove(srcData.ptr, imageRep.bitmapData(), dataSize);
 
         PaletteData palette = new PaletteData(0xFF0000, 0xFF00, 0xFF);
-        ImageData data = new ImageData(width, height, (int)/*64*/bpp, palette, 4, srcData);
-        data.bytesPerLine = (int)/*64*/bpr;
+        ImageData data = new ImageData(width, height, cast(int)/*64*/bpp, palette, 4, srcData);
+        data.bytesPerLine = cast(int)/*64*/bpr;
 
         data.transparentPixel = transparentPixel;
         if (transparentPixel is -1 && type is DWT.ICON) {
@@ -771,12 +771,12 @@
     image.type = type;
     image.handle = nsImage;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSImageRep rep = nsImage.bestRepresentationForDevice(null);
-        if (rep.isKindOfClass(OS.class_NSBitmapImageRep)) { 
+        if (rep.isKindOfClass(cast(objc.Class)OS.class_NSBitmapImageRep)) { 
             rep.retain();
-            image.imageRep = new NSBitmapImageRep(rep.id_);
+            image.imageRep = new NSBitmapImageRep(rep.id);
         }
         return image;
     } finally {
@@ -795,7 +795,7 @@
  * @see #equals
  */
 public hash_t toHash () {
-    return handle !is null ? cast(hash_t) handle.id_ : 0;
+    return handle !is null ? cast(hash_t) handle.id : 0;
 }
 
 alias toHash hashCode;
@@ -814,7 +814,7 @@
     size.height = height;
     handle = handle.initWithSize(size);
     NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
-    rep = rep.initWithBitmapDataPlanes_(null, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, NSAlphaFirstBitmapFormat | NSAlphaNonpremultipliedBitmapFormat, width * 4, 32);
+    rep = rep.initWithBitmapDataPlanes(null, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, width * 4, 32);
     OS.memset(rep.bitmapData(), 0xFF, cast(size_t) (width * height * 4));
     handle.addRepresentation(rep);
 //  rep.release();
@@ -923,7 +923,7 @@
     size.height = height;
     handle = handle.initWithSize(size);
     NSBitmapImageRep rep = imageRep = cast(NSBitmapImageRep)(new NSBitmapImageRep()).alloc();
-    rep = rep.initWithBitmapDataPlanes(0, width, height, 8, hasAlpha ? 4 : 3, hasAlpha, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, bpr, 32);
+    rep = rep.initWithBitmapDataPlanes(null, 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();
@@ -948,7 +948,7 @@
         DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     }
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSBitmapImageRep rep = imageRep;
         if (imageRep.hasAlpha()) {
@@ -958,7 +958,7 @@
         if (data.bitmapDataAddress !is null) OS.free(data.bitmapDataAddress);
         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 = rep.initWithBitmapDataPlanes(&data.bitmapDataAddress, width, height, 8, 3, false, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat , bpr, 32);
             rep.autorelease();
         }
         handle.setCacheMode(OS.NSImageCacheNever);
@@ -980,7 +980,7 @@
             data.font = device.systemFont;
             data.image = this;
         }
-    return context.id_;
+    return context.id;
     } finally {
         if (pool !is null) pool.release();
     }
--- a/dwt/graphics/Path.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Path.d	Fri Dec 05 16:00:41 2008 +0100
@@ -40,9 +40,9 @@
 import dwt.graphics.GCData;
 import dwt.graphics.PathData;
 import dwt.graphics.Resource;
-import dwt.internal.cocoa.CGFloat;
+import dwt.internal.c.Carbon;
 import dwt.internal.cocoa.NSFont : NSGlyph;
-import dwt.internal.cocoa.NSInteger;
+import dwt.internal.objc.cocoa.Cocoa;
 
 /**
  * Instances of this class represent paths through the two-dimensional
@@ -106,7 +106,7 @@
 public this (Device device) {
     super(device);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle = NSBezierPath.bezierPath();
         if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
@@ -149,9 +149,10 @@
  * @see #dispose()
  * @since 3.4
  */
+public this (Device device, Path path, float flatness) {
     super(device);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(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);
@@ -159,7 +160,7 @@
         if (flatness is 0) {
         handle = new NSBezierPath(path.handle.copy().id_);
         } else {
-        CGFloat defaultFlatness = NSBezierPath.defaultFlatness();
+            CGFloat defaultFlatness = NSBezierPath.defaultFlatness();
             NSBezierPath.setDefaultFlatness(flatness);
             handle = path.handle.bezierPathByFlatteningPath();
             NSBezierPath.setDefaultFlatness(defaultFlatness);       
@@ -196,9 +197,10 @@
  * @see #dispose()
  * @since 3.4
  */
+public this (Device device, PathData data) {
     this(device);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         if (data is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     init_(data);
@@ -239,7 +241,7 @@
 public void addArc(float x, float y, float width, float height, float startAngle, float arcAngle) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSAffineTransform transform = NSAffineTransform.transform();
         transform.translateXBy(x + width / 2f, y + height / 2f);
@@ -274,7 +276,7 @@
     if (path is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (path.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle.appendBezierPath(path.handle);
     } finally {
@@ -302,7 +304,7 @@
     rect.width = width;
     rect.height = height;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle.appendBezierPathWithRect(rect);
     } finally {
@@ -387,7 +389,7 @@
 public void close() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle.closePath();
     } finally {
@@ -423,7 +425,7 @@
     if (gc is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (gc.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         //  gc.checkGC(GC.LINE_CAP | GC.LINE_JOIN | GC.LINE_STYLE | GC.LINE_WIDTH);
         //TODO outline
@@ -453,7 +455,7 @@
 public void cubicTo(float cx1, float cy1, float cx2, float cy2, float x, float y) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSPoint pt = NSPoint();
         pt.x = x;
@@ -495,13 +497,13 @@
     if (bounds is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (bounds.length < 4) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(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;
+        bounds[0] = cast(float)/*64*/rect.x;
+        bounds[1] = cast(float)/*64*/rect.y;
+        bounds[2] = cast(float)/*64*/rect.width;
+        bounds[3] = cast(float)/*64*/rect.height;
     } finally {
         if (pool !is null) pool.release();
     }
@@ -526,11 +528,11 @@
     if (point is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (point.length < 2) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSPoint pt = handle.currentPoint();
-        point[0] = (float)/*64*/pt.x;
-        point[1] = (float)/*64*/pt.y;
+        point[0] = cast(float)/*64*/pt.x;
+        point[1] = cast(float)/*64*/pt.y;
     } finally {
         if (pool !is null) pool.release();
     }
@@ -550,9 +552,9 @@
 public PathData getPathData() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        int count = (int)/*64*/handle.elementCount();
+        int count = cast(int)/*64*/handle.elementCount();
         int pointCount = 0, typeCount = 0;
         byte[] types = new byte[count];
         float[] pointArray = new float[count * 6];
@@ -661,7 +663,7 @@
 public void lineTo(float x, float y) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         NSPoint pt = NSPoint();
         pt.x = x;
--- a/dwt/graphics/Pattern.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Pattern.d	Fri Dec 05 16:00:41 2008 +0100
@@ -31,7 +31,7 @@
 import dwt.graphics.GC;
 import dwt.graphics.Image;
 import dwt.graphics.Resource;
-import dwt.internal.cocoa.CGFloat;
+import dwt.internal.c.Carbon;
 
 /**
  * Instances of this class represent patterns to use while drawing. Patterns
@@ -92,7 +92,7 @@
     if (image is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (image.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         this.image = image;
         color = NSColor.colorWithPatternImage(image.handle);
--- a/dwt/graphics/Region.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Region.d	Fri Dec 05 16:00:41 2008 +0100
@@ -33,9 +33,7 @@
 import dwt.graphics.Point;
 import dwt.graphics.Rectangle;
 import dwt.graphics.Resource;
-import dwt.internal.c.carboncore.MacTypes;
-import dwt.internal.c.qd.Quickdraw;
-static import QuickdrawTypes = dwt.internal.c.qd.QuickdrawTypes;
+import Carbon = dwt.internal.c.Carbon;
 
 /**
  * Instances of this class represent areas of an x-y coordinate
@@ -64,7 +62,7 @@
      * platforms and should never be accessed from application code.
      * </p>
      */
-    public QuickdrawTypes.RgnHandle handle;
+    public Carbon.RgnHandle handle;
 
 /**
  * Constructs a new empty region.
@@ -99,7 +97,7 @@
 public this(Device device) {
     super(device);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle = OS.NewRgn();
     if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES);
@@ -109,18 +107,18 @@
     }
 }
 
-this(Device device, QuickdrawTypes.RgnHandle handle) {
+this(Device device, Carbon.RgnHandle handle) {
     super(device);
     this.handle = handle;
 }
 
-public static Region cocoa_new(Device device, int handle) {
+public static Region cocoa_new(Device device, Carbon.RgnHandle 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();
+static Carbon.RgnHandle polyToRgn(int[] poly, int length) {
+    Carbon.Rect r;
+    Carbon.RgnHandle 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];
@@ -133,14 +131,14 @@
         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);
+                inter[count++] = cast(int)((((y - y1) / cast(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);
+            inter[count++] = cast(int)((((y - y1) / cast(float)(y2 - y1)) * (x2 - x1)) + x1 + 0.5f);
         }
         for (int gap=count/2; gap>0; gap/=2) {
             for (int i=gap; i<count; i++) {
@@ -154,8 +152,8 @@
             }
         }
         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.SetRect(&r, cast(short)inter[i], cast(short)y, cast(short)(inter[i + 1]), cast(short)(y + 1));
+            OS.RectRgn(rectRgn, &r);
             OS.UnionRgn(polyRgn, rectRgn, polyRgn);
         }
     }
@@ -163,19 +161,19 @@
     return polyRgn;
 }
 
-static int /*long*/ polyRgn(int[] pointArray, int count) {
+static Carbon.RgnHandle polyRgn(int[] pointArray, int count) {
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        int /*long*/ polyRgn;
+        Carbon.RgnHandle polyRgn;
         if (C.PTR_SIZEOF is 4) {
             polyRgn = OS.NewRgn();
             OS.OpenRgn();
-            OS.MoveTo((short)pointArray[0], (short)pointArray[1]);
+            OS.MoveTo(cast(short)pointArray[0], cast(short)pointArray[1]);
             for (int i = 1; i < count / 2; i++) {
-                OS.LineTo((short)pointArray[2 * i], (short)pointArray[2 * i + 1]);
+                OS.LineTo(cast(short)pointArray[2 * i], cast(short)pointArray[2 * i + 1]);
             }
-            OS.LineTo((short)pointArray[0], (short)pointArray[1]);
+            OS.LineTo(cast(short)pointArray[0], cast(short)pointArray[1]);
             OS.CloseRgn(polyRgn);
         } else {
             polyRgn = polyToRgn(pointArray, count);
@@ -206,7 +204,7 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         add(pointArray, pointArray.length);
     } finally {
@@ -219,7 +217,7 @@
     NSAutoreleasePool pool = null;
     if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        int /*long*/ polyRgn = polyRgn(pointArray, count);
+        Carbon.RgnHandle polyRgn = polyRgn(pointArray, count);
         OS.UnionRgn(handle, polyRgn, handle);
         OS.DisposeRgn(polyRgn);
     } finally {
@@ -246,7 +244,7 @@
     if (rect is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (rect.width < 0 || rect.height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         add (rect.x, rect.y, rect.width, rect.height);
     } finally {
@@ -278,8 +276,8 @@
     NSAutoreleasePool pool = null;
     if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
-        Rect r;
+        Carbon.RgnHandle rectRgn = OS.NewRgn();
+        Carbon.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);
@@ -309,7 +307,7 @@
     if (region is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (region.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         OS.UnionRgn(handle, region.handle, handle);
     } finally {
@@ -335,7 +333,7 @@
     NSAutoreleasePool pool = null;
     if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        QuickdrawTypes.Point point = {cast(short)x, cast(short)y};
+        Carbon.Point point = {cast(short)x, cast(short)y};
         return OS.PtInRgn(point, handle);
     } finally {
         if (pool !is null) pool.release();
@@ -364,8 +362,8 @@
 
 static NSAffineTransform transform;
 void convertRgn(NSAffineTransform transform) {
-    QuickdrawTypes.RgnHandle newRgn = OS.NewRgn();
-    RegionToRectsUPP proc = &Region.convertRgn_;
+    Carbon.RgnHandle newRgn = OS.NewRgn();
+    Carbon.RegionToRectsUPP proc = &Region.convertRgn_;
     this.transform = transform;
     OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, proc, newRgn);
     this.transform = null;
@@ -373,9 +371,9 @@
     OS.DisposeRgn(newRgn);
 }
 
-extern(C) private static OSStatus* convertRgn_(ushort message, QuickdrawTypes.RgnHandle rgn, Rect* r, void* newRgn) {
+extern(C) private static Carbon.OSStatus convertRgn_(ushort message, Carbon.RgnHandle rgn, Carbon.Rect* r, void* newRgn) {
     if (message is OS.kQDRegionToRectsMsgParse) {
-        Rect rect;
+        Carbon.Rect rect;
         OS.memmove(&rect, r, rect.sizeof);
         int i = 0;
         NSPoint point = NSPoint();
@@ -384,26 +382,26 @@
         point.y = rect.top;
         point = transform.transformPoint(point);
         short startX, startY;
-        points[i++] = startX = (short)point.x;
-        points[i++] = startY = (short)point.y;
+        points[i++] = startX = cast(short)point.x;
+        points[i++] = startY = cast(short)point.y;
         point.y = rect.top;
         point = transform.transformPoint(point);
-        points[i++] = (short)Math.round(point.x);
-        points[i++] = (short)point.y;
+        points[i++] = cast(short)Math.round(point.x);
+        points[i++] = cast(short)point.y;
         point.y = rect.bottom;
         point = transform.transformPoint(point);
-        points[i++] = (short)Math.round(point.x);
-        points[i++] = (short)Math.round(point.y);
+        points[i++] = cast(short)Math.round(point.x);
+        points[i++] = cast(short)Math.round(point.y);
         point.y = rect.bottom;
         point = transform.transformPoint(point);
-        points[i++] = (short)point.x;
-        points[i++] = (short)Math.round(point.y);
+        points[i++] = cast(short)point.x;
+        points[i++] = cast(short)Math.round(point.y);
         points[i++] = startX;
         points[i++] = startY;
-        int /*long*/ polyRgn = polyRgn(points, points.length);
+        Carbon.RgnHandle polyRgn = polyRgn(points, points.length);
         OS.DisposeRgn(polyRgn);
     }
-    return null;
+    return 0;
 }
 
 void destroy() {
@@ -446,7 +444,7 @@
 public Rectangle getBounds() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    Rect bounds;
+    Carbon.Rect bounds;
 
     if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
@@ -462,14 +460,14 @@
 NSBezierPath getPath() {
     NSBezierPath path = NSBezierPath.bezierPath();
     path.retain();
-    OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, &Region.regionToRects, path.id_);
+    OS.QDRegionToRects(handle, OS.kQDParseRegionFromTopLeft, &Region.regionToRects, path.id);
     if (path.isEmpty()) path.appendBezierPathWithRect(NSRect());
     return path;
 }
 
 static NSPoint pt = NSPoint();
-static Rect rect;
-extern(C) private static OSStatus* regionToRects(ushort message, QuickdrawTypes.RgnHandle rgn, Rect* r, objc.id path) {
+static Carbon.Rect rect;
+extern(C) private static Carbon.OSStatus regionToRects(ushort message, Carbon.RgnHandle rgn, Carbon.Rect* r, void* path) {
     if (message is OS.kQDRegionToRectsMsgParse) {
         OS.memmove(&rect, r, rect.sizeof);
         pt.x = rect.left;
@@ -484,7 +482,7 @@
         OS.objc_msgSend(path, OS.sel_lineToPoint_, pt);
         OS.objc_msgSend(path, OS.sel_closePath);
     }
-    return null;
+    return 0;
 }
 
 /**
@@ -547,10 +545,10 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (width < 0 || height < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        QuickdrawTypes.RgnHandle rectRgn = OS.NewRgn();
-        Rect r;
+        Carbon.RgnHandle rectRgn = OS.NewRgn();
+        Carbon.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);
@@ -582,7 +580,7 @@
     if (region is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (region.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         OS.SectRgn(handle, region.handle, handle);
     } finally {
@@ -612,7 +610,7 @@
     NSAutoreleasePool pool = null;
     if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        Rect r;
+        Carbon.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 {
@@ -670,7 +668,7 @@
 public bool isEmpty() {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         return OS.EmptyRgn(handle);
     } finally {
@@ -700,7 +698,7 @@
     NSAutoreleasePool pool = null;
     if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        int /*long*/ polyRgn = polyRgn(pointArray, pointArray.length);
+        Carbon.RgnHandle polyRgn = polyRgn(pointArray, pointArray.length);
         OS.DiffRgn(handle, polyRgn, handle);
         OS.DisposeRgn(polyRgn);
     } finally {
@@ -754,8 +752,8 @@
     NSAutoreleasePool pool = null;
     if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
-        int /*long*/ rectRgn = OS.NewRgn();
-        Rect r;
+        Carbon.RgnHandle rectRgn = OS.NewRgn();
+        Carbon.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);
@@ -838,7 +836,7 @@
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     if (pt is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         translate (pt.x, pt.y);
     } finally {
--- a/dwt/graphics/TextLayout.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/TextLayout.d	Fri Dec 05 16:00:41 2008 +0100
@@ -50,9 +50,9 @@
 import dwt.graphics.Region;
 import dwt.graphics.Resource;
 import dwt.graphics.TextStyle;
-import dwt.internal.cocoa.CGFloat;
-import dwt.internal.cocoa.NSInteger;
+import dwt.internal.c.Carbon;
 import dwt.internal.cocoa.NSText;
+import dwt.internal.objc.cocoa.Cocoa;
 
 /**
  * <code>TextLayout</code> is a graphic object that represents
@@ -207,7 +207,7 @@
         int count = tabs.length;
         for (int i = 0, pos = 0; i < count; i++) {
             pos += tabs[i];
-            NSTextTab tab = (NSTextTab)new NSTextTab().alloc();
+            NSTextTab tab = cast(NSTextTab)(new NSTextTab()).alloc();
             tab = tab.initWithType(OS.NSLeftTabStopType, pos);
             paragraph.addTabStop(tab);
             tab.release();
@@ -221,7 +221,7 @@
     textStorage.addAttribute(OS.NSParagraphStyleAttributeName, paragraph, range);
     paragraph.release();
     
-    int /*long*/ textLength = str.length();
+    NSUInteger textLength = str.length();
     for (int i = 0; i < styles.length - 1; i++) {
         StyleItem run = styles[i];
         if (run.style is null) continue;
@@ -299,7 +299,7 @@
         bounds[numberOfLines] = layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
         if (numberOfLines < bounds.length - 1) bounds[numberOfLines].height -= spacing;
         OS.memmove(&lineRange, rangePtr, NSRange.sizeof);
-        offsets[numberOfLines] = (int)/*64*/lineRange.location;
+        offsets[numberOfLines] = cast(int)/*64*/lineRange.location;
         index = lineRange.location + lineRange.length;
     }
     if (numberOfLines is 0) {
@@ -309,7 +309,7 @@
         bounds[0].height = Math.max(layoutManager.defaultLineHeightForFont(nsFont), ascent + descent);
     }
     OS.free(rangePtr);
-    offsets[numberOfLines] = (int)/*64*/textStorage.length();
+    offsets[numberOfLines] = cast(int)/*64*/textStorage.length();
     this.lineOffsets = offsets;
     this.lineBounds = bounds;
 }
@@ -415,7 +415,7 @@
             selectionColor = NSColor.colorWithDeviceRed(selectionBackground.handle[0], selectionBackground.handle[1], selectionBackground.handle[2], selectionBackground.handle[3]);
         }
         if (hasSelection) {
-            selectionRange = new NSRange();
+            selectionRange = NSRange();
             selectionRange.location = selectionStart;
             selectionRange.length = selectionEnd - selectionStart + 1;
         layoutManager.addTemporaryAttribute(OS.NSBackgroundColorAttributeName, selectionColor, *selectionRange);
@@ -423,7 +423,7 @@
         //TODO draw selection for flags (DELIMITER_SELECTION)
         int numberOfGlyphs = layoutManager.numberOfGlyphs();
         if (numberOfGlyphs > 0) {
-            NSRange range = new NSRange();
+            NSRange range = 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;
@@ -437,7 +437,7 @@
             layoutManager.drawGlyphsForGlyphRange(range, pt);
             range.length = length;
             layoutManager.removeTemporaryAttribute(OS.NSForegroundColorAttributeName, range);
-            NSPoint point = new NSPoint();
+            NSPoint point = NSPoint();
             for (int j = 0; j < styles.length; j++) {
                 StyleItem run = styles[j];
                 TextStyle style = run.style;
@@ -478,7 +478,7 @@
                                     path.setLineWidth(2f);
                                     path.setLineCapStyle(OS.NSRoundLineCapStyle);
                                     path.setLineJoinStyle(OS.NSRoundLineJoinStyle);
-                                    path.setLineDash(new float[]{1, 3f}, 2, 0);
+                                    path.setLineDash([1, 3f], 2, 0);
                                     point.x = underlineX;
                                     point.y = underlineY + 0.5f;
                                     path.moveToPoint(point);
@@ -496,7 +496,7 @@
                                     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));
+                                    float[] points = computePolyline(cast(int)underlineX, cast(int)squigglyY, cast(int)(underlineX + rect.width), cast(int)(squigglyY + squigglyHeight));
                                     point.x = points[0] + 0.5f;
                                     point.y = points[1] + 0.5f;
                                     path.moveToPoint(point);
@@ -556,7 +556,7 @@
         }
         if ((flags & DWT.LAST_LINE_SELECTION) !is 0) {
             NSRect bounds = lineBounds[lineBounds.length - 1];
-            NSRect rect = new NSRect();
+            NSRect rect = 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;
@@ -643,7 +643,7 @@
 public Rectangle getBounds() {
     checkLayout();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         NSRect rect = layoutManager.usedRectForTextContainer(textContainer);
@@ -677,7 +677,7 @@
 public Rectangle getBounds(int start, int end) {
     checkLayout();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         int length = text.length();
@@ -780,7 +780,7 @@
 public int getLevel(int offset) {
     checkLayout();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         int length = text.length();
@@ -808,7 +808,7 @@
 public int[] getLineOffsets() {
     checkLayout ();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         int[] offsets = new int[lineOffsets.length];
@@ -838,7 +838,7 @@
 public int getLineIndex(int offset) {
     checkLayout ();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         int length = text.length();
@@ -871,7 +871,7 @@
 public Rectangle getLineBounds(int lineIndex) {
     checkLayout();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         if (!(0 <= lineIndex && lineIndex < lineBounds.length)) DWT.error(DWT.ERROR_INVALID_RANGE);
@@ -895,7 +895,7 @@
 public int getLineCount() {
     checkLayout ();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();  
         return lineOffsets.length - 1;
@@ -920,7 +920,7 @@
 public FontMetrics getLineMetrics (int lineIndex) {
     checkLayout ();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         int lineCount = getLineCount();
@@ -962,7 +962,7 @@
 public Point getLocation(int offset, bool trailing) {
     checkLayout();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         int length = text.length();
@@ -1006,7 +1006,7 @@
  */
 public int getNextOffset (int offset, int movement) {
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         return _getOffset(offset, movement, true);
     } finally {
@@ -1032,15 +1032,15 @@
             return Math.max(0, Math.min(length, untranslateOffset(offset)));
         }
         case DWT.MOVEMENT_WORD: {
-            return untranslateOffset((int)/*64*/textStorage.nextWordFromIndex(offset, forward));
+            return untranslateOffset(cast(int)/*64*/textStorage.nextWordFromIndex(offset, forward));
         }
         case DWT.MOVEMENT_WORD_END: {
             NSRange range = textStorage.doubleClickAtIndex(length is offset ? length - 1 : offset);
-            return untranslateOffset((int)/*64*/(range.location + range.length));
+            return untranslateOffset(cast(int)/*64*/(range.location + range.length));
         }
         case DWT.MOVEMENT_WORD_START: {
             NSRange range = textStorage.doubleClickAtIndex(length is offset ? length - 1 : offset);
-            return untranslateOffset((int)/*64*/range.location);
+            return untranslateOffset(cast(int)/*64*/range.location);
         }
         default:
             break;
@@ -1074,7 +1074,7 @@
 public int getOffset(Point point, int[] trailing) {
     checkLayout();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         if (point is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
@@ -1110,7 +1110,7 @@
 public int getOffset(int x, int y, int[] trailing) {
     checkLayout();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         computeRuns();
         if (trailing !is null && trailing.length < 1) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
@@ -1121,9 +1121,9 @@
         pt.y = y;
     CGFloat partialFration;
     NSUInteger glyphIndex = layoutManager.glyphIndexForPoint(pt, textContainer, &partialFration);
-        int /*long*/ offset = layoutManager.characterIndexForGlyphAtIndex(glyphIndex);
+        NSUInteger offset = layoutManager.characterIndexForGlyphAtIndex(glyphIndex);
     if (trailing !is null) trailing[0] = cast(int) Math.round(partialFration);
-        return Math.min(untranslateOffset((int)/*64*/offset), length - 1);
+        return Math.min(untranslateOffset(cast(int)/*64*/offset), length - 1);
     } finally {
         if (pool !is null) pool.release();
     }
@@ -1164,7 +1164,7 @@
  */
 public int getPreviousOffset (int index, int movement) {
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         return _getOffset(index, movement, false);
     } finally {
@@ -1373,7 +1373,7 @@
     if ((alignment & DWT.RIGHT) !is 0) alignment = DWT.RIGHT;
     if (this.alignment is alignment) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.alignment = alignment;
@@ -1405,7 +1405,7 @@
     if (ascent < -1) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (this.ascent is ascent) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.ascent = ascent;
@@ -1437,7 +1437,7 @@
     if (descent < -1) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (this.descent is descent) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.descent = descent;
@@ -1470,7 +1470,7 @@
     this.font = font;
     if (oldFont !is null && oldFont.equals(font)) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
     } finally {
@@ -1495,7 +1495,7 @@
     if (indent < 0) return;
     if (this.indent is indent) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.indent = indent;
@@ -1520,7 +1520,7 @@
     checkLayout ();
     if (justify is this.justify) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.justify = justify;
@@ -1548,7 +1548,7 @@
     if (this.orientation is orientation) return;
     this.orientation = orientation;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
     } finally {
@@ -1587,7 +1587,7 @@
         }
     }
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.segments = segments;
@@ -1614,7 +1614,7 @@
     if (spacing < 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (this.spacing is spacing) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.spacing = spacing;
@@ -1639,7 +1639,7 @@
 public void setStyle (TextStyle style, int start, int end) {
     checkLayout();
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         int length = text.length();
         if (length is 0) return;
@@ -1737,7 +1737,7 @@
         }
     }
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.tabs = tabs;
@@ -1763,7 +1763,7 @@
     if (text is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (text.equals(this.text)) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.text = text;
@@ -1797,7 +1797,7 @@
     if (width < -1 || width is 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     if (this.wrapWidth is width) return;
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         freeRuns();
         this.wrapWidth = width;
--- a/dwt/graphics/Transform.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/graphics/Transform.d	Fri Dec 05 16:00:41 2008 +0100
@@ -191,15 +191,15 @@
     if (elements is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (elements.length < 6) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(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;
+        elements[0] = cast(float)/*64*/struct_.m11;
+        elements[1] = cast(float)/*64*/struct_.m12;
+        elements[2] = cast(float)/*64*/struct_.m21;
+        elements[3] = cast(float)/*64*/struct_.m22;
+        elements[4] = cast(float)/*64*/struct_.tX;
+        elements[5] = cast(float)/*64*/struct_.tY;
     } finally {
         if (pool !is null) pool.release();
     }
@@ -222,7 +222,7 @@
         NSAffineTransformStruct struct_ = NSAffineTransformStruct();
         struct_.m11 = 1;
         struct_.m22 = 1;
-        handle.setTransformStruct(structt);
+        handle.setTransformStruct(struct_);
     } finally {
         if (pool !is null) pool.release();
     }
@@ -277,8 +277,8 @@
     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;
+        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();
     }
@@ -304,7 +304,7 @@
     if (matrix is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     if (matrix.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle.prependTransform(matrix.handle);
     } finally {
@@ -328,7 +328,7 @@
 public void rotate(float angle) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle.rotateByDegrees(angle);
     } finally {
@@ -350,7 +350,7 @@
 public void scale(float scaleX, float scaleY) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle.scaleXBy(scaleX, scaleY);
     } finally {
@@ -448,8 +448,8 @@
             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;               
+            pointArray[j] = cast(float)/*64*/point.x;               
+            pointArray[j + 1] = cast(float)/*64*/point.y;               
         }
     } finally {
         if (pool !is null) pool.release();
@@ -470,7 +470,7 @@
 public void translate(float offsetX, float offsetY) {
     if (isDisposed()) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
     NSAutoreleasePool pool = null;
-    if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+    if (!NSThread.isMainThread()) pool = cast(NSAutoreleasePool) (new NSAutoreleasePool()).alloc().init();
     try {
         handle.translateXBy(offsetX, offsetY);
     } finally {
--- a/dwt/internal/Library.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/internal/Library.d	Fri Dec 05 16:00:41 2008 +0100
@@ -38,7 +38,7 @@
     /**
      * DWT Minor version number (must be in the range 0..999)
      */
-    static int MINOR_VERSION = 514;
+    static const int MINOR_VERSION = 514;
 
     /**
      * DWT revision number (must be >= 0)
--- a/dwt/internal/cocoa/NSEvent.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/internal/cocoa/NSEvent.d	Fri Dec 05 16:00:41 2008 +0100
@@ -103,8 +103,8 @@
     return result;
 }
 
-public int /*long*/ modifierFlags() {
-    return OS.objc_msgSend(this.id, OS.sel_modifierFlags);
+public NSUInteger modifierFlags() {
+    return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_modifierFlags);
 }
 
 public static NSPoint mouseLocation() {
--- a/dwt/internal/cocoa/NSRect.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/internal/cocoa/NSRect.d	Fri Dec 05 16:00:41 2008 +0100
@@ -14,19 +14,52 @@
 module dwt.internal.cocoa.NSRect;
 
 import dwt.dwthelper.utils;
+import dwt.internal.c.Carbon;
 import dwt.internal.cocoa.NSPoint;
 import dwt.internal.cocoa.NSSize;
 
 
 public struct NSRect {
     /** @field accessor=origin.x */
-    public alias origin.x x;
+    CGFloat x ()
+    {
+        return origin.x;
+    }
+    
+    CGFloat x (CGFloat x)
+    {
+        return origin.x = x;
+    }
     /** @field accessor=origin.y */
-    public alias origin.y y;
+    CGFloat y ()
+    {
+        return origin.y;
+    }
+    
+    CGFloat y (CGFloat y)
+    {
+        return origin.y = y;
+    }
     /** @field accessor=size.width */
-    public alias size.width width;
+    CGFloat width ()
+    {
+        return size.width;
+    }
+    
+    CGFloat width (CGFloat width)
+    {
+        return size.width = width;
+    }
     /** @field accessor=size.height */
-    public alias size.height height;
+    CGFloat height ()
+    {
+        return size.height;
+    }
+    
+    CGFloat width (CGFloat height)
+    {
+        return size.height = height;
+    }
     
     NSPoint origin;
     NSSize size;
--- a/dwt/internal/cocoa/NSScreen.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/internal/cocoa/NSScreen.d	Fri Dec 05 16:00:41 2008 +0100
@@ -17,10 +17,10 @@
 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.OS;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
 public class NSScreen : NSObject {
--- a/dwt/internal/cocoa/NSString.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/internal/cocoa/NSString.d	Fri Dec 05 16:00:41 2008 +0100
@@ -13,6 +13,8 @@
  *******************************************************************************/
 module dwt.internal.cocoa.NSString;
 
+import tango = tango.text.convert.Utf;
+
 import dwt.dwthelper.utils;
 import cocoa = dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSObject;
@@ -65,7 +67,7 @@
 public String getString() {
     wchar[] buffer = new wchar[length()];
     getCharacters(buffer.ptr);
-    return buffer.toString();
+    return tango.toString(buffer);
 }
 
 public static NSString stringWith(String str) {
--- a/dwt/internal/cocoa/OS.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/internal/cocoa/OS.d	Fri Dec 05 16:00:41 2008 +0100
@@ -24,12 +24,15 @@
 import dwt.internal.cocoa.CGRect;
 import dwt.internal.cocoa.CGSize;
 import dwt.internal.cocoa.NSAffineTransformStruct;
-import dwt.internal.cocoa.NSInteger;
+import dwt.internal.cocoa.NSBitmapImageRep;
+import dwt.internal.cocoa.NSImage;
+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.NSString;
+import dwt.internal.cocoa.NSText;
 import Cocoa = dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
@@ -1196,9 +1199,9 @@
 /** JNI natives */
 
 /** @method flags=jni */
-static char* NewGlobalRef (Object object)
+static void* NewGlobalRef (Object object)
 {
-    return cast(char*) object;
+    return cast(void*) object;
 }
 /**
  * @method flags=jni
@@ -1206,7 +1209,7 @@
  */
 //public static final native void DeleteGlobalRef(int /*long*/ globalRef);
 /** @method flags=no_gen */
-static Object JNIGetObject (char* globalRef)
+static Object JNIGetObject (void* globalRef)
 {
     return cast(Object) globalRef;
 }
@@ -2516,1744 +2519,1744 @@
 public static const objc.SEL sel_yearOfCommonEra;
 
 /** 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;
+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;
+alias NSBitmapFormat.NSAlphaFirstBitmapFormat NSAlphaFirstBitmapFormat;
+alias NSBitmapFormat.NSAlphaNonpremultipliedBitmapFormat NSAlphaNonpremultipliedBitmapFormat;
+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;
+alias NSTextAlignment.NSCenterTextAlignment NSCenterTextAlignment;
+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;
+alias NSImageCacheMode.NSImageCacheNever NSImageCacheNever;
+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;
+alias NSTextAlignment.NSLeftTextAlignment NSLeftTextAlignment;
+public static const int NSLeftTextMovement = 19;
+public static const int NSLighterFontAction = 6;
+public static const int NSLineBorder = 1;
+public static const int NSLineBreakByCharWrapping = 1;
+alias NSLineBreakMode.NSLineBreakByClipping NSLineBreakByClipping;
+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 kCFStringEncodingUTF8 = 134217984;
+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;
 
 /** Globals */
 /** @method flags=const */
--- a/dwt/internal/objc/bindings.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/internal/objc/bindings.d	Fri Dec 05 16:00:41 2008 +0100
@@ -25,7 +25,7 @@
 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_getInstanceVariable (id obj, /*const*/char* name, out void* outValue);
 Ivar object_setInstanceVariable (id obj, /*const*/char* name, void* value);
 SEL sel_registerName (/*const*/char* str);
 id objc_msgSend (id theReceiver, SEL theSelector, ...);
--- a/dwt/internal/objc/runtime.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/internal/objc/runtime.d	Fri Dec 05 16:00:41 2008 +0100
@@ -39,6 +39,7 @@
     
     // for dwt compatibility
     alias clazz cls;
+    alias clazz super_class;
 }
 
 struct objc_class
@@ -164,7 +165,7 @@
     return dwt.internal.objc.bindings.object_getClassName(obj);
 }
 
-Ivar object_getInstanceVariable (id obj, String name, void** outValue)
+Ivar object_getInstanceVariable (id obj, String name, out void* outValue)
 {
     return dwt.internal.objc.bindings.object_getInstanceVariable(obj, name.ptr, outValue);
 }
--- a/dwt/printing/Printer.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/printing/Printer.d	Fri Dec 05 16:00:41 2008 +0100
@@ -217,7 +217,7 @@
     if (job.isEqual(new NSString(OS.NSPrintPreviewJob()))) {
         printInfo.setJobDisposition(job);
     }
-    NSRect rect = new NSRect();
+    NSRect rect = NSRect();
     window = (NSWindow)new NSWindow().alloc();
     window.initWithContentRect(rect, OS.NSBorderlessWindowMask, OS.NSBackingStoreBuffered, false);
     view = (NSView)new NSView().alloc();
@@ -403,10 +403,10 @@
 public bool startPage() {
     checkDevice();
     NSSize paperSize = printInfo.paperSize();
-    NSRect rect = new NSRect();
+    NSRect rect = NSRect();
     rect.width = paperSize.width;
     rect.height = paperSize.height;
-    view.beginPageInRect(rect, new NSPoint());
+    view.beginPageInRect(rect, NSPoint());
     NSRect imageBounds = printInfo.imageablePageBounds();
     NSBezierPath.bezierPathWithRect(imageBounds).setClip();
     NSAffineTransform transform = NSAffineTransform.transform();
--- a/dwt/program/Program.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/program/Program.d	Fri Dec 05 16:00:41 2008 +0100
@@ -318,7 +318,7 @@
         if (fullPath !is null) {
             NSImage nsImage = workspace.iconForFile(fullPath);
             if (nsImage !is null) {
-                NSSize size = new NSSize();
+                NSSize size = NSSize();
                 size.width = size.height = 16;
                 nsImage.setSize(size);
                 NSBitmapImageRep imageRep = null;
--- a/dwt/widgets/Button.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Button.d	Fri Dec 05 16:00:41 2008 +0100
@@ -38,13 +38,14 @@
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.SWTButton;
-import dwt.internal.cocoa.id;
+import cocoa = dwt.internal.cocoa.id;
 
 import dwt.dwthelper.utils;
-import dwt.internal.cocoa.CGFloat;
+import dwt.internal.c.Carbon;
 import dwt.internal.cocoa.NSCell;
-import dwt.internal.cocoa.NSInteger;
 import dwt.internal.cocoa.NSText;
+import dwt.internal.objc.cocoa.Cocoa;
+import objc = dwt.internal.objc.runtime;
 import dwt.widgets.Composite;
 import dwt.widgets.Control;
 import dwt.widgets.Decorations;
@@ -122,11 +123,11 @@
     super (parent, checkStyle (style));
 }
 
-int accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+objc.id accessibilityAttributeValue (objc.id id, objc.SEL sel, objc.id arg0) {
     NSString nsAttributeName = new NSString(arg0);
     
     if (accessible !is null) {
-        id returnObject = accessible.internal_accessibilityAttributeValue(nsAttributeName, ACC.CHILDID_SELF);
+        cocoa.id returnObject = accessible.internal_accessibilityAttributeValue(nsAttributeName, ACC.CHILDID_SELF);
         if (returnObject !is null) return returnObject.id;
     }
     
@@ -226,7 +227,7 @@
 
     NSTextAlignment alignment;
     if ((style & DWT.CENTER) !is 0) {
-        alignment = NSCenterTextAlignment;
+        alignment = OS.NSCenterTextAlignment;
     } else if ((style & DWT.LEFT) !is 0) {
         alignment = NSLeftTextAlignment;
     } else {
@@ -292,13 +293,13 @@
         int arrowSize = Math.min((int)frame.height, (int)frame.width) / 2;
         NSGraphicsContext context = NSGraphicsContext.currentContext();
         context.saveGraphicsState();
-        NSPoint p1 = new NSPoint();
+        NSPoint p1 = NSPoint();
         p1.x = (float)Math.floor(-arrowSize / 2);
         p1.y = (float)Math.floor(-arrowSize / 2);
-        NSPoint p2 = new NSPoint();
+        NSPoint p2 = NSPoint();
         p2.x = (float)Math.ceil(arrowSize / 2);
         p2.y = p1.y;
-        NSPoint p3 = new NSPoint();
+        NSPoint p3 = NSPoint();
         p3.y = (float)Math.ceil(arrowSize / 2);
     
         NSBezierPath path = NSBezierPath.bezierPath();
--- a/dwt/widgets/Canvas.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Canvas.d	Fri Dec 05 16:00:41 2008 +0100
@@ -147,7 +147,7 @@
     if (gc.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT);
     Control control = findBackgroundControl ();
     if (control !is null) {
-        NSRect rect = new NSRect();
+        NSRect rect = NSRect();
         rect.x = x;
         rect.y = y;
         rect.width = width;
--- a/dwt/widgets/Combo.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Combo.d	Fri Dec 05 16:00:41 2008 +0100
@@ -405,14 +405,14 @@
 void createHandle () {
     if ((style & DWT.READ_ONLY) !is 0) {
         NSPopUpButton widget = cast(NSPopUpButton)new SWTPopUpButton().alloc();
-        widget.initWithFrame(new NSRect(), false);
+        widget.initWithFrame(NSRect(), false);
         widget.menu().setAutoenablesItems(false);
         widget.setTarget(widget);
         widget.setAction(OS.sel_sendSelection);
         view = widget;
     } else {
         NSComboBox widget = cast(NSComboBox)new SWTComboBox().alloc();
-        widget.initWithFrame(new NSRect());
+        widget.initWithFrame(NSRect());
         widget.setDelegate(widget);
         view = widget;
     }
@@ -1566,7 +1566,7 @@
     if (receivingFocus && selectionRange !is null) return selectionRange;
 
     /* allow the selection change to proceed */
-    NSRange result = new NSRange();
+    NSRange result = NSRange();
     OS.memmove(result, newSelectedCharRange, NSRange.sizeof);
     return result;
 }
--- a/dwt/widgets/Control.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Control.d	Fri Dec 05 16:00:41 2008 +0100
@@ -59,7 +59,7 @@
 import dwt.internal.cocoa.NSString;
 import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.OS;
-import dwt.internal.cocoa.id;
+import cocoa = dwt.internal.cocoa.id;
 
 import tango.core.Thread;
 
@@ -171,18 +171,18 @@
     createWidget ();
 }
 
-int accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
+objc.id accessibilityActionNames(objc.id id, objc.SEL sel) {
     if (accessible !is null) {
         NSArray returnValue = accessible.internal_accessibilityActionNames(ACC.CHILDID_SELF);
-        if (returnValue !is null) return returnValue.id_;
+        if (returnValue !is null) return returnValue.id;
     }
     
     return super.accessibilityActionNames(id, sel);
 }
 
-int accessibilityAttributeNames(objc.id id, objc.SEL sel) {
+objc.id 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 (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.
@@ -205,13 +205,13 @@
             }
 
             if (extraAttributes.count() > 0) {
-                int superResult = super.accessibilityAttributeNames(id, sel);
+                objc.id 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);
+                    cocoa.id currAttribute = extraAttributes.objectAtIndex(i);
                     if (!mutableAttributes.containsObject(currAttribute)) {
                         mutableAttributes.addObject(currAttribute);
                     }
@@ -225,9 +225,9 @@
     return super.accessibilityAttributeNames(id, sel);
 }
 
-int accessibilityParameterizedAttributeNames(int /*long*/ id, int /*long*/ sel) {
+objc.id accessibilityParameterizedAttributeNames(objc.id id, objc.SEL sel) {
 
-    if (id is view.id || (view instanceof NSControl && ((NSControl)view).cell() !is null && ((NSControl)view).cell().id is id)) {
+    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) {
             NSArray returnValue = accessible.internal_accessibilityParameterizedAttributeNames(ACC.CHILDID_SELF);
             if (returnValue !is null) return returnValue.id;
@@ -238,7 +238,7 @@
 }
 
 
-bool accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+bool accessibilityIsAttributeSettable(objc.id id, objc.SEL sel, int /*long*/ arg0) {
 
     // TODO: Carbon didn't support setting attributes, so for now Cocoa doesn't as well.
     //  NSString attribute = new NSString(arg0);
@@ -251,10 +251,10 @@
     return false;
 }
 
-int accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
-    id returnValue = null;
+objc.id accessibilityFocusedUIElement(objc.id id, objc.SEL sel) {
+    cocoa.id returnValue = null;
 
-    if (id is view.id || (view instanceof NSControl && ((NSControl)view).cell() !is null && ((NSControl)view).cell().id is id)) {
+    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) {
             returnValue = accessible.internal_accessibilityFocusedUIElement(ACC.CHILDID_SELF);
         }
@@ -268,10 +268,10 @@
         return returnValue.id;
 }
 
-int accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint point) {
-    id returnValue = null;
+objc.id accessibilityHitTest(objc.id id, objc.SEL sel, NSPoint point) {
+    cocoa.id returnValue = null;
 
-    if (id is view.id || (view instanceof NSControl && ((NSControl)view).cell() !is null && ((NSControl)view).cell().id is id)) {
+    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) {
             returnValue = accessible.internal_accessibilityHitTest(point, ACC.CHILDID_SELF);
         }
@@ -285,10 +285,10 @@
         return returnValue.id;
 }
 
-int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+objc.id accessibilityAttributeValue(objc.id id, objc.SEL sel, objc.id arg0) {
     NSString attribute = new NSString(arg0);
-    int returnValue = 0;
-    id returnObject = null;
+    objc.id returnValue = null;
+    cocoa.id returnObject = null;
     
     if (accessible !is null) {
         returnObject = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
@@ -305,13 +305,13 @@
     return returnValue;
 }
 
-int accessibilityAttributeValue_forParameter(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+objc.id accessibilityAttributeValue_forParameter(objc.id id, objc.SEL sel, objc.id arg0, objc.id arg1) {
     NSString attribute = new NSString(arg0);
     
-    id returnValue = null;
+    cocoa.id returnValue = null;
     
     if (accessible !is null) {
-        id parameter = new id(arg1);
+        cocoa.id parameter = new cocoa.id(arg1);
         returnValue = accessible.internal_accessibilityAttributeValue_forParameter(attribute, parameter, ACC.CHILDID_SELF);
     }
     
@@ -850,7 +850,7 @@
     releaseHandle ();
 }
 
-void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ selector) {
+void doCommandBySelector (objc.id id, objc.SEL 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) {
@@ -1006,7 +1006,7 @@
     if (image !is null && !image.isDisposed()) {
         context.saveGraphicsState();
         NSColor.colorWithPatternImage(image.handle).setFill();
-        NSPoint phase = new NSPoint();
+        NSPoint phase = NSPoint();
         NSView controlView = control.view;
         NSView contentView = controlView.window().contentView();
         phase = controlView.convertPoint_toView_(phase, contentView);
@@ -1058,7 +1058,7 @@
 //  OS.ClearKeyboardFocus (window);
 }
 
-void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void flagsChanged (objc.id id, objc.SEL sel, int /*long*/ theEvent) {
     if (view.window ().firstResponder ().id is id) {
         if ((state & SAFARI_EVENTS_FIX) is 0) {
             int mask = 0;
@@ -1555,12 +1555,12 @@
     return (view.window().firstResponder().id is view.id);
 }
 
-int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+int /*long*/ hitTest (objc.id id, objc.SEL 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) {
+bool insertText (objc.id id, objc.SEL 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) {
@@ -1600,11 +1600,11 @@
     checkWidget();
     objc.id context = null;
     if (data !is null && data.paintRect !is null) {
-        context = NSGraphicsContext.currentContext().id_;
+        context = NSGraphicsContext.currentContext().id;
     } else {
         NSGraphicsContext graphicsContext = NSGraphicsContext.graphicsContextWithWindow (view.window ());
         display.addContext (graphicsContext);
-        context = graphicsContext.id_;
+        context = graphicsContext.id;
     }
     if (data !is null) {
         int mask = DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT;
@@ -1777,7 +1777,7 @@
 }
 
 void keyDown (objc.id id, objc.SEL sel, objc.id theEvent) {
-    if (view.window ().firstResponder ().id_ is id) {
+    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);
@@ -1791,7 +1791,7 @@
     super.keyDown (id, sel, theEvent);
 }
 
-void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyUp (objc.id id, objc.SEL sel, int /*long*/ theEvent) {
     if (view.window ().firstResponder ().id is id) {
         NSEvent nsEvent = new NSEvent (theEvent);
         if (!sendKeyEvent (nsEvent, DWT.KeyUp)) return;
@@ -1803,7 +1803,7 @@
     /* Do nothing */
 }
 
-int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+int /*long*/ menuForEvent (objc.id id, objc.SEL sel, int /*long*/ theEvent) {
     NSPoint pt = NSEvent.mouseLocation();
     pt.y = (int) (display.getPrimaryFrame().height - pt.y);
     int x = cast(int) pt.x;
@@ -1818,7 +1818,7 @@
         if (x !is event.x || y !is event.y) {
             menu.setLocation (event.x, event.y);
         }
-        return menu.nsMenu.id_;
+        return menu.nsMenu.id;
     }
     return super.menuForEvent (id, sel, theEvent);
 }
@@ -1827,7 +1827,7 @@
     return parent.menuShell ();
 }
 
-void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void scrollWheel (objc.id id, objc.SEL sel, int /*long*/ theEvent) {
     if (id is view.id) {
         if (hooks (DWT.MouseWheel) || filters (DWT.MouseWheel)) {
             NSEvent nsEvent = new NSEvent(theEvent);
@@ -1841,7 +1841,7 @@
     super.scrollWheel(id, sel, theEvent);
 }
 
-void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown(objc.id id, objc.SEL sel, int /*long*/ theEvent) {
     Display display = this.display;
     display.trackingControl = this;
     super.mouseDown(id, sel, theEvent);
@@ -2610,7 +2610,7 @@
 void setBounds (int x, int y, int width, int height, bool move, bool resize) {
     NSView topView = topView();
     if (move && resize) {
-        NSRect rect = new NSRect();
+        NSRect rect = NSRect();
         rect.x = x;
         rect.y = y;
         rect.width = width;
@@ -2851,7 +2851,7 @@
 //  OS.SetControlFontStyle (control, fontStyle);
 }
 
-void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) {
+void setFrameOrigin (objc.id id, objc.SEL sel, NSPoint point) {
     NSView topView = topView ();
     if (topView.id !is id) {
         super.setFrameOrigin(id, sel, point);
@@ -2864,7 +2864,7 @@
     }
 }
 
-void setFrameSize (int /*long*/ id, int /*long*/ sel, NSSize size) {
+void setFrameSize (objc.id id, objc.SEL sel, NSSize size) {
     NSView topView = topView ();
     if (topView.id !is id) {
         super.setFrameSize(id, sel, size);
--- a/dwt/widgets/DateTime.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/DateTime.d	Fri Dec 05 16:00:41 2008 +0100
@@ -159,7 +159,7 @@
 
 void createHandle () {
     NSDatePicker widget = cast(NSDatePicker)new SWTDatePicker().alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
     int pickerStyle = OS.NSTextFieldAndStepperDatePickerStyle;
     int elementFlags = 0;
     if ((style & DWT.CALENDAR) !is 0) {
--- a/dwt/widgets/Display.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Display.d	Fri Dec 05 16:00:41 2008 +0100
@@ -75,14 +75,13 @@
 import dwt.dwthelper.Runnable;
 import dwt.dwthelper.System;
 import dwt.dwthelper.utils;
-
-import dwt.internal.c.carboncore.MacTypes;
-import dwt.internal.cocoa.NSInteger;
+import dwt.internal.c.Carbon;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
-
 import dwt.widgets.Caret;
 import dwt.widgets.ColorDialog;
 import dwt.widgets.Control;
+import dwt.widgets.Decorations;
 import dwt.widgets.Dialog;
 import dwt.widgets.Event;
 import dwt.widgets.EventTable;
@@ -96,8 +95,6 @@
 import dwt.widgets.Tray;
 import dwt.widgets.Widget;
 
-//import mambo.io;
-
 /**
  * Instances of this class are responsible for managing the
  * connection between DWT and the underlying operating
@@ -202,7 +199,7 @@
     Menu[] menus, popups;
 
     NSApplication application;
-    int /*long*/ applicationClass;
+    objc.Class applicationClass;
     NSImage dockImage;
     bool isEmbedded;
     
@@ -214,10 +211,8 @@
     bool idle;
     static final short DWT_IDLE_TYPE = 1;
 
-    int[] screenID = new int[32];
-    NSPoint[] screenCascade = new NSPoint[32];
-    static Callback dialogCallback3;
-    static Callback applicationCallback2, applicationCallback3, applicationCallback6;
+    int[] screenID;
+    NSPoint[] screenCascade;
     
     /* Menus */
 //  Menu menuBar;
@@ -236,86 +231,86 @@
     
     /* Key Mappings. */
     static int [] [] KeyTable = [
-
+    
          /* Keyboard and Mouse Masks */
-        {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 */
-        {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 */
-        {51,    DWT.BS},
-        {36,    DWT.CR},
-        {117,   DWT.DEL},
-        {53,    DWT.ESC},
-        {76,    DWT.LF},
-        {48,    DWT.TAB},   
-         
-         /* Functions Keys */
-        {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},
-
-         /* Other keys */
-        {57,    DWT.CAPS_LOCK},
-        {71,    DWT.NUM_LOCK},
+         [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 */
+         [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 */
+         [51,    DWT.BS],
+         [36,    DWT.CR],
+         [117,   DWT.DEL],
+         [53,    DWT.ESC],
+         [76,    DWT.LF],
+         [48,    DWT.TAB],   
+          
+          /* Functions Keys */
+         [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],
+    
+          /* Other keys */
+         [57,    DWT.CAPS_LOCK],
+         [71,    DWT.NUM_LOCK],
 //       [??,    DWT.SCROLL_LOCK],
 //       [??,    DWT.PAUSE],
 //       [??,    DWT.BREAK],
 //       [??,    DWT.PRINT_SCREEN],
-        {114, 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$
+    static const String SWT_OBJECT = "SWT_OBJECT"; //$NON-NLS-1$
 
     /* Multiple Displays. */
     static Display Default;
@@ -507,7 +502,7 @@
 
 void addWidget (NSObject view, Widget widget) {
     if (view is null) return;
-    OS.object_setInstanceVariable (view.id, DWT_OBJECT, widget.jniRef);
+    OS.object_setInstanceVariable (view.id, SWT_OBJECT, widget.jniRef);
 }
 
 /**
@@ -555,14 +550,14 @@
 
 void cascadeWindow (NSWindow window, NSScreen screen) {
     NSDictionary dictionary = screen.deviceDescription();
-    int screenNumber = new NSNumber(dictionary.objectForKey(NSString.stringWith("NSScreenNumber")).id).intValue();
+    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 = NSPoint();
         cascade.x = frame.x;
         cascade.y = frame.y + frame.height;
     }
@@ -621,6 +616,8 @@
  */
 public this (DeviceData data) {
     super (data);
+    screenID = new int[32];
+    screenCascade = new NSPoint[32];
     cursors = new Cursor [DWT.CURSOR_HAND + 1];
     Displays = new Display [4];
     timerDelegate = cast(SWTWindowDelegate)(new SWTWindowDelegate()).alloc().init();
@@ -646,6 +643,21 @@
             
         }
     };
+    
+    hoverTimer = new class(currentControl) Runnable {
+        Control currentControl;
+        
+        this (Control currentControl)
+        {
+            this.currentControl = currentControl;
+        }
+        
+        public void run () {
+            if (currentControl !is null && !currentControl.isDisposed()) {
+                currentControl.sendMouseEvent (null, DWT.MouseHover, trackingControl !is null);
+            }
+        }
+    };
 }
 
 static void checkDisplay (Thread thread, bool multiple) {
@@ -777,20 +789,20 @@
          * used) but both functions must be called in order for
          * windows to come to the front.
          */
-    ProcessSerialNumber* psn;
+        ProcessSerialNumber* psn;
         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) {
+            char* ptr = OS.getenv (ascii ("APP_NAME_" + pid));
+            if (ptr is null && APP_NAME !is null) {
                 ptr = NSString.stringWith(APP_NAME).UTF8String();   
             }
-            if (ptr !is 0) OS.CPSSetProcessName (psn, ptr);
+            if (ptr !is null) OS.CPSSetProcessName (psn, ptr);
             OS.TransformProcessType (psn, OS.kProcessTransformToForegroundApplication);
             OS.SetFrontProcess (psn);
             ptr = OS.getenv (ascii ("APP_ICON_" + pid));
-            if (ptr !is 0) {
+            if (ptr !is null) {
                 NSString path = NSString.stringWithUTF8String (ptr);
-                NSImage image = (NSImage) new NSImage().alloc();
+                NSImage image = cast(NSImage) (new NSImage()).alloc();
                 image = image.initByReferencingFile(path);
                 dockImage = image;
                 application.setApplicationIconImage(image);
@@ -798,18 +810,11 @@
         }
 
         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);
+        objc.Class cls;
+        if ((cls = OS.objc_lookUpClass (className)) is null) {
+            objc.IMP proc2 = cast(objc.IMP) &applicationProc2;
+            objc.IMP proc3 = cast(objc.IMP) &applicationProc3;
+            objc.IMP proc6 = cast(objc.IMP) &applicationProc6;
             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");
@@ -1003,12 +1008,12 @@
 public Shell getActiveShell () {
     checkDevice ();
     NSArray windows = application.windows();
-    int count = (int)/*64*/windows.count();
+    int count = cast(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) {
+            if (cast(Shell) widget) {
                 return cast(Shell)widget;
             }
         }
@@ -1034,15 +1039,15 @@
 }
 
 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++) {
+    NSRect primaryFrame = (new NSScreen(screens.objectAtIndex(0))).frame();
+    CGFloat minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
+    CGFloat minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
+    NSUInteger count = screens.count();
+    for (NSUInteger 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);
+        CGFloat x1 = frame.x, x2 = frame.x + frame.width;
+        CGFloat 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;
@@ -1052,7 +1057,7 @@
         if (y1 > maxY) maxY = y1;
         if (y2 > maxY) maxY = y2;
     }
-    return new Rectangle ((int)minX, (int)minY, (int)(maxX - minX), (int)(maxY - minY));
+    return new Rectangle (cast(int)minX, cast(int)minY, cast(int)(maxX - minX), cast(int)(maxY - minY));
 }
 
 /**
@@ -1091,8 +1096,8 @@
     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);
+    CGFloat y = frame.height - (visibleFrame.y + visibleFrame.height);
+    return new Rectangle(cast(int)visibleFrame.x, cast(int)y, cast(int)visibleFrame.width, cast(int)visibleFrame.height);
 }
 
 /**
@@ -1225,11 +1230,11 @@
 }
 
 /**
- * Returns the button dismissal alignment, one of <code>LEFT</code> or <code>RIGHT</code>.
- * The button dismissal alignment is the ordering that should be used when positioning the
+ * Returns the button dismissal align_ment, one of <code>LEFT</code> or <code>RIGHT</code>.
+ * The button dismissal align_ment is the ordering that should be used when positioning the
  * default dismissal button for a dialog.  For example, in a dialog that contains an OK and
- * CANCEL button, on platforms where the button dismissal alignment is <code>LEFT</code>, the
- * button ordering should be OK/CANCEL.  When button dismissal alignment is <code>RIGHT</code>,
+ * CANCEL button, on platforms where the button dismissal align_ment is <code>LEFT</code>, the
+ * button ordering should be OK/CANCEL.  When button dismissal align_ment is <code>RIGHT</code>,
  * the button ordering should be CANCEL/OK.
  *
  * @return the button dismissal order
@@ -1293,8 +1298,8 @@
         if (view !is null) {
             do {
                 Widget widget = GetWidget (view.id);
-                if (widget instanceof Control) {
-                    return (Control)widget;
+                if (cast(Control)widget) {
+                    return cast(Control)widget;
                 }
                 view = view.superview();
             } while (view !is null);
@@ -1404,19 +1409,19 @@
 public dwt.widgets.Monitor.Monitor [] getMonitors () {
     checkDevice ();
     NSArray screens = NSScreen.screens();
-    NSRect primaryFrame = new NSScreen(screens.objectAtIndex(0)).frame();
-    int count = (int)/*64*/screens.count();
+    NSRect primaryFrame = (new NSScreen(screens.objectAtIndex(0))).frame();
+    int count = cast(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 = (int)(primaryFrame.height - (frame.y + frame.height));
+        monitor.y = cast(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 = (int)(primaryFrame.height - (visibleFrame.y + visibleFrame.height));
+        monitor.clientY = cast(int)(primaryFrame.height - (visibleFrame.y + visibleFrame.height));
         monitor.clientWidth = cast(int)visibleFrame.width;
         monitor.clientHeight = cast(int)visibleFrame.height;
         monitors [i] = monitor;
@@ -1426,7 +1431,7 @@
 
 NSRect getPrimaryFrame () {
     NSArray screens = NSScreen.screens();
-    return new NSScreen(screens.objectAtIndex(0)).frame();
+    return (new NSScreen(screens.objectAtIndex(0))).frame();
 }
 
 /**
@@ -1443,12 +1448,12 @@
     NSScreen screen = new NSScreen(screens.objectAtIndex(0));
     NSRect frame = screen.frame();
     monitor.x = cast(int)frame.x;
-    monitor.y = (int)(frame.height - (frame.y + frame.height));
+    monitor.y = cast(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 = (int)(frame.height - (visibleFrame.y + visibleFrame.height));
+    monitor.clientY = cast(int)(frame.height - (visibleFrame.y + visibleFrame.height));
     monitor.clientWidth = cast(int)visibleFrame.width;
     monitor.clientHeight = cast(int)visibleFrame.height;
     return monitor;
@@ -1469,12 +1474,12 @@
     checkDevice ();
     NSArray windows = application.windows();
     int index = 0;
-    Shell [] result = new Shell [(int)/*64*/windows.count()];
+    Shell [] result = new Shell [windows.count()];
     for (int i = 0; i < result.length; i++) {
         NSWindow window = new NSWindow(windows.objectAtIndex(i));
         Widget widget = getWidget(window.contentView());
-        if (widget instanceof Shell) {
-            result[index++] = (Shell)widget;
+        if (cast(Shell) widget) {
+            result[index++] = cast(Shell)widget;
         }
     }
     if (index is result.length) return result;
@@ -1570,7 +1575,7 @@
     if (color is null) return super.getSystemColor(id);
     color = color.colorUsingColorSpace(NSColorSpace.deviceRGBColorSpace());
     if (color is null) return super.getSystemColor(id);
-    float /*double*/[] components = new float /*double*/[(int)/*64*/color.numberOfComponents()];
+    CGFloat[] components = new CGFloat[color.numberOfComponents()];
     color.getComponents(components);    
     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]]);
 }
@@ -1722,16 +1727,16 @@
     return 560;
 }
 
-Widget getWidget (int /*long*/ id) {
+Widget getWidget (objc.id 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]);
+static Widget GetWidget (objc.id id) {
+    if (id is null) return null;
+    void* jniRef;
+    OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
+    if (jniRef is null) return null;
+    return cast(Widget)OS.JNIGetObject(jniRef);
 }
 
 Widget getWidget (NSView view) {
@@ -1757,7 +1762,7 @@
         application.finishLaunching();
     }
         
-    timerDelegate = (SWTWindowDelegate)new SWTWindowDelegate().alloc().init();
+    timerDelegate = cast(SWTWindowDelegate)(new SWTWindowDelegate()).alloc().init();
     
     NSTextView textView = cast(NSTextView)(new NSTextView()).alloc();
     textView.initWithFrame (NSRect ());
@@ -1769,11 +1774,8 @@
 void initApplicationDelegate() {
     String className = "SWTApplicationDelegate";
     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);
+        objc.IMP appProc3 = cast(objc.IMP) &applicationDelegateProc;
+        objc.Class 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, "@:@");
@@ -1789,7 +1791,7 @@
     application.setDelegate(applicationDelegate);
 }
 
-void addEventMethods (int /*long*/ cls, int /*long*/ proc2, int /*long*/ proc3, int /*long*/ drawRectProc) {
+void addEventMethods (objc.Class cls, objc.IMP proc2, objc.IMP proc3, objc.IMP 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, "@:@");
@@ -1810,12 +1812,12 @@
     OS.class_addMethod(cls, OS.sel_drawRect_, drawRectProc, "@:{NSRect}");
 }
 
-void addFrameMethods(int /*long*/ cls, int /*long*/ setFrameOriginProc, int /*long*/ setFrameSizeProc) {
+void addFrameMethods(objc.Class cls, objc.IMP setFrameOriginProc, objc.IMP 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) {
+void addAccessibilityMethods(objc.Class cls, objc.IMP proc2, objc.IMP proc3, objc.IMP proc4, objc.IMP 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, "@:");
@@ -1829,10 +1831,10 @@
     OS.class_addMethod(cls, OS.sel_accessibilityActionDescription_, proc3, "@:@");  
 }
 
-int registerCellSubclass(int cellClass, int size, int align, String types) {
+objc.Class registerCellSubclass(objc.Class 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);
+    objc.Class cls = OS.objc_allocateClassPair(cellClass, "DWT" + cellClassName, 0);   
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     OS.objc_registerClassPair(cls);
     return cls;
 }
@@ -1840,34 +1842,34 @@
 void initClasses () {
     if (OS.objc_lookUpClass ("SWTView") !is null) return;
     
-    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 dialogProc3 = &dialogProc3;
+    objc.IMP proc3 = &windowDelegateProc3;
+    objc.IMP proc2 = windowDelegateProc2.getAddress();
+    objc.IMP proc4 = windowDelegateProc4.getAddress();
+    objc.IMP proc5 = windowDelegateProc5.getAddress();
+    objc.IMP proc6 = windowDelegateProc6.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 drawInteriorWithFrameInViewProc = OS.drawInteriorWithFrame_inView_CALLBACK (proc4);
+    objc.IMP setFrameOriginProc = OS.setFrameOrigin_CALLBACK(proc3);
+    objc.IMP setFrameSizeProc = OS.setFrameSize_CALLBACK(proc3);
+    objc.IMP hitTestProc = OS.hitTest_CALLBACK(proc3);
+    objc.IMP markedRangeProc = OS.markedRange_CALLBACK(proc2);
+    objc.IMP selectedRangeProc = OS.selectedRange_CALLBACK(proc2);
+    objc.IMP highlightSelectionInClipRectProc = OS.highlightSelectionInClipRect_CALLBACK(proc3);
+    objc.IMP setMarkedText_selectedRangeProc = OS.setMarkedText_selectedRange_CALLBACK(proc4);
+    objc.IMP attributedSubstringFromRangeProc = OS.attributedSubstringFromRange_CALLBACK(proc3);
+    objc.IMP characterIndexForPointProc = OS.characterIndexForPoint_CALLBACK(proc3);
+    objc.IMP firstRectForCharacterRangeProc = OS.firstRectForCharacterRange_CALLBACK(proc3);    
+    objc.IMP textWillChangeSelectionProc = OS.textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK(proc5);
+    objc.IMP accessibilityHitTestProc = OS.accessibilityHitTest_CALLBACK(proc3);
     
     String types = "*";
-    int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF is 4 ? 2 : 3;
+    size_t size = C.PTR_SIZEOF, align_ = C.PTR_SIZEOF is 4 ? 2 : 3;
 
     String className = "SWTWindowDelegate";
-    int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    objc.Class cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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, "@:@");
@@ -1879,7 +1881,7 @@
     
     className = "SWTPanelDelegate";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSObject, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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, "@:@");
@@ -1887,7 +1889,7 @@
     
     className = "SWTMenu";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSMenu, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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, "@:@@");
@@ -1897,7 +1899,7 @@
     className = "SWTView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSView, className, 0);
     OS.class_addProtocol(cls, OS.objc_getProtocol("NSTextInput"));
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     OS.class_addMethod(cls, OS.sel_isFlipped, proc2, "@:");
     OS.class_addMethod(cls, OS.sel_acceptsFirstResponder, proc2, "@:");
     OS.class_addMethod(cls, OS.sel_isOpaque, proc2, "@:");
@@ -1923,7 +1925,7 @@
     
     className = "SWTScrollView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSScrollView, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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_pageDown_, proc3, "@:@");
@@ -1936,20 +1938,20 @@
     
     className = "SWTButton";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSButton, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
     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);
+    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_addIvar(cls, SWT_OBJECT, size, cast(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_numberOfRowsInTableView_, proc3, "@:@");
@@ -1968,25 +1970,25 @@
 
     className = "SWTTableHeaderCell";
     cls = OS.objc_allocateClassPair (OS.class_NSTableHeaderCell, className, 0);
-    OS.class_addIvar (cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar (cls, SWT_OBJECT, size, cast(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_addIvar (cls, SWT_OBJECT, size, cast(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_addIvar(cls, SWT_OBJECT, size, cast(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_addIvar(cls, SWT_OBJECT, size, cast(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_, proc3, "@:@");
@@ -2009,12 +2011,12 @@
 
     className = "SWTTreeItem";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSObject, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     OS.objc_registerClassPair(cls);
 
     className = "SWTTabView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSTabView, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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);
@@ -2024,7 +2026,7 @@
     
     className = "SWTBox";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSBox, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     addEventMethods(cls, proc2, proc3, drawRectProc);
     addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
     addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2032,7 +2034,7 @@
     
     className = "SWTProgressIndicator";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSProgressIndicator, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     addEventMethods(cls, proc2, proc3, drawRectProc);
     addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
     addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2040,32 +2042,32 @@
 
     className = "SWTSlider";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSSlider, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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);
+    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_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
     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);
+    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_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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_textDidChange_, proc3, "@:@");
@@ -2076,13 +2078,13 @@
     addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
     OS.objc_registerClassPair(cls);
     
-    cls = registerCellSubclass(NSComboBox.cellClass(), size, align, types);
+    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_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
     addEventMethods(cls, proc2, proc3, drawRectProc);
     addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
@@ -2091,32 +2093,32 @@
 
     className = "SWTImageView";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSImageView, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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);
+    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_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
     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);
+    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_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
     addEventMethods(cls, proc2, proc3, drawRectProc);
     addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
@@ -2125,13 +2127,13 @@
     
     className = "SWTMenuItem";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSMenuItem, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     addEventMethods(cls, proc2, proc3, drawRectProc);
     addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
     addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2151,7 +2153,7 @@
     
     className = "SWTTextField";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSTextField, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     addEventMethods(cls, proc2, proc3, drawRectProc);
     addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
     addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2160,13 +2162,13 @@
     OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
     OS.objc_registerClassPair(cls);
     
-    cls = registerCellSubclass(NSTextField.cellClass(), size, align, types);
+    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);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     addEventMethods(cls, proc2, proc3, drawRectProc);
     addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
     addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2175,13 +2177,13 @@
     OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
     OS.objc_registerClassPair(cls);
     
-    cls = registerCellSubclass(NSSearchField.cellClass(), size, align, types);
+    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);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(byte)align_, types);
     addEventMethods(cls, proc2, proc3, drawRectProc);
     addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
     addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2194,7 +2196,7 @@
     
     className = "SWTWindow";
     cls = OS.objc_allocateClassPair(cast(objc.Class) OS.class_NSWindow, className, 0);
-    OS.class_addIvar(cls, DWT_OBJECT, size, (byte)align, types);
+    OS.class_addIvar(cls, SWT_OBJECT, size, cast(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, "@:");
@@ -2226,8 +2228,8 @@
 public objc.id internal_new_GC (GCData data) {
     if (isDisposed()) DWT.error(DWT.ERROR_DEVICE_DISPOSED);
     if (screenWindow is null) {
-        NSWindow window = (NSWindow) new NSWindow ().alloc ();
-        NSRect rect = new NSRect();
+        NSWindow window = cast(NSWindow) (new NSWindow ()).alloc ();
+        NSRect rect = NSRect();
         window = window.initWithContentRect(rect, OS.NSBorderlessWindowMask, OS.NSBackingStoreBuffered, false);
         window.setReleasedWhenClosed(false);
         screenWindow = window;
@@ -2724,7 +2726,7 @@
     checkDevice ();
     if (loopCounter is 0) {
         pool.release();
-        pool = (NSAutoreleasePool)new NSAutoreleasePool().alloc().init();
+        pool = cast(NSAutoreleasePool)(new NSAutoreleasePool()).alloc().init();
     }
     loopCounter ++;
     bool events = false;
@@ -2738,7 +2740,7 @@
         events = true;
         application.sendEvent(event);
     }
-//      NSEvent event = NSEvent.otherEventWithType(OS.NSApplicationDefined, new NSPoint(), 0, 0, 0, null, DWT_IDLE_TYPE, 0, 0);
+//      NSEvent event = NSEvent.otherEventWithType(OS.NSApplicationDefined, NSPoint(), 0, 0, 0, null, DWT_IDLE_TYPE, 0, 0);
 //      application.postEvent(event, false);
 //      idle = true;
 //      application.run();
@@ -2951,10 +2953,10 @@
 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);
+    OS.object_getInstanceVariable(view.id, SWT_OBJECT, jniRef);
     if (jniRef[0] is 0) return null;
-    Widget widget = (Widget)OS.JNIGetObject(jniRef[0]);
-    OS.object_setInstanceVariable(view.id, DWT_OBJECT, 0);
+    Widget widget = cast(Widget)OS.JNIGetObject(jniRef[0]);
+    OS.object_setInstanceVariable(view.id, SWT_OBJECT, 0);
     return widget;
 }
 
@@ -3088,13 +3090,8 @@
 }
 
 //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);
-        }
-    }
-};
+Runnable hoverTimer;
+
 //TODO - use custom timer instead of timerExec
 Runnable caretTimer;
     
@@ -3188,9 +3185,9 @@
     //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];
+        Object [] data = cast(Object [])value;
+        NSObject object = cast(NSObject)data [0];
+        Widget widget = cast(Widget)data [1];
         if (widget is null) {
             removeWidget (object);
         } else {
@@ -3558,8 +3555,8 @@
     if (view !is null) {
         do {
             Widget widget = getWidget (view);
-            if (widget instanceof Control) {
-                control = (Control)widget;
+            if (cast(Control) widget) {
+                control = cast(Control)widget;
                 break;
             }
             view = view.superview();
@@ -3571,13 +3568,13 @@
     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();
+objc.id applicationNextEventMatchingMask (objc.id id, objc.SEL sel, objc.id mask, objc.id expiration, objc.id mode, objc.id dequeue) {
+    objc_super super_struct = 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) {
+    objc.id result = OS.objc_msgSendSuper(super_struct, sel, mask, expiration, mode, dequeue !is null);
+    if (result !is null) {
+        if (trackingControl !is null && dequeue !is null) {
             NSEvent nsEvent = new NSEvent(result);
             applicationSendMouseEvent(nsEvent, true);
         }
@@ -3588,7 +3585,7 @@
 void applicationSendMouseEvent (NSEvent nsEvent, bool send) {
     if (send) runDeferredEvents();
     bool up = false;
-    int type = (int)/*64*/nsEvent.type();
+    int type = cast(int)/*64*/nsEvent.type();
     switch (type) {
         case OS.NSLeftMouseDown:
         case OS.NSRightMouseDown:
@@ -3645,7 +3642,7 @@
     }
 }
 
-void applicationSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void applicationSendEvent (objc.id id, objc.SEL sel, objc.id event) {
     NSEvent nsEvent = new NSEvent(event);
     int type = nsEvent.type ();
     bool beep = false;
@@ -3668,7 +3665,7 @@
         case OS.NSScrollWheel:
             NSWindow window = nsEvent.window ();
             if (window !is null) {
-                Shell shell = (Shell) getWidget (window.id);
+                Shell shell = cast(Shell) getWidget (window.id);
                 if (shell !is null && shell.getModalShell () !is null) {
                     if (beep) beep ();  
                     return;
@@ -3677,7 +3674,7 @@
             break;
     }
     applicationSendMouseEvent (nsEvent, false);
-    objc_super super_struct = new objc_super ();
+    objc_super super_struct = objc_super ();
     super_struct.receiver = id;
     super_struct.super_class = OS.objc_msgSend (id, OS.sel_superclass);
     OS.objc_msgSendSuper (super_struct, sel, event);
@@ -3689,42 +3686,44 @@
 //  application.stop(null);
 }
 
+extern (C):
+
 // #245724: [NSApplication isRunning] must return true to allow the AWT to load correctly.
-static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel) {
+static objc.id applicationProc2(objc.id id, objc.SEL sel) {
     //TODO optimize getting the display
     Display display = getCurrent ();
-    if (display is null) return 0;
+    if (display is null) return null;
     if (sel is OS.sel_isRunning) {
-        return display.isDisposed() ? 0 : 1;
+        return cast(objc.id) (display.isDisposed() ? null : 1);
     }
-    return 0;
+    return null;
 }
 
-static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+static objc.id applicationProc3(objc.id id, objc.SEL sel, objc.id event) {
     //TODO optimize getting the display
     Display display = getCurrent ();
-    if (display is null) return 0;
+    if (display is null) return null;
     if (sel is OS.sel_sendEvent_) {
         display.applicationSendEvent (id, sel, event);
-        return 0;
+        return null;
     }
-    return 0;
+    return null;
 }
 
-static objc.id applicationProc(objc.id id, objc.SEL sel, objc.id arg0, objc.id arg1, objc.id arg2, objc.id arg3) {
+static objc.id applicationProc6(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;
+    return null;
 }
 
 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;
+    if (display is null) return null;
     id applicationDelegate = display.applicationDelegate;
     NSApplication application = display.application;
     if (sel is OS.sel_applicationWillFinishLaunching_) {
@@ -3746,45 +3745,43 @@
                 ni.setTitle(title);
             }
         }
-    } else if (sel == OS.sel_terminate_) {
+    } else if (sel is OS.sel_terminate_) {
         application.terminate(application);
-    } else if (sel == OS.sel_orderFrontStandardAboutPanel_) {
+    } else if (sel is OS.sel_orderFrontStandardAboutPanel_) {
 //      Event event = new Event ();
-//      sendEvent (DWT.ABORT, event);
-    } else if (sel == OS.sel_hideOtherApplications_) {
+//      sendEvent (SWT.ABORT, event);
+    } else if (sel is OS.sel_hideOtherApplications_) {
         application.hideOtherApplications(application);
-    } else if (sel == OS.sel_hide_) {
+    } else if (sel is OS.sel_hide_) {
         application.hide(application);
-    } else if (sel == OS.sel_unhideAllApplications_) {
+    } else if (sel is OS.sel_unhideAllApplications_) {
         application.unhideAllApplications(application);
-    } else if (sel == OS.sel_applicationShouldTerminate_) {
+    } else if (sel is OS.sel_applicationShouldTerminate_) {
         if (!display.disposing) {
             Event event = new Event ();
-            display.sendEvent (DWT.Close, event);
+            display.sendEvent (SWT.Close, event);
             if (event.doit) {
-                return cast(objc.id) OS.NSTerminateNow;
+                return OS.NSTerminateNow;
             }
         }
-        return cast(objc.id) OS.NSTerminateCancel;
-    } else if (sel == OS.sel_applicationWillTerminate_) {
+        return OS.NSTerminateCancel;
+    } else if (sel is OS.sel_applicationWillTerminate_) {
         display.dispose();
-    } else if (sel == OS.sel_applicationWillResignActive_) {
+    } else if (sel is OS.sel_applicationWillResignActive_) {
         Shell[] shells = display.getShells();
         for (int i = 0; i < shells.length; i++) {
             shells[i].clearLevel();
         }
     }
-    }
+    return null;
 }
 
-static objc.id dialogProc(objc.id id, objc.SEL selector, objc.id arg0) {
-    String sel = fromStringz(selector);
-    
-    objc.id jniRef;
-    OS.object_getInstanceVariable(id, DWT_OBJECT, jniRef);
-    if (jniRef is null) return 0;
+static objc.id dialogProc(objc.id id, objc.SEL selector, objc.id arg0) { 
+    void* jniRef;
+    OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
+    if (jniRef is null) return null;
     if (sel == OS.sel_changeColor_) {
-        ColorDialog dialog = (ColorDialog)OS.JNIGetObject(jniRef);
+        ColorDialog dialog = cast(ColorDialog)OS.JNIGetObject(jniRef);
     if (jniRef is null) return null;
         dialog.changeColor(id, sel, arg0);
     } else if (sel == OS.sel_changeFont_) {
@@ -3792,7 +3789,7 @@
         if (dialog is null) return null;
         dialog.changeFont(id, sel, arg0);
     } else if (sel == OS.sel_windowWillClose_) {
-        Object object = OS.JNIGetObject(jniRef[0]);
+        Object object = OS.JNIGetObject(jniRef);
         if (cast(FontDialog) object) {
             (cast(FontDialog)object).windowWillClose(id, sel, arg0);
         } else if (cast(ColorDialog) object) {
@@ -3802,28 +3799,26 @@
     return null;
 }
 	
-static int objc.id windowDelegateProc2(objc.id id, objc.SEL selector) {
-    String sel = fromStringz(selector);
-
+static objc.id windowDelegateProc2(objc.id id, objc.SEL selector) {
     Widget widget = GetWidget(id);
     if (widget is null) return null;
-    if (sel == OS.sel_sendSelection) {
+    if (sel is OS.sel_sendSelection) {
         widget.sendSelection();
-    } else if (sel == OS.sel_sendDoubleSelection) {
+    } else if (sel is OS.sel_sendDoubleSelection) {
         widget.sendDoubleSelection();
-    } else if (sel == OS.sel_sendVerticalSelection) {
+    } else if (sel is OS.sel_sendVerticalSelection) {
         widget.sendVerticalSelection();
-    } else if (sel == OS.sel_sendHorizontalSelection) {
+    } else if (sel is OS.sel_sendHorizontalSelection) {
         widget.sendHorizontalSelection();
-    } else if (sel == OS.sel_acceptsFirstResponder) {
+    } else if (sel is 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) {
+    } else  if (sel is OS.sel_isFlipped) {
         return widget.isFlipped(id, sel) ? cast(objc.id) 1 : null;
-    } else if (sel == OS.sel_isOpaque) {
+    } else if (sel is OS.sel_isOpaque) {
         return widget.isOpaque(id, sel) ? cast(objc.id) 1 : null;
     } else if (sel is OS.sel_unmarkText) {
         //TODO not called?
@@ -3832,19 +3827,19 @@
     } 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);
+        objc.id 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);
+        objc.id 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;
+        return widget.hasMarkedText (id, sel) ? cast(objc.id) 1 : null;
     } else if (sel is OS.sel_canBecomeKeyWindow) {
-        return widget.canBecomeKeyWindow (id, sel) ? 1 : 0;
+        return widget.canBecomeKeyWindow (id, sel) ? cast(objc.id) 1 : null;
     } else if (sel is OS.sel_accessibilityActionNames) {
         return widget.accessibilityActionNames(id, sel);
     } else if (sel is OS.sel_accessibilityAttributeNames) {
@@ -3854,77 +3849,72 @@
     } 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 (widget.accessibilityIsIgnored(id, sel) ? cast(objc.id) 1 : null);
     }
     return null;
 }
 
 static objc.id windowDelegateProc3(objc.id ID, objc.SEL selector, objc.id arg0) {
-    String sel = fromStringz(selector);
-
-    if (sel == OS.sel_timerProc_) {
+    if (sel is 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_);
     }
     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 ());
+    if (widget is null && (sel is OS.sel_keyDown_ ||sel is OS.sel_keyUp_ ||sel is OS.sel_insertText_ ||sel is OS.sel_doCommandBySelector_))  {
+        widget = GetFocusControl ((new NSView (id)).window ());
     }
-    if (widget is null) return null;
-    if (sel == OS.sel_windowWillClose_) {
+    if (widget is null) return 0;
+    if (sel is OS.sel_windowWillClose_) {
         widget.windowWillClose(id, sel, arg0);
-    } else if (sel == OS.sel_drawRect_) {
-        NSRect rect = NSRect();
-        OS.memmove(&rect, arg0_, NSRect.sizeof);
+    } else if (sel is OS.sel_drawRect_) {
+        NSRect rect = new NSRect();
+        OS.memmove(rect, arg0, NSRect.sizeof);
         widget.drawRect(id, sel, rect);
-    } else if (sel == OS.sel_setFrameOrigin_) {
-        NSPoint point = NSPoint();
+    } else if (sel is OS.sel_setFrameOrigin_) {
+        NSPoint point = new NSPoint();
         OS.memmove(point, arg0, NSPoint.sizeof);
         widget.setFrameOrigin(id, sel, point);
-    } else if (sel == OS.sel_setFrameSize_) {
+    } else if (sel is OS.sel_setFrameSize_) {
         NSSize size = new NSSize();
         OS.memmove(size, arg0, NSSize.sizeof);
         widget.setFrameSize(id, sel, size);
-    } else if (sel == OS.sel_hitTest_) {
+    } else if (sel is 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_) {
+    } else if (sel is OS.sel_windowShouldClose_) {
+        return widget.windowShouldClose(id, sel, arg0) ? cast(objc.id) 1 : null;
+    } else if (sel is OS.sel_mouseDown_) {
         widget.mouseDown(id, sel, arg0);
-    } else if (sel == OS.sel_keyDown_) {
+    } else if (sel is OS.sel_keyDown_) {
         widget.keyDown(id, sel, arg0);
-    } else if (sel == OS.sel_keyUp_) {
+    } else if (sel is OS.sel_keyUp_) {
         widget.keyUp(id, sel, arg0);
-    } else if (sel == OS.sel_flagsChanged_) {
+    } else if (sel is OS.sel_flagsChanged_) {
         widget.flagsChanged(id, sel, arg0);
-    } else if (sel == OS.sel_mouseUp_) {
+    } else if (sel is OS.sel_mouseUp_) {
         widget.mouseUp(id, sel, arg0);
-    } else if (sel == OS.sel_rightMouseDown_) {
+    } else if (sel is OS.sel_rightMouseDown_) {
         widget.rightMouseDown(id, sel, arg0);
-    } else if (sel == OS.sel_rightMouseUp_) {
+    } else if (sel is OS.sel_rightMouseUp_) {
         widget.rightMouseUp(id, sel, arg0);
-    } else if (sel == OS.sel_otherMouseDown_) {
+    } else if (sel is OS.sel_otherMouseDown_) {
         widget.otherMouseDown(id, sel, arg0);
-    } else if (sel == OS.sel_otherMouseUp_) {
+    } else if (sel is OS.sel_otherMouseUp_) {
         widget.otherMouseUp(id, sel, arg0);
-    } else if (sel == OS.sel_mouseMoved_) {
+    } else if (sel is OS.sel_mouseMoved_) {
         widget.mouseMoved(id, sel, arg0);
-    } else if (sel == OS.sel_mouseDragged_) {
+    } else if (sel is OS.sel_mouseDragged_) {
         widget.mouseDragged(id, sel, arg0);
-    } else if (sel == OS.sel_mouseEntered_) {
+    } else if (sel is OS.sel_mouseEntered_) {
         widget.mouseEntered(id, sel, arg0);
-    } else if (sel == OS.sel_mouseExited_) {
+    } else if (sel is OS.sel_mouseExited_) {
         widget.mouseExited(id, sel, arg0);
-    } else if (sel == OS.sel_menuForEvent_) {
+    } else if (sel is OS.sel_menuForEvent_) {
         return widget.menuForEvent(id, sel, arg0);
-    } else if (sel == OS.sel_numberOfRowsInTableView_) {
+    } else if (sel is OS.sel_numberOfRowsInTableView_) {
         return widget.numberOfRowsInTableView(id, sel, arg0);
     } else if (sel is OS.sel_comboBoxSelectionDidChange_) {
         widget.comboBoxSelectionDidChange(id, sel, arg0);
@@ -3969,7 +3959,7 @@
     } 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);
+        objc.id result = OS.malloc (NSRect.sizeof);
         OS.memmove (result, rect, NSRect.sizeof);
         return result;
     } else if (sel is OS.sel_insertText_) {
@@ -3987,13 +3977,13 @@
     } 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);
+        return (widget.accessibilityIsAttributeSettable(id, sel, arg0) ? cast(objc.id) 1 : null);
     } 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;
+        return widget.makeFirstResponder(id, sel, arg0) ? cast(objc.id) 1 : null;
     } else if (sel is OS.sel_tableViewColumnDidMove_) {
         widget.tableViewColumnDidMove(id, sel, arg0);
     } else if (sel is OS.sel_tableViewColumnDidResize_) {
@@ -4003,28 +3993,27 @@
     } else if (sel is OS.sel_outlineViewColumnDidResize_) {
         widget.outlineViewColumnDidResize(id, sel, arg0);
     }
+    return null;
 }
 
 static objc.id windowDelegateProc4(objc.id id, objc.SEL selector, objc.id arg0, objc.id arg1) {
-    String sel = fromStringz(selector);
-    
-    Widget widget = GetWidget(id);    
-    
-    if (sel == OS.sel_tabView_willSelectTabViewItem_) {
+    Widget widget = GetWidget(id);
+    if (widget is null) return null;
+    if (sel is OS.sel_tabView_willSelectTabViewItem_) {
         widget.tabView_willSelectTabViewItem(id, sel, arg0, arg1);
-    } else if (sel ==is OS.sel_tabView_didSelectTabViewItem_) {
+    } 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_) {
+    } else if (sel is OS.sel_outlineView_isItemExpandable_) {
+        return widget.outlineView_isItemExpandable(id, sel, arg0, arg1) ? cast(objc.id) 1 : null;
+    } else if (sel is 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_) {
+    } else if (sel is OS.sel_outlineView_shouldCollapseItem_) {
+        return widget.outlineView_shouldCollapseItem(id, sel, arg0, arg1) ? cast(objc.id) 1 : null;
+    } else if (sel is OS.sel_outlineView_shouldExpandItem_) {
+        return widget.outlineView_shouldExpandItem(id, sel, arg0, arg1) ? cast(objc.id) 1 : null;
+    } else if (sel is OS.sel_menu_willHighlightItem_) {
         widget.menu_willHighlightItem(id, sel, arg0, arg1);
-    } else if (sel == OS.sel_setMarkedText_selectedRange_) {
+    } else if (sel is 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);
@@ -4038,54 +4027,41 @@
     return null;
 }
 
-objc.id windowDelegateProc5(objc.id id, objc.SEL selector, objc.id arg0, objc.id arg1, objc.id arg2) {
-    String sel = fromStringz(selector);
-    
-    Widget widget = GetWidget(id); 
-      
-    if (sel == OS.sel_tableView_objectValueForTableColumn_row_) {
+static objc.id windowDelegateProc5(objc.id id, objc.SEL selector, objc.id arg0, objc.id arg1, objc.id arg2) {
+    Widget widget = GetWidget(id);
+    if (widget is null) return null;
+    if (sel is OS.sel_tableView_objectValueForTableColumn_row_) {
         return widget.tableView_objectValueForTableColumn_row(id, sel, arg0, arg1, arg2);
-    } else if (sel == OS.sel_tableView_shouldEditTableColumn_row_) {
+    } else if (sel is 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_) {
+    } else if (sel is 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_) {
+    } else if (sel is OS.sel_outlineView_child_ofItem_) {
          return widget.outlineView_child_ofItem(id, sel, arg0, arg1, arg2);
-    } else if (sel == OS.sel_outlineView_objectValueForTableColumn_byItem_) {
+    } else if (sel is OS.sel_outlineView_objectValueForTableColumn_byItem_) {
          return widget.outlineView_objectValueForTableColumn_byItem(id, sel, arg0, arg1, arg2);
-    } else if (sel == OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_) {
+    } else if (sel is 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);
+        objc.id result = OS.malloc (NSRange.sizeof);
         OS.memmove (result, range, NSRange.sizeof);
         return result;
     }
     return null;
 }
 
-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);
-    
+static objc.id windowDelegateProc6(objc.id id, objc.SEL selector, objc.id arg0, objc.id arg1, objc.id arg2, objc.id arg3) {
     Widget widget = GetWidget(id);
-
-    if (sel == OS.sel_tableView_willDisplayCell_forTableColumn_row_) {
+    if (widget is null) return null;
+    if (sel is 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_) {
+    } else if (sel is 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_) {
+    } else  if (sel is 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_) {
+    } else if (sel is 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) {
     }
     return null;
 }
-    
-Widget getWidget (objc.id ID)
-{
-    NSInteger* dObject;
-    OS.object_getInstanceVariable(ID, "dObject", cast(void**)dObject);
-    if (dObject is null) return null;
-    return cast(Widget)(*dObject);
 }
-}
--- a/dwt/widgets/Group.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Group.d	Fri Dec 05 16:00:41 2008 +0100
@@ -129,10 +129,10 @@
 
 void createHandle () {
     NSBox widget = cast(NSBox)(new SWTBox()).alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
     widget.setTitlePosition(OS.NSNoTitle);
     NSView contentWidget = (NSView)new SWTView().alloc();
-    contentWidget.initWithFrame(new NSRect());
+    contentWidget.initWithFrame(NSRect());
 //  contentWidget.setDrawsBackground(false);
     widget.setContentView(contentWidget);
     contentView = contentWidget;
--- a/dwt/widgets/Label.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Label.d	Fri Dec 05 16:00:41 2008 +0100
@@ -210,7 +210,7 @@
 
 void createHandle () {
     NSBox widget = cast(NSBox)(new SWTBox()).alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
     widget.setTitle(NSString.stringWith(""));
     if ((style & DWT.SEPARATOR) !is 0) {
         widget.setBoxType(OS.NSBoxSeparator);
@@ -228,7 +228,7 @@
         imageWidget.setImageScaling (OS.NSScaleNone);
         
         NSTextField textWidget = cast(NSTextField)(new SWTTextField()).alloc();
-        textWidget.initWithFrame(new NSRect());
+        textWidget.initWithFrame(NSRect());
         textWidget.setBordered(false);
         textWidget.setEditable(false);
         textWidget.setDrawsBackground(false);
--- a/dwt/widgets/Link.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Link.d	Fri Dec 05 16:00:41 2008 +0100
@@ -137,7 +137,7 @@
     int width, height;
     //TODO wrapping, wHint
     int borderStyle = hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder;
-    NSSize borderSize = NSScrollView.frameSizeForContentSize(new NSSize(), false, false, borderStyle);
+    NSSize borderSize = NSScrollView.frameSizeForContentSize(NSSize(), false, false, borderStyle);
     NSTextView widget = cast(NSTextView)view;
     NSSize size = widget.textStorage().size();
     width = cast(int)(size.width + borderSize.width);
@@ -166,7 +166,7 @@
     scrollWidget.setBorderType(hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder);
 
     NSTextView widget = cast(NSTextView)new SWTTextView().alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
     widget.setEditable(false);
     widget.setDrawsBackground(false);
     widget.setDelegate(widget);
@@ -430,7 +430,7 @@
     NSTextView widget = cast(NSTextView)view;
     widget.setString(NSString.stringWith(parse(string)));
     NSTextStorage textStorage = widget.textStorage();
-    NSRange range = new NSRange();
+    NSRange range = NSRange();
     for (int i = 0; i < offsets.length; i++) {
         range.location = offsets[i].x;
         range.length = offsets[i].y - offsets[i].x + 1;
--- a/dwt/widgets/List.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/List.d	Fri Dec 05 16:00:41 2008 +0100
@@ -268,7 +268,7 @@
     scrollWidget.setBorderType((style & DWT.BORDER) !is 0 ? OS.NSBezelBorder : OS.NSNoBorder);
     
     NSTableView widget = cast(NSTableView)new SWTTableView().alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
     widget.setAllowsMultipleSelection((style & DWT.MULTI) !is 0);
     widget.setDataSource(widget);
     widget.setHeaderView(null);
@@ -628,7 +628,7 @@
     checkWidget();
     //TODO - partial item at the top
     NSRect rect = scrollView.documentVisibleRect();
-    NSPoint point = new NSPoint();
+    NSPoint point = NSPoint();
     point.x = rect.x;
     point.y = rect.y;
     int result = (int)/*64*/(cast(NSTableView)view).rowAtPoint(point);
@@ -933,7 +933,7 @@
         end = Math.min (end, itemCount - 1);
         int length = end - start + 1;
         NSIndexSet indexes = cast(NSIndexSet)new NSIndexSet().alloc();
-        NSRange range = new NSRange();
+        NSRange range = NSRange();
         range.location = start;
         range.length = length;
         indexes.initWithIndexesInRange(range);
--- a/dwt/widgets/ProgressBar.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/ProgressBar.d	Fri Dec 05 16:00:41 2008 +0100
@@ -105,7 +105,7 @@
 
 void createHandle () {
     NSProgressIndicator widget = cast(NSProgressIndicator)new SWTProgressIndicator().alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
     widget.setUsesThreadedAnimation(false);
     widget.setIndeterminate((style & DWT.INDETERMINATE) !is 0);
     if ((style & DWT.INDETERMINATE) !is 0) widget.startAnimation(null);
--- a/dwt/widgets/Sash.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Sash.d	Fri Dec 05 16:00:41 2008 +0100
@@ -282,7 +282,7 @@
 
 void createHandle () {
     NSView widget = cast(NSView)new SWTView().alloc();
-    widget.initWithFrame (new NSRect());
+    widget.initWithFrame (NSRect());
     view = widget;
 }
 
--- a/dwt/widgets/Scale.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Scale.d	Fri Dec 05 16:00:41 2008 +0100
@@ -136,7 +136,7 @@
 
 void createHandle () {
     NSSlider widget = cast(NSSlider)new SWTSlider().alloc();
-    NSRect rect = new NSRect();
+    NSRect rect = NSRect();
         rect.width = 1;
         rect.height = 1;
     widget.initWithFrame(rect);
--- a/dwt/widgets/Scrollable.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Scrollable.d	Fri Dec 05 16:00:41 2008 +0100
@@ -147,7 +147,7 @@
     bar.display = display;
     NSScroller scroller;
     String actionSelector;
-    NSRect rect = new NSRect();
+    NSRect rect = NSRect();
     if ((style & DWT.H_SCROLL) !is 0) {
         rect.width = 1;
     } else {
--- a/dwt/widgets/Shell.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Shell.d	Fri Dec 05 16:00:41 2008 +0100
@@ -555,7 +555,7 @@
         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);
+        window = window.initWithContentRect(NSRect(), styleMask, OS.NSBackingStoreBuffered, false, screen);
         if ((style & (DWT.NO_TRIM | DWT.BORDER | DWT.SHELL_TRIM)) is 0) {
             window.setHasShadow (true);
         }
@@ -1450,12 +1450,12 @@
     path.retain();
     OS.QDRegionToRects(region.handle, OS.kQDParseRegionFromTopLeft, callback.getAddress(), path.id);
     callback.dispose();
-    if (path.isEmpty()) path.appendBezierPathWithRect(new NSRect());
+    if (path.isEmpty()) path.appendBezierPathWithRect(NSRect());
     return path;
 }
 
 int /*long*/ regionToRects(int /*long*/ message, int /*long*/ rgn, int /*long*/ r, int /*long*/ path) {
-    NSPoint pt = new NSPoint();
+    NSPoint pt = NSPoint();
     short[] rect = new short[4];
     if (message is OS.kQDRegionToRectsMsgParse) {
         OS.memmove(rect, r, rect.length * 2);
--- a/dwt/widgets/Slider.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Slider.d	Fri Dec 05 16:00:41 2008 +0100
@@ -174,7 +174,7 @@
 
 void createHandle () {
     NSScroller widget = cast(NSScroller)new SWTScroller().alloc();
-    NSRect rect = new NSRect();
+    NSRect rect = NSRect();
     if ((style & DWT.HORIZONTAL) !is 0) {
         rect.width = 1;
     } else {
--- a/dwt/widgets/Spinner.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Spinner.d	Fri Dec 05 16:00:41 2008 +0100
@@ -272,15 +272,15 @@
 
 void createHandle () {
     NSView widget = cast(NSView)new SWTView().alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
 //  widget.setDrawsBackground(false);
     NSStepper buttonWidget = cast(NSStepper)new SWTStepper().alloc();
-    buttonWidget.initWithFrame(new NSRect());
+    buttonWidget.initWithFrame(NSRect());
     buttonWidget.setValueWraps((style & DWT.WRAP) !is 0);
     buttonWidget.setTarget(buttonWidget);
     buttonWidget.setAction(OS.sel_sendSelection);
     NSTextField textWidget = cast(NSTextField)new SWTTextField().alloc();
-    textWidget.initWithFrame(new NSRect());
+    textWidget.initWithFrame(NSRect());
 //  textWidget.setTarget(widget);
     textWidget.setEditable((style & DWT.READ_ONLY) is 0);
     textFormatter = new NSNumberFormatter();
--- a/dwt/widgets/TabFolder.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/TabFolder.d	Fri Dec 05 16:00:41 2008 +0100
@@ -164,7 +164,7 @@
 
 void createHandle () {
     NSTabView widget = cast(NSTabView)new SWTTabView().alloc();
-    widget.initWithFrame (new NSRect());
+    widget.initWithFrame (NSRect());
     widget.setDelegate(widget);
     if ((style & DWT.BOTTOM) !is 0) {
         widget.setTabViewType(OS.NSBottomTabsBezelBorder);
--- a/dwt/widgets/TabItem.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/TabItem.d	Fri Dec 05 16:00:41 2008 +0100
@@ -275,7 +275,7 @@
         view = newControl.topView();
     } else {
         view = (NSView)new NSView().alloc();
-        view.initWithFrame (new NSRect());
+        view.initWithFrame (NSRect());
         view.autorelease();
     }
     nsItem.setView (view);
--- a/dwt/widgets/Table.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Table.d	Fri Dec 05 16:00:41 2008 +0100
@@ -436,7 +436,7 @@
     scrollWidget.setBorderType(hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder);
     
     NSTableView widget = cast(NSTableView)new SWTTableView().alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
     widget.setAllowsMultipleSelection((style & DWT.MULTI) !is 0);
     widget.setAllowsColumnReordering (false);
     widget.setDataSource(widget);
@@ -1256,7 +1256,7 @@
 public TableItem getItem (Point point) {
     checkWidget ();
     NSTableView widget = (NSTableView)view;
-    NSPoint pt = new NSPoint();
+    NSPoint pt = NSPoint();
     pt.x = point.x;
     pt.y = point.y;
     int row = cast(int)/*64*/widget.rowAtPoint(pt);
@@ -1509,7 +1509,7 @@
     checkWidget ();
     //TODO - partial item at the top
     NSRect rect = scrollView.documentVisibleRect();
-    NSPoint point = new NSPoint();
+    NSPoint point = NSPoint();
     point.x = rect.x;
     point.y = rect.y;
     return csat(int)/*64*/(cast(NSTableView)view).rowAtPoint(point);
@@ -1857,7 +1857,7 @@
         end = Math.min (end, itemCount - 1);
         int length = end - start + 1;
         NSIndexSet indexes = cast(NSIndexSet)new NSIndexSet().alloc();
-        NSRange range = new NSRange();
+        NSRange range = NSRange();
         range.location = start;
         range.length = length;
         indexes.initWithIndexesInRange(range);
--- a/dwt/widgets/ToolBar.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/ToolBar.d	Fri Dec 05 16:00:41 2008 +0100
@@ -213,7 +213,7 @@
 
 void createHandle () {
     NSView widget = cast(NSView)new SWTView().alloc();
-    widget.initWithFrame(new NSRect());
+    widget.initWithFrame(NSRect());
 //  widget.setDrawsBackground(false);
     view = widget;
 }
--- a/dwt/widgets/ToolItem.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/ToolItem.d	Fri Dec 05 16:00:41 2008 +0100
@@ -276,15 +276,15 @@
 void createHandle () {
     if ((style & DWT.SEPARATOR) !is 0) {
         NSBox widget = cast(NSBox)new SWTBox().alloc();
-        widget.initWithFrame(new NSRect());
+        widget.initWithFrame(NSRect());
         widget.setBoxType(OS.NSBoxSeparator);
         view = widget;
     } else {
         NSView widget = cast(NSView)new SWTView().alloc();
-        widget.initWithFrame(new NSRect());
+        widget.initWithFrame(NSRect());
         parent.contentView().addSubview(widget);
         button = cast(NSButton)new SWTButton().alloc();
-        button.initWithFrame(new NSRect());
+        button.initWithFrame(NSRect());
         button.setBordered(false);
         button.setAction(OS.sel_sendSelection);
         button.setTarget(button);
@@ -361,7 +361,7 @@
             NSGraphicsContext context = NSGraphicsContext.currentContext();
             context.saveGraphicsState();
             NSBezierPath path = NSBezierPath.bezierPath();
-            NSPoint pt = new NSPoint();
+            NSPoint pt = NSPoint();
             path.moveToPoint(pt);
             pt.x += ARROW_WIDTH;
             path.lineToPoint(pt);
@@ -665,7 +665,7 @@
 }
 
 void setBounds (int x, int y, int width, int height) {
-    NSRect rect = new NSRect();
+    NSRect rect = NSRect();
     rect.x = x;
     rect.y = y;
     rect.width = width;
--- a/dwt/widgets/Tracker.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Tracker.d	Fri Dec 05 16:00:41 2008 +0100
@@ -738,7 +738,7 @@
         if (y1 > maxY) maxY = y1;
         if (y2 > maxY) maxY = y2;
     }   
-    NSRect frame = new NSRect();
+    NSRect frame = NSRect();
     frame.x = minX;
     frame.y = minY;
     frame.width = maxX - minX;
--- a/dwt/widgets/Tree.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Tree.d	Fri Dec 05 16:00:41 2008 +0100
@@ -1309,7 +1309,7 @@
     checkWidget ();
     if (point is null) error (DWT.ERROR_NULL_ARGUMENT);
     NSOutlineView widget = (NSOutlineView)view;
-    NSPoint pt = new NSPoint();
+    NSPoint pt = NSPoint();
     pt.x = point.x;
     pt.y = point.y;
     int row = (int)/*64*/widget.rowAtPoint(pt);
--- a/dwt/widgets/Widget.d	Mon Dec 01 17:07:00 2008 +0100
+++ b/dwt/widgets/Widget.d	Fri Dec 05 16:00:41 2008 +0100
@@ -14,8 +14,6 @@
 module dwt.widgets.Widget;
 
 
-import tango.core.Thread;
-
 import dwt.DWT;
 import dwt.DWTException;
 import dwt.events.DisposeListener;
@@ -33,15 +31,17 @@
 import dwt.internal.cocoa.OS;
 import dwt.internal.cocoa.objc_super;
 
+import tango.core.Thread;
+
 import dwt.dwthelper.utils;
-import dwt.internal.cocoa.NSInteger;
+import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
-
 import dwt.widgets.Display;
 import dwt.widgets.Event;
 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
@@ -75,7 +75,7 @@
     EventTable eventTable;
     Object data;
 
-    char* jniRef;
+    void* jniRef;
 
     /* Global state flags */
     static const int DISPOSED         = 1 << 0;
@@ -154,52 +154,53 @@
     display = parent.display;
 }
 
-int accessibilityActionDescription(objc.id id, objc.SEL sel, objc.id arg0) {
+objc.id accessibilityActionDescription(objc.id id, objc.SEL sel, objc.id arg0) {
     return callSuperObject(id, sel, arg0);
 }
 
-int accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
+objc.id accessibilityActionNames(objc.id id, objc.SEL sel) {
     return callSuperObject(id, sel);
 }
 
-int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+objc.id accessibilityAttributeNames(objc.id id, objc.SEL sel) {
     return callSuperObject(id, sel);
 }
 
-int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+objc.id accessibilityAttributeValue(objc.id id, objc.SEL sel, objc.id arg0) {
     return callSuperObject(id, sel, arg0);
 }
 
-int accessibilityAttributeValue_forParameter(int id, int sel, int /*long*/ arg0, int /*long*/ arg1) {
+objc.id accessibilityAttributeValue_forParameter(objc.id id, objc.SEL sel, objc.id arg0, objc.id arg1) {
+    objc_super super_struct = 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, arg1);
 }
 
-int accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
+objc.id accessibilityFocusedUIElement(objc.id id, objc.SEL sel) {
     return callSuperObject(id, sel);
 }
 
-int accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint point) {
-    objc_super super_struct = new objc_super();
+objc.id accessibilityHitTest(objc.id id, objc.SEL sel, NSPoint point) {
+    objc_super super_struct = 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 accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+bool accessibilityIsAttributeSettable(objc.id id, objc.SEL sel, objc.id arg0) {
     return callSuperBoolean(id, sel, arg0);
 }
 
-bool accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+bool accessibilityIsIgnored(objc.id id, objc.SEL sel) {
     return callSuperBoolean(id, sel);
 }
 
-int accessibilityParameterizedAttributeNames(int /*long*/ id, int /*long*/ sel) {
+objc.id accessibilityParameterizedAttributeNames(objc.id id, objc.SEL sel) {
     return callSuperObject(id, sel);
 }
 
-void accessibilityPerformAction(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+void accessibilityPerformAction(objc.id id, objc.SEL sel, objc.id arg0) {
     callSuper(id, sel, arg0);
 }
 
@@ -213,76 +214,76 @@
     return null;
 }
 
-int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
+objc.id attributedSubstringFromRange (objc.id id, objc.SEL sel, objc.id range) {
     return 0;
 }
 
-void callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-    objc_super super_struct = new objc_super();
+void callSuper(objc.id id, objc.SEL sel, objc.id arg0) {
+    objc_super super_struct = 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();
+void callSuper(objc.id id, objc.SEL sel, NSRect arg0) {
+    objc_super super_struct = 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();
+void callSuper(objc.id id, objc.SEL sel, NSRect arg0, objc.id arg1) {
+    objc_super super_struct = 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();
+bool callSuperBoolean(objc.id id, objc.SEL sel) {
+    objc_super super_struct = 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;
+    return OS.objc_msgSendSuper(super_struct, sel) !is null;
 }
 
-bool canBecomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
+bool canBecomeKeyWindow (objc.id id, objc.SEL sel) {
     return callSuperBoolean (id, sel);
 }
 
-bool callSuperBoolean(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-    objc_super super_struct = new objc_super();
+bool callSuperBoolean(objc.id id, objc.SEL sel, objc.id arg0) {
+    objc_super super_struct = 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;
+    return OS.objc_msgSendSuper(super_struct, sel, arg0) !is null;
 }
 
-int callSuperObject(int /*long*/ id, int /*long*/ sel) {
-    objc_super super_struct = new objc_super();
+objc.id callSuperObject(objc.id id, objc.SEL sel) {
+    objc_super super_struct = objc_super();
     super_struct.receiver = id;
     super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
     return OS.objc_msgSendSuper(super_struct, sel);
 }
 
-int callSuperObject(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-    objc_super super_struct = new objc_super();
+objc.id callSuperObject(objc.id id, objc.SEL sel, objc.id arg0) {
+    objc_super super_struct = 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) {
+int /*long*/ characterIndexForPoint (objc.id id, objc.SEL sel, objc.id point) {
     return OS.NSNotFound;
 }
 
-bool acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
+bool acceptsFirstResponder (objc.id id, objc.SEL sel) {
     return callSuperBoolean(id, sel);
 }
 
-bool becomeFirstResponder (int /*long*/ id, int /*long*/ sel) {
+bool becomeFirstResponder (objc.id id, objc.SEL sel) {
     return callSuperBoolean(id, sel);
 }
 
-bool resignFirstResponder (int /*long*/ id, int /*long*/ sel) {
+bool resignFirstResponder (objc.id id, objc.SEL sel) {
     return callSuperBoolean(id, sel);
 }
 
@@ -443,18 +444,18 @@
     if ((state & DISPOSED) !is 0) error (DWT.ERROR_WIDGET_DISPOSED);
 }
 
-bool textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*long*/ textView, int /*long*/ link, int /*long*/ charIndex) {
+bool textView_clickOnLink_atIndex(objc.id id, objc.SEL sel, objc.id textView, objc.id link, objc.id charIndex) {
     return true;
 }
 
-void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void comboBoxSelectionDidChange(objc.id id, objc.SEL sel, objc.id notification) {
 }
 
-void copyToClipboard (char [] buffer) {
+void copyToClipboard (wchar [] 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);
+    pasteboard.setString (NSString.stringWithCharacters (buffer.ptr, buffer.length), OS.NSStringPboardType);
 }
 
 void createHandle () {
@@ -462,7 +463,7 @@
 
 void createJNIRef () {
     jniRef = OS.NewGlobalRef(this);
-    if (jniRef is 0) error (DWT.ERROR_NO_HANDLES);
+    if (jniRef is null) error (DWT.ERROR_NO_HANDLES);
 }
 
 void createWidget () {
@@ -475,8 +476,8 @@
 }
 
 void destroyJNIRef () {
-    if (jniRef !is 0) OS.DeleteGlobalRef (jniRef);
-    jniRef = 0;
+    //if (jniRef !is 0) OS.DeleteGlobalRef (jniRef);
+    jniRef = null;
 }
 
 void destroyWidget () {
@@ -516,7 +517,7 @@
     release (true);
 }
 
-void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ aSelector) {
+void doCommandBySelector (objc.id id, objc.SEL sel, objc.id aSelector) {
     callSuper (id, sel, aSelector);
 }
 
@@ -524,10 +525,10 @@
     /* Do nothing */
 }
 
-void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, int /*long*/ cellFrame, int /*long*/ view) {
+void drawInteriorWithFrame_inView (objc.id id, objc.SEL sel, int /*long*/ cellFrame, int /*long*/ view) {
 }
 
-void drawRect (int /*long*/ id, int /*long*/ sel, NSRect rect) {
+void drawRect (objc.id id, objc.SEL sel, NSRect rect) {
     //TODO offset region to view coordinates
     //TODO use region from control as well shell region
     NSGraphicsContext current = NSGraphicsContext.currentContext();
@@ -545,7 +546,7 @@
     }
 }
 
-void drawWidget (int /*long*/ id, NSRect rect) {
+void drawWidget (objc.id id, NSRect rect) {
 }
 
 void error (int code) {
@@ -556,10 +557,11 @@
     return display.filters (eventType);
 }
 
-NSRect firstRectForCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
-    return new NSRect ();
+NSRect firstRectForCharacterRange(objc.id id, objc.SEL sel, objc.id range) {
+    return NSRect ();
 }
 
+int fixMnemonic (char [] buffer) {
     while (i < buffer.length) {
         if ((buffer [j++] = buffer [i++]) is '&') {
             if (i is buffer.length) {continue;}
@@ -718,18 +720,18 @@
     return style;
 }
 
-bool hasMarkedText (int /*long*/ id, int /*long*/ sel) {
+bool hasMarkedText (objc.id id, objc.SEL sel) {
     return false;
 }
 
-void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void helpRequested(objc.id id, objc.SEL sel, objc.id theEvent) {
 }
 
-void highlightSelectionInClipRect(int /*long*/ id, int /*long*/ sel, int /*long*/ rect) {   
+void highlightSelectionInClipRect(objc.id id, objc.SEL sel, objc.id rect) {   
 }
 
-int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) {
-    objc_super super_struct = new objc_super();
+objc.id hitTest (objc.id id, objc.SEL sel, NSPoint point) {
+    objc_super super_struct = 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);
@@ -740,7 +742,7 @@
     return eventTable.hooks (eventType);
 }
 
-bool insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
+bool insertText (objc.id id, objc.SEL sel, objc.id string) {
     callSuper (id, sel, string);
     return true;
 }
@@ -760,7 +762,7 @@
     return (state & DISPOSED) !is 0;
 }
 
-bool isFlipped (int /*long*/ id, int /*long*/ sel) {
+bool isFlipped (objc.id id, objc.SEL sel) {
     return true;
 }
 
@@ -785,7 +787,7 @@
     return hooks (eventType);
 }
 
-bool isOpaque(int /*long*/ id, int /*long*/ sel) {
+bool isOpaque(objc.id id, objc.SEL sel) {
     return false;
 }
 
@@ -797,136 +799,136 @@
     return getDisplay ().isValidThread ();
 }
 
-void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void flagsChanged (objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper (id, sel, theEvent);
 }
 
-void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyDown (objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void keyUp (objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDown(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseUp(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void rightMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseDown(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void rightMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void rightMouseUp(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void otherMouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseDown(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void otherMouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void otherMouseUp(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void mouseMoved(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseMoved(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseDragged(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void mouseEntered(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseEntered(objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-void mouseExited(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void mouseExited(objc.id id, objc.SEL sel, objc.id 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) {
+bool menuHasKeyEquivalent_forEvent_target_action(objc.id id, objc.SEL sel, objc.id menu, objc.id event, objc.id target, objc.id action) {
     return true;
 }
 
-int /*long*/ menuForEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
-    objc_super super_struct = new objc_super();
+objc.id menuForEvent (objc.id id, objc.SEL sel, objc.id theEvent) {
+    objc_super super_struct = 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) {
+void menuNeedsUpdate(objc.id id, objc.SEL sel, objc.id menu) {
 }
 
-bool makeFirstResponder(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+bool makeFirstResponder(objc.id id, objc.SEL sel, objc.id notification) {
     return callSuperBoolean(id, sel, notification);
 }
 
-NSRange markedRange (int /*long*/ id, int /*long*/ sel) {
+NSRange markedRange (objc.id id, objc.SEL sel) {
     return new NSRange ();
 }
 
-void menu_willHighlightItem(int /*long*/ id, int /*long*/ sel, int /*long*/ menu, int /*long*/ item) {
-}
-
-void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menu_willHighlightItem(objc.id id, objc.SEL sel, objc.id menu, objc.id item) {
 }
 
-void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+void menuDidClose(objc.id id, objc.SEL sel, objc.id menu) {
 }
 
-int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) {
-    return 0;
+void menuWillOpen(objc.id id, objc.SEL sel, objc.id menu) {
 }
 
-int /*long*/ outlineView_child_ofItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ index, int /*long*/ item) {
+int /*long*/ numberOfRowsInTableView(objc.id id, objc.SEL sel, objc.id aTableView) {
     return 0;
 }
 
-void outlineView_didClickTableColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn) {
+objc.id outlineView_child_ofItem(objc.id id, objc.SEL sel, objc.id outlineView, objc.id index, objc.id item) {
+    return null;
 }
 
-int /*long*/ outlineView_objectValueForTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ item) {
+void outlineView_didClickTableColumn(objc.id id, objc.SEL sel, objc.id outlineView, objc.id tableColumn) {
+}
+
+int /*long*/ outlineView_objectValueForTableColumn_byItem(objc.id id, objc.SEL sel, objc.id outlineView, objc.id tableColumn, objc.id item) {
     return 0;
 }
 
-bool outlineView_isItemExpandable(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+bool outlineView_isItemExpandable(objc.id id, objc.SEL sel, objc.id outlineView, objc.id item) {
     return false;
 }
 
-int /*long*/ outlineView_numberOfChildrenOfItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+int /*long*/ outlineView_numberOfChildrenOfItem(objc.id id, objc.SEL sel, objc.id outlineView, objc.id item) {
     return 0;
 }
 
-void outlineView_willDisplayCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ item) {
+void outlineView_willDisplayCell_forTableColumn_item(objc.id id, objc.SEL sel, objc.id outlineView, objc.id cell, objc.id tableColumn, objc.id item) {
 }
 
-bool outlineView_shouldCollapseItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+bool outlineView_shouldCollapseItem(objc.id id, objc.SEL sel, objc.id outlineView, objc.id item) {
     return false;
 }
 
-bool outlineView_shouldExpandItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ item) {
+bool outlineView_shouldExpandItem(objc.id id, objc.SEL sel, objc.id outlineView, objc.id item) {
     return false;
 }
 
-void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void outlineViewColumnDidMove (objc.id id, objc.SEL sel, objc.id aNotification) {
 }
 
-void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void outlineViewColumnDidResize (objc.id id, objc.SEL sel, objc.id aNotification) {
 }
 
-void outlineViewItemDidExpand(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void outlineViewItemDidExpand(objc.id id, objc.SEL sel, objc.id notification) {
 }
 
-void outlineViewSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void outlineViewSelectionDidChange(objc.id id, objc.SEL sel, objc.id notification) {
 }
 
-void outlineView_setObjectValue_forTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ item) {
+void outlineView_setObjectValue_forTableColumn_byItem(objc.id id, objc.SEL sel, objc.id outlineView, objc.id object, objc.id tableColumn, objc.id item) {
 }
 
 /**
@@ -955,11 +957,11 @@
     sendEvent (eventType, event);
 }
 
-void pageDown (int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void pageDown (objc.id id, objc.SEL sel, objc.id sender) {
     callSuper(id, sel, sender);
 }
 
-void pageUp (int /*long*/ id, int /*long*/ sel, int /*long*/ sender) {
+void pageUp (objc.id id, objc.SEL sel, objc.id sender) {
     callSuper(id, sel, sender);
 }
 
@@ -971,7 +973,7 @@
     sendEvent (eventType, event, false);
 }
 
-void reflectScrolledClipView (int /*long*/ id, int /*long*/ sel, int /*long*/ aClipView) {
+void reflectScrolledClipView (objc.id id, objc.SEL sel, objc.id aClipView) {
     callSuper (id, sel, aClipView);
 }
 
@@ -1102,11 +1104,11 @@
     eventTable.unhook (DWT.Dispose, listener);
 }
 
-void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+void scrollWheel (objc.id id, objc.SEL sel, objc.id theEvent) {
     callSuper(id, sel, theEvent);
 }
 
-NSRange selectedRange (int /*long*/ id, int /*long*/ sel) {
+NSRange selectedRange (objc.id id, objc.SEL sel) {
     return new NSRange ();
 }
 
@@ -1282,15 +1284,15 @@
     }
 }
 
-void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) {
-    objc_super super_struct = new objc_super();
+void setFrameOrigin (objc.id id, objc.SEL sel, NSPoint point) {
+    objc_super super_struct = 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();
+void setFrameSize (objc.id id, objc.SEL sel, NSSize size) {
+    objc_super super_struct = objc_super();
     super_struct.receiver = id;
     super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
     OS.objc_msgSendSuper(super_struct, sel, size);
@@ -1298,17 +1300,17 @@
 
 bool setInputState (Event event, NSEvent nsEvent, int type) {
     if (nsEvent is null) return true;
-    int /*long*/ modifierFlags = nsEvent.modifierFlags();
+    NSUInteger 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()) {
+    switch (cast(int)/*64*/nsEvent.type()) {
         case OS.NSLeftMouseDragged:
         case OS.NSRightMouseDragged:
         case OS.NSOtherMouseDragged:
-            switch ((int)/*64*/nsEvent.buttonNumber()) {
+            switch (cast(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;
@@ -1384,12 +1386,12 @@
         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 (chars.length() > 0) event.character = cast(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 (unmodifiedChars.length() > 0) event.keyCode = cast(char)unmodifiedChars.characterAtIndex(0);
             }
     }
     if (event.keyCode is 0 && event.character is 0) {
@@ -1399,44 +1401,44 @@
     return true;
 }
 
-bool setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) {
+bool setMarkedText_selectedRange (objc.id id, objc.SEL sel, objc.id string, objc.id range) {
     return true;
 }
 
-void tableViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewColumnDidMove (objc.id id, objc.SEL sel, objc.id aNotification) {
 }
 
-void tableViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewColumnDidResize (objc.id id, objc.SEL sel, objc.id aNotification) {
 }
 
-void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void tableViewSelectionDidChange (objc.id id, objc.SEL sel, objc.id aNotification) {
 }
 
-void tableView_didClickTableColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ tableColumn) {
+void tableView_didClickTableColumn(objc.id id, objc.SEL sel, objc.id tableView, objc.id tableColumn) {
 }
 
-int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
-    return 0;
+objc.id tableView_objectValueForTableColumn_row(objc.id id, objc.SEL sel, objc.id aTableView, objc.id aTableColumn, objc.id rowIndex) {
+    return null;
 }
 
-void tableView_setObjectValue_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) { 
+void tableView_setObjectValue_forTableColumn_row(objc.id id, objc.SEL sel, objc.id aTableView, objc.id anObject, objc.id aTableColumn, objc.id rowIndex) { 
 }
 
-bool tableView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+bool tableView_shouldEditTableColumn_row(objc.id id, objc.SEL sel, objc.id aTableView, objc.id aTableColumn, objc.id rowIndex) {
     return true;
 }
 
-void tableView_willDisplayCell_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aCell, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
+void tableView_willDisplayCell_forTableColumn_row(objc.id id, objc.SEL sel, objc.id aTableView, objc.id aCell, objc.id aTableColumn, objc.id rowIndex) {
 }
 
-void textViewDidChangeSelection(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textViewDidChangeSelection(objc.id id, objc.SEL sel, objc.id aNotification) {
 }
 
-void textDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void textDidChange(objc.id id, objc.SEL sel, objc.id aNotification) {
 }
 
-NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int /*long*/ id, int /*long*/ sel, int /*long*/ aTextView, int /*long*/ oldSelectedCharRange, int /*long*/ newSelectedCharRange) {
-    return new NSRange();
+NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(objc.id id, objc.SEL sel, objc.id aTextView, objc.id oldSelectedCharRange, objc.id newSelectedCharRange) {
+    return NSRange();
 }
 
 /**
@@ -1454,37 +1456,37 @@
     return getName () ~ " {" ~ string ~ "}";
 }
 
-int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) {
+int /*long*/ validAttributesForMarkedText (objc.id id, objc.SEL sel) {
     return 0;
 }
 
-void tabView_didSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
+void tabView_didSelectTabViewItem(objc.id id, objc.SEL sel, objc.id tabView, objc.id tabViewItem) {
 }
 
-void tabView_willSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tabView, int /*long*/ tabViewItem) {
+void tabView_willSelectTabViewItem(objc.id id, objc.SEL sel, objc.id tabView, objc.id tabViewItem) {
 }
 
-void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidMove(objc.id id, objc.SEL sel, objc.id notification) {
 }
 
-void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidResize(objc.id id, objc.SEL sel, objc.id notification) {
 }
 
-void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidResignKey(objc.id id, objc.SEL sel, objc.id notification) {
 }
 
-void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowDidBecomeKey(objc.id id, objc.SEL sel, objc.id notification) {
 }
 
-void windowSendEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
+void windowSendEvent(objc.id id, objc.SEL sel, objc.id event) {
     callSuper(id, sel, event);
 }
 
-bool windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) {
+bool windowShouldClose(objc.id id, objc.SEL sel, objc.id window) {
     return false;
 }
 
-void windowWillClose(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void windowWillClose(objc.id id, objc.SEL sel, objc.id notification) {
 }
 
 }