comparison dwt/internal/cocoa/NSOpenGLView.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
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
33 super(id); 33 super(id);
34 } 34 }
35 35
36 public void clearGLContext () 36 public void clearGLContext ()
37 { 37 {
38 OS.objc_msgSend(this.id, OS.sel_clearGLContext); 38 OS.objc_msgSend(this.id_, OS.sel_clearGLContext);
39 } 39 }
40 40
41 public static NSOpenGLPixelFormat defaultPixelFormat () 41 public static NSOpenGLPixelFormat defaultPixelFormat ()
42 { 42 {
43 objc.id result = OS.objc_msgSend(OS.class_NSOpenGLView, OS.sel_defaultPixelFormat); 43 objc.id result = OS.objc_msgSend(OS.class_NSOpenGLView, OS.sel_defaultPixelFormat);
44 return result !is null ? new NSOpenGLPixelFormat(result) : null; 44 return result !is null ? new NSOpenGLPixelFormat(result) : null;
45 } 45 }
46 46
47 public NSOpenGLView initWithFrame (NSRect frameRect, NSOpenGLPixelFormat format) 47 public NSOpenGLView initWithFrame (NSRect frameRect, NSOpenGLPixelFormat format)
48 { 48 {
49 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFrame_1pixelFormat_1, frameRect, format !is null ? format.id : null); 49 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFrame_1pixelFormat_1, frameRect, format !is null ? format.id_ : null);
50 return result !is null ? this : null; 50 return result !is null ? this : null;
51 } 51 }
52 52
53 public NSOpenGLContext openGLContext () 53 public NSOpenGLContext openGLContext ()
54 { 54 {
55 objc.id result = OS.objc_msgSend(this.id, OS.sel_openGLContext); 55 objc.id result = OS.objc_msgSend(this.id_, OS.sel_openGLContext);
56 return result !is null ? new NSOpenGLContext(result) : null; 56 return result !is null ? new NSOpenGLContext(result) : null;
57 } 57 }
58 58
59 public NSOpenGLPixelFormat pixelFormat () 59 public NSOpenGLPixelFormat pixelFormat ()
60 { 60 {
61 objc.id result = OS.objc_msgSend(this.id, OS.sel_pixelFormat); 61 objc.id result = OS.objc_msgSend(this.id_, OS.sel_pixelFormat);
62 return result !is null ? new NSOpenGLPixelFormat(result) : null; 62 return result !is null ? new NSOpenGLPixelFormat(result) : null;
63 } 63 }
64 64
65 public void prepareOpenGL () 65 public void prepareOpenGL ()
66 { 66 {
67 OS.objc_msgSend(this.id, OS.sel_prepareOpenGL); 67 OS.objc_msgSend(this.id_, OS.sel_prepareOpenGL);
68 } 68 }
69 69
70 public void reshape () 70 public void reshape ()
71 { 71 {
72 OS.objc_msgSend(this.id, OS.sel_reshape); 72 OS.objc_msgSend(this.id_, OS.sel_reshape);
73 } 73 }
74 74
75 public void setOpenGLContext (NSOpenGLContext context) 75 public void setOpenGLContext (NSOpenGLContext context)
76 { 76 {
77 OS.objc_msgSend(this.id, OS.sel_setOpenGLContext_1, context !is null ? context.id : null); 77 OS.objc_msgSend(this.id_, OS.sel_setOpenGLContext_1, context !is null ? context.id_ : null);
78 } 78 }
79 79
80 public void setPixelFormat (NSOpenGLPixelFormat pixelFormat) 80 public void setPixelFormat (NSOpenGLPixelFormat pixelFormat)
81 { 81 {
82 OS.objc_msgSend(this.id, OS.sel_setPixelFormat_1, pixelFormat !is null ? pixelFormat.id : null); 82 OS.objc_msgSend(this.id_, OS.sel_setPixelFormat_1, pixelFormat !is null ? pixelFormat.id_ : null);
83 } 83 }
84 84
85 public void update () 85 public void update ()
86 { 86 {
87 OS.objc_msgSend(this.id, OS.sel_update); 87 OS.objc_msgSend(this.id_, OS.sel_update);
88 } 88 }
89 89
90 } 90 }