comparison dstep/appkit/NSGlyphGenerator.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 b9de51448c6b
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Sep 24, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.appkit.NSGlyphGenerator;
8
9 import dstep.appkit.NSFont;
10 import dstep.foundation.NSAttributedString;
11 import dstep.foundation.NSObjCRuntime;
12 import dstep.foundation.NSObject;
13 import dstep.objc.bridge.Bridge;
14 import dstep.objc.objc;
15
16 enum
17 {
18 NSShowControlGlyphs = (1 << 0),
19 NSShowInvisibleGlyphs = (1 << 1),
20 NSWantsBidiLevels = (1 << 2)
21 }
22
23 class NSGlyphGenerator : NSObject
24 {
25 mixin (ObjcWrap);
26
27 void generateGlyphsForGlyphStorage (INSGlyphStorage glyphStorage, NSUInteger nChars, NSUInteger* glyphIndex, NSUInteger* charIndex)
28 {
29 return invokeObjcSelf!(void, "generateGlyphsForGlyphStorage:desiredNumberOfCharacters:glyphIndex:characterIndex:", INSGlyphStorage, NSUInteger, NSUInteger*, NSUInteger*)(glyphStorage, nChars, glyphIndex, charIndex);
30 }
31
32 static Object sharedGlyphGenerator ()
33 {
34 return invokeObjcSelfClass!(Object, "sharedGlyphGenerator");
35 }
36 }
37
38 interface INSGlyphStorage
39 {
40 void insertGlyphs (NSGlyph* glyphs, NSUInteger length, NSUInteger glyphIndex, NSUInteger charIndex);
41 void setIntAttribute (NSInteger attributeTag, NSInteger val, NSUInteger glyphIndex);
42 NSAttributedString attributedString ();
43 NSUInteger layoutOptions ();
44 }
45