Pajdeg  0.2.2
Pajdeg
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
PDDefines.h File Reference

Definitions for the Pajdeg interface. More...

#include <sys/types.h>
#include "PDType.h"

Go to the source code of this file.

Data Structures

struct  PDPoint
 
struct  PDRect
 
struct  PDSelection
 

Macros

#define PD_SUPPORT_ZLIB
 
#define PD_SUPPORT_CRYPTO
 
#define PD_WARNINGS
 
#define PD_ASSERTS
 
#define DEBUG_PDTYPES
 
#define __deprecated
 
#define PD_DEPRECATED(introduce_version, deprecate_version)   __deprecated
 
#define PDIntegerFromString   atol
 
#define PDRealFromString   atof
 
#define PDSizeFromString   atol
 
#define PDOffsetFromString   atoll
 
#define PDRectFromOSRect(osr)   (PDRect) {{osr.origin.x, osr.origin.y}, {osr.origin.x+osr.size.width, osr.origin.y+osr.size.height}}
 
#define PDRectToOSRect(rect)   {{rect.a.x, rect.a.y}, {rect.b.x-rect.a.x, rect.b.y-rect.a.y}}
 
#define kPDFTypeStrings   NULL, "/Page", "/Pages", "/Catalog", "/Annot", "/Font", "/FontDescriptor", "/Action"
 

Typedefs

typedef long PDInteger
 
typedef float PDReal
 
typedef unsigned char PDBool
 
typedef size_t PDSize
 
typedef long long PDOffset
 
typedef struct PDPoint PDPoint
 
typedef struct PDRect PDRect
 
typedef const char ** PDID
 
typedef void(* PDDeallocator) (void *ob)
 
typedef void(* PDSynchronizer) (void *parser, void *object, const void *syncInfo)
 
typedef union PDType * PDTypeRef
 
typedef struct pd_stackpd_stack
 
typedef struct PDArrayPDArrayRef
 
typedef void(* PDHashIterator) (char *key, void *value, void *userInfo, PDBool *shouldStop)
 
typedef struct PDDictionaryPDDictionaryRef
 
typedef struct PDDictionaryStackPDDictionaryStackRef
 
typedef struct PDFontDictionaryPDFontDictionaryRef
 
typedef struct PDFontPDFontRef
 
typedef struct PDCMapPDCMapRef
 
typedef struct pd_cryptopd_crypto
 
typedef struct PDStaticHashPDStaticHashRef
 
typedef struct PDSplayTreePDSplayTreeRef
 
typedef struct PDSelectionPDSelectionRef
 
typedef PDBool(* PDTextSearchOperatorFunc) (PDSelectionRef selection)
 
typedef struct PDObjectPDObjectRef
 
typedef struct PDPagePDPageRef
 
typedef struct PDParserAttachmentPDParserAttachmentRef
 
typedef struct PDObjectStreamPDObjectStreamRef
 
typedef struct PDContentStreamPDContentStreamRef
 
typedef PDOperatorState(* PDContentOperatorFunc) (PDContentStreamRef cs, void *userInfo, PDArrayRef args, pd_stack inState, pd_stack *outState)
 
typedef PDInteger(* PDInstancePrinter) (void *inst, char **buf, PDInteger offs, PDInteger *cap)
 
typedef struct PDReferencePDReferenceRef
 
typedef struct PDNumberPDNumberRef
 
typedef struct PDStringPDStringRef
 
typedef struct PDPipePDPipeRef
 
typedef struct PDTaskPDTaskRef
 
typedef PDTaskResult(* PDTaskFunc) (PDPipeRef pipe, PDTaskRef task, PDObjectRef object, void *info)
 
typedef struct PDParserPDParserRef
 
typedef struct PDCatalogPDCatalogRef
 
typedef struct PDTwinStreamPDTwinStreamRef
 
typedef struct PDStreamFilterPDStreamFilterRef
 
typedef struct PDEnvPDEnvRef
 
typedef struct PDStatePDStateRef
 
typedef struct PDOperatorPDOperatorRef
 
typedef struct PDScannerPDScannerRef
 
typedef void(* PDScannerBufFunc) (void *info, PDScannerRef scanner, char **buf, PDInteger *size, PDInteger req)
 
typedef void(* PDScannerPopFunc) (PDScannerRef scanner)
 

Enumerations

enum  pd_crypto_method { pd_crypto_method_none = 0, pd_crypto_method_rc4 = 1, pd_crypto_method_aesv2 = 2 }
 
enum  pd_auth_event { pd_auth_event_none = 0, pd_auth_event_docopen = 1 }
 
enum  PDOperatorState { PDOperatorStateIndependent = 0, PDOperatorStatePush = 1, PDOperatorStatePop = 2, PDOperatorStateSeek = 3 }
 
enum  PDInstanceType {
  PDInstanceTypeUnset =-2, PDInstanceTypeUnknown =-1, PDInstanceTypeNull = 0, PDInstanceTypeNumber = 1,
  PDInstanceTypeString = 2, PDInstanceTypeArray = 3, PDInstanceTypeDict = 4, PDInstanceTypeRef = 5,
  PDInstanceTypeObj = 6, PDInstanceTypeParser = 7, PDInstanceTypePipe = 8, PDInstanceTypeScanner = 9,
  PDInstanceTypeCStream = 10, PDInstanceTypeOStream = 11, PDInstanceTypeOperator = 12, PDInstanceTypePage = 13,
  PDInstanceTypeParserAtt = 14, PDInstanceTypeTree = 15, PDInstanceTypeState = 16, PDInstanceTypeSFilter = 17,
  PDInstanceTypeTask = 18, PDInstanceType2Stream = 19, PDInstanceTypeXTable = 20, PDInstanceTypeCSOper = 21,
  PDInstanceTypeFontDict = 22, PDInstanceTypeFont = 23, PDInstanceTypeCMap = 24, PDInstanceTypePSExec = 25,
  PDInstanceTypeDictStack = 26, PDInstanceType__SIZE = 27
}
 
enum  PDObjectType {
  PDObjectTypeNull = 0, PDObjectTypeUnknown = 1, PDObjectTypeBoolean, PDObjectTypeInteger,
  PDObjectTypeReal, PDObjectTypeName, PDObjectTypeString, PDObjectTypeArray,
  PDObjectTypeDictionary, PDObjectTypeStream, PDObjectTypeReference, PDObjectTypeSize
}
 
enum  PDObjectClass { PDObjectClassRegular = 1, PDObjectClassCompressed = 2, PDObjectClassTrailer = 3 }
 
enum  PDStringType { PDStringTypeEscaped = 1, PDStringTypeHex = 2, PDStringTypeBinary = 3, PDStringTypeName = 4 }
 
enum  PDStringEncoding {
  PDStringEncodingDefault = 0, PDStringEncodingASCII = 1, PDStringEncodingUTF8 = 2, PDStringEncodingUTF16BE = 3,
  PDStringEncodingUTF16LE = 4, PDStringEncodingUTF32 = 5, PDStringEncodingMacRoman = 6, PDStringEncodingEUCJP = 7,
  PDStringEncodingSHIFTJIS = 8, PDStringEncodingISO8859_1 = 9, PDStringEncodingISO8859_2 = 10, PDStringEncodingCP1251 = 11,
  PDStringEncodingCP1252 = 12, PDStringEncodingCP1253 = 13, PDStringEncodingCP1254 = 14, PDStringEncodingCP1250 = 15,
  PDStringEncodingISO2022JP = 16, __PDSTRINGENC_END = 16, PDStringEncodingCustom = 998, PDStringEncodingUndefined = 999
}
 
enum  PDFType {
  PDFTypePage = 1, PDFTypePages, PDFTypeCatalog, PDFTypeAnnot,
  PDFTypeFont, PDFTypeFontDescriptor, PDFTypeAction, _PDFTypeCount
}
 
enum  PDPropertyType {
  PDPropertyObjectId = 1, PDPropertyRootObject, PDPropertyInfoObject, PDPropertyPDFType,
  PDPropertyPage
}
 
enum  PDTaskResult { PDTaskFailure = -1, PDTaskDone = 0, PDTaskSkipRest = 1, PDTaskUnload = 2 }
 
enum  PDTwinStreamMethod { PDTwinStreamReadWrite, PDTwinStreamRandomAccess, PDTwinStreamReversed }
 
enum  PDPredictorType {
  PDPredictorNone = 1, PDPredictorTIFF2 = 2, PDPredictorPNG_NONE = 10, PDPredictorPNG_SUB = 11,
  PDPredictorPNG_UP = 12, PDPredictorPNG_AVG = 13, PDPredictorPNG_PAE = 14, PDPredictorPNG_OPT = 15
}
 
enum  PDOperatorType {
  PDOperatorPushState = 1, PDOperatorPushWeakState, PDOperatorPopState, PDOperatorPopVariable,
  PDOperatorPopValue, PDOperatorPushEmptyString, PDOperatorPushResult, PDOperatorPushComplex,
  PDOperatorStoveComplex, PDOperatorPullBuildVariable, PDOperatorPushbackSymbol, PDOperatorPushbackValue,
  PDOperatorPopLine, PDOperatorReadToDelimiter, PDOperatorMark, PDOperatorPushMarked,
  PDOperatorNOP, PDOperatorBreak
}
 

Functions

void PDNOP (void *)
 
const char * PDStringEncodingToIconvName (PDStringEncoding enc)
 

Variables

PDInstancePrinter PDInstancePrinters []
 

Detailed Description

Definitions for the Pajdeg interface.

Macro Definition Documentation

#define __deprecated

The __deprecated macro should be available.

#define DEBUG_PDTYPES

Adds header to all PDType objects and asserts that an object is a real PDType when retained/released.

Keeping this enabled is recommended, even for production code, unless it's very stable.

#define PD_ASSERTS

Enable internal assertions.

The PD_ASSERTS directive turns on assertions. If something is misbehaving, turning this on is a good idea as it provides a crash point and/or clue as to what's not going right. Enabled implicitly if DEBUG is defined.

#define PD_DEPRECATED (   introduce_version,
  deprecate_version 
)    __deprecated

Deprecation Pseudo-Macro, used to mark functions or methods as deprecated as of a given version. The method also includes a version of introduction, indicating when the given method was added to Pajdeg.

Warning
Deprecations are removed in each major version increment. I.e. if a method -foo: was deprecated in version 0.2.0, it will remain in the code base as a deprecated method through 0.3.0, 0.4.0, ... until 1.0.0, at which point it is removed from the code base completely (thus causing crashes for anyone going from 0.x to 1.0 without addressing deprecations).
Parameters
introduce_versionVersion at which the deprecated method or function was added to Pajdeg
deprecate_versionVersion at which the deprecated method or function was first deprecated
#define PD_SUPPORT_CRYPTO

Support cryptography in PDFs. Currently includes RC4/MD5, but not AES.

#define PD_SUPPORT_ZLIB

Support zlib compression for filters.

#define PD_WARNINGS

Show internal warnings on stderr.

The PD_WARNINGS directive turns on printing of warnings to stderr. Enabled implicitly if DEBUG is defined.