1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.c-types alien.syntax kernel destructors
4 core-foundation core-foundation.dictionaries
5 core-foundation.strings
6 core-foundation.utilities ;
7 IN: core-foundation.attributed-strings
9 TYPEDEF: void* CFAttributedStringRef
11 FUNCTION: CFAttributedStringRef CFAttributedStringCreate (
14 CFDictionaryRef attributes
17 : <CFAttributedString> ( string assoc -- alien )
19 [ >cf &CFRelease ] bi@
20 [ kCFAllocatorDefault ] 2dip CFAttributedStringCreate