2000-07-11 08:12:20 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftsystem.h */
|
|
|
|
/* */
|
2000-07-14 08:16:47 +02:00
|
|
|
/* FreeType low-level system interface definition (specification). */
|
2000-07-11 08:12:20 +02:00
|
|
|
/* */
|
|
|
|
/* 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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
#ifndef FTSYSTEM_H
|
|
|
|
#define FTSYSTEM_H
|
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
|
2000-08-01 15:17:04 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* M E M O R Y M A N A G E M E N T */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
typedef struct FT_MemoryRec_* FT_Memory;
|
2000-04-04 18:46:12 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
|
|
|
|
typedef void* (*FT_Alloc_Func)( FT_Memory memory,
|
|
|
|
long size );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
typedef void (*FT_Free_Func)( FT_Memory memory,
|
|
|
|
void* block );
|
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
typedef void* (*FT_Realloc_Func)( FT_Memory memory,
|
|
|
|
long cur_size,
|
|
|
|
long new_size,
|
|
|
|
void* block );
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
struct FT_MemoryRec_
|
|
|
|
{
|
|
|
|
void* user;
|
|
|
|
FT_Alloc_Func alloc;
|
|
|
|
FT_Free_Func free;
|
|
|
|
FT_Realloc_Func realloc;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* I / O M A N A G E M E N T */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-04-04 18:46:12 +02:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
typedef union FT_StreamDesc_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-07-11 08:12:20 +02:00
|
|
|
long value;
|
|
|
|
void* pointer;
|
2000-04-04 18:46:12 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
} FT_StreamDesc;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct FT_StreamRec_* FT_Stream;
|
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
|
|
|
|
typedef unsigned long (*FT_Stream_IO)( FT_Stream stream,
|
2000-07-05 06:32:02 +02:00
|
|
|
unsigned long offset,
|
|
|
|
unsigned char* buffer,
|
|
|
|
unsigned long count );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
typedef void (*FT_Stream_Close)( FT_Stream stream );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2000-07-11 08:12:20 +02:00
|
|
|
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;
|
1999-12-17 00:11:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-08-01 15:17:04 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
#endif /* FTSYSTEM_H */
|
2000-07-11 08:12:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|