diff dwt/internal/cocoa/NSControl.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSControl.d	Sat Aug 09 17:00:02 2008 +0200
+++ b/dwt/internal/cocoa/NSControl.d	Tue Aug 19 17:35:17 2008 +0200
@@ -41,179 +41,179 @@
 
     public bool abortEditing ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_abortEditing) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_abortEditing) !is null;
     }
 
     public objc.SEL action ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_action);
+        return cast(objc.SEL) OS.objc_msgSend(this.id_, OS.sel_action);
     }
 
     public objc.id alignment ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_alignment);
+        return OS.objc_msgSend(this.id_, OS.sel_alignment);
     }
 
     public NSAttributedString attributedStringValue ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_attributedStringValue);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedStringValue);
         return result !is null ? new NSAttributedString(result) : null;
     }
 
     public objc.id baseWritingDirection ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_baseWritingDirection);
+        return OS.objc_msgSend(this.id_, OS.sel_baseWritingDirection);
     }
 
     public void calcSize ()
     {
-        OS.objc_msgSend(this.id, OS.sel_calcSize);
+        OS.objc_msgSend(this.id_, OS.sel_calcSize);
     }
 
     public objc.id cell ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_cell);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cell);
         return result !is null ? result : null;
     }
 
     public static objc.Class cellClass ()
     {
-        return OS.objc_msgSend(OS.class_NSControl, OS.sel_cellClass);
+        return cast(objc.Class) OS.objc_msgSend(OS.class_NSControl, OS.sel_cellClass);
     }
 
     public NSText currentEditor ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_currentEditor);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentEditor);
         return result !is null ? new NSText(result) : null;
     }
 
     public double doubleValue ()
     {
-        return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue);
+        return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
     }
 
     public void drawCell (NSCell aCell)
     {
-        OS.objc_msgSend(this.id, OS.sel_drawCell_1, aCell !is null ? aCell.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_drawCell_1, aCell !is null ? aCell.id_ : null);
     }
 
     public void drawCellInside (NSCell aCell)
     {
-        OS.objc_msgSend(this.id, OS.sel_drawCellInside_1, aCell !is null ? aCell.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_drawCellInside_1, aCell !is null ? aCell.id_ : null);
     }
 
     public float floatValue ()
     {
-        return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_floatValue);
+        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_floatValue);
     }
 
     public NSFont font ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_font);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_font);
         return result !is null ? new NSFont(result) : null;
     }
 
     public id formatter ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_formatter);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_formatter);
         return result !is null ? new id(result) : null;
     }
 
     public bool ignoresMultiClick ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_ignoresMultiClick) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_ignoresMultiClick) !is null;
     }
 
     public int intValue ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_intValue);
+        return cast(int) OS.objc_msgSend(this.id_, OS.sel_intValue);
     }
 
-    public int integerValue ()
+    public NSInteger integerValue ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_integerValue);
+        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_integerValue);
     }
 
     public bool isContinuous ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_isContinuous) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_isContinuous) !is null;
     }
 
     public bool isEnabled ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_isEnabled) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_isEnabled) !is null;
     }
 
     public void mouseDown (NSEvent theEvent)
     {
-        OS.objc_msgSend(this.id, OS.sel_mouseDown_1, theEvent !is null ? theEvent.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_mouseDown_1, theEvent !is null ? theEvent.id_ : null);
     }
 
     public id objectValue ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_objectValue);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_objectValue);
         return result !is null ? new id(result) : null;
     }
 
     public void performClick (id sender)
     {
-        OS.objc_msgSend(this.id, OS.sel_performClick_1, sender !is null ? sender.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_performClick_1, sender !is null ? sender.id_ : null);
     }
 
     public bool refusesFirstResponder ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_refusesFirstResponder) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_refusesFirstResponder) !is null;
     }
 
     public void selectCell (NSCell aCell)
     {
-        OS.objc_msgSend(this.id, OS.sel_selectCell_1, aCell !is null ? aCell.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_selectCell_1, aCell !is null ? aCell.id_ : null);
     }
 
     public id selectedCell ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_selectedCell);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_selectedCell);
         return result !is null ? new id(result) : null;
     }
 
     public NSInteger selectedTag ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_selectedTag);
+        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_selectedTag);
     }
 
     public bool sendAction (objc.SEL theAction, id theTarget)
     {
-        return OS.objc_msgSend(this.id, OS.sel_sendAction_1to_1, theAction, theTarget !is null ? theTarget.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_sendAction_1to_1, theAction, theTarget !is null ? theTarget.id_ : null) !is null;
     }
 
     public NSInteger sendActionOn (NSInteger mask)
     {
-        return OS.objc_msgSend(this.id, OS.sel_sendActionOn_1, mask);
+        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_sendActionOn_1, mask);
     }
 
     public void setAction (objc.SEL aSelector)
     {
-        OS.objc_msgSend(this.id, OS.sel_setAction_1, aSelector);
+        OS.objc_msgSend(this.id_, OS.sel_setAction_1, aSelector);
     }
 
     public void setAlignment (objc.id mode)
     {
-        OS.objc_msgSend(this.id, OS.sel_setAlignment_1, mode);
+        OS.objc_msgSend(this.id_, OS.sel_setAlignment_1, mode);
     }
 
     public void setAttributedStringValue (NSAttributedString obj)
     {
-        OS.objc_msgSend(this.id, OS.sel_setAttributedStringValue_1, obj !is null ? obj.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setAttributedStringValue_1, obj !is null ? obj.id_ : null);
     }
 
     public void setBaseWritingDirection (objc.id writingDirection)
     {
-        OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_1, writingDirection);
+        OS.objc_msgSend(this.id_, OS.sel_setBaseWritingDirection_1, writingDirection);
     }
 
     public void setCell (NSCell aCell)
     {
-        OS.objc_msgSend(this.id, OS.sel_setCell_1, aCell !is null ? aCell.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setCell_1, aCell !is null ? aCell.id_ : null);
     }
 
     public static void setCellClass (objc.Class factoryId)
@@ -223,149 +223,149 @@
 
     public void setContinuous (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setContinuous_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setContinuous_1, flag);
     }
 
     public void setDoubleValue (double aDouble)
     {
-        OS.objc_msgSend(this.id, OS.sel_setDoubleValue_1, aDouble);
+        OS.objc_msgSend(this.id_, OS.sel_setDoubleValue_1, aDouble);
     }
 
     public void setEnabled (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setEnabled_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setEnabled_1, flag);
     }
 
     public void setFloatValue (float aFloat)
     {
-        OS.objc_msgSend(this.id, OS.sel_setFloatValue_1, aFloat);
+        OS.objc_msgSend(this.id_, OS.sel_setFloatValue_1, aFloat);
     }
 
     public void setFloatingPointFormat (bool autoRange, NSUInteger leftDigits, NSUInteger rightDigits)
     {
-        OS.objc_msgSend(this.id, OS.sel_setFloatingPointFormat_1left_1right_1, autoRange, leftDigits, rightDigits);
+        OS.objc_msgSend(this.id_, OS.sel_setFloatingPointFormat_1left_1right_1, autoRange, leftDigits, rightDigits);
     }
 
     public void setFont (NSFont fontObj)
     {
-        OS.objc_msgSend(this.id, OS.sel_setFont_1, fontObj !is null ? fontObj.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setFont_1, fontObj !is null ? fontObj.id_ : null);
     }
 
     public void setFormatter (NSFormatter newFormatter)
     {
-        OS.objc_msgSend(this.id, OS.sel_setFormatter_1, newFormatter !is null ? newFormatter.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setFormatter_1, newFormatter !is null ? newFormatter.id_ : null);
     }
 
     public void setIgnoresMultiClick (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setIgnoresMultiClick_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setIgnoresMultiClick_1, flag);
     }
 
     public void setIntValue (int anInt)
     {
-        OS.objc_msgSend(this.id, OS.sel_setIntValue_1, anInt);
+        OS.objc_msgSend(this.id_, OS.sel_setIntValue_1, anInt);
     }
 
-    public void setIntegerValue (int anInteger)
+    public void setIntegerValue (NSInteger anInteger)
     {
-        OS.objc_msgSend(this.id, OS.sel_setIntegerValue_1, anInteger);
+        OS.objc_msgSend(this.id_, OS.sel_setIntegerValue_1, anInteger);
     }
 
     public void setNeedsDisplay ()
     {
-        OS.objc_msgSend(this.id, OS.sel_setNeedsDisplay);
+        OS.objc_msgSend(this.id_, OS.sel_setNeedsDisplay);
     }
 
     public void setObjectValue (id obj)
     {
-        OS.objc_msgSend(this.id, OS.sel_setObjectValue_1, obj !is null ? obj.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setObjectValue_1, obj !is null ? obj.id_ : null);
     }
 
     public void setRefusesFirstResponder (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setRefusesFirstResponder_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setRefusesFirstResponder_1, flag);
     }
 
     public void setStringValue (NSString aString)
     {
-        OS.objc_msgSend(this.id, OS.sel_setStringValue_1, aString !is null ? aString.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setStringValue_1, aString !is null ? aString.id_ : null);
     }
 
     public void setTag (NSInteger anInt)
     {
-        OS.objc_msgSend(this.id, OS.sel_setTag_1, anInt);
+        OS.objc_msgSend(this.id_, OS.sel_setTag_1, anInt);
     }
 
     public void setTarget (id anObject)
     {
-        OS.objc_msgSend(this.id, OS.sel_setTarget_1, anObject !is null ? anObject.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setTarget_1, anObject !is null ? anObject.id_ : null);
     }
 
     public void sizeToFit ()
     {
-        OS.objc_msgSend(this.id, OS.sel_sizeToFit);
+        OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
     }
 
     public NSString stringValue ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_stringValue);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_stringValue);
         return result !is null ? new NSString(result) : null;
     }
 
     public NSInteger tag ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_tag);
+        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_tag);
     }
 
     public void takeDoubleValueFrom (id sender)
     {
-        OS.objc_msgSend(this.id, OS.sel_takeDoubleValueFrom_1, sender !is null ? sender.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_takeDoubleValueFrom_1, sender !is null ? sender.id_ : null);
     }
 
     public void takeFloatValueFrom (id sender)
     {
-        OS.objc_msgSend(this.id, OS.sel_takeFloatValueFrom_1, sender !is null ? sender.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_takeFloatValueFrom_1, sender !is null ? sender.id_ : null);
     }
 
     public void takeIntValueFrom (id sender)
     {
-        OS.objc_msgSend(this.id, OS.sel_takeIntValueFrom_1, sender !is null ? sender.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_takeIntValueFrom_1, sender !is null ? sender.id_ : null);
     }
 
     public void takeIntegerValueFrom (id sender)
     {
-        OS.objc_msgSend(this.id, OS.sel_takeIntegerValueFrom_1, sender !is null ? sender.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_takeIntegerValueFrom_1, sender !is null ? sender.id_ : null);
     }
 
     public void takeObjectValueFrom (id sender)
     {
-        OS.objc_msgSend(this.id, OS.sel_takeObjectValueFrom_1, sender !is null ? sender.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_takeObjectValueFrom_1, sender !is null ? sender.id_ : null);
     }
 
     public void takeStringValueFrom (id sender)
     {
-        OS.objc_msgSend(this.id, OS.sel_takeStringValueFrom_1, sender !is null ? sender.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_takeStringValueFrom_1, sender !is null ? sender.id_ : null);
     }
 
     public id target ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_target);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_target);
         return result !is null ? new id(result) : null;
     }
 
     public void updateCell (NSCell aCell)
     {
-        OS.objc_msgSend(this.id, OS.sel_updateCell_1, aCell !is null ? aCell.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_updateCell_1, aCell !is null ? aCell.id_ : null);
     }
 
     public void updateCellInside (NSCell aCell)
     {
-        OS.objc_msgSend(this.id, OS.sel_updateCellInside_1, aCell !is null ? aCell.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_updateCellInside_1, aCell !is null ? aCell.id_ : null);
     }
 
     public void validateEditing ()
     {
-        OS.objc_msgSend(this.id, OS.sel_validateEditing);
+        OS.objc_msgSend(this.id_, OS.sel_validateEditing);
     }
 
 }