Hash :
c713d924
Author :
Date :
2000-08-01T13:17:04
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
/***************************************************************************/
/* */
/* ftsystem.h */
/* */
/* FreeType low-level system interface definition (specification). */
/* */
/* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef FTSYSTEM_H
#define FTSYSTEM_H
#ifdef __cplusplus
extern "C" {
#endif
/*************************************************************************/
/* */
/* M E M O R Y M A N A G E M E N T */
/* */
/*************************************************************************/
typedef struct FT_MemoryRec_* FT_Memory;
typedef void* (*FT_Alloc_Func)( FT_Memory memory,
long size );
typedef void (*FT_Free_Func)( FT_Memory memory,
void* block );
typedef void* (*FT_Realloc_Func)( FT_Memory memory,
long cur_size,
long new_size,
void* block );
struct FT_MemoryRec_
{
void* user;
FT_Alloc_Func alloc;
FT_Free_Func free;
FT_Realloc_Func realloc;
};
/*************************************************************************/
/* */
/* I / O M A N A G E M E N T */
/* */
/*************************************************************************/
typedef union FT_StreamDesc_
{
long value;
void* pointer;
} FT_StreamDesc;
typedef struct FT_StreamRec_* FT_Stream;
typedef unsigned long (*FT_Stream_IO)( FT_Stream stream,
unsigned long offset,
unsigned char* buffer,
unsigned long count );
typedef void (*FT_Stream_Close)( FT_Stream stream );
struct FT_StreamRec_
{
unsigned char* base;
unsigned long size;
unsigned long pos;
FT_StreamDesc descriptor;
FT_StreamDesc pathname; /* ignored by FreeType -- */
/* useful for debugging */
FT_Stream_IO read;
FT_Stream_Close close;
FT_Memory memory;
unsigned char* cursor;
unsigned char* limit;
};
#ifdef __cplusplus
}
#endif
#endif /* FTSYSTEM_H */
/* END */