annotate dstep/appkit/NSGraphics.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Sep 24, 2009
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.appkit.NSGraphics;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 import dstep.appkit.AppKitDefines;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
10 import dstep.appkit.NSColor;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.appkit.NSView;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.applicationservices.coregraphics.CGBase;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 import dstep.foundation.NSGeometry;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 import dstep.foundation.NSObjCRuntime;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
15 import dstep.foundation.NSString;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 import dstep.objc.bridge.Bridge;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 import dstep.objc.objc;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
18
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 import bindings = dstep.appkit.NSGraphics_bindings;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
20
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 alias NSUInteger NSCompositingOperation;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22 alias NSUInteger NSBackingStoreType;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 alias NSInteger NSWindowOrderingMode;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24 alias NSUInteger NSFocusRingPlacement;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
25 alias NSUInteger NSFocusRingType;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
26 alias int NSWindowDepth;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
27 alias NSUInteger NSAnimationEffect;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
28
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
29 extern (C)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
30 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
31 extern
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
32 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
33 const CGFloat NSWhite;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34 const CGFloat NSLightGray;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 const CGFloat NSDarkGray;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 const CGFloat NSBlack;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 private
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42 NSString NSCalibratedWhiteColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
43 NSString NSCalibratedBlackColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
44 NSString NSCalibratedRGBColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
45 NSString NSDeviceWhiteColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
46 NSString NSDeviceBlackColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
47 NSString NSDeviceRGBColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
48 NSString NSDeviceCMYKColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
49 NSString NSNamedColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
50 NSString NSPatternColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
51 NSString NSCustomColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
52 NSString NSDeviceResolution_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
53 NSString NSDeviceColorSpaceName_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
54 NSString NSDeviceBitsPerSample_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
55 NSString NSDeviceIsScreen_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
56 NSString NSDeviceIsPrinter_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
57 NSString NSDeviceSize_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
58 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
59
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
60 NSString NSCalibratedWhiteColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
61 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
62 if (NSCalibratedWhiteColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
63 return NSCalibratedWhiteColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
64
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
65 return NSCalibratedWhiteColorSpace_ = new NSString(bindings.NSCalibratedWhiteColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
66 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
67
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
68 NSString NSCalibratedBlackColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
69 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
70 if (NSCalibratedBlackColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
71 return NSCalibratedBlackColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
72
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
73 return NSCalibratedBlackColorSpace_ = new NSString(bindings.NSCalibratedBlackColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
74 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
75
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
76 NSString NSCalibratedRGBColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
77 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
78 if (NSCalibratedRGBColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
79 return NSCalibratedRGBColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
80
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
81 return NSCalibratedRGBColorSpace_ = new NSString(bindings.NSCalibratedRGBColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
82 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
83
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
84 NSString NSDeviceWhiteColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
85 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
86 if (NSDeviceWhiteColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
87 return NSDeviceWhiteColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
88
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
89 return NSDeviceWhiteColorSpace_ = new NSString(bindings.NSDeviceWhiteColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
90 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
91
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
92 NSString NSDeviceBlackColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
93 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
94 if (NSDeviceBlackColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
95 return NSDeviceBlackColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
96
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
97 return NSDeviceBlackColorSpace_ = new NSString(bindings.NSDeviceBlackColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
98 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
99
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
100 NSString NSDeviceRGBColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
101 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
102 if (NSDeviceRGBColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
103 return NSDeviceRGBColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
104
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
105 return NSDeviceRGBColorSpace_ = new NSString(bindings.NSDeviceRGBColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
106 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
107
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
108 NSString NSDeviceCMYKColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
109 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
110 if (NSDeviceCMYKColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
111 return NSDeviceCMYKColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
112
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
113 return NSDeviceCMYKColorSpace_ = new NSString(bindings.NSDeviceCMYKColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
114 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
115
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
116 NSString NSNamedColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
117 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
118 if (NSNamedColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
119 return NSNamedColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
120
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
121 return NSNamedColorSpace_ = new NSString(bindings.NSNamedColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
122 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
123
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
124 NSString NSPatternColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
125 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
126 if (NSPatternColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
127 return NSPatternColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
128
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
129 return NSPatternColorSpace_ = new NSString(bindings.NSPatternColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
130 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
131
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
132 NSString NSCustomColorSpace ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
133 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
134 if (NSCustomColorSpace_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
135 return NSCustomColorSpace_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
136
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
137 return NSCustomColorSpace_ = new NSString(bindings.NSCustomColorSpace);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
138 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
139
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
140 NSString NSDeviceResolution ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
141 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
142 if (NSDeviceResolution_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
143 return NSDeviceResolution_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
144
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
145 return NSDeviceResolution_ = new NSString(bindings.NSDeviceResolution);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
146 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
147
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
148 NSString NSDeviceColorSpaceName ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
149 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
150 if (NSDeviceColorSpaceName_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
151 return NSDeviceColorSpaceName_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
152
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
153 return NSDeviceColorSpaceName_ = new NSString(bindings.NSDeviceColorSpaceName);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
154 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
155
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
156 NSString NSDeviceBitsPerSample ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
157 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
158 if (NSDeviceBitsPerSample_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
159 return NSDeviceBitsPerSample_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
160
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
161 return NSDeviceBitsPerSample_ = new NSString(bindings.NSDeviceBitsPerSample);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
162 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
163
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
164 NSString NSDeviceIsScreen ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
165 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
166 if (NSDeviceIsScreen_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
167 return NSDeviceIsScreen_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
168
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
169 return NSDeviceIsScreen_ = new NSString(bindings.NSDeviceIsScreen);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
170 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
171
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
172 NSString NSDeviceIsPrinter ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
173 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
174 if (NSDeviceIsPrinter_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
175 return NSDeviceIsPrinter_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
176
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
177 return NSDeviceIsPrinter_ = new NSString(bindings.NSDeviceIsPrinter);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
178 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
179
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
180 NSString NSDeviceSize ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
181 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
182 if (NSDeviceSize_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
183 return NSDeviceSize_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
184
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
185 return NSDeviceSize_ = new NSString(bindings.NSDeviceSize);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
186 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
187
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
188 enum
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
189 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
190 NSCompositeClear = 0,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
191 NSCompositeCopy = 1,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
192 NSCompositeSourceOver = 2,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
193 NSCompositeSourceIn = 3,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
194 NSCompositeSourceOut = 4,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
195 NSCompositeSourceAtop = 5,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
196 NSCompositeDestinationOver = 6,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
197 NSCompositeDestinationIn = 7,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
198 NSCompositeDestinationOut = 8,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
199 NSCompositeDestinationAtop = 9,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
200 NSCompositeXOR = 10,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
201 NSCompositePlusDarker = 11,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
202 NSCompositeHighlight = 12,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
203 NSCompositePlusLighter = 13
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
204 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
205
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
206 enum
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
207 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
208 NSBackingStoreRetained = 0,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
209 NSBackingStoreNonretained = 1,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
210 NSBackingStoreBuffered = 2
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
211 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
212
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
213 enum
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
214 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
215 NSWindowAbove = 1,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
216 NSWindowBelow = -1,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
217 NSWindowOut = 0
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
218 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
219
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
220 enum
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
221 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
222 NSFocusRingOnly = 0,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
223 NSFocusRingBelow = 1,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
224 NSFocusRingAbove = 2
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
225 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
226
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
227 enum
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
228 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
229 NSFocusRingTypeDefault = 0,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
230 NSFocusRingTypeNone = 1,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
231 NSFocusRingTypeExterior = 2
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
232 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
233
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
234 enum
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
235 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
236 NSAnimationEffectDisappearingItemDefault = 0,
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
237 NSAnimationEffectPoof = 10
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
238 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
239 /*
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
240 int NSBestDepth (NSString colorSpace, NSInteger bps, NSInteger bpp, bool planar, bool* exactMatch)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
241 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
242 return Bridge.invokeObjcFunction!(int, bindings.NSBestDepth, NSString, NSInteger, NSInteger, bool, bool*)(colorSpace, bps, bpp, planar, exactMatch);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
243 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
244
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
245 NSString NSColorSpaceFromDepth (int depth)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
246 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
247 return Bridge.invokeObjcFunction!(NSString, bindings.NSColorSpaceFromDepth, int)(depth);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
248 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
249
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
250 NSInteger NSNumberOfColorComponents (NSString colorSpaceName)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
251 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
252 return Bridge.invokeObjcFunction!(NSInteger, bindings.NSNumberOfColorComponents, NSString)(colorSpaceName);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
253 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
254
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
255 NSColor NSReadPixel (NSPoint passedPoint)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
256 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
257 return Bridge.invokeObjcFunction!(NSColor, bindings.NSReadPixel, NSPoint)(passedPoint);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
258 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
259
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
260 void NSDrawBitmap (NSRect rect, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, NSInteger bpp, NSInteger bpr, bool isPlanar, bool hasAlpha, NSString colorSpaceName, char*[5] data)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
261 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
262 return Bridge.invokeObjcFunction!(void, bindings.NSDrawBitmap, NSRect, NSInteger, NSInteger, NSInteger, NSInteger, NSInteger, NSInteger, bool, bool, NSString, char*[5])(rect, width, height, bps, spp, bpp, bpr, isPlanar, hasAlpha, colorSpaceName, data);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
263 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
264
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
265 void NSShowAnimationEffect (uint animationEffect, NSPoint centerLocation, NSSize size, Object animationDelegate, SEL didEndSelector, void* contextInfo)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
266 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
267 return Bridge.invokeObjcFunction!(void, bindings.NSShowAnimationEffect, uint, NSPoint, NSSize, Object, SEL, void*)(animationEffect, centerLocation, size, animationDelegate, didEndSelector, contextInfo);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
268 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
269 */
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
270 extern (C)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
271 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
272 bool NSPlanarFromDepth (int depth);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
273 NSInteger NSBitsPerSampleFromDepth (int depth);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
274 NSInteger NSBitsPerPixelFromDepth (int depth);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
275 NSWindowDepth* NSAvailableWindowDepths ();
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
276 void NSRectFill (NSRect aRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
277 void NSRectFillList (NSRect* rects, NSInteger count);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
278 void NSRectFillListWithGrays (NSRect* rects, CGFloat* grays, NSInteger num);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
279 void NSRectFillListWithColors (NSRect* rects, NSColor** colors, NSInteger num);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
280 void NSRectFillUsingOperation (NSRect aRect, uint op);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
281 void NSRectFillListUsingOperation (NSRect* rects, NSInteger count, uint op);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
282 void NSRectFillListWithColorsUsingOperation (NSRect* rects, NSColor** colors, NSInteger num, uint op);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
283 void NSFrameRect (NSRect aRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
284 void NSFrameRectWithWidth (NSRect aRect, CGFloat frameWidth);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
285 void NSFrameRectWithWidthUsingOperation (NSRect aRect, CGFloat frameWidth, uint op);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
286 void NSRectClip (NSRect aRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
287 void NSRectClipList (NSRect* rects, NSInteger count);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
288 NSRect NSDrawTiledRects (NSRect boundsRect, NSRect clipRect, NSRectEdge* sides, CGFloat* grays, NSInteger count);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
289 void NSDrawGrayBezel (NSRect aRect, NSRect clipRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
290 void NSDrawGroove (NSRect aRect, NSRect clipRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
291 void NSDrawWhiteBezel (NSRect aRect, NSRect clipRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
292 void NSDrawButton (NSRect aRect, NSRect clipRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
293 void NSEraseRect (NSRect aRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
294 void NSCopyBits (NSInteger srcGState, NSRect srcRect, NSPoint destPoint);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
295 void NSHighlightRect (NSRect aRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
296 void NSBeep ();
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
297 void NSCountWindows (NSInteger* count);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
298 void NSWindowList (NSInteger size, NSInteger* list);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
299 void NSCountWindowsForContext (NSInteger context, NSInteger* count);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
300 void NSWindowListForContext (NSInteger context, NSInteger size, NSInteger* list);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
301 NSInteger NSGetWindowServerMemory (NSInteger context, NSInteger* virtualMemory, NSInteger* windowBackingMemory, NSString** windowDumpString);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
302 NSRect NSDrawColorTiledRects (NSRect boundsRect, NSRect clipRect, NSRectEdge* sides, NSColor** colors, NSInteger count);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
303 void NSDrawDarkBezel (NSRect aRect, NSRect clipRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
304 void NSDrawLightBezel (NSRect aRect, NSRect clipRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
305 void NSDottedFrameRect (NSRect aRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
306 void NSDrawWindowBackground (NSRect aRect);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
307 void NSSetFocusRingStyle (uint placement);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
308 void NSDisableScreenUpdates ();
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
309 void NSEnableScreenUpdates ();
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff changeset
310 }