home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks2 / DPSClient.framework / Headers / dpsOpenStep.h < prev    next >
Text File  |  1995-12-21  |  4KB  |  173 lines

  1. /*
  2.     dpsOpenStep.h
  3.     
  4.     DPS routines specific to the OpenStep implementation of dpsclient.
  5.     This API is part of OpenStep.
  6.     
  7.     Copyright (c) 1994 NeXT, Inc. as an unpublished work.
  8.     All rights reserved.
  9. */
  10.  
  11. #ifndef DPSOPENSTEP_H
  12. #define DPSOPENSTEP_H
  13.  
  14. #import "dpsclient.h"
  15. #import <Foundation/Foundation.h>
  16.  
  17. /* === Exception names === */
  18.  
  19. extern NSString *DPSPostscriptErrorException;
  20. extern NSString *DPSNameTooLongException;
  21. extern NSString *DPSResultTagCheckException;
  22. extern NSString *DPSResultTypeCheckException;
  23. extern NSString *DPSInvalidContextException;
  24. extern NSString *DPSSelectException;
  25. extern NSString *DPSConnectionClosedException;
  26. extern NSString *DPSReadException;
  27. extern NSString *DPSWriteException;
  28. extern NSString *DPSInvalidFDException;
  29. extern NSString *DPSInvalidTEException;
  30. extern NSString *DPSInvalidPortException;
  31. extern NSString *DPSOutOfMemoryException;
  32. extern NSString *DPSCantConnectException;
  33.  
  34. /*=== CONSTANTS ===*/
  35.  
  36. /* operation types for composite operators */
  37. typedef enum _NSCompositingOperation {
  38.     NSCompositeClear        = 0,
  39.     NSCompositeCopy        = 1,
  40.     NSCompositeSourceOver    = 2,
  41.     NSCompositeSourceIn        = 3,
  42.     NSCompositeSourceOut    = 4,
  43.     NSCompositeSourceAtop    = 5,
  44.     NSCompositeDestinationOver    = 6,
  45.     NSCompositeDestinationIn    = 7,
  46.     NSCompositeDestinationOut    = 8,
  47.     NSCompositeDestinationAtop    = 9,
  48.     NSCompositeXOR        = 10,
  49.     NSCompositePlusDarker    = 11,
  50.     NSCompositeHighlight    = 12,
  51.     NSCompositePlusLighter    = 13
  52. } NSCompositingOperation;
  53.  
  54. /* special values for alpha */
  55. enum {
  56.     NSAlphaEqualToData        = 1,
  57.     NSAlphaAlwaysOne        = 2
  58. };
  59.  
  60. /* types of window backing store */
  61. typedef enum _NSBackingStoreType {
  62.     NSBackingStoreRetained     = 0,
  63.     NSBackingStoreNonretained     = 1,
  64.     NSBackingStoreBuffered     = 2
  65. } NSBackingStoreType;
  66.  
  67. /* ways to order windows */
  68. typedef enum _NSWindowOrderingMode {
  69.     NSWindowAbove         =  1,
  70.     NSWindowBelow         = -1,
  71.     NSWindowOut             =  0
  72. } NSWindowOrderingMode;
  73.  
  74.  
  75. typedef enum _DPSNumberFormat {
  76. #ifdef __BIG_ENDIAN__
  77.     dps_float = 48,
  78.     dps_long = 0,
  79.     dps_short = 32
  80. #else
  81.     dps_float = 48+128,
  82.     dps_long = 0+128,
  83.     dps_short = 32+128
  84. #endif
  85. } DPSNumberFormat;
  86.   /* Constants for DPSDoUserPath describing what type of coordinates are
  87.      being used.  Other legal values are:
  88.  
  89.      For 32-bit fixed point numbers, use dps_long plus the number of bits
  90.      in the fractional part.
  91.  
  92.      For 16-bit fixed point numbers, use dps_short plus the number of bits
  93.      in the fractional part.
  94.   */
  95.  
  96. typedef enum _DPSUserPathOp {
  97.     dps_setbbox = 0,
  98.     dps_moveto,
  99.     dps_rmoveto,
  100.     dps_lineto,
  101.     dps_rlineto,
  102.     dps_curveto,
  103.     dps_rcurveto,
  104.     dps_arc,
  105.     dps_arcn,
  106.     dps_arct,
  107.     dps_closepath,
  108.     dps_ucache
  109. } DPSUserPathOp;
  110.   /* Constants for constructing operator array parameter of DPSDoUserPath. */
  111.  
  112. typedef enum _DPSUserPathAction {
  113.     dps_uappend = 176,
  114.     dps_ufill = 179,
  115.     dps_ueofill = 178,
  116.     dps_ustroke = 183,
  117.     dps_ustrokepath = 364,
  118.     dps_inufill = 93,
  119.     dps_inueofill = 92,
  120.     dps_inustroke = 312,
  121.     dps_def = 51,
  122.     dps_put = 120
  123. } DPSUserPathAction;
  124.   /* Constants for the action of DPSDoUserPath.  In addition to these, any
  125.      other system name index may be used.
  126.    */
  127.  
  128. /* a userobject that can be used to pass a PostScript "null" */
  129. enum {
  130.     DPSNullObject = 1
  131. };
  132.  
  133. /*=== PROCEDURES ===*/
  134.  
  135. extern void DPSFlush(void);
  136.   /* Flushes the current connection */
  137.  
  138. extern void PSWait(void);
  139.   /* Flushes the current connection, waits for acknowledgement */
  140.  
  141. extern int DPSDefineUserObject(int index);
  142.   /* Maps a PostScript object to a user object index.  If index is 0, a new
  143.      userobject index is allocated;  otherwise the supplied index is used.
  144.      In either case, the new index for the object is returned.  This index
  145.      can be passed to a pswrap generated function taking a "userobject"
  146.      parameter.  This routine should be called with the object that is
  147.      to be indexed on the top of the operand stack.
  148.   */
  149.  
  150. extern void DPSUndefineUserObject(int index);
  151.   /* Unmaps a previously created user object. */
  152.  
  153. extern void DPSDoUserPath(  
  154.     void *coords,
  155.     int numCoords,
  156.     DPSNumberFormat numType,
  157.     unsigned char *ops,
  158.     int numOps,
  159.     void *bbox,
  160.     int action);
  161.  
  162. extern void DPSDoUserPathWithMatrix(  
  163.     void *coords,
  164.     int numCoords,
  165.     DPSNumberFormat numType,
  166.     unsigned char *ops,
  167.     int numOps,
  168.     void *bbox,
  169.     int action,
  170.     float matrix[6]);
  171.  
  172. #endif DPSOPENSTEP_H
  173.