GNUstep CoreBase Library 0.2
CFAttributedString.h
1/* CFAttributedString.h
2
3 Copyright (C) 2012 Free Software Foundation, Inc.
4
5 Written by: Stefan Bidigaray
6 Date: April, 2012
7
8 This file is part of the GNUstep CoreBase Library.
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; see the file COPYING.LIB.
22 If not, see <http://www.gnu.org/licenses/> or write to the
23 Free Software Foundation, 51 Franklin Street, Fifth Floor,
24 Boston, MA 02110-1301, USA.
25*/
26
27#ifndef __COREFOUNDATION_CFATTRIBUTEDSTIRNG_H__
28#define __COREFOUNDATION_CFATTRIBUTEDSTIRNG_H__ 1
29
30#include <CoreFoundation/CFBase.h>
31#include <CoreFoundation/CFDictionary.h>
32
33CF_EXTERN_C_BEGIN
35typedef const struct __CFAttributedString *CFAttributedStringRef;
37typedef struct __CFAttributedString *CFMutableAttributedStringRef;
38
45CF_EXPORT CFAttributedStringRef
46CFAttributedStringCreate (CFAllocatorRef alloc, CFStringRef str,
47 CFDictionaryRef attribs);
48
49CF_EXPORT CFAttributedStringRef
50CFAttributedStringCreateCopy (CFAllocatorRef alloc, CFAttributedStringRef str);
51
52CF_EXPORT CFAttributedStringRef
53CFAttributedStringCreateWithSubstring (CFAllocatorRef alloc,
54 CFAttributedStringRef str,
55 CFRange range);
56
57CF_EXPORT CFIndex CFAttributedStringGetLength (CFAttributedStringRef str);
58
59CF_EXPORT CFStringRef CFAttributedStringGetString (CFAttributedStringRef str);
65CF_EXPORT CFTypeRef
66CFAttributedStringGetAttribute (CFAttributedStringRef str, CFIndex loc,
67 CFStringRef attrName, CFRange * effRange);
68
69CF_EXPORT CFDictionaryRef
70CFAttributedStringGetAttributes (CFAttributedStringRef str, CFIndex loc,
71 CFRange * effRange);
72
73CF_EXPORT CFTypeRef
74CFAttributedStringGetAttributeAndLongestEffectiveRange (CFAttributedStringRef
75 str, CFIndex loc,
76 CFStringRef attrName,
77 CFRange inRange,
78 CFRange *
79 longestEffRange);
80
81CF_EXPORT CFDictionaryRef
82CFAttributedStringGetAttributesAndLongestEffectiveRange (CFAttributedStringRef
83 str, CFIndex loc,
84 CFRange inRange,
85 CFRange *
86 longestEffRange);
92CF_EXPORT CFTypeID CFAttributedStringGetTypeID (void);
102CF_EXPORT CFMutableAttributedStringRef
103CFAttributedStringCreateMutable (CFAllocatorRef alloc, CFIndex maxLength);
104
105CF_EXPORT CFMutableAttributedStringRef
106CFAttributedStringCreateMutableCopy (CFAllocatorRef alloc, CFIndex maxLength,
107 CFAttributedStringRef str);
113CF_EXPORT void
114CFAttributedStringBeginEditing (CFMutableAttributedStringRef str);
115
116CF_EXPORT void CFAttributedStringEndEditing (CFMutableAttributedStringRef str);
117
118CF_EXPORT CFMutableStringRef
119CFAttributedStringGetMutableString (CFMutableAttributedStringRef str);
120
121CF_EXPORT void
122CFAttributedStringRemoveAttribute (CFMutableAttributedStringRef str,
123 CFRange range, CFStringRef attrName);
124
125CF_EXPORT void
126CFAttributedStringReplaceString (CFMutableAttributedStringRef str,
127 CFRange range, CFStringRef repl);
128
129CF_EXPORT void
130CFAttributedStringReplaceAttributedString (CFMutableAttributedStringRef str,
131 CFRange range,
132 CFAttributedStringRef repl);
133
134CF_EXPORT void
135CFAttributedStringSetAttribute (CFMutableAttributedStringRef str,
136 CFRange range, CFStringRef attrName,
137 CFTypeRef value);
138
139CF_EXPORT void
140CFAttributedStringSetAttributes (CFMutableAttributedStringRef str,
141 CFRange range, CFDictionaryRef repl,
142 Boolean clearOtherAttribs);
146CF_EXTERN_C_END
147#endif /* __COREFOUNDATION_CFATTRIBUTEDSTIRNG_H__ */
signed long CFIndex
Definition CFBase.h:165
Definition CFBase.h:172
const struct __CFAllocator * CFAllocatorRef
A reference to a CFAllocator object.
Definition CFBase.h:301