OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* ftsystem.h */ | 3 /* ftsystem.h */ |
4 /* */ | 4 /* */ |
5 /* FreeType low-level system interface definition (specification). */ | 5 /* FreeType low-level system interface definition (specification). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 1996-2001, 2002, 2005, 2010 by */ | 7 /* Copyright 1996-2001, 2002, 2005, 2010 by */ |
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
15 /* */ | 15 /* */ |
16 /***************************************************************************/ | 16 /***************************************************************************/ |
17 | 17 |
18 | 18 |
19 #ifndef __FTSYSTEM_H__ | 19 #ifndef __FTSYSTEM_H__ |
20 #define __FTSYSTEM_H__ | 20 #define __FTSYSTEM_H__ |
21 | 21 |
22 | 22 |
23 #include "../ft2build.h" | 23 #include <ft2build.h> |
24 | 24 |
25 | 25 |
26 FT_BEGIN_HEADER | 26 FT_BEGIN_HEADER |
27 | 27 |
28 | 28 |
29 /*************************************************************************/ | 29 /*************************************************************************/ |
30 /* */ | 30 /* */ |
31 /* <Section> */ | 31 /* <Section> */ |
32 /* system_interface */ | 32 /* system_interface */ |
33 /* */ | 33 /* */ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 * The size in bytes to allocate. | 82 * The size in bytes to allocate. |
83 * | 83 * |
84 * @return: | 84 * @return: |
85 * Address of new memory block. 0~in case of failure. | 85 * Address of new memory block. 0~in case of failure. |
86 * | 86 * |
87 */ | 87 */ |
88 typedef void* | 88 typedef void* |
89 (*FT_Alloc_Func)( FT_Memory memory, | 89 (*FT_Alloc_Func)( FT_Memory memory, |
90 long size ); | 90 long size ); |
91 | 91 |
92 /* Sunliang.Liu 20100915 sync 221's revison. */ | |
93 typedef void* | |
94 (*FT_AllocDebug_Func)( FT_Memory memory, | |
95 long size, const char* filename, int line); | |
96 | |
97 | |
98 | 92 |
99 /************************************************************************* | 93 /************************************************************************* |
100 * | 94 * |
101 * @functype: | 95 * @functype: |
102 * FT_Free_Func | 96 * FT_Free_Func |
103 * | 97 * |
104 * @description: | 98 * @description: |
105 * A function used to release a given block of memory. | 99 * A function used to release a given block of memory. |
106 * | 100 * |
107 * @input: | 101 * @input: |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 * A pointer type to an memory freeing function. | 165 * A pointer type to an memory freeing function. |
172 * | 166 * |
173 * realloc :: | 167 * realloc :: |
174 * A pointer type to a reallocation function. | 168 * A pointer type to a reallocation function. |
175 * | 169 * |
176 */ | 170 */ |
177 struct FT_MemoryRec_ | 171 struct FT_MemoryRec_ |
178 { | 172 { |
179 void* user; | 173 void* user; |
180 FT_Alloc_Func alloc; | 174 FT_Alloc_Func alloc; |
181 FT_AllocDebug_Func allocdebug; /* Sunliang.Liu 20100915 sync 221's revi
son. */ | |
182 FT_Free_Func free; | 175 FT_Free_Func free; |
183 FT_Realloc_Func realloc; | 176 FT_Realloc_Func realloc; |
184 }; | 177 }; |
185 | 178 |
186 | 179 |
187 /*************************************************************************/ | 180 /*************************************************************************/ |
188 /* */ | 181 /* */ |
189 /* I / O M A N A G E M E N T */ | 182 /* I / O M A N A G E M E N T */ |
190 /* */ | 183 /* */ |
191 /*************************************************************************/ | 184 /*************************************************************************/ |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 FT_StreamDesc pathname; | 328 FT_StreamDesc pathname; |
336 FT_Stream_IoFunc read; | 329 FT_Stream_IoFunc read; |
337 FT_Stream_CloseFunc close; | 330 FT_Stream_CloseFunc close; |
338 | 331 |
339 FT_Memory memory; | 332 FT_Memory memory; |
340 unsigned char* cursor; | 333 unsigned char* cursor; |
341 unsigned char* limit; | 334 unsigned char* limit; |
342 | 335 |
343 } FT_StreamRec; | 336 } FT_StreamRec; |
344 | 337 |
345 | |
346 /* */ | 338 /* */ |
347 | 339 |
348 | 340 |
349 FT_END_HEADER | 341 FT_END_HEADER |
350 | 342 |
351 #endif /* __FTSYSTEM_H__ */ | 343 #endif /* __FTSYSTEM_H__ */ |
352 | 344 |
353 | 345 |
354 /* END */ | 346 /* END */ |
OLD | NEW |