home *** CD-ROM | disk | FTP | other *** search
- /*
- dpsOpenStep.h
-
- DPS routines specific to the OpenStep implementation of dpsclient.
- This API is part of OpenStep.
-
- Copyright (c) 1994 NeXT, Inc. as an unpublished work.
- All rights reserved.
- */
-
- #ifndef DPSOPENSTEP_H
- #define DPSOPENSTEP_H
-
- #import "dpsclient.h"
- #import <Foundation/Foundation.h>
-
- /* === Exception names === */
-
- extern NSString *DPSPostscriptErrorException;
- extern NSString *DPSNameTooLongException;
- extern NSString *DPSResultTagCheckException;
- extern NSString *DPSResultTypeCheckException;
- extern NSString *DPSInvalidContextException;
- extern NSString *DPSSelectException;
- extern NSString *DPSConnectionClosedException;
- extern NSString *DPSReadException;
- extern NSString *DPSWriteException;
- extern NSString *DPSInvalidFDException;
- extern NSString *DPSInvalidTEException;
- extern NSString *DPSInvalidPortException;
- extern NSString *DPSOutOfMemoryException;
- extern NSString *DPSCantConnectException;
-
- /*=== CONSTANTS ===*/
-
- /* operation types for composite operators */
- typedef enum _NSCompositingOperation {
- NSCompositeClear = 0,
- NSCompositeCopy = 1,
- NSCompositeSourceOver = 2,
- NSCompositeSourceIn = 3,
- NSCompositeSourceOut = 4,
- NSCompositeSourceAtop = 5,
- NSCompositeDestinationOver = 6,
- NSCompositeDestinationIn = 7,
- NSCompositeDestinationOut = 8,
- NSCompositeDestinationAtop = 9,
- NSCompositeXOR = 10,
- NSCompositePlusDarker = 11,
- NSCompositeHighlight = 12,
- NSCompositePlusLighter = 13
- } NSCompositingOperation;
-
- /* special values for alpha */
- enum {
- NSAlphaEqualToData = 1,
- NSAlphaAlwaysOne = 2
- };
-
- /* types of window backing store */
- typedef enum _NSBackingStoreType {
- NSBackingStoreRetained = 0,
- NSBackingStoreNonretained = 1,
- NSBackingStoreBuffered = 2
- } NSBackingStoreType;
-
- /* ways to order windows */
- typedef enum _NSWindowOrderingMode {
- NSWindowAbove = 1,
- NSWindowBelow = -1,
- NSWindowOut = 0
- } NSWindowOrderingMode;
-
-
- typedef enum _DPSNumberFormat {
- #ifdef __BIG_ENDIAN__
- dps_float = 48,
- dps_long = 0,
- dps_short = 32
- #else
- dps_float = 48+128,
- dps_long = 0+128,
- dps_short = 32+128
- #endif
- } DPSNumberFormat;
- /* Constants for DPSDoUserPath describing what type of coordinates are
- being used. Other legal values are:
-
- For 32-bit fixed point numbers, use dps_long plus the number of bits
- in the fractional part.
-
- For 16-bit fixed point numbers, use dps_short plus the number of bits
- in the fractional part.
- */
-
- typedef unsigned char DPSUserPathOp;
- enum {
- dps_setbbox = 0,
- dps_moveto,
- dps_rmoveto,
- dps_lineto,
- dps_rlineto,
- dps_curveto,
- dps_rcurveto,
- dps_arc,
- dps_arcn,
- dps_arct,
- dps_closepath,
- dps_ucache
- };
- /* Constants for constructing operator array parameter of DPSDoUserPath. */
-
- typedef enum _DPSUserPathAction {
- dps_uappend = 176,
- dps_ufill = 179,
- dps_ueofill = 178,
- dps_ustroke = 183,
- dps_ustrokepath = 364,
- dps_inufill = 93,
- dps_inueofill = 92,
- dps_inustroke = 312,
- dps_def = 51,
- dps_put = 120
- } DPSUserPathAction;
- /* Constants for the action of DPSDoUserPath. In addition to these, any
- other system name index may be used.
- */
-
- /* a userobject that can be used to pass a PostScript "null" */
- enum {
- DPSNullObject = 1
- };
-
- /*=== PROCEDURES ===*/
-
- extern void PSFlush(void);
- /* Flushes the current connection */
-
- extern void PSWait(void);
- /* Flushes the current connection, waits for acknowledgement */
-
- extern void PSDoUserPath(
- const void *coords,
- int numCoords,
- DPSNumberFormat numType,
- const DPSUserPathOp *ops,
- int numOps,
- const void *bbox,
- DPSUserPathAction action);
- extern void DPSDoUserPath(
- DPSContext context,
- const void *coords,
- int numCoords,
- DPSNumberFormat numType,
- const DPSUserPathOp *ops,
- int numOps,
- const void *bbox,
- DPSUserPathAction action);
- extern void PSDoUserPathWithMatrix(
- const void *coords,
- int numCoords,
- DPSNumberFormat numType,
- const DPSUserPathOp *ops,
- int numOps,
- const void *bbox,
- DPSUserPathAction action,
- float matrix[6]);
- extern void DPSDoUserPathWithMatrix(
- DPSContext context,
- const void *coords,
- int numCoords,
- DPSNumberFormat numType,
- const DPSUserPathOp *ops,
- int numOps,
- const void *bbox,
- DPSUserPathAction action,
- float matrix[6]);
- /* Sends a user path to the window server and one other operator. See DPS
- extensions documentation on encoded user paths.
- Matrix represents the optional matrix argument used by the ustroke,
- inustroke and ustrokepath operators. If matrix is NULL, it is ignored.
- */
-
- #endif DPSOPENSTEP_H
-