home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / dpsOpenStep.h < prev    next >
Text File  |  1995-12-21  |  5KB  |  185 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 unsigned char DPSUserPathOp;
  97. enum {
  98.     dps_setbbox = 0,
  99.     dps_moveto,
  100.     dps_rmoveto,
  101.     dps_lineto,
  102.     dps_rlineto,
  103.     dps_curveto,
  104.     dps_rcurveto,
  105.     dps_arc,
  106.     dps_arcn,
  107.     dps_arct,
  108.     dps_closepath,
  109.     dps_ucache
  110. };
  111.   /* Constants for constructing operator array parameter of DPSDoUserPath. */
  112.  
  113. typedef enum _DPSUserPathAction {
  114.     dps_uappend = 176,
  115.     dps_ufill = 179,
  116.     dps_ueofill = 178,
  117.     dps_ustroke = 183,
  118.     dps_ustrokepath = 364,
  119.     dps_inufill = 93,
  120.     dps_inueofill = 92,
  121.     dps_inustroke = 312,
  122.     dps_def = 51,
  123.     dps_put = 120
  124. } DPSUserPathAction;
  125.   /* Constants for the action of DPSDoUserPath.  In addition to these, any
  126.      other system name index may be used.
  127.    */
  128.  
  129. /* a userobject that can be used to pass a PostScript "null" */
  130. enum {
  131.     DPSNullObject = 1
  132. };
  133.  
  134. /*=== PROCEDURES ===*/
  135.  
  136. extern void PSFlush(void);
  137.   /* Flushes the current connection */
  138.  
  139. extern void PSWait(void);
  140.   /* Flushes the current connection, waits for acknowledgement */
  141.  
  142. extern void PSDoUserPath(  
  143.     const void *coords,
  144.     int numCoords,
  145.     DPSNumberFormat numType,
  146.     const DPSUserPathOp *ops,
  147.     int numOps,
  148.     const void *bbox,
  149.     DPSUserPathAction action);
  150. extern void DPSDoUserPath(
  151.     DPSContext context,
  152.     const void *coords,
  153.     int numCoords,
  154.     DPSNumberFormat numType,
  155.     const DPSUserPathOp *ops,
  156.     int numOps,
  157.     const void *bbox,
  158.     DPSUserPathAction action);
  159. extern void PSDoUserPathWithMatrix(  
  160.     const void *coords,
  161.     int numCoords,
  162.     DPSNumberFormat numType,
  163.     const DPSUserPathOp *ops,
  164.     int numOps,
  165.     const void *bbox,
  166.     DPSUserPathAction action,
  167.     float matrix[6]);
  168. extern void DPSDoUserPathWithMatrix(
  169.     DPSContext context,
  170.     const void *coords,
  171.     int numCoords,
  172.     DPSNumberFormat numType,
  173.     const DPSUserPathOp *ops,
  174.     int numOps,
  175.     const void *bbox,
  176.     DPSUserPathAction action,
  177.     float matrix[6]);
  178.   /* Sends a user path to the window server and one other operator.  See DPS
  179.      extensions documentation on encoded user paths.
  180.      Matrix represents the optional matrix argument used by the ustroke,
  181.      inustroke and ustrokepath operators. If matrix is NULL, it is ignored.
  182.    */
  183.  
  184. #endif DPSOPENSTEP_H
  185.