Synopsis:
typedef struct _t_DPSContextRec {
char *priv;
DPSSpacespace;
DPSProgramEncodingprogramEncoding;
DPSNameEncodingnameEncoding;
struct _t_DPSProcsRec const *procs;
void (*textProc)();
void (*errorProc)();
DPSResultsresultTable;
unsigned intresultTableLength;
struct _t_DPSContextRec *chainParent, *chainChild;
DPSContextTypetype;
}DPSContextRec, *DPSContext;
Description:
The DPSContextRec structure represents a Display PostScript context.
Synopsis:
typedef enum {
dps_machServer,
dps_fdServer,
dps_stream}DPSContextType;
Description:
These represent the context types supported by NeXT's version of Display PostScript, as used in the type field of a DPSContextRec structure.
Synopsis:
typedef enum _DPSErrorCode {
dps_err_ps= DPS_ERROR_BASE,
dps_err_nameTooLong,
dps_err_resultTagCheck,
dps_err_resultTypeCheck,
dps_err_invalidContext,
dps_err_select= DPS_NEXT_ERROR_BASE,
dps_err_connectionClosed,
dps_err_read,
dps_err_write,
dps_err_invalidFD,
dps_err_invalidTE,
dps_err_invalidPort,
dps_err_outOfMemory,
dps_err_cantConnect}DPSErrorCode;
Description:
Error codes passed to a DPSErrorProc() function.
Synopsis:
typedef int (*DPSEventFilterFunc)(NXEvent *ev);
Description:
Call-back function used to filter events.
Synopsis:
typedef void (*DPSFDProc)(int fd, void *userData);
Description:
Call-back function used when a file descriptor is registered through DPSAddFD().
Synopsis:
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
}DPSNumberFormat;
Description:
These constants are used by the DPSDoUserPath() function to describe the type of numbers that are being passed.
Synopsis:
typedef void (*DPSPingProc)
(DPSContext ctxt,
void *userData);
Description:
Call-back function used by DPSAsynchronousWaitContext().
Synopsis:
typedef void (*DPSPortProc)
(msg_header_t *msg,
void *userData);
Description:
Call-back function used when a port is registered through DPSAddPort().
Synopsis:
typedef struct __DPSTimedEntry *DPSTimedEntry;
Description:
The return type for DPSAddTimedEntry().
Synopsis:
typedef void (*DPSTimedEntryProc)
(DPSTimedEntry timedEntry,
double now,
void *userData);
Description:
Call-back function used when a timed entry is registered through DPSAddTimedEntry().
Synopsis:
typedef enum _DPSUserPathAction {
dps_uappend,
dps_ufill,
dps_ueofill,
dps_ustroke,
dps_ustrokepath,
dps_inufill,
dps_inueofill,
dps_inustroke,
dps_def,
dps_put}DPSUserPathAction;
Description:
These constants are convenient representations of some of the PostScript operator indices, suitable for enrollment in the action array passed to DPSDoUserPath().
Synopsis:
typedef enum _DPSUserPathOp {
dps_setbbox,
dps_moveto,
dps_rmoveto,
dps_lineto,
dps_rlineto,
dps_curveto,
dps_rcurveto,
dps_arc,
dps_arcn,
dps_arct,
dps_closepath,
dps_ucache}DPSUserPathOp;
Description:
These constants represent the PostScript operators that can be passed in DPSDoUserPath()'s operator array.
Synopsis:
typedef float NXCoord
Description:
Used to represent a single coordinate in a Cartesian coordinate system.
Synopsis:
typedef struct _NXEvent {
inttype;
NXPointlocation;
longtime;
intflags;
unsigned intwindow;
NXEventDatadata;
DPSContextctxt;
}NXEvent,*NXEventPtr;
Description:
Represents a single event; this structure is also known as the event record. The fields are:
| type | The type of event (see "Event Types," below) |
| location | The event's location in the base coordinate system of its window |
| time | The time of the event (in hardware-dependent units) since system startup |
| flags | Mouse-button and modifier-key flags (see "Event Flags," below) |
| window | The window number of the window associated with the event |
| data | Additional type-specific data (see "NXEventData," below) |
| ctxt | The PostScript context of the event |
Synopsis:
typedef union {
struct {
short eventNum;
int click;
unsigned char pressure;
} mouse;
struct {
short repeat;
unsigned short charSet;
unsigned short charCode;
unsigned short keyCode;
short keyData;
} key;
struct {
short eventNum;
int trackingNum;
int userData;
} tracking;
struct {
short subtype;
union {
float F[2];
long L[2];
short S[4];
char C[8];
} misc;
} compound;
} NXEventData;
Description:
This structure supplies type-specific information for an event. It's a union of four structures, where the type of the event determines which structure is pertinent:
mouse is used for mouse events.
key is used for keyboard events.
tracking is for tracking-rectangle events.
compound is for system-, kit-, and application-defined events.
Synopsis:
typedef struct _NXPoint {
NXCoordx;
NXCoordy;
}NXPoint;
Description:
Represents a point in a Cartesian coordinate system.
Synopsis:
typedef struct _NXSize {
NXCoordwidth;
NXCoordheight;
}NXSize;
Description:
Represents a two-dimensional size.
Synopsis:
DPS_ALLCONTEXTS
Description:
This constant represents all extant contexts.
Synopsis:
NX_DATA
NX_ONES
Description:
These constants represent alpha values.
Synopsis:
NX_ASCIISET
NX_SYMBOLSET
NX_DINGBATSSET
Description:
These constants represent the values that may occur in the data.key.charSet field of an NXEvent structure.
Synopsis:
NX_CLEAR
NX_COPY
NX_SOVER
NX_SIN
NX_SOUT
NX_SATOP
NX_DOVER
NX_DIN
NX_DOUT
NX_DATOP
NX_XOR
NX_PLUSD
NX_HIGHLIGHT
NX_PLUSL
Description:
These represent the compositing operations used by PScomposite() and the NXImage class.
Synopsis:
DPS_ERROR_BASE
DPS_NEXT_ERROR_BASE
Description:
These constants represent the lowest values for Display PostScript error codes.
| Type | Meaning |
|---|---|
| NX_NULLEVENT | A non-event |
| NX_LMOUSEDOWN | Left mouse-down |
| NX_LMOUSEUP | Left mouse-up |
| NX_LMOUSEDRAGGED | left mouse-dragged |
| NX_MOUSEDOWN | Same as NX_LMOUSEDOWN |
| NX_MOUSEUP | Same as NX_LMOUSEUP |
| NX_MOUSEDRAGGED | Same as NX_LMOUSEDRAGGED |
| NX_RMOUSEDOWN | Right mouse-down |
| NX_RMOUSEUP | Right mouse-up |
| NX_RMOUSEDRAGGED | Right mouse-dragged |
| NX_MOUSEMOVED | Mouse-moved |
| NX_MOUSEENTERED | Mouse-entered |
| NX_MOUSEEXITED | Mouse-exited |
| NX_KEYDOWN | Key-down |
| NX_KEYUP | Key-up event |
| NX_FLAGSCHANGED | Flags-changed |
| NX_KITDEFINED | Application Kit-defined |
| NX_SYSDEFINED | System-defined |
| NX_APPDEFINED | Application-defined |
| NX_TIMER | Timer used for tracking |
| NX_CURSORUPDATE | Cursor tracking |
| NX_JOURNALEVENT | Event used by journaling |
| NX_FIRSTEVENT | The smallest-valued event constant |
| NX_LASTEVENT | The greatest-valued event constant |
| NX_ALLEVENTS | A value that includes all event types |
Description:
These constants represent event types. They're passed as the type field of the NXEvent structure that's created when an event occurs.
Synopsis:
NX_NULLEVENTMASK
NX_LMOUSEDOWNMASK
NX_LMOUSEUPMASK
NX_RMOUSEDOWNMASK
NX_RMOUSEUPMASK
NX_MOUSEMOVEDMASK
NX_LMOUSEDRAGGEDMASK
NX_RMOUSEDRAGGEDMASK
NX_MOUSEENTEREDMASK
NX_MOUSEEXITEDMASK
NX_KEYDOWNMASK
NX_KEYUPMASK
NX_FLAGSCHANGEDMASK
NX_KITDEFINEDMASK
NX_APPDEFINEDMASK
NX_SYSDEFINEDMASK
NX_TIMERMASK
NX_CURSORUPDATEMASK
NX_MOUSEDOWNMASK
NX_MOUSEUPMASK
NX_MOUSEDRAGGEDMASK
NX_JOURNALEVENTMASK
Description:
These masks correspond to the event types defined immediately above. They let you query the type field of an NXEvent structure for the existence of a particular event type.
Synopsis:
NX_FOREVER
Description:
A long, long time. Typically used as the timeout argument to DPSGetEvent().
| Type | Meaning |
|---|---|
| NX_ALPHASHIFTMASK | Shift lock |
| NX_SHIFTMASK | Shift key |
| NX_CONTROLMASK | Control key |
| NX_ALTERNATEMASK | Alt key |
| NX_COMMANDMASK | Command key |
| NX_NUMERICPADMASK | Number pad key |
| NX_HELPMASK | Help key |
| NX_NEXTCTRLKEYMASK | Control key |
| NX_NEXTLSHIFTKEYMASK | Left shift key |
| NX_NEXTRSHIFTKEYMASK | Right shift key |
| NX_NEXTLCMDKEYMASK | Left command key |
| NX_NEXTRCMDKEYMASK | Right command key |
| NX_NEXTLALTKEYMASK | Left alt key |
| NX_NEXTRALTKEYMASK | Right alt key |
Description:
These masks correspond to keyboard states that might be included in an NXEvent structure's flags mask. The masks are grouped as device-independent (NX_ALPHASHIFTMASK through NX_HELPMASK) and device-dependent (all others).
| Type | Meaning |
|---|---|
| NX_STYLUSPROXIMITYMASK | Stylus is in proximity (for tablets) |
| NX_NONCOALSESCEDMASK | Event coalescing disabled |
Description:
These masks correspond to miscellaneous states that might be included in an NXEvent structure's flags mask.
Synopsis:
NX_RETAINED
NX_NONRETAINED
NX_BUFFERED
Description:
These represent the three backing types provided by window devices (and used by the Application Kit's Window objects).
Synopsis:
NX_ABOVE
NX_BELOW
NX_OUT
Description:
These represent the placement of a window device in the screen list.