Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed








































Rev Author Line No. Line
3918 Serge 1
2
"http://www.w3.org/TR/html4/loose.dtd">
3
4
5
6
FreeType-2.5.0 API Reference
7
32
33
34
 
35
[Index]
36
37
[TOC]
38

FreeType-2.5.0 API Reference

39
 
40

41
List Processing
42
43

Synopsis

44
45
FT_ListFT_List_AddFT_List_Iterate
46
FT_ListNodeFT_List_InsertFT_List_Destructor
47
FT_ListRecFT_List_RemoveFT_List_Finalize
48
FT_ListNodeRecFT_List_Up
49
FT_List_FindFT_List_Iterator
50


51
 
52
53

This section contains various definitions related to list processing using doubly-linked nodes.

54

55
56

FT_List

57
58
Defined in FT_TYPES_H (freetype/fttypes.h).
59

60
61
 
62
  typedef struct FT_ListRec_*  FT_List;
63
 
64

65
66

A handle to a list record (see FT_ListRec).

67

68
69

70
[Index]
71
72
[TOC]
73
 
74
75

FT_ListNode

76
77
Defined in FT_TYPES_H (freetype/fttypes.h).
78

79
80
 
81
  typedef struct FT_ListNodeRec_*  FT_ListNode;
82
 
83

84
85

Many elements and objects in FreeType are listed through an FT_List record (see FT_ListRec). As its name suggests, an FT_ListNode is a handle to a single list element.

86

87
88

89
[Index]
90
91
[TOC]
92
 
93
94

FT_ListRec

95
96
Defined in FT_TYPES_H (freetype/fttypes.h).
97

98
99
 
100
  typedef struct  FT_ListRec_
101
  {
102
    FT_ListNode  head;
103
    FT_ListNode  tail;
104
 
105
  } FT_ListRec;
106
 
107

108
109

A structure used to hold a simple doubly-linked list. These are used in many parts of FreeType.

110

111
fields
112

113
114
head
115

The head (first element) of doubly-linked list.

116
117
tail
118

The tail (last element) of doubly-linked list.

119
120
121
122
123

124
[Index]
125
126
[TOC]
127
 
128
129

FT_ListNodeRec

130
131
Defined in FT_TYPES_H (freetype/fttypes.h).
132

133
134
 
135
  typedef struct  FT_ListNodeRec_
136
  {
137
    FT_ListNode  prev;
138
    FT_ListNode  next;
139
    void*        data;
140
 
141
  } FT_ListNodeRec;
142
 
143

144
145

A structure used to hold a single list element.

146

147
fields
148

149
150
prev
151

The previous element in the list. NULL if first.

152
153
next
154

The next element in the list. NULL if last.

155
156
data
157

A typeless pointer to the listed object.

158
159
160
161
162

163
[Index]
164
165
[TOC]
166
 
167
168

FT_List_Find

169
170
Defined in FT_LIST_H (freetype/ftlist.h).
171

172
173
 
174
  FT_EXPORT( FT_ListNode )
175
  FT_List_Find( FT_List  list,
176
                void*    data );
177
 
178

179
180

Find the list node for a given listed object.

181

182
input
183

184
185
list
186

A pointer to the parent list.

187
188
data
189

The address of the listed object.

190
191
192
193
return
194

List node. NULL if it wasn't found.

195
196
197

198
[Index]
199
200
[TOC]
201
 
202
203

FT_List_Add

204
205
Defined in FT_LIST_H (freetype/ftlist.h).
206

207
208
 
209
  FT_EXPORT( void )
210
  FT_List_Add( FT_List      list,
211
               FT_ListNode  node );
212
 
213

214
215

Append an element to the end of a list.

216

217
inout
218

219
220
list
221

A pointer to the parent list.

222
223
node
224

The node to append.

225
226
227
228
229

230
[Index]
231
232
[TOC]
233
 
234
235

FT_List_Insert

236
237
Defined in FT_LIST_H (freetype/ftlist.h).
238

239
240
 
241
  FT_EXPORT( void )
242
  FT_List_Insert( FT_List      list,
243
                  FT_ListNode  node );
244
 
245

246
247

Insert an element at the head of a list.

248

249
inout
250

251
252
list
253

A pointer to parent list.

254
255
node
256

The node to insert.

257
258
259
260
261

262
[Index]
263
264
[TOC]
265
 
266
267

FT_List_Remove

268
269
Defined in FT_LIST_H (freetype/ftlist.h).
270

271
272
 
273
  FT_EXPORT( void )
274
  FT_List_Remove( FT_List      list,
275
                  FT_ListNode  node );
276
 
277

278
279

Remove a node from a list. This function doesn't check whether the node is in the list!

280

281
input
282

283
284
node
285

The node to remove.

286
287
288
289
inout
290

291
292
list
293

A pointer to the parent list.

294
295
296
297
298

299
[Index]
300
301
[TOC]
302
 
303
304

FT_List_Up

305
306
Defined in FT_LIST_H (freetype/ftlist.h).
307

308
309
 
310
  FT_EXPORT( void )
311
  FT_List_Up( FT_List      list,
312
              FT_ListNode  node );
313
 
314

315
316

Move a node to the head/top of a list. Used to maintain LRU lists.

317

318
inout
319

320
321
list
322

A pointer to the parent list.

323
324
node
325

The node to move.

326
327
328
329
330

331
[Index]
332
333
[TOC]
334
 
335
336

FT_List_Iterator

337
338
Defined in FT_LIST_H (freetype/ftlist.h).
339

340
341
 
342
  typedef FT_Error
343
  (*FT_List_Iterator)( FT_ListNode  node,
344
                       void*        user );
345
 
346

347
348

An FT_List iterator function which is called during a list parse by FT_List_Iterate.

349

350
input
351

352
353
node
354

The current iteration list node.

355
356
user
357

A typeless pointer passed to FT_List_Iterate. Can be used to point to the iteration's state.

358
359
360
361
362

363
[Index]
364
365
[TOC]
366
 
367
368

FT_List_Iterate

369
370
Defined in FT_LIST_H (freetype/ftlist.h).
371

372
373
 
374
  FT_EXPORT( FT_Error )
375
  FT_List_Iterate( FT_List           list,
376
                   FT_List_Iterator  iterator,
377
                   void*             user );
378
 
379

380
381

Parse a list and calls a given iterator function on each element. Note that parsing is stopped as soon as one of the iterator calls returns a non-zero value.

382

383
input
384

385
386
list
387

A handle to the list.

388
389
iterator
390

An iterator function, called on each node of the list.

391
392
user
393

A user-supplied field which is passed as the second argument to the iterator.

394
395
396
397
return
398

The result (a FreeType error code) of the last iterator call.

399
400
401

402
[Index]
403
404
[TOC]
405
 
406
407

FT_List_Destructor

408
409
Defined in FT_LIST_H (freetype/ftlist.h).
410

411
412
 
413
  typedef void
414
  (*FT_List_Destructor)( FT_Memory  memory,
415
                         void*      data,
416
                         void*      user );
417
 
418

419
420

An FT_List iterator function which is called during a list finalization by FT_List_Finalize to destroy all elements in a given list.

421

422
input
423

424
425
system
426

The current system object.

427
428
data
429

The current object to destroy.

430
431
user
432

A typeless pointer passed to FT_List_Iterate. It can be used to point to the iteration's state.

433
434
435
436
437

438
[Index]
439
440
[TOC]
441
 
442
443

FT_List_Finalize

444
445
Defined in FT_LIST_H (freetype/ftlist.h).
446

447
448
 
449
  FT_EXPORT( void )
450
  FT_List_Finalize( FT_List             list,
451
                    FT_List_Destructor  destroy,
452
                    FT_Memory           memory,
453
                    void*               user );
454
 
455

456
457

Destroy all elements in the list as well as the list itself.

458

459
input
460

461
462
list
463

A handle to the list.

464
465
destroy
466

A list destructor that will be applied to each element of the list.

467
468
memory
469

The current memory object which handles deallocation.

470
471
user
472

A user-supplied field which is passed as the last argument to the destructor.

473
474
475
476
note
477

This function expects that all nodes added by FT_List_Add or FT_List_Insert have been dynamically allocated.

478
479
480

481
[Index]
482
483
[TOC]
484
 
485
486