--- ray/src/hd/rhdisp.h 1997/10/31 10:23:29 3.1 +++ ray/src/hd/rhdisp.h 1997/12/08 18:51:16 3.6 @@ -4,23 +4,25 @@ /* * Header for holodeck display drivers. - * Include after "rholo.h". */ /* display requests */ -#define DR_NEWSET 1 /* new bundle set */ -#define DR_BUNDLE 2 /* bundle request */ -#define DR_ATTEN 3 /* request for attention */ -#define DR_SHUTDOWN 4 /* shutdown request */ +#define DR_NOOP 0 /* to release from vain DR_ATTEN */ +#define DR_BUNDLE 1 /* lone bundle request */ +#define DR_ATTEN 2 /* request for attention */ +#define DR_SHUTDOWN 3 /* shutdown request */ +#define DR_NEWSET 4 /* new bundle set */ #define DR_ADDSET 5 /* add to current set */ -#define DR_DELSET 6 /* delete from current set */ +#define DR_ADJSET 6 /* adjust set quantities */ +#define DR_DELSET 7 /* delete from current set */ /* server responses */ -#define DS_IMMSET 1 /* immediate bundle set */ -#define DS_BUNDLE 2 /* computed bundle */ -#define DS_ACKNOW 3 /* acknowledge request for attention */ -#define DS_SHUTDOWN 4 /* end process and close connection */ -#define DS_ADDHOLO 5 /* register new holodeck */ +#define DS_BUNDLE 8 /* computed bundle */ +#define DS_ACKNOW 9 /* acknowledge request for attention */ +#define DS_SHUTDOWN 10 /* end process and close connection */ +#define DS_ADDHOLO 11 /* register new holodeck */ +#define DS_STARTIMM 12 /* begin immediate bundle set */ +#define DS_ENDIMM 13 /* end immediate bundle set */ /* * Normally, the server channel has priority, with the display process @@ -32,35 +34,36 @@ * Priority returns to normal after the following request. */ +#ifndef BIGREQSIZ +#define BIGREQSIZ 512 /* big request size (bytes) */ +#endif + typedef struct { int2 type; /* message type */ int4 nbytes; /* number of additional bytes */ } MSGHEAD; /* message head */ - /* display request message bodies */ +/* + * The display process is started with three arguments. The first argument + * is the short name of the holodeck file, appropriate for window naming, etc. + * The second and third arguments are the file descriptor numbers assigned to + * the server's standard output and input, respectively. The stdin and stdout + * of the display process are used for normal communication with the server, + * and are connected to pipes going each way. It is entirely appropriate + * for the display process to borrow the server's stdin and stdout for reading + * and writing user commands from the following list. If the standard input + * is not available for reading, then a descriptor of -1 will be passed. + * The standard output will always be available for writing, though it + * may go to /dev/null. + */ - /* DR_NEWSET */ -/* no body */ - /* DR_BUNDLE */ -#define BUNDLE_REQ PACKHEAD - /* DR_ENDSET */ -/* no body */ - /* DR_SHUTDOWN */ -/* no body */ - /* DR_ADDSET */ -/* no body */ + /* user commands */ +#define DC_SETVIEW 0 /* set the view */ +#define DC_GETVIEW 1 /* print the current view */ +#define DC_PAUSE 2 /* pause the current calculation */ +#define DC_RESUME 3 /* resume the calculation */ +#define DC_QUIT 4 /* quit the program */ - /* server response message bodies */ +#define DC_NCMDS 5 /* number of commands */ - /* DS_STARTIMM */ -/* no body */ - /* DS_BUNDLE */ -#define BUNDLE_RES PACKHEAD /* extendable */ - /* DS_ENDIMM */ -/* no body */ - /* DS_SHUTDOWN */ -/* no body */ - /* DS_ADDHOLO */ -#define HOLO_RES HDGRID - /* DS_ACKNOW */ -/* no body */ +#define DC_INIT {"VIEW=","where","pause","resume","quit"}