diff dwt/internal/cocoa/NSGraphicsContext.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/NSGraphicsContext.d	Sat Aug 09 17:00:02 2008 +0200
+++ b/dwt/internal/cocoa/NSGraphicsContext.d	Tue Aug 19 17:35:17 2008 +0200
@@ -57,24 +57,24 @@
     }
 
     //public CIContext CIContext() {
-    //  objc.id result = OS.objc_msgSend(this.id, OS.sel_CIContext);
+    //  objc.id result = OS.objc_msgSend(this.id_, OS.sel_CIContext);
     //  return result !is null ? new CIContext(result) : null;
     //}
 
     public NSDictionary attributes ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_attributes);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributes);
         return result !is null ? new NSDictionary(result) : null;
     }
 
     public NSColorRenderingIntent colorRenderingIntent ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_colorRenderingIntent);
+        return cast(NSColorRenderingIntent) OS.objc_msgSend(this.id_, OS.sel_colorRenderingIntent);
     }
 
     public NSCompositingOperation compositingOperation ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_compositingOperation);
+        return cast(NSCompositingOperation) OS.objc_msgSend(this.id_, OS.sel_compositingOperation);
     }
 
     public static NSGraphicsContext currentContext ()
@@ -90,26 +90,26 @@
 
     public void flushGraphics ()
     {
-        OS.objc_msgSend(this.id, OS.sel_flushGraphics);
+        OS.objc_msgSend(this.id_, OS.sel_flushGraphics);
     }
 
     public id focusStack ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_focusStack);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_focusStack);
         return result !is null ? new id(result) : null;
     }
 
     public static NSGraphicsContext graphicsContextWithAttributes (NSDictionary attributes)
     {
         objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithAttributes_1,
-                attributes !is null ? attributes.id : null);
+                attributes !is null ? attributes.id_ : null);
         return result !is null ? new NSGraphicsContext(result) : null;
     }
 
     public static NSGraphicsContext graphicsContextWithBitmapImageRep (NSBitmapImageRep bitmapRep)
     {
         objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithBitmapImageRep_1,
-                bitmapRep !is null ? bitmapRep.id : null);
+                bitmapRep !is null ? bitmapRep.id_ : null);
         return result !is null ? new NSGraphicsContext(result) : null;
     }
 
@@ -122,40 +122,40 @@
 
     public static NSGraphicsContext graphicsContextWithWindow (NSWindow window)
     {
-        objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithWindow_1, window !is null ? window.id : null);
+        objc.id result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_graphicsContextWithWindow_1, window !is null ? window.id_ : null);
         return result !is null ? new NSGraphicsContext(result) : null;
     }
 
     public void* graphicsPort ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_graphicsPort);
+        return OS.objc_msgSend(this.id_, OS.sel_graphicsPort);
     }
 
     public NSImageInterpolation imageInterpolation ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_imageInterpolation);
+        return cast(NSImageInterpolation) OS.objc_msgSend(this.id_, OS.sel_imageInterpolation);
     }
 
     public bool isDrawingToScreen ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_isDrawingToScreen) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_isDrawingToScreen) !is null;
     }
 
     public bool isFlipped ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_isFlipped) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_isFlipped) !is null;
     }
 
     public NSPoint patternPhase ()
     {
         NSPoint result;
-        OS.objc_msgSend_stret(result, this.id, OS.sel_patternPhase);
+        OS.objc_msgSend_stret(&result, this.id_, OS.sel_patternPhase);
         return result;
     }
 
     public void restoreGraphicsState ()
     {
-        OS.objc_msgSend(this.id, OS.sel_restoreGraphicsState);
+        OS.objc_msgSend(this.id_, OS.sel_restoreGraphicsState);
     }
 
     public static void static_restoreGraphicsState ()
@@ -165,7 +165,7 @@
 
     public void saveGraphicsState ()
     {
-        OS.objc_msgSend(this.id, OS.sel_saveGraphicsState);
+        OS.objc_msgSend(this.id_, OS.sel_saveGraphicsState);
     }
 
     public static void static_saveGraphicsState ()
@@ -175,22 +175,22 @@
 
     public void setColorRenderingIntent (NSColorRenderingIntent renderingIntent)
     {
-        OS.objc_msgSend(this.id, OS.sel_setColorRenderingIntent_1, renderingIntent);
+        OS.objc_msgSend(this.id_, OS.sel_setColorRenderingIntent_1, renderingIntent);
     }
 
     public void setCompositingOperation (NSCompositingOperation operation)
     {
-        OS.objc_msgSend(this.id, OS.sel_setCompositingOperation_1, operation);
+        OS.objc_msgSend(this.id_, OS.sel_setCompositingOperation_1, operation);
     }
 
     public static void setCurrentContext (NSGraphicsContext context)
     {
-        OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_setCurrentContext_1, context !is null ? context.id : null);
+        OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_setCurrentContext_1, context !is null ? context.id_ : null);
     }
 
     public void setFocusStack (id stack)
     {
-        OS.objc_msgSend(this.id, OS.sel_setFocusStack_1, stack !is null ? stack.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_setFocusStack_1, stack !is null ? stack.id_ : null);
     }
 
     public static void setGraphicsState (NSInteger gState)
@@ -200,22 +200,22 @@
 
     public void setImageInterpolation (NSImageInterpolation interpolation)
     {
-        OS.objc_msgSend(this.id, OS.sel_setImageInterpolation_1, interpolation);
+        OS.objc_msgSend(this.id_, OS.sel_setImageInterpolation_1, interpolation);
     }
 
     public void setPatternPhase (NSPoint phase)
     {
-        OS.objc_msgSend(this.id, OS.sel_setPatternPhase_1, phase);
+        OS.objc_msgSend(this.id_, OS.sel_setPatternPhase_1, phase);
     }
 
     public void setShouldAntialias (bool antialias)
     {
-        OS.objc_msgSend(this.id, OS.sel_setShouldAntialias_1, antialias);
+        OS.objc_msgSend(this.id_, OS.sel_setShouldAntialias_1, antialias);
     }
 
     public bool shouldAntialias ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_shouldAntialias) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_shouldAntialias) !is null;
     }
 
 }