diff dwt/internal/cocoa/NSLayoutManager.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/NSLayoutManager.d	Sat Aug 09 17:00:02 2008 +0200
+++ b/dwt/internal/cocoa/NSLayoutManager.d	Tue Aug 19 17:35:17 2008 +0200
@@ -13,6 +13,7 @@
  *******************************************************************************/
 module dwt.internal.cocoa.NSLayoutManager;
 
+import dwt.internal.cocoa.CGFloat;
 import dwt.internal.cocoa.id;
 import dwt.internal.cocoa.NSArray;
 import dwt.internal.cocoa.NSAttributedString;
@@ -36,6 +37,7 @@
 import dwt.internal.cocoa.NSTextStorage;
 import dwt.internal.cocoa.NSTextView;
 import dwt.internal.cocoa.NSTypesetter;
+import dwt.internal.cocoa.NSView;
 import dwt.internal.cocoa.NSWindow;
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
@@ -93,55 +95,55 @@
 
     public void addTemporaryAttribute (NSString attrName, id value, NSRange charRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_addTemporaryAttribute_1value_1forCharacterRange_1, attrName !is null ? attrName.id : null,
-                value !is null ? value.id : null, charRange);
+        OS.objc_msgSend(this.id_, OS.sel_addTemporaryAttribute_1value_1forCharacterRange_1, attrName !is null ? attrName.id_ : null,
+                value !is null ? value.id_ : null, charRange);
     }
 
     public void addTemporaryAttributes (NSDictionary attrs, NSRange charRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_addTemporaryAttributes_1forCharacterRange_1, attrs !is null ? attrs.id : null, charRange);
+        OS.objc_msgSend(this.id_, OS.sel_addTemporaryAttributes_1forCharacterRange_1, attrs !is null ? attrs.id_ : null, charRange);
     }
 
     public void addTextContainer (NSTextContainer container)
     {
-        OS.objc_msgSend(this.id, OS.sel_addTextContainer_1, container !is null ? container.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_addTextContainer_1, container !is null ? container.id_ : null);
     }
 
     public bool allowsNonContiguousLayout ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_allowsNonContiguousLayout) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_allowsNonContiguousLayout) !is null;
     }
 
     public NSSize attachmentSizeForGlyphAtIndex (NSUInteger glyphIndex)
     {
         NSSize result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_attachmentSizeForGlyphAtIndex_1, glyphIndex);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_attachmentSizeForGlyphAtIndex_1, glyphIndex);
         return result;
     }
 
     public NSAttributedString attributedString ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_attributedString);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedString);
         return result !is null ? new NSAttributedString(result) : null;
     }
 
     public bool backgroundLayoutEnabled ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_backgroundLayoutEnabled) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_backgroundLayoutEnabled) !is null;
     }
 
     public NSRect boundingRectForGlyphRange (NSRange glyphRange, NSTextContainer container)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_boundingRectForGlyphRange_1inTextContainer_1, glyphRange,
-                container !is null ? container.id : null);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundingRectForGlyphRange_1inTextContainer_1, glyphRange,
+                container !is null ? container.id_ : null);
         return result;
     }
 
     public NSRect boundsRectForTextBlock_atIndex_effectiveRange_ (NSTextBlock block, NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_boundsRectForTextBlock_1atIndex_1effectiveRange_1, block !is null ? block.id : null,
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundsRectForTextBlock_1atIndex_1effectiveRange_1, block !is null ? block.id_ : null,
                 glyphIndex, effectiveGlyphRange);
         return result;
     }
@@ -149,63 +151,63 @@
     public NSRect boundsRectForTextBlock_glyphRange_ (NSTextBlock block, NSRange glyphRange)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_boundsRectForTextBlock_1glyphRange_1, block !is null ? block.id : null, glyphRange);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_boundsRectForTextBlock_1glyphRange_1, block !is null ? block.id_ : null, glyphRange);
         return result;
     }
 
     public NSUInteger characterIndexForGlyphAtIndex (NSUInteger glyphIndex)
     {
-        return OS.objc_msgSend(this.id, OS.sel_characterIndexForGlyphAtIndex_1, glyphIndex);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_characterIndexForGlyphAtIndex_1, glyphIndex);
     }
 
     public NSRange characterRangeForGlyphRange (NSRange glyphRange, NSRangePointer actualGlyphRange)
     {
         NSRange result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_characterRangeForGlyphRange_1actualGlyphRange_1, glyphRange, actualGlyphRange);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_characterRangeForGlyphRange_1actualGlyphRange_1, glyphRange, actualGlyphRange);
         return result;
     }
 
     public NSImageScaling defaultAttachmentScaling ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_defaultAttachmentScaling);
+        return cast(NSImageScaling) OS.objc_msgSend(this.id_, OS.sel_defaultAttachmentScaling);
     }
 
     public CGFloat defaultBaselineOffsetForFont (NSFont theFont)
     {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_defaultBaselineOffsetForFont_1, theFont !is null ? theFont.id : null);
+        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_defaultBaselineOffsetForFont_1, theFont !is null ? theFont.id_ : null);
     }
 
     public CGFloat defaultLineHeightForFont (NSFont theFont)
     {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_defaultLineHeightForFont_1, theFont !is null ? theFont.id : null);
+        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_defaultLineHeightForFont_1, theFont !is null ? theFont.id_ : null);
     }
 
     public id delegatee ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
         return result !is null ? new id(result) : null;
     }
 
     public void deleteGlyphsInRange (NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_deleteGlyphsInRange_1, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_deleteGlyphsInRange_1, glyphRange);
     }
 
     public void drawBackgroundForGlyphRange (NSRange glyphsToShow, NSPoint origin)
     {
-        OS.objc_msgSend(this.id, OS.sel_drawBackgroundForGlyphRange_1atPoint_1, glyphsToShow, origin);
+        OS.objc_msgSend(this.id_, OS.sel_drawBackgroundForGlyphRange_1atPoint_1, glyphsToShow, origin);
     }
 
     public void drawGlyphsForGlyphRange (NSRange glyphsToShow, NSPoint origin)
     {
-        OS.objc_msgSend(this.id, OS.sel_drawGlyphsForGlyphRange_1atPoint_1, glyphsToShow, origin);
+        OS.objc_msgSend(this.id_, OS.sel_drawGlyphsForGlyphRange_1atPoint_1, glyphsToShow, origin);
     }
 
     public void drawStrikethroughForGlyphRange (NSRange glyphRange, NSInteger strikethroughVal, CGFloat baselineOffset, NSRect lineRect,
             NSRange lineGlyphRange, NSPoint containerOrigin)
     {
         OS.objc_msgSend(
-                this.id,
+                this.id_,
                 OS.sel_drawStrikethroughForGlyphRange_1strikethroughType_1baselineOffset_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1,
                 glyphRange, strikethroughVal, baselineOffset, lineRect, lineGlyphRange, containerOrigin);
     }
@@ -213,261 +215,261 @@
     public void drawUnderlineForGlyphRange (NSRange glyphRange, NSInteger underlineVal, CGFloat baselineOffset, NSRect lineRect,
             NSRange lineGlyphRange, NSPoint containerOrigin)
     {
-        OS.objc_msgSend(this.id,
+        OS.objc_msgSend(this.id_,
                 OS.sel_drawUnderlineForGlyphRange_1underlineType_1baselineOffset_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1,
                 glyphRange, underlineVal, baselineOffset, lineRect, lineGlyphRange, containerOrigin);
     }
 
     public bool drawsOutsideLineFragmentForGlyphAtIndex (NSUInteger glyphIndex)
     {
-        return OS.objc_msgSend(this.id, OS.sel_drawsOutsideLineFragmentForGlyphAtIndex_1, glyphIndex) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_drawsOutsideLineFragmentForGlyphAtIndex_1, glyphIndex) !is null;
     }
 
     public void ensureGlyphsForCharacterRange (NSRange charRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_ensureGlyphsForCharacterRange_1, charRange);
+        OS.objc_msgSend(this.id_, OS.sel_ensureGlyphsForCharacterRange_1, charRange);
     }
 
     public void ensureGlyphsForGlyphRange (NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_ensureGlyphsForGlyphRange_1, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_ensureGlyphsForGlyphRange_1, glyphRange);
     }
 
     public void ensureLayoutForBoundingRect (NSRect bounds, NSTextContainer container)
     {
-        OS.objc_msgSend(this.id, OS.sel_ensureLayoutForBoundingRect_1inTextContainer_1, bounds, container !is null ? container.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_ensureLayoutForBoundingRect_1inTextContainer_1, bounds, container !is null ? container.id_ : null);
     }
 
     public void ensureLayoutForCharacterRange (NSRange charRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_ensureLayoutForCharacterRange_1, charRange);
+        OS.objc_msgSend(this.id_, OS.sel_ensureLayoutForCharacterRange_1, charRange);
     }
 
     public void ensureLayoutForGlyphRange (NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_ensureLayoutForGlyphRange_1, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_ensureLayoutForGlyphRange_1, glyphRange);
     }
 
     public void ensureLayoutForTextContainer (NSTextContainer container)
     {
-        OS.objc_msgSend(this.id, OS.sel_ensureLayoutForTextContainer_1, container !is null ? container.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_ensureLayoutForTextContainer_1, container !is null ? container.id_ : null);
     }
 
     public NSRect extraLineFragmentRect ()
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_extraLineFragmentRect);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_extraLineFragmentRect);
         return result;
     }
 
     public NSTextContainer extraLineFragmentTextContainer ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_extraLineFragmentTextContainer);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_extraLineFragmentTextContainer);
         return result !is null ? new NSTextContainer(result) : null;
     }
 
     public NSRect extraLineFragmentUsedRect ()
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_extraLineFragmentUsedRect);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_extraLineFragmentUsedRect);
         return result;
     }
 
     public NSTextView firstTextView ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_firstTextView);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_firstTextView);
         return result !is null ? new NSTextView(result) : null;
     }
 
     public NSUInteger firstUnlaidCharacterIndex ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_firstUnlaidCharacterIndex);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_firstUnlaidCharacterIndex);
     }
 
     public NSUInteger firstUnlaidGlyphIndex ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_firstUnlaidGlyphIndex);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_firstUnlaidGlyphIndex);
     }
 
     public CGFloat fractionOfDistanceThroughGlyphForPoint (NSPoint point, NSTextContainer container)
     {
-        return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_fractionOfDistanceThroughGlyphForPoint_1inTextContainer_1, point,
-                container !is null ? container.id : null);
+        return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_fractionOfDistanceThroughGlyphForPoint_1inTextContainer_1, point,
+                container !is null ? container.id_ : null);
     }
 
     public void getFirstUnlaidCharacterIndex (NSUInteger* charIndex, NSUInteger* glyphIndex)
     {
-        OS.objc_msgSend(this.id, OS.sel_getFirstUnlaidCharacterIndex_1glyphIndex_1, charIndex, glyphIndex);
+        OS.objc_msgSend(this.id_, OS.sel_getFirstUnlaidCharacterIndex_1glyphIndex_1, charIndex, glyphIndex);
     }
 
     public NSUInteger getGlyphs (NSGlyph* glyphArray, NSRange glyphRange)
     {
-        return OS.objc_msgSend(this.id, OS.sel_getGlyphs_1range_1, glyphArray, glyphRange);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_getGlyphs_1range_1, glyphArray, glyphRange);
     }
 
     public NSUInteger getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_ (NSRange glyphRange, NSGlyph* glyphBuffer,
             NSUInteger* charIndexBuffer, NSGlyphInscription* inscribeBuffer, bool* elasticBuffer)
     {
-        return OS.objc_msgSend(this.id, OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1, glyphRange, glyphBuffer,
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1, glyphRange, glyphBuffer,
                 charIndexBuffer, inscribeBuffer, elasticBuffer);
     }
 
     public NSUInteger getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_ (NSRange glyphRange, NSGlyph* glyphBuffer,
             NSUInteger* charIndexBuffer, NSGlyphInscription* inscribeBuffer, bool* elasticBuffer, ubyte* bidiLevelBuffer)
     {
-        return OS.objc_msgSend(this.id, OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1bidiLevels_1, glyphRange,
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1bidiLevels_1, glyphRange,
                 glyphBuffer, charIndexBuffer, inscribeBuffer, elasticBuffer, bidiLevelBuffer);
     }
 
     public NSUInteger getLineFragmentInsertionPointsForCharacterAtIndex (NSUInteger charIndex, bool aFlag, bool dFlag, CGFloat* positions,
             NSUInteger* charIndexes)
     {
-        return OS.objc_msgSend(this.id,
+        return cast(NSUInteger) OS.objc_msgSend(this.id_,
                 OS.sel_getLineFragmentInsertionPointsForCharacterAtIndex_1alternatePositions_1inDisplayOrder_1positions_1characterIndexes_1,
                 charIndex, aFlag, dFlag, positions, charIndexes);
     }
 
     public NSGlyph glyphAtIndex_ (NSUInteger glyphIndex)
     {
-        return OS.objc_msgSend(this.id, OS.sel_glyphAtIndex_1, glyphIndex);
+        return cast(NSGlyph) OS.objc_msgSend(this.id_, OS.sel_glyphAtIndex_1, glyphIndex);
     }
 
     public NSGlyph glyphAtIndex_isValidIndex_ (NSUInteger glyphIndex, bool* isValidIndex)
     {
-        return OS.objc_msgSend(this.id, OS.sel_glyphAtIndex_1isValidIndex_1, glyphIndex, isValidIndex);
+        return cast(NSGlyph) OS.objc_msgSend(this.id_, OS.sel_glyphAtIndex_1isValidIndex_1, glyphIndex, isValidIndex);
     }
 
     public NSGlyphGenerator glyphGenerator ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_glyphGenerator);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_glyphGenerator);
         return result !is null ? new NSGlyphGenerator(result) : null;
     }
 
     public NSUInteger glyphIndexForCharacterAtIndex (NSUInteger charIndex)
     {
-        return OS.objc_msgSend(this.id, OS.sel_glyphIndexForCharacterAtIndex_1, charIndex);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_glyphIndexForCharacterAtIndex_1, charIndex);
     }
 
     public NSUInteger glyphIndexForPoint_inTextContainer_ (NSPoint point, NSTextContainer container)
     {
-        return OS.objc_msgSend(this.id, OS.sel_glyphIndexForPoint_1inTextContainer_1, point, container !is null ? container.id : null);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_glyphIndexForPoint_1inTextContainer_1, point, container !is null ? container.id_ : null);
     }
 
     public NSUInteger glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_ (NSPoint point, NSTextContainer container,
             CGFloat* partialFraction)
     {
-        return OS.objc_msgSend(this.id, OS.sel_glyphIndexForPoint_1inTextContainer_1fractionOfDistanceThroughGlyph_1, point,
-                container !is null ? container.id : null, partialFraction);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_glyphIndexForPoint_1inTextContainer_1fractionOfDistanceThroughGlyph_1, point,
+                container !is null ? container.id_ : null, partialFraction);
     }
 
     public NSRange glyphRangeForBoundingRect (NSRect bounds, NSTextContainer container)
     {
         NSRange result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_glyphRangeForBoundingRect_1inTextContainer_1, bounds, container !is null ? container.id : null);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_glyphRangeForBoundingRect_1inTextContainer_1, bounds, container !is null ? container.id_ : null);
         return result;
     }
 
     public NSRange glyphRangeForBoundingRectWithoutAdditionalLayout (NSRect bounds, NSTextContainer container)
     {
         NSRange result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_glyphRangeForBoundingRectWithoutAdditionalLayout_1inTextContainer_1, bounds,
-                container !is null ? container.id : null);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_glyphRangeForBoundingRectWithoutAdditionalLayout_1inTextContainer_1, bounds,
+                container !is null ? container.id_ : null);
         return result;
     }
 
     public NSRange glyphRangeForCharacterRange (NSRange charRange, NSRangePointer actualCharRange)
     {
         NSRange result;
-        OS.objc_msgSend_struct(result, this.id, OS.sel_glyphRangeForCharacterRange_1actualCharacterRange_1, charRange, actualCharRange);
+        OS.objc_msgSend_struct(&result, this.id_, OS.sel_glyphRangeForCharacterRange_1actualCharacterRange_1, &charRange, actualCharRange);
         return result;
     }
 
     public NSRange glyphRangeForTextContainer (NSTextContainer container)
     {
         NSRange result;
-        OS.objc_msgSend_struct(result, this.id, OS.sel_glyphRangeForTextContainer_1, container !is null ? container.id : null);
+        OS.objc_msgSend_struct(&result, this.id_, OS.sel_glyphRangeForTextContainer_1, container !is null ? container.id_ : null);
         return result;
     }
 
     public bool hasNonContiguousLayout ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_hasNonContiguousLayout) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_hasNonContiguousLayout) !is null;
     }
 
     public float hyphenationFactor ()
     {
-        return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_hyphenationFactor);
+        return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_hyphenationFactor);
     }
 
     public void insertGlyph (NSGlyph glyph, NSUInteger glyphIndex, NSUInteger charIndex)
     {
-        OS.objc_msgSend(this.id, OS.sel_insertGlyph_1atGlyphIndex_1characterIndex_1, glyph, glyphIndex, charIndex);
+        OS.objc_msgSend(this.id_, OS.sel_insertGlyph_1atGlyphIndex_1characterIndex_1, glyph, glyphIndex, charIndex);
     }
 
     public void insertGlyphs (/*const*/NSGlyph* glyphs, NSUInteger length, NSUInteger glyphIndex, NSUInteger charIndex)
     {
-        OS.objc_msgSend(this.id, OS.sel_insertGlyphs_1length_1forStartingGlyphAtIndex_1characterIndex_1, glyphs, length, glyphIndex, charIndex);
+        OS.objc_msgSend(this.id_, OS.sel_insertGlyphs_1length_1forStartingGlyphAtIndex_1characterIndex_1, glyphs, length, glyphIndex, charIndex);
     }
 
     public void insertTextContainer (NSTextContainer container, NSUInteger index)
     {
-        OS.objc_msgSend(this.id, OS.sel_insertTextContainer_1atIndex_1, container !is null ? container.id : null, index);
+        OS.objc_msgSend(this.id_, OS.sel_insertTextContainer_1atIndex_1, container !is null ? container.id_ : null, index);
     }
 
     public NSInteger intAttribute (NSInteger attributeTag, NSUInteger glyphIndex)
     {
-        return OS.objc_msgSend(this.id, OS.sel_intAttribute_1forGlyphAtIndex_1, attributeTag, glyphIndex);
+        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_intAttribute_1forGlyphAtIndex_1, attributeTag, glyphIndex);
     }
 
     public void invalidateDisplayForCharacterRange (NSRange charRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_invalidateDisplayForCharacterRange_1, charRange);
+        OS.objc_msgSend(this.id_, OS.sel_invalidateDisplayForCharacterRange_1, charRange);
     }
 
     public void invalidateDisplayForGlyphRange (NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_invalidateDisplayForGlyphRange_1, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_invalidateDisplayForGlyphRange_1, glyphRange);
     }
 
     public void invalidateGlyphsForCharacterRange (NSRange charRange, NSInteger delta, NSRangePointer actualCharRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_invalidateGlyphsForCharacterRange_1changeInLength_1actualCharacterRange_1, charRange, delta, actualCharRange);
+        OS.objc_msgSend(this.id_, OS.sel_invalidateGlyphsForCharacterRange_1changeInLength_1actualCharacterRange_1, charRange, delta, actualCharRange);
     }
 
     public void invalidateGlyphsOnLayoutInvalidationForGlyphRange (NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_invalidateGlyphsOnLayoutInvalidationForGlyphRange_1, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_invalidateGlyphsOnLayoutInvalidationForGlyphRange_1, glyphRange);
     }
 
     public void invalidateLayoutForCharacterRange_actualCharacterRange_ (NSRange charRange, NSRangePointer actualCharRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_invalidateLayoutForCharacterRange_1actualCharacterRange_1, charRange, actualCharRange);
+        OS.objc_msgSend(this.id_, OS.sel_invalidateLayoutForCharacterRange_1actualCharacterRange_1, charRange, actualCharRange);
     }
 
     public void invalidateLayoutForCharacterRange_isSoft_actualCharacterRange_ (NSRange charRange, bool flag, NSRangePointer actualCharRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_invalidateLayoutForCharacterRange_1isSoft_1actualCharacterRange_1, charRange, flag, actualCharRange);
+        OS.objc_msgSend(this.id_, OS.sel_invalidateLayoutForCharacterRange_1isSoft_1actualCharacterRange_1, charRange, flag, actualCharRange);
     }
 
     public bool isValidGlyphIndex (NSUInteger glyphIndex)
     {
-        return OS.objc_msgSend(this.id, OS.sel_isValidGlyphIndex_1, glyphIndex) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_isValidGlyphIndex_1, glyphIndex) !is null;
     }
 
     public bool layoutManagerOwnsFirstResponderInWindow (NSWindow window)
     {
-        return OS.objc_msgSend(this.id, OS.sel_layoutManagerOwnsFirstResponderInWindow_1, window !is null ? window.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_layoutManagerOwnsFirstResponderInWindow_1, window !is null ? window.id_ : null) !is null;
     }
 
     public NSUInteger layoutOptions ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_layoutOptions);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_layoutOptions);
     }
 
     public NSRect layoutRectForTextBlock_atIndex_effectiveRange_ (NSTextBlock block, NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_layoutRectForTextBlock_1atIndex_1effectiveRange_1, block !is null ? block.id : null,
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_layoutRectForTextBlock_1atIndex_1effectiveRange_1, block !is null ? block.id_ : null,
                 glyphIndex, effectiveGlyphRange);
         return result;
     }
@@ -475,14 +477,14 @@
     public NSRect layoutRectForTextBlock_glyphRange_ (NSTextBlock block, NSRange glyphRange)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_layoutRectForTextBlock_1glyphRange_1, block !is null ? block.id : null, glyphRange);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_layoutRectForTextBlock_1glyphRange_1, block !is null ? block.id_ : null, glyphRange);
         return result;
     }
 
     public NSRect lineFragmentRectForGlyphAtIndex_effectiveRange_ (NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
         return result;
     }
 
@@ -490,7 +492,7 @@
             bool flag)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
                 effectiveGlyphRange, flag);
         return result;
     }
@@ -498,7 +500,7 @@
     public NSRect lineFragmentUsedRectForGlyphAtIndex_effectiveRange_ (NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
         return result;
     }
 
@@ -506,7 +508,7 @@
             NSRangePointer effectiveGlyphRange, bool flag)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_lineFragmentUsedRectForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
                 effectiveGlyphRange, flag);
         return result;
     }
@@ -514,349 +516,349 @@
     public NSPoint locationForGlyphAtIndex (NSUInteger glyphIndex)
     {
         NSPoint result;
-        OS.objc_msgSend_struct(result, this.id, OS.sel_locationForGlyphAtIndex_1, glyphIndex);
+        OS.objc_msgSend_struct(&result, this.id_, OS.sel_locationForGlyphAtIndex_1, glyphIndex);
         return result;
     }
 
     public bool notShownAttributeForGlyphAtIndex (NSUInteger glyphIndex)
     {
-        return OS.objc_msgSend(this.id, OS.sel_notShownAttributeForGlyphAtIndex_1, glyphIndex) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_notShownAttributeForGlyphAtIndex_1, glyphIndex) !is null;
     }
 
     public NSUInteger numberOfGlyphs ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_numberOfGlyphs);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfGlyphs);
     }
 
     public NSRange rangeOfNominallySpacedGlyphsContainingIndex (NSUInteger glyphIndex)
     {
         NSRange result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_rangeOfNominallySpacedGlyphsContainingIndex_1, glyphIndex);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_rangeOfNominallySpacedGlyphsContainingIndex_1, glyphIndex);
         return result;
     }
 
     public NSRectArray rectArrayForCharacterRange (NSRange charRange, NSRange selCharRange, NSTextContainer container, NSUInteger* rectCount)
     {
-        return OS.objc_msgSend(this.id, OS.sel_rectArrayForCharacterRange_1withinSelectedCharacterRange_1inTextContainer_1rectCount_1, charRange,
-                selCharRange, container !is null ? container.id : null, rectCount);
+        return cast(NSRectArray) OS.objc_msgSend(this.id_, OS.sel_rectArrayForCharacterRange_1withinSelectedCharacterRange_1inTextContainer_1rectCount_1, charRange,
+                selCharRange, container !is null ? container.id_ : null, rectCount);
     }
 
     public NSRectArray rectArrayForGlyphRange (NSRange glyphRange, NSRange selGlyphRange, NSTextContainer container, NSUInteger* rectCount)
     {
-        return OS.objc_msgSend(this.id, OS.sel_rectArrayForGlyphRange_1withinSelectedGlyphRange_1inTextContainer_1rectCount_1, glyphRange,
-                selGlyphRange, container !is null ? container.id : null, rectCount);
+        return cast(NSRectArray) OS.objc_msgSend(this.id_, OS.sel_rectArrayForGlyphRange_1withinSelectedGlyphRange_1inTextContainer_1rectCount_1, glyphRange,
+                selGlyphRange, container !is null ? container.id_ : null, rectCount);
     }
 
     public void removeTemporaryAttribute (NSString attrName, NSRange charRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_removeTemporaryAttribute_1forCharacterRange_1, attrName !is null ? attrName.id : null, charRange);
+        OS.objc_msgSend(this.id_, OS.sel_removeTemporaryAttribute_1forCharacterRange_1, attrName !is null ? attrName.id_ : null, charRange);
     }
 
     public void removeTextContainerAtIndex (NSUInteger index)
     {
-        OS.objc_msgSend(this.id, OS.sel_removeTextContainerAtIndex_1, index);
+        OS.objc_msgSend(this.id_, OS.sel_removeTextContainerAtIndex_1, index);
     }
 
     public void replaceGlyphAtIndex (NSUInteger glyphIndex, NSGlyph newGlyph)
     {
-        OS.objc_msgSend(this.id, OS.sel_replaceGlyphAtIndex_1withGlyph_1, glyphIndex, newGlyph);
+        OS.objc_msgSend(this.id_, OS.sel_replaceGlyphAtIndex_1withGlyph_1, glyphIndex, newGlyph);
     }
 
     public void replaceTextStorage (NSTextStorage newTextStorage)
     {
-        OS.objc_msgSend(this.id, OS.sel_replaceTextStorage_1, newTextStorage !is null ? newTextStorage.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_replaceTextStorage_1, newTextStorage !is null ? newTextStorage.id_ : null);
     }
 
     public NSView rulerAccessoryViewForTextView (NSTextView view, NSParagraphStyle style, NSRulerView ruler, bool isEnabled)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_rulerAccessoryViewForTextView_1paragraphStyle_1ruler_1enabled_1,
-                view !is null ? view.id : null, style !is null ? style.id : null, ruler !is null ? ruler.id : null, isEnabled);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rulerAccessoryViewForTextView_1paragraphStyle_1ruler_1enabled_1,
+                view !is null ? view.id_ : null, style !is null ? style.id_ : null, ruler !is null ? ruler.id_ : null, isEnabled);
         return result !is null ? new NSView(result) : null;
     }
 
     public NSArray rulerMarkersForTextView (NSTextView view, NSParagraphStyle style, NSRulerView ruler)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_rulerMarkersForTextView_1paragraphStyle_1ruler_1, view !is null ? view.id : null,
-                style !is null ? style.id : null, ruler !is null ? ruler.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_rulerMarkersForTextView_1paragraphStyle_1ruler_1, view !is null ? view.id_ : null,
+                style !is null ? style.id_ : null, ruler !is null ? ruler.id_ : null);
         return result !is null ? new NSArray(result) : null;
     }
 
     public void setAllowsNonContiguousLayout (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setAllowsNonContiguousLayout_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setAllowsNonContiguousLayout_1, flag);
     }
 
     public void setAttachmentSize (NSSize attachmentSize, NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_setAttachmentSize_1forGlyphRange_1, attachmentSize, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_setAttachmentSize_1forGlyphRange_1, attachmentSize, glyphRange);
     }
 
     public void setBackgroundLayoutEnabled (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setBackgroundLayoutEnabled_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setBackgroundLayoutEnabled_1, flag);
     }
 
     public void setBoundsRect (NSRect rect, NSTextBlock block, NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_setBoundsRect_1forTextBlock_1glyphRange_1, rect, block !is null ? block.id : null, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_setBoundsRect_1forTextBlock_1glyphRange_1, rect, block !is null ? block.id_ : null, glyphRange);
     }
 
     public void setCharacterIndex (NSUInteger charIndex, NSUInteger glyphIndex)
     {
-        OS.objc_msgSend(this.id, OS.sel_setCharacterIndex_1forGlyphAtIndex_1, charIndex, glyphIndex);
+        OS.objc_msgSend(this.id_, OS.sel_setCharacterIndex_1forGlyphAtIndex_1, charIndex, glyphIndex);
     }
 
     public void setDefaultAttachmentScaling (NSImageScaling scaling)
     {
-        OS.objc_msgSend(this.id, OS.sel_setDefaultAttachmentScaling_1, scaling);
+        OS.objc_msgSend(this.id_, OS.sel_setDefaultAttachmentScaling_1, scaling);
     }
 
     public void setDelegate (id delegatee)
     {
-        OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
     }
 
     public void setDrawsOutsideLineFragment (bool flag, NSUInteger glyphIndex)
     {
-        OS.objc_msgSend(this.id, OS.sel_setDrawsOutsideLineFragment_1forGlyphAtIndex_1, flag, glyphIndex);
+        OS.objc_msgSend(this.id_, OS.sel_setDrawsOutsideLineFragment_1forGlyphAtIndex_1, flag, glyphIndex);
     }
 
     public void setExtraLineFragmentRect (NSRect fragmentRect, NSRect usedRect, NSTextContainer container)
     {
-        OS.objc_msgSend(this.id, OS.sel_setExtraLineFragmentRect_1usedRect_1textContainer_1, fragmentRect, usedRect,
-                container !is null ? container.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setExtraLineFragmentRect_1usedRect_1textContainer_1, fragmentRect, usedRect,
+                container !is null ? container.id_ : null);
     }
 
     public void setGlyphGenerator (NSGlyphGenerator glyphGenerator)
     {
-        OS.objc_msgSend(this.id, OS.sel_setGlyphGenerator_1, glyphGenerator !is null ? glyphGenerator.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setGlyphGenerator_1, glyphGenerator !is null ? glyphGenerator.id_ : null);
     }
 
     public void setHyphenationFactor (float factor)
     {
-        OS.objc_msgSend(this.id, OS.sel_setHyphenationFactor_1, factor);
+        OS.objc_msgSend(this.id_, OS.sel_setHyphenationFactor_1, factor);
     }
 
     public void setIntAttribute (NSInteger attributeTag, NSInteger val, NSUInteger glyphIndex)
     {
-        OS.objc_msgSend(this.id, OS.sel_setIntAttribute_1value_1forGlyphAtIndex_1, attributeTag, val, glyphIndex);
+        OS.objc_msgSend(this.id_, OS.sel_setIntAttribute_1value_1forGlyphAtIndex_1, attributeTag, val, glyphIndex);
     }
 
     public void setLayoutRect (NSRect rect, NSTextBlock block, NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_setLayoutRect_1forTextBlock_1glyphRange_1, rect, block !is null ? block.id : null, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_setLayoutRect_1forTextBlock_1glyphRange_1, rect, block !is null ? block.id_ : null, glyphRange);
     }
 
     public void setLineFragmentRect (NSRect fragmentRect, NSRange glyphRange, NSRect usedRect)
     {
-        OS.objc_msgSend(this.id, OS.sel_setLineFragmentRect_1forGlyphRange_1usedRect_1, fragmentRect, glyphRange, usedRect);
+        OS.objc_msgSend(this.id_, OS.sel_setLineFragmentRect_1forGlyphRange_1usedRect_1, fragmentRect, glyphRange, usedRect);
     }
 
     public void setLocation (NSPoint location, NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_setLocation_1forStartOfGlyphRange_1, location, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_setLocation_1forStartOfGlyphRange_1, location, glyphRange);
     }
 
     public void setLocations (NSPointArray locations, NSUInteger* glyphIndexes, NSUInteger count, NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_setLocations_1startingGlyphIndexes_1count_1forGlyphRange_1, locations, glyphIndexes, count, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_setLocations_1startingGlyphIndexes_1count_1forGlyphRange_1, locations, glyphIndexes, count, glyphRange);
     }
 
     public void setNotShownAttribute (bool flag, NSUInteger glyphIndex)
     {
-        OS.objc_msgSend(this.id, OS.sel_setNotShownAttribute_1forGlyphAtIndex_1, flag, glyphIndex);
+        OS.objc_msgSend(this.id_, OS.sel_setNotShownAttribute_1forGlyphAtIndex_1, flag, glyphIndex);
     }
 
     public void setShowsControlCharacters (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setShowsControlCharacters_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setShowsControlCharacters_1, flag);
     }
 
     public void setShowsInvisibleCharacters (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setShowsInvisibleCharacters_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setShowsInvisibleCharacters_1, flag);
     }
 
     public void setTemporaryAttributes (NSDictionary attrs, NSRange charRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_setTemporaryAttributes_1forCharacterRange_1, attrs !is null ? attrs.id : null, charRange);
+        OS.objc_msgSend(this.id_, OS.sel_setTemporaryAttributes_1forCharacterRange_1, attrs !is null ? attrs.id_ : null, charRange);
     }
 
     public void setTextContainer (NSTextContainer container, NSRange glyphRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_setTextContainer_1forGlyphRange_1, container !is null ? container.id : null, glyphRange);
+        OS.objc_msgSend(this.id_, OS.sel_setTextContainer_1forGlyphRange_1, container !is null ? container.id_ : null, glyphRange);
     }
 
     public void setTextStorage (NSTextStorage textStorage)
     {
-        OS.objc_msgSend(this.id, OS.sel_setTextStorage_1, textStorage !is null ? textStorage.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setTextStorage_1, textStorage !is null ? textStorage.id_ : null);
     }
 
     public void setTypesetter (NSTypesetter typesetter)
     {
-        OS.objc_msgSend(this.id, OS.sel_setTypesetter_1, typesetter !is null ? typesetter.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setTypesetter_1, typesetter !is null ? typesetter.id_ : null);
     }
 
     public void setTypesetterBehavior (NSTypesetterBehavior theBehavior)
     {
-        OS.objc_msgSend(this.id, OS.sel_setTypesetterBehavior_1, theBehavior);
+        OS.objc_msgSend(this.id_, OS.sel_setTypesetterBehavior_1, theBehavior);
     }
 
     public void setUsesFontLeading (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setUsesFontLeading_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setUsesFontLeading_1, flag);
     }
 
     public void setUsesScreenFonts (bool flag)
     {
-        OS.objc_msgSend(this.id, OS.sel_setUsesScreenFonts_1, flag);
+        OS.objc_msgSend(this.id_, OS.sel_setUsesScreenFonts_1, flag);
     }
 
     public void showAttachmentCell (NSCell cell, NSRect rect, NSUInteger attachmentIndex)
     {
-        OS.objc_msgSend(this.id, OS.sel_showAttachmentCell_1inRect_1characterIndex_1, cell !is null ? cell.id : null, rect, attachmentIndex);
+        OS.objc_msgSend(this.id_, OS.sel_showAttachmentCell_1inRect_1characterIndex_1, cell !is null ? cell.id_ : null, rect, attachmentIndex);
     }
 
     public void showPackedGlyphs (byte* glyphs, NSUInteger glyphLen, NSRange glyphRange, NSPoint point, NSFont font, NSColor color,
             NSSize printingAdjustment)
     {
-        OS.objc_msgSend(this.id, OS.sel_showPackedGlyphs_1length_1glyphRange_1atPoint_1font_1color_1printingAdjustment_1, glyphs, glyphLen,
-                glyphRange, point, font !is null ? font.id : null, color !is null ? color.id : null, printingAdjustment);
+        OS.objc_msgSend(this.id_, OS.sel_showPackedGlyphs_1length_1glyphRange_1atPoint_1font_1color_1printingAdjustment_1, glyphs, glyphLen,
+                glyphRange, point, font !is null ? font.id_ : null, color !is null ? color.id_ : null, printingAdjustment);
     }
 
     public bool showsControlCharacters ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_showsControlCharacters) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_showsControlCharacters) !is null;
     }
 
     public bool showsInvisibleCharacters ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_showsInvisibleCharacters) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_showsInvisibleCharacters) !is null;
     }
 
     public void strikethroughGlyphRange (NSRange glyphRange, NSInteger strikethroughVal, NSRect lineRect, NSRange lineGlyphRange,
             NSPoint containerOrigin)
     {
-        OS.objc_msgSend(this.id, OS.sel_strikethroughGlyphRange_1strikethroughType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1,
+        OS.objc_msgSend(this.id_, OS.sel_strikethroughGlyphRange_1strikethroughType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1,
                 glyphRange, strikethroughVal, lineRect, lineGlyphRange, containerOrigin);
     }
 
     public NSFont substituteFontForFont (NSFont originalFont)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_substituteFontForFont_1, originalFont !is null ? originalFont.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_substituteFontForFont_1, originalFont !is null ? originalFont.id_ : null);
         return result !is null ? new NSFont(result) : null;
     }
 
     public id temporaryAttribute_atCharacterIndex_effectiveRange_ (NSString attrName, NSUInteger location, NSRangePointer range)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_temporaryAttribute_1atCharacterIndex_1effectiveRange_1,
-                attrName !is null ? attrName.id : null, location, range);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_temporaryAttribute_1atCharacterIndex_1effectiveRange_1,
+                attrName !is null ? attrName.id_ : null, location, range);
         return result !is null ? new id(result) : null;
     }
 
     public id temporaryAttribute_atCharacterIndex_longestEffectiveRange_inRange_ (NSString attrName, NSUInteger location, NSRangePointer range,
             NSRange rangeLimit)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_temporaryAttribute_1atCharacterIndex_1longestEffectiveRange_1inRange_1,
-                attrName !is null ? attrName.id : null, location, range, rangeLimit);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_temporaryAttribute_1atCharacterIndex_1longestEffectiveRange_1inRange_1,
+                attrName !is null ? attrName.id_ : null, location, range, rangeLimit);
         return result !is null ? new id(result) : null;
     }
 
     public NSDictionary temporaryAttributesAtCharacterIndex_effectiveRange_ (NSUInteger charIndex, NSRangePointer effectiveCharRange)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_temporaryAttributesAtCharacterIndex_1effectiveRange_1, charIndex, effectiveCharRange);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_temporaryAttributesAtCharacterIndex_1effectiveRange_1, charIndex, effectiveCharRange);
         return result !is null ? new NSDictionary(result) : null;
     }
 
     public NSDictionary temporaryAttributesAtCharacterIndex_longestEffectiveRange_inRange_ (NSUInteger location, NSRangePointer range,
             NSRange rangeLimit)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_temporaryAttributesAtCharacterIndex_1longestEffectiveRange_1inRange_1, location, range,
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_temporaryAttributesAtCharacterIndex_1longestEffectiveRange_1inRange_1, location, range,
                 rangeLimit);
         return result !is null ? new NSDictionary(result) : null;
     }
 
     public void textContainerChangedGeometry (NSTextContainer container)
     {
-        OS.objc_msgSend(this.id, OS.sel_textContainerChangedGeometry_1, container !is null ? container.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_textContainerChangedGeometry_1, container !is null ? container.id_ : null);
     }
 
     public void textContainerChangedTextView (NSTextContainer container)
     {
-        OS.objc_msgSend(this.id, OS.sel_textContainerChangedTextView_1, container !is null ? container.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_textContainerChangedTextView_1, container !is null ? container.id_ : null);
     }
 
     public NSTextContainer textContainerForGlyphAtIndex_effectiveRange_ (NSUInteger glyphIndex, NSRangePointer effectiveGlyphRange)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_textContainerForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainerForGlyphAtIndex_1effectiveRange_1, glyphIndex, effectiveGlyphRange);
         return result !is null ? new NSTextContainer(result) : null;
     }
 
     public NSTextContainer textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout_ (NSUInteger glyphIndex,
             NSRangePointer effectiveGlyphRange, bool flag)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_textContainerForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainerForGlyphAtIndex_1effectiveRange_1withoutAdditionalLayout_1, glyphIndex,
                 effectiveGlyphRange, flag);
         return result !is null ? new NSTextContainer(result) : null;
     }
 
     public NSArray textContainers ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_textContainers);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainers);
         return result !is null ? new NSArray(result) : null;
     }
 
     public NSTextStorage textStorage ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_textStorage);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textStorage);
         return result !is null ? new NSTextStorage(result) : null;
     }
 
     public void textStorage_edited_range_changeInLength_invalidatedRange_ (NSTextStorage str, NSUInteger editedMask, NSRange newCharRange,
             NSInteger delta, NSRange invalidatedCharRange)
     {
-        OS.objc_msgSend(this.id, OS.sel_textStorage_1edited_1range_1changeInLength_1invalidatedRange_1, str !is null ? str.id : null, editedMask,
+        OS.objc_msgSend(this.id_, OS.sel_textStorage_1edited_1range_1changeInLength_1invalidatedRange_1, str !is null ? str.id_ : null, editedMask,
                 newCharRange, delta, invalidatedCharRange);
     }
 
     public NSTextView textViewForBeginningOfSelection ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_textViewForBeginningOfSelection);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_textViewForBeginningOfSelection);
         return result !is null ? new NSTextView(result) : null;
     }
 
     public NSTypesetter typesetter ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_typesetter);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typesetter);
         return result !is null ? new NSTypesetter(result) : null;
     }
 
     public NSTypesetterBehavior typesetterBehavior ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_typesetterBehavior);
+        return cast(NSTypesetterBehavior) OS.objc_msgSend(this.id_, OS.sel_typesetterBehavior);
     }
 
     public void underlineGlyphRange (NSRange glyphRange, NSInteger underlineVal, NSRect lineRect, NSRange lineGlyphRange, NSPoint containerOrigin)
     {
-        OS.objc_msgSend(this.id, OS.sel_underlineGlyphRange_1underlineType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1, glyphRange,
+        OS.objc_msgSend(this.id_, OS.sel_underlineGlyphRange_1underlineType_1lineFragmentRect_1lineFragmentGlyphRange_1containerOrigin_1, glyphRange,
                 underlineVal, lineRect, lineGlyphRange, containerOrigin);
     }
 
     public NSRect usedRectForTextContainer (NSTextContainer container)
     {
         NSRect result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_usedRectForTextContainer_1, container !is null ? container.id : null);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_usedRectForTextContainer_1, container !is null ? container.id_ : null);
         return result;
     }
 
     public bool usesFontLeading ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_usesFontLeading) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_usesFontLeading) !is null;
     }
 
     public bool usesScreenFonts ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_usesScreenFonts) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_usesScreenFonts) !is null;
     }
 
 }