home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / NSDPSServerContext.h < prev    next >
Text File  |  1995-07-13  |  3KB  |  107 lines

  1. /*
  2.     NSDPSServerContext.h
  3.  
  4.     A DPSContext Object that talks to the NeXT Window Server
  5.     Copyright 1993, NeXT, Inc.
  6.     NeXT, March 1993
  7. */
  8.  
  9. #ifndef STRICT_OPENSTEP
  10.  
  11. #import "NSDPSContext.h"
  12. #import <mach/mach.h>
  13.  
  14. typedef struct _DPSTaggedMsg {
  15.     msg_header_t header;
  16.     msg_type_t type;
  17.     int values[2];
  18. } DPSTaggedMsg;
  19.   /* Start of a message passed to DPSSendTaggedMsg. */
  20.  
  21. @interface NSDPSServerContext : NSDPSContext {
  22.   /* data being parsed, NULL if no valid data */
  23.     char *bufStart;
  24.   /* size of buffer we're parsing if data was ooline, 0 if inline */
  25.     int oolineSize;
  26.   /* parsing ptrs into data buffer */
  27.     char *bufCurr;
  28.     char *bufEnd;
  29.   /* filter routine for events */
  30.     void *eventFunc;
  31.   /* dead key events */
  32.     void *deadDownEvent;
  33.     void *deadUpEvent;
  34.   /* port to get PS messages on */
  35.     NSPort *inPort;
  36.   /* port to send PS messages to */
  37.     NSPort *outPort;
  38.   /* set of flags */
  39.     struct {
  40.       /* do we need to get more data from PS? */
  41.     unsigned int needMoreData:1;
  42.       /* should we free the data pointed to by bufStart? */
  43.     unsigned int freeBufStart:1;
  44.       /* has someone done a DPSStartWaitCursorTimer? */
  45.     unsigned int didStartWCTimer:1;
  46.       /* do we owe Window Server a wait cursor ack? */
  47.     unsigned int needsWCAck:1;
  48.       /* perf flag for monitoring Q size */
  49.     unsigned int evQGrowing:1;
  50.     unsigned int pad:7;
  51.       /* pmon sending mode (used by send_data to make pmon events) */
  52.     unsigned int sendMode:4;
  53.     } flags;
  54.   /* port to receive Pings on */
  55.     NSPort *pingPort;
  56.   /* count of last ping we received */
  57.     int lastPingReceived;
  58.   /* the timestamp of the last event we've handed to the app */
  59.     int eventTimeToAck;
  60.   /* the timestamp of the last event we've recevied */
  61.     int lastEventTimeReceived;
  62.   /* ever incrementing count of pings */
  63.     int lastPingSent;
  64.   /* list of asynchronous ping handlers */
  65.     NSMutableArray *asyncPings;
  66.     NSString *hostName;
  67.     NSString *serverName;
  68. }
  69.  
  70. - initWithHostName:(NSString *)hostName serverName:(NSString *)serverName textProc:(DPSTextProc)textProc errorProc:(DPSErrorProc)errorProc timeout:(NSTimeInterval)timeout secure:(BOOL)secureFlag encapsulated:(BOOL)doEncapsulated;
  71.  
  72. - (NSString *)hostName;
  73. - (NSString *)serverName;
  74.  
  75. - (int)sendPort:(NSPort *)port withAllRights:(BOOL)flag;
  76.  
  77. - (int)sendTaggedMsg:(DPSTaggedMsg *)msg;
  78.  
  79. - (void)sendEOF;
  80.  
  81. + (void)setEventCoalescingEnabled:(BOOL)flag;
  82. + (BOOL)isEventCoalescingEnabled;
  83.  
  84. + (void)setDeadKeyProcessingEnabled:(BOOL)flag;
  85. + (BOOL)isDeadKeyProcessingEnabled;
  86.  
  87. + (void)setEventsTraced:(BOOL)flag;
  88. + (BOOL)areEventsTraced;
  89.  
  90. @end
  91.  
  92. extern const char *DPSNameFromTypeAndIndex(short type, int index);
  93.  
  94. extern int DPSDefineUserObject(int index);
  95.   /* Maps a PostScript object to a user object index.  If index is 0, a new
  96.      userobject index is allocated;  otherwise the supplied index is used.
  97.      In either case, the new index for the object is returned.  This index
  98.      can be passed to a pswrap generated function taking a "userobject"
  99.      parameter.  This routine should be called with the object that is
  100.      to be indexed on the top of the operand stack.
  101.   */
  102.  
  103. extern void DPSUndefineUserObject(int index);
  104.   /* Unmaps a previously created user object. */
  105.  
  106. #endif STRICT_OPENSTEP
  107.