home *** CD-ROM | disk | FTP | other *** search
-
- /* HEADER FILE *****************************************************
- * WTCOMM.H - Writing Tools API Communication Header File.
- *******************************************************************
- * Copyright (C) 1993 WordPerfect Corp., All Rights Reserved
- *******************************************************************/
- #ifndef WTCOMM_H
- #define WTCOMM_H
-
- #include <wtapi.h>
-
- #define MAXBLOCKSIZE 1024
- #define MAXBLOCKCNT 50
-
- typedef int (*FUNCP)(); /* pointer to function which returns an int */
-
- typedef enum {
- PIPE_OK = 0, /* pipe read/write was successful */
- PIPE_DOWN, /* pipe read/write failed, pipe has gone down */
- PIPE_NOMEM, /* pipe read/write failed, not enough memory */
- PIPE_ERROR /* pipe read/write failed, unknown error */
- } PIPE_ERRS;
-
- typedef enum {
- WTAPI_CLIENT_COMMAND, /* Command sent by a client */
- WTAPI_CLIENT_QUERY, /* Query sent by a client */
- WTAPI_TOOL_COMMAND, /* Command sent by a tool */
- WTAPI_TOOL_QUERY, /* Query sent by a tool */
- QUIT, /* Quit */
- REPLY, /* Reply to a sent message */
- INVOKE_DIALOG, /* Bring up a dialog */
- QUERY, /* Get info about product */
- END_MSG_TYPES /* End of message types */
- } MSG_TYPE;
-
- typedef enum {
- MSG_SEND,
- MSG_SEND_MODAL,
- MSG_SEND_REQUEST
- } SEND_TYPE;
-
- typedef enum {
- MSG_OK,
- MSG_CANT_DELIVER,
- MSG_CANT_RECEIVE,
- MSG_NOMEM,
- MSG_ERROR
- } MSG_ERRS;
-
- typedef struct {
- WTMSGID inmsgid;
- WTSIZE inmsgsize;
- WTSIZE inbufsize;
- WTMSGID rtmsgid;
- WTSIZE rtmsgsize;
- WTSIZE rtbufsize;
- } WTMSGHEADER, *WTMSGHEADERP;
-
- typedef struct { /* TEXTBLOCK query structure */
- unsigned offset; /* offset of text */
- unsigned len; /* len of text */
- } TQCONTEXT, *TQPTR;
-
- typedef struct {
- WTCOMM commid; /* communication id (platform-specific) */
- WTTOOL toolType; /* type of writing tool */
- WTTEXT textmode; /* text transmission mode */
- unsigned version; /* version of API communication */
- unsigned service; /* writing tool service number */
- char rtText[MAXBLOCKSIZE]; /* block for returning data */
- TQCONTEXT textInfo[MAXBLOCKCNT];
- int lastBlock;
- int currBlock;
- unsigned absPos;
- WTUNIT tounit;
- WTPOS topos;
- WTCOUNT toloc;
- } WTCONTEXT, *WTPTR;
-
- #endif /* WTCOMM_H */
-