dpsprivate.h revision 824
294N/A/*
294N/A * dpsprivate.h -- Private interface for the DPS client library implementation.
787N/A *
787N/A * (c) Copyright 1988-1994 Adobe Systems Incorporated.
294N/A * All rights reserved.
294N/A *
787N/A * Permission to use, copy, modify, distribute, and sublicense this software
787N/A * and its documentation for any purpose and without fee is hereby granted,
787N/A * provided that the above copyright notices appear in all copies and that
787N/A * both those copyright notices and this permission notice appear in
294N/A * supporting documentation and that the name of Adobe Systems Incorporated
294N/A * not be used in advertising or publicity pertaining to distribution of the
294N/A * software without specific, written prior permission. No trademark license
294N/A * to use the Adobe trademarks is hereby granted. If the Adobe trademark
294N/A * "Display PostScript"(tm) is used to describe this software, its
294N/A * functionality or for any other purpose, such use shall be limited to a
294N/A * statement that this software works in conjunction with the Display
787N/A * PostScript system. Proper trademark attribution to reflect Adobe's
787N/A * ownership of the trademark shall be given whenever any such reference to
787N/A * the Display PostScript system is made.
787N/A *
294N/A * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
294N/A * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
294N/A * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
294N/A * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
294N/A * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
294N/A * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
294N/A * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
787N/A * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
787N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
787N/A * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
294N/A *
294N/A * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
294N/A * Incorporated which may be registered in certain jurisdictions
787N/A *
294N/A * Author: Adobe Systems Incorporated
294N/A */
294N/A
294N/A#ifndef DPSPRIVATE_H
294N/A#define DPSPRIVATE_H
294N/A
294N/A#include "DPS/dpsconfig.h"
294N/A#include "DPS/dpsclient.h"
294N/A
787N/Atypedef enum {
787N/A dps_hiFirst, dps_loFirst
294N/A } DPSByteOrder;
294N/A
294N/Atypedef enum {
294N/A dps_ieee, dps_native
294N/A } DPSNumFormat;
787N/A
787N/Atypedef void (*DPSClientPrintProc)(
294N/A DPSContext /* cid */,
787N/A char * /* buf */,
294N/A unsigned int /* count */);
787N/A /* Call-back procedure to handle output from the PostScript server for
787N/A context with id 'cid'. Passed to DPSServicePostScript.
294N/A 'buf' contains 'count' bytes. */
294N/A
787N/Aextern void DPSInitClient(
787N/A DPSTextProc textProc,
787N/A void (* /* releaseProc */) (char *, char *));
787N/A/* Initialize the environment-specific parts of the client library */
787N/A
787N/A#ifndef DPSDefaultProgramEncoding
787N/A#define DPSDefaultProgramEncoding dps_binObjSeq
787N/A#endif /* not DPSDefaultProgramEncoding */
787N/A
294N/A#ifndef DPSDefaultByteOrder
294N/A#if SWAPBITS
787N/A#define DPSDefaultByteOrder dps_loFirst
294N/A#else /* SWAPBITS */
294N/A#define DPSDefaultByteOrder dps_hiFirst
294N/A#endif /* SWAPBITS */
294N/A#endif /* DPSDefaultByteOrder */
787N/A
294N/A#ifndef DPSDefaultNumFormat
294N/A#if IEEEFLOAT
294N/A#define DPSDefaultNumFormat dps_ieee
787N/A#else /* IEEEFLOAT */
294N/A#define DPSDefaultNumFormat dps_native
294N/A#endif /* IEEEFLOAT */
294N/A#endif /* not DPSDefaultNumFormat */
787N/A
294N/A#ifndef DPSDefaultNameEncoding
294N/A#define DPSDefaultNameEncoding dps_indexed
294N/A#endif /* not DPSDefaultNameEncoding */
294N/A
787N/Aextern void DPSCheckRaiseError(DPSContext c);
294N/A /* Checks the resynching flag in a DPSPrivContext and raises an exception
294N/A if true */
787N/A
787N/A/* system name table boundaries */
787N/A#define DPS_LAST_COMMON_SYSNAME 212
787N/A#define DPS_FIRST_AUX_SYSNAME 256
787N/A#define DPS_LAST_AUX_SYSNAME 427
787N/A
787N/Aextern char **DPSSysNames;
294N/Aextern char **DPSSysNamesAux;
294N/A
787N/A /* System name tables. DPSSysNames[index] is the string for the name.
787N/A DPSSysNamesAux[index - DPS_FIRST_AUX_SYSNAME] is the string
787N/A for an uncommon system name. */
787N/A
787N/Aextern int DPSInitialize(void);
787N/Aextern void DPSInitSysNames(void);
294N/A
294N/Aextern char *DPSSetWh(DPSContext /* ctxt */, char * /* newWh */);
294N/A /* set new window handle, returns old window handle */
294N/A
294N/Aextern void DPSOutOfMemory(void);
294N/A /*
294N/A This is called by the DPS software when it cannot allocate any more
294N/A storage from the heap (e.g., when malloc returns NIL).
787N/A
787N/A MAC ONLY
787N/A DPSOutOfMemory calls CantHappen (see dpsexcept.h) unless you
787N/A have used DPSSetOutOfMemoryProc to establish a different procedure
787N/A to be called, in which case DPSOutOfMemory calls your procedure instead.
294N/A If your procedure returns, DPSOutOfMemory returns to its caller, which
787N/A re-attempts the allocation. Note that another allocation failure will
787N/A cause DPSOutOfMemory to be called again (and again ...).
787N/A
787N/A */
294N/A
294N/A#endif /* DPSPRIVATE_H */
294N/A