D
dongliu
Unregistered / Unconfirmed
GUEST, unregistred user!
#ifndef __PDFAPI_H__
#define __PDFAPI_H__
#include "machine.h" /* defines basic data types and sizes */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define generic types used throughout API
*/
typedef uint16 CW;
/* data type capable of holding a single codeword */
typedef uint8 BUFDATA;
/* input/output basic unit */
#if (ENVTYPE &
PDF_E_WINMASK) != 0 /* Win16/32 system */
/*
* For windows environments, we know we have already included the
* windows.h header file so we have all definitions we already need. We
* just map the windows definitions to ours
*/
typedef LONG FILEPOS;
/* file position indicator */
# if (ENVTYPE == PDF_E_WIN32)
typedef HANDLE FILEHANDLE;
typedef HANDLE GENHANDLE;
# else
typedef HFILE FILEHANDLE;
typedef HANDLE GENHANDLE;
# endif
#else
/*do
S/other environments */
typedef int FILEHANDLE;
/* open file handle for O/S */
typedef long FILEPOS;
/* file position indicator */
typedef int16 GENHANDLE;
#endif
/*
Pointer definitions:
LP - full-size address specification prefix
C - constant data prefix
LPC - full-size address specification to constant data
*/
typedef char FAR *LPSTRING;
typedef const char FAR *LPCSTRING;
/* non-changing string */
typedef BUFDATA FAR *LPBUF;
/* source data buffer type */
typedef const BUFDATA FAR *LPCBUF;
typedef void FAR *LPVOID;
/* generic buffer pointer */
typedef const void FAR *LPCVOID;
typedef uint32 FAR *LPUINT32;
typedef uint16 FAR *LPUINT16;
typedef CW FAR *LPCW;
/* symbol codeword buffer pointer */
typedef const CW FAR *LPCCW;
typedef uint32 PDFSIZET, FAR *LPPDFSIZET;
typedef BUFDATA FAR *LPMEMBUF;
typedef int16 PDFSTATUS;
typedef PDFSIZET PDFCALLBACK FNPDFIO( int16 nCmd, LPBUF lpBufIO, uint16 nBytes, LPVOID lpGeneric );
typedef FNPDFIO FAR *LPFNPDFIO;
typedef struct s_pdfobject {
uint16 ioType;
/* Input/Output */
uint16 ioDirection;
/* File/Callback/Memory */
PDFSIZET nLen;
/* (Bytes to encode)/(Bytes written) */
union {
LPMEMBUF lpMemBuffer;
struct {
LPFNPDFIO lpfnCallback;
LPVOID lpAppArg;
} func;
struct {
FILEHANDLE hFile;
FILEPOS nInitPos;
Bool fMustClose;
} file;
struct {
LPMEMBUF lpMem;
/* For CF_TEXT clipboard input */
uint16 fmtOutput;
/* API definition for output format */
} clip;
} access;
Bool fIsHuge;
LPVOID lpState;
/* internal state information/buffer */
} PDFObject;
typedef PDFObject FAR *LPPDFObject;
#define __PDFAPI_H__
#include "machine.h" /* defines basic data types and sizes */
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define generic types used throughout API
*/
typedef uint16 CW;
/* data type capable of holding a single codeword */
typedef uint8 BUFDATA;
/* input/output basic unit */
#if (ENVTYPE &
PDF_E_WINMASK) != 0 /* Win16/32 system */
/*
* For windows environments, we know we have already included the
* windows.h header file so we have all definitions we already need. We
* just map the windows definitions to ours
*/
typedef LONG FILEPOS;
/* file position indicator */
# if (ENVTYPE == PDF_E_WIN32)
typedef HANDLE FILEHANDLE;
typedef HANDLE GENHANDLE;
# else
typedef HFILE FILEHANDLE;
typedef HANDLE GENHANDLE;
# endif
#else
/*do
S/other environments */
typedef int FILEHANDLE;
/* open file handle for O/S */
typedef long FILEPOS;
/* file position indicator */
typedef int16 GENHANDLE;
#endif
/*
Pointer definitions:
LP - full-size address specification prefix
C - constant data prefix
LPC - full-size address specification to constant data
*/
typedef char FAR *LPSTRING;
typedef const char FAR *LPCSTRING;
/* non-changing string */
typedef BUFDATA FAR *LPBUF;
/* source data buffer type */
typedef const BUFDATA FAR *LPCBUF;
typedef void FAR *LPVOID;
/* generic buffer pointer */
typedef const void FAR *LPCVOID;
typedef uint32 FAR *LPUINT32;
typedef uint16 FAR *LPUINT16;
typedef CW FAR *LPCW;
/* symbol codeword buffer pointer */
typedef const CW FAR *LPCCW;
typedef uint32 PDFSIZET, FAR *LPPDFSIZET;
typedef BUFDATA FAR *LPMEMBUF;
typedef int16 PDFSTATUS;
typedef PDFSIZET PDFCALLBACK FNPDFIO( int16 nCmd, LPBUF lpBufIO, uint16 nBytes, LPVOID lpGeneric );
typedef FNPDFIO FAR *LPFNPDFIO;
typedef struct s_pdfobject {
uint16 ioType;
/* Input/Output */
uint16 ioDirection;
/* File/Callback/Memory */
PDFSIZET nLen;
/* (Bytes to encode)/(Bytes written) */
union {
LPMEMBUF lpMemBuffer;
struct {
LPFNPDFIO lpfnCallback;
LPVOID lpAppArg;
} func;
struct {
FILEHANDLE hFile;
FILEPOS nInitPos;
Bool fMustClose;
} file;
struct {
LPMEMBUF lpMem;
/* For CF_TEXT clipboard input */
uint16 fmtOutput;
/* API definition for output format */
} clip;
} access;
Bool fIsHuge;
LPVOID lpState;
/* internal state information/buffer */
} PDFObject;
typedef PDFObject FAR *LPPDFObject;