]> gitweb.factorcode.org Git - factor.git/blob - basis/core-foundation/attributed-strings/attributed-strings.factor
Fix conflict in images vocab
[factor.git] / basis / core-foundation / attributed-strings / attributed-strings.factor
1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.syntax kernel destructors core-foundation
4 core-foundation.utilities ;
5 IN: core-foundation.attributed-strings
6
7 TYPEDEF: void* CFAttributedStringRef
8
9 FUNCTION: CFAttributedStringRef CFAttributedStringCreate (
10    CFAllocatorRef alloc,
11    CFStringRef str,
12    CFDictionaryRef attributes
13 ) ;
14
15 : <CFAttributedString> ( string assoc -- alien )
16     [
17         [ >cf &CFRelease ] bi@
18         [ kCFAllocatorDefault ] 2dip CFAttributedStringCreate
19     ] with-destructors ;