Mercurial > projects > dstep
diff dstep/appkit/NSTextStorageScripting.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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dstep/appkit/NSTextStorageScripting.d Sun Jan 03 22:06:11 2010 +0100 @@ -0,0 +1,89 @@ +/** + * Copyright: Copyright (c) 2009 Jacob Carlborg. + * Authors: Jacob Carlborg + * Version: Initial created: Sep 24, 2009 + * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) + */ +module dstep.appkit.NSTextStorageScripting; + +import dstep.appkit.NSTextStorage; +import dstep.objc.bridge.Bridge; +import dstep.objc.objc; + +const TScripting = ` + + NSArray attributeRuns () + { + return invokeObjcSelf!(NSArray, "attributeRuns"); + } + + void setAttributeRuns (NSArray attributeRuns) + { + return invokeObjcSelf!(void, "setAttributeRuns:", NSArray)(attributeRuns); + } + + NSArray paragraphs () + { + return invokeObjcSelf!(NSArray, "paragraphs"); + } + + void setParagraphs (NSArray paragraphs) + { + return invokeObjcSelf!(void, "setParagraphs:", NSArray)(paragraphs); + } + + NSArray words () + { + return invokeObjcSelf!(NSArray, "words"); + } + + void setWords (NSArray words) + { + return invokeObjcSelf!(void, "setWords:", NSArray)(words); + } + + NSArray characters () + { + return invokeObjcSelf!(NSArray, "characters"); + } + + void setCharacters (NSArray characters) + { + return invokeObjcSelf!(void, "setCharacters:", NSArray)(characters); + } + + NSFont font () + { + return invokeObjcSelf!(NSFont, "font"); + } + + void setFont (NSFont font) + { + return invokeObjcSelf!(void, "setFont:", NSFont)(font); + } + + NSColor foregroundColor () + { + return invokeObjcSelf!(NSColor, "foregroundColor"); + } + + void setForegroundColor (NSColor color) + { + return invokeObjcSelf!(void, "setForegroundColor:", NSColor)(color); + } + + //mixin ObjcBindMethod!(attributeRuns, "attributeRuns"); + //mixin ObjcBindMethod!(setAttributeRuns, "setAttributeRuns:"); + //mixin ObjcBindMethod!(paragraphs, "paragraphs"); + //mixin ObjcBindMethod!(setParagraphs, "setParagraphs:"); + //mixin ObjcBindMethod!(words, "words"); + //mixin ObjcBindMethod!(setWords, "setWords:"); + //mixin ObjcBindMethod!(characters, "characters"); + //mixin ObjcBindMethod!(setCharacters, "setCharacters:"); + //mixin ObjcBindMethod!(font, "font"); + //mixin ObjcBindMethod!(setFont, "setFont:"); + //mixin ObjcBindMethod!(foregroundColor, "foregroundColor"); + //mixin ObjcBindMethod!(setForegroundColor, "setForegroundColor:"); + +`; +