home *** CD-ROM | disk | FTP | other *** search
-
- /* HEADER FILE *****************************************************
- * WTDEF.H - Writing Tools API definitions for client and writing
- * tool use. Platform Independent Information.
- *******************************************************************
- * Copyright (C) 1992, 1993 WordPerfect Corp., All Rights Reserved
- *******************************************************************/
- #ifndef WTDEF_H
- #define WTDEF_H
-
- #define WTAPI_VERSION 0x0006 /* hi byte = major, low byte = minor */
-
- /* DEFINITIONS FOR API MESSAGES */
-
- /* ENUMERATED TYPES */
-
- typedef enum { /* Writing tool message identifiers */
- WTC_NOMESSAGE, /* 00 Message #0 is not an API message */
- WTC_RQINIT, /* 01 request API initialization */
- WTC_INIT, /* 02 initialize API communication */
- WTQ_INFOBLOCK, /* 03 request the client infoblock */
- WTR_INFOBLOCK, /* 04 return the infoblock */
- WTQ_UNITINFO, /* 05 request text unit info */
- WTR_UNITINFO, /* 06 return unit info */
- WTQ_READTOOLDATA, /* 07 request a tool data area */
- WTR_READTOOLDATA, /* 08 return a tool data area */
- WTQ_WRITETOOLDATA, /* 09 write a tool data area */
- WTR_WRITETOOLDATA, /* 0A acknowledge tool data area write */
- WTQ_TEXTBLOCK, /* 0B request a text block */
- WTQ_NEXTTEXTBLOCK, /* 0C request the next text block */
- WTR_TEXTBLOCK, /* 0D return a text block */
- WTQ_READTEXTOBJECT, /* 0E request a text object */
- WTR_READTEXTOBJECT, /* 0F return a text object */
- WTQ_WRITETEXTOBJECT, /* 10 write a text object */
- WTR_WRITETEXTOBJECT, /* 11 acknowledge text object write */
- WTQ_GOTO, /* 12 goto an API position */
- WTR_GOTO, /* 13 acknowledge new position */
- WTQ_HILITE, /* 14 highlight an area */
- WTR_HILITE, /* 15 acknowledge highlight */
- WTQ_DEHILITE, /* 16 dehighlight an area */
- WTR_DEHILITE, /* 17 acknowledge dehighlight */
- WTQ_REPLACE, /* 18 replace text in a text block */
- WTQ_UNDOREPLACE, /* 19 undo the last replace */
- WTR_REPLACE, /* 1A acknowledge replacement */
- WTC_RQCLACTIVE, /* 1B request client activation */
- WTC_CLACTIVE, /* 1C client was activated */
- WTC_CLINACTIVE, /* 1D client was deactivated */
- WTC_TLINACTIVE, /* 1E tool was deactivated */
- WTQ_TLACTIVE, /* 1F tool was reactivated */
- WTR_TLACTIVE, /* 20 update tool on text query status */
- WTC_RQTLTERM, /* 21 reqest tool termination */
- WTC_TLTERM /* 22 tool termination */
- } WTMSGID;
-
- typedef enum { /* Writing tool status types */
- WTS_OK, /* ok status */
- WTS_NOMEMORY, /* not enough memory */
- WTS_COMERROR, /* error in WTAPI communication */
- WTS_BADREQUEST, /* bad API request message */
- WTS_APIERROR = WTS_BADREQUEST, /* use WTS_BADREQUEST instead */
- WTS_CLIENTERROR, /* client internal error */
- WTS_USER, /* user intervention */
- WTS_QUITAPI, /* termination requested */
- WTS_TOOLBUSY, /* writing tool is busy */
- WTS_NOTSUPPORTED /* API request not supported */
- } WTSTATUS;
-
- typedef enum { /* Writing tool Boolean types */
- WT_FALSE, /* false condition or flag */
- WT_TRUE /* true condition or flag */
- } WTBOOL;
-
- typedef enum { /* Writing tool positioning methods */
- WTP_REL, /* relative positioning */
- WTP_BEG, /* positioning from the block begin */
- WTP_END /* positioning from the block end */
- } WTPOS;
-
- typedef enum { /* Writing tool execution modes */
- WTM_NORMAL, /* Normal execution */
- WTM_SETUP, /* Setup mode */
- WTM_HELP /* Help mode */
- } WTMODE;
-
- typedef enum { /* Writing tool types */
- WTT_DEFAULT, /* default writing tool type */
- WTT_SPELLER, /* spell checking */
- WTT_THESAURUS, /* thesaurus lookup */
- WTT_GRAMMAR, /* grammar checking */
- WTT_DICTIONARY, /* definitional dictionary */
- WTT_HYPHENATION, /* word hyphenation */
- WTT_STATISTICS, /* statistical analysis */
- WTT_PHONETIC, /* phonetic analysis */
- WTT_SYNTAX, /* syntactical analysis/compilation */
- WTT_INPUT, /* input method */
- WTT_TRANSLATOR /* language translation */
- } WTTOOL;
-
- typedef enum { /* Types of text block queries */
- WTB_INIT, /* initialize a new query */
- WTB_RESUME, /* resume the query in progress */
- WTB_EXTEND, /* extend the query lower bound */
- WTB_ROLLBACK /* roll the query back to a block */
- } WTTBQTYPE;
-
- typedef enum { /* End of TEXTBLOCK query causes */
- WTE_FULL, /* text block buffer is full */
- WTE_ENDQUERY, /* end of the query was reached */
- WTE_NEWCONTAINER, /* starting a nested container */
- WTE_ENDCONTAINER, /* end of current text container */
- WTE_LANGCHANGE, /* language change encountered */
- WTE_ERROR /* error encountered */
- } WTENDBLOCK;
-
-
- /* WTDAMODE -- Writing tool data storage modes */
- #define WTD_PRODUCT 0x0001 /* product area */
- #define WTD_DOCUMENT 0x0002 /* document area */
- #define WTD_CURSOR 0x0004 /* at the cursor */
- #define WTD_VISIBLE 0x0008 /* tool data is visible */
- #define WTD_TEMPORARY 0x0010 /* tool data is temporary */
- #define WTD_START 0x0020 /* start of tool data */
- #define WTD_END 0x0040 /* end of tool data */
-
- /* WTTEXT -- writing tool text types */
- #define WTX_NATIVE 0x00000001 /* native operating system format */
- #define WTX_STYLE 0x00000002 /* native with style information */
- #define WTX_UNICODE 0x00000004 /* Unicode */
- /* reserved 0x00000008 */
- #define WTX_WPWRD 0x00000010 /* WordPerfect word string format */
- #define WTX_WP6 0x00000020 /* WordPerfect 6.x document format */
- /* reserved 0x00000040 */
- /* reserved 0x00000080 */
- #define WTX_RTF 0x00000100 /* Microsoft RTF */
-
- /* WTUNIT -- writing tool text units */
- #define WTU_DEFUNIT 0x00000000 /* default client text unit */
- #define WTU_SELECTION 0x00000001 /* user-selected text */
- #define WTU_CHAR 0x00000002 /* character unit */
- #define WTU_WORD 0x00000004 /* word unit */
- #define WTU_LINE 0x00000008 /* line unit */
- #define WTU_SENTENCE 0x00000010 /* sentence unit */
- #define WTU_PARAGRAPH 0x00000020 /* paragraph unit */
- #define WTU_PAGE 0x00000040 /* page unit */
- #define WTU_DOCUMENT 0x00000080 /* document unit */
- #define WTU_ENTRYBOX 0x00000100 /* text entry box unit */
-
- /* WTACTION -- Action to be taken by writing tool */
- #define WTA_SUSPEND 0x0000 /* suspend writing tool session */
- #define WTA_RESUME 0x0001 /* resume writing tool session */
- #define WTA_FRONT 0x0000 /* stay in front of the client window */
- #define WTA_BACK 0x0002 /* move in back of the client window */
- #define WTA_SHOW 0x0000 /* show the writing tool window */
- #define WTA_HIDE 0x0004 /* hide the window */
- #define WTA_WINDOW 0x0000 /* tool should appear as a window */
- #define WTA_ICON 0x0008 /* tool should appear as an icon */
-
- /* WTINFO -- Info that needs to be resent after writing tool becomes active */
- #define WTI_INFOBLOCK 0x0001 /* INFOBLOCK needs to be resent */
- #define WTI_UNITINFO 0x0002 /* UNITINFO needs to be resent */
-
- #endif /* WTDEF_H */
-